shaka-player 4.6.0 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/locales.js +33 -33
- package/dist/shaka-player.compiled.debug.js +254 -253
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +788 -787
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +271 -271
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +870 -869
- package/dist/shaka-player.ui.map +3 -3
- package/lib/dash/dash_parser.js +12 -11
- package/lib/dash/segment_template.js +9 -3
- package/lib/hls/hls_parser.js +9 -3
- package/lib/media/streaming_engine.js +35 -27
- package/lib/player.js +6 -2
- package/package.json +1 -1
- package/test/hls/hls_parser_unit.js +40 -0
package/dist/shaka-player.ui.js
CHANGED
|
@@ -16,17 +16,17 @@ fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(v
|
|
|
16
16
|
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function w(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var ma={a:!0},na={};try{na.__proto__=ma;ka=na.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ja;
|
|
18
18
|
function pa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(oa)oa(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.hk=b.prototype}function qa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function ra(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}qa.prototype.u=function(a){this.h=a};
|
|
19
|
-
function sa(a,b){a.i={Gg:b,Og:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function D(a,b,c){a.g=c;return{value:b}}qa.prototype.F=function(a){this.g=a};function
|
|
20
|
-
function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Og?a.g=a.m||a.j:void 0!=c.F&&a.j<c.F?(a.g=c.F,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new qa;this.h=a}function
|
|
19
|
+
function sa(a,b){a.i={Gg:b,Og:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function D(a,b,c){a.g=c;return{value:b}}qa.prototype.F=function(a){this.g=a};function E(a){a.g=0}function ta(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a,b){a.m=0;a.j=b||0}function va(a,b,c){a.g=b;a.m=c||0}function wa(a,b){a.m=b||0;b=a.i.Gg;a.i=null;return b}function xa(a){a.C=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Og?a.g=a.m||a.j:void 0!=c.F&&a.j<c.F?(a.g=c.F,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new qa;this.h=a}function Ba(a,b){ra(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
|
|
21
21
|
function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Og)throw b.Gg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
|
-
function Ea(a){this.next=function(b){ra(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Da(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.u):(sa(a.g,b),b=Da(a));return b};this.return=function(b){return
|
|
23
|
-
function
|
|
22
|
+
function Ea(a){this.next=function(b){ra(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Da(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.u):(sa(a.g,b),b=Da(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
23
|
+
function K(a){return Fa(new Ea(new za(a)))}function Ga(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
24
|
fa("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=ea.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.C()};b.prototype.I=function(){var g=this;e(function(){if(g.D()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.D=
|
|
27
27
|
function(){if(this.s)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.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=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
28
|
-
b.prototype.J=function(g){var h=this.j();g.
|
|
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=t(g),m=l.next();!m.done;m=l.next())d(m.value).
|
|
28
|
+
b.prototype.J=function(g){var h=this.j();g.Rd(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,q){return"function"==typeof r?function(u){try{l(r(u))}catch(v){m(v)}}:q}var l,m,n=new b(function(r,q){l=r;m=q});this.Rd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Rd=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.s=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Rd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){r[u]=v;q--;0==q&&l(r)}}var r=[],q=0;do r.push(void 0),q++,d(k.value).Rd(n(r.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
31
31
|
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ha(k,g)){var l=new c;ca(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(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ha(k,
|
|
@@ -47,9 +47,9 @@ fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.th
|
|
|
47
47
|
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
|
|
48
48
|
fa("Array.prototype.entries",function(a){return a?a:function(){return Ia(this,function(b,c){return[b,c]})}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ka(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});
|
|
49
49
|
fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
|
|
50
|
-
fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});function Ma(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]}fa("Array.prototype.at",function(a){return a?a:Ma});function
|
|
51
|
-
fa("Uint8Array.prototype.at",
|
|
52
|
-
function M(a,b){a=a.split(".");var c=
|
|
50
|
+
fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});function Ma(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]}fa("Array.prototype.at",function(a){return a?a:Ma});function Oa(a){return a?a:Ma}fa("Int8Array.prototype.at",Oa);
|
|
51
|
+
fa("Uint8Array.prototype.at",Oa);fa("Uint8ClampedArray.prototype.at",Oa);fa("Int16Array.prototype.at",Oa);fa("Uint16Array.prototype.at",Oa);fa("Int32Array.prototype.at",Oa);fa("Uint32Array.prototype.at",Oa);fa("Float32Array.prototype.at",Oa);fa("Float64Array.prototype.at",Oa);fa("String.prototype.at",function(a){return a?a:Ma});var Pa=this||self;
|
|
52
|
+
function M(a,b){a=a.split(".");var c=Pa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
|
|
53
53
|
@license
|
|
54
54
|
Shaka Player
|
|
55
55
|
Copyright 2016 Google LLC
|
|
@@ -58,26 +58,26 @@ function M(a,b){a=a.split(".");var c=Oa;a[0]in c||"undefined"==typeof c.execScri
|
|
|
58
58
|
var shaka={};function N(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
59
59
|
function Qa(a){var b=new N(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}N.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};N.prototype.stopImmediatePropagation=function(){this.g=!0};N.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",N);
|
|
60
60
|
var Ra={kj:"abrstatuschanged",lj:"adaptation",mj:"buffering",nj:"complete",oj:"downloadfailed",pj:"downloadheadersreceived",qj:"drmsessionupdate",sj:"emsg",Ij:"prft",Error:"error",tj:"expirationupdated",uj:"firstquartile",vj:"gapjumped",yj:"keystatuschanged",Aj:"loaded",Bj:"loading",Dj:"manifestparsed",Ej:"manifestupdated",Fj:"mediaqualitychanged",Metadata:"metadata",Gj:"midpoint",Hj:"onstatechange",Kj:"ratechange",Lj:"segmentappended",Mj:"sessiondata",Nj:"stalldetected",Oj:"started",Pj:"statechanged",
|
|
61
|
-
Qj:"streaming",Rj:"textchanged",Sj:"texttrackvisibility",Tj:"thirdquartile",Uj:"timelineregionadded",Vj:"timelineregionenter",Wj:"timelineregionexit",Xj:"trackschanged",Zj:"unloading",bk:"variantchanged"};function Sa(){}function Ta(){}function Ua(){}function Va(a){var b=Ga.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ua.apply(Sa,w(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Wa=new Set;window.console&&(Ua=function(){return console.warn.apply(console,w(Ga.apply(0,arguments)))},Ta=function(){console.error.apply(console,w(Ga.apply(0,arguments)))});function bb(){this.g={}}p=bb.prototype;p.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};p.get=function(a){return(a=this.g[a])?a.slice():null};p.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};p.forEach=function(a){for(var b in this.g)a(b,this.g[b])};p.size=function(){return Object.keys(this.g).length};p.keys=function(){return Object.keys(this.g)};function cb(){this.va=new bb;this.
|
|
61
|
+
Qj:"streaming",Rj:"textchanged",Sj:"texttrackvisibility",Tj:"thirdquartile",Uj:"timelineregionadded",Vj:"timelineregionenter",Wj:"timelineregionexit",Xj:"trackschanged",Zj:"unloading",bk:"variantchanged"};function Sa(){}function Ta(){}function Ua(){}function Va(a){var b=Ga.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ua.apply(Sa,w(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Wa=new Set;window.console&&(Ua=function(){return console.warn.apply(console,w(Ga.apply(0,arguments)))},Ta=function(){console.error.apply(console,w(Ga.apply(0,arguments)))});function bb(){this.g={}}p=bb.prototype;p.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};p.get=function(a){return(a=this.g[a])?a.slice():null};p.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};p.forEach=function(a){for(var b in this.g)a(b,this.g[b])};p.size=function(){return Object.keys(this.g).length};p.keys=function(){return Object.keys(this.g)};function cb(){this.va=new bb;this.ge=this}cb.prototype.addEventListener=function(a,b){this.va&&this.va.push(a,b)};cb.prototype.removeEventListener=function(a,b){this.va&&this.va.remove(a,b)};cb.prototype.dispatchEvent=function(a){if(!this.va)return!0;var b=this.va.get(a.type)||[],c=this.va.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.ge;a.currentTarget=this.ge;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
62
62
|
cb.prototype.release=function(){this.va=null};function db(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function eb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function fb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function gb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
|
|
63
63
|
@license
|
|
64
64
|
Copyright 2008 The Closure Library Authors
|
|
65
65
|
SPDX-License-Identifier: Apache-2.0
|
|
66
66
|
*/
|
|
67
|
-
var
|
|
67
|
+
var jb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
|
68
68
|
@license
|
|
69
69
|
Copyright 2006 The Closure Library Authors
|
|
70
70
|
SPDX-License-Identifier: Apache-2.0
|
|
71
71
|
*/
|
|
72
|
-
function
|
|
73
|
-
p.toString=function(){var a=[],b=this.qb;b&&a.push(
|
|
74
|
-
p.resolve=function(a){var b=this.clone();"data"===b.qb&&(b=new
|
|
75
|
-
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Sa=d:c=""!==a.g.toString();c?
|
|
76
|
-
function
|
|
77
|
-
function
|
|
78
|
-
p.set=function(a,b){
|
|
79
|
-
p.clone=function(){var a=new
|
|
80
|
-
|
|
72
|
+
function kb(a){var b;a instanceof kb?(nb(this,a.qb),this.tc=a.tc,ob(this,a.Db),pb(this,a.Mc),this.Sa=a.Sa,qb(this,a.g.clone()),this.fc=a.fc):a&&(b=String(a).match(jb))?(nb(this,b[1]||"",!0),this.tc=sb(b[2]||""),ob(this,b[3]||"",!0),pb(this,b[4]),this.Sa=sb(b[5]||"",!0),qb(this,b[6]||"",!0),this.fc=sb(b[7]||"")):this.g=new tb(null)}p=kb.prototype;p.qb="";p.tc="";p.Db="";p.Mc=null;p.Sa="";p.fc="";
|
|
73
|
+
p.toString=function(){var a=[],b=this.qb;b&&a.push(ub(b,vb,!0),":");if(b=this.Db){a.push("//");var c=this.tc;c&&a.push(ub(c,vb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Mc;null!=b&&a.push(":",String(b))}if(b=this.Sa)this.Db&&"/"!=b.charAt(0)&&a.push("/"),a.push(ub(b,"/"==b.charAt(0)?wb:xb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fc)&&a.push("#",ub(b,yb));return a.join("")};
|
|
74
|
+
p.resolve=function(a){var b=this.clone();"data"===b.qb&&(b=new kb);var c=!!a.qb;c?nb(b,a.qb):c=!!a.tc;c?b.tc=a.tc:c=!!a.Db;c?ob(b,a.Db):c=null!=a.Mc;var d=a.Sa;if(c)pb(b,a.Mc);else if(c=!!a.Sa){if("/"!=d.charAt(0))if(this.Db&&!this.Sa)d="/"+d;else{var e=b.Sa.lastIndexOf("/");-1!=e&&(d=b.Sa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
75
|
+
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Sa=d:c=""!==a.g.toString();c?qb(b,a.g.clone()):c=!!a.fc;c&&(b.fc=a.fc);return b};p.clone=function(){return new kb(this)};function nb(a,b,c){a.qb=c?sb(b,!0):b;a.qb&&(a.qb=a.qb.replace(/:$/,""))}function ob(a,b,c){a.Db=c?sb(b,!0):b}function pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Mc=b}else a.Mc=null}
|
|
76
|
+
function qb(a,b,c){b instanceof tb?a.g=b:(c||(b=ub(b,zb)),a.g=new tb(b))}function sb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function ub(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Ab),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ab(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var vb=/[#\/\?@]/g,xb=/[#\?:]/g,wb=/[#\?]/g,zb=/[#\?@]/g,yb=/#/g;function tb(a){this.g=a||null}
|
|
77
|
+
function Bb(a){if(!a.Ja&&(a.Ja={},a.jd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}p=tb.prototype;p.Ja=null;p.jd=null;function Cb(a){Bb(a);return a.jd}p.add=function(a,b){Bb(this);this.g=null;var c=this.Ja.hasOwnProperty(a)?this.Ja[a]:null;c||(this.Ja[a]=c=[]);c.push(b);this.jd++;return this};
|
|
78
|
+
p.set=function(a,b){Bb(this);this.g=null;this.Ja.hasOwnProperty(a)?this.Ja[a]=[b]:this.add(a,b);return this};p.get=function(a){Bb(this);return this.Ja[a]||[]};p.toString=function(){if(this.g)return this.g;if(!this.Ja)return"";var a=[],b;for(b in this.Ja)for(var c=encodeURIComponent(b),d=this.Ja[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
79
|
+
p.clone=function(){var a=new tb;a.g=this.g;if(this.Ja){var b={},c;for(c in this.Ja)b[c]=this.Ja[c].concat();a.Ja=b;a.jd=this.jd}return a};function P(a,b,c){var d=Ga.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Db)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",P);var Db=!0;P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
80
|
+
P.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
81
81
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
|
|
82
82
|
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_CODEC_UNKNOWN:3021,MSS_TRANSMUXING_FAILED:3022,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,
|
|
83
83
|
DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,
|
|
@@ -85,203 +85,203 @@ HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK
|
|
|
85
85
|
AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,
|
|
86
86
|
OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,
|
|
87
87
|
STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,
|
|
88
|
-
SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function
|
|
89
|
-
function
|
|
90
|
-
function
|
|
91
|
-
function
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
var
|
|
88
|
+
SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Eb(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new kb(a[0]);b=new kb(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new kb(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new kb(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
89
|
+
function Hb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}function Ib(a,b){if(1==b.length)return b[0];a=Jb(a,b);if(null!=a)return a;throw new P(2,4,4025,b);}
|
|
90
|
+
function Jb(a,b){for(var c=t(Kb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Lb?"":null}var Lb="text",Mb={qa:"video",W:"audio",wa:Lb,fd:"image",ij:"application"},Kb={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Nb(){}function Ob(a,b){a=Pb(a);b=Pb(b);return a.split("-")[0]==b.split("-")[0]}function Qb(a,b){a=Pb(a);b=Pb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Rb(a,b){a=Pb(a);b=Pb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Pb(a){var b=a.split("-x-"),c=b[0].split("-");a=c[0]||"";c=c[1]||"";b=b[1]?"x-"+b[1]:"";a=a.toLowerCase();a=Sb.get(a)||a;c=c.toUpperCase();return(c?a+"-"+c:a)+(b?"-"+b:"")}
|
|
91
|
+
function Tb(a,b){var c=Ub(a),d=Ub(b);return a!=c&&b!=d&&c==d}function Vb(a,b){a=Pb(a);b=Pb(b);return b==a?4:Qb(b,a)?3:Rb(b,a)?2:Qb(a,b)?1:0}function Ub(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Sb.get(a)||a}function Wb(a){return a.language?Pb(a.language):a.audio&&a.audio.language?Pb(a.audio.language):a.video&&a.video.language?Pb(a.video.language):"und"}
|
|
92
|
+
function Xb(a,b){a=Pb(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(Pb(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Qb(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Rb(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Qb(a,b))return b;return null}M("shaka.util.LanguageUtils",Nb);Nb.findClosestLocale=Xb;Nb.getLocaleForVariant=Wb;
|
|
93
|
+
Nb.getLocaleForText=function(a){return Pb(a.language||"und")};Nb.getBase=Ub;Nb.relatedness=Vb;Nb.areSiblings=Tb;Nb.normalize=Pb;Nb.isSiblingOf=Rb;Nb.isParentOf=Qb;Nb.areLanguageCompatible=Ob;Nb.areLocaleCompatible=function(a,b){a=Pb(a);b=Pb(b);return a==b};
|
|
94
|
+
var Sb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
|
|
95
95
|
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
96
96
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
97
97
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
98
98
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
99
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function
|
|
100
|
-
p.yg=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(
|
|
101
|
-
p.sa=function(a,b,c){a=
|
|
99
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Yb(a){cb.call(this);this.j=Pb(a);this.i=new Map;this.g=new Set;this.h=new Map}pa(Yb,cb);p=Yb.prototype;p.release=function(){cb.prototype.release.call(this)};
|
|
100
|
+
p.yg=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Pb(c.value));Zb(this);a=gb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new N("unknown-locales",(new Map).set("locales",a)));a=gb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new N("locale-changed",a))};
|
|
101
|
+
p.sa=function(a,b,c){a=Pb(a);void 0===c&&(c=$b);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=$b||d.set(f,e)});this.h.set(a,d);Zb(this);this.dispatchEvent(new N("locale-updated"));return this};p.Vi=function(a){for(var b=t(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};p.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new N("unknown-localization",a));return""};
|
|
102
102
|
p.Rh=function(){return this.g};
|
|
103
|
-
function
|
|
104
|
-
c.reverse();a.i.clear();b=t(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=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,bc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new N("missing-localizations",d)))}function bc(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}M("shaka.ui.Localization",
|
|
105
|
-
|
|
103
|
+
function Zb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=t(d),h=g.next();!h.done;f={xc:f.xc},h=g.next()){f.xc=h.value;e.add(f.xc);e.add(Ub(f.xc));h=gb(b.keys(),function(l){return function(m){return Tb(m,l.xc)}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=gb(b.keys(),function(l){return function(m){return Ub(m)==l.xc}}(f));h.sort();k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=t(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
104
|
+
c.reverse();a.i.clear();b=t(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=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,bc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new N("missing-localizations",d)))}function bc(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}M("shaka.ui.Localization",Yb);Yb.prototype.getCurrentLocales=Yb.prototype.Rh;
|
|
105
|
+
Yb.prototype.resolve=Yb.prototype.resolve;Yb.prototype.resolveDictionary=Yb.prototype.Vi;Yb.prototype.insert=Yb.prototype.sa;Yb.prototype.changeLocale=Yb.prototype.yg;Yb.prototype.release=Yb.prototype.release;var $b=1;Yb.ConflictResolution={USE_OLD:0,USE_NEW:$b};Yb.UNKNOWN_LOCALES="unknown-locales";Yb.UNKNOWN_LOCALIZATION="unknown-localization";Yb.MISSING_LOCALIZATIONS="missing-localizations";Yb.LOCALE_CHANGED="locale-changed";Yb.LOCALE_UPDATED="locale-updated";function cc(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}cc.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 dc(a){return a.h/(1-Math.pow(a.g,a.i))};function ec(){this.h=new cc(2);this.j=new cc(5);this.g=0;this.i=128E3;this.l=16E3}ec.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)};ec.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)}};ec.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(dc(this.h),dc(this.j))};function fc(a){if(gc.has(a))return gc.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);gc.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),gc.set(a,b),b):!1}function hc(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var gc=new Map;function ic(){}ic.prototype.extract=function(){};ic.prototype.decode=function(){return[]};ic.prototype.clear=function(){};ic.prototype.getStreams=function(){return[]};function jc(){}jc.prototype.init=function(){};jc.prototype.parse=function(){return[]};function kc(){}function lc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(mc(a)==mc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=nc(a);b=nc(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function mc(a){return a instanceof ArrayBuffer?a:a.buffer}function oc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
106
106
|
function nc(a,b,c){c=void 0===c?Infinity:c;return pc(a,void 0===b?0:b,c,Uint8Array)}function qc(a,b,c){c=void 0===c?Infinity:c;return pc(a,void 0===b?0:b,c,Uint16Array)}function rc(a,b,c){c=void 0===c?Infinity:c;return pc(a,void 0===b?0:b,c,DataView)}function pc(a,b,c,d){var e=mc(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
|
|
107
107
|
M("shaka.util.BufferUtils",kc);kc.toDataView=rc;kc.toUint16=qc;kc.toUint8=nc;kc.toArrayBuffer=oc;kc.equal=lc;function sc(){}sc.prototype.init=function(){};sc.prototype.i=function(){};sc.prototype.h=function(){};sc.prototype.j=function(){};M("shaka.media.IClosedCaptionParser",sc);function tc(a){this.l=new jc;if(a=uc[a.toLowerCase()])this.l=a();this.g=new ic;if(a=vc)this.g=a()}tc.prototype.init=function(a){this.l.init(a)};tc.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=nc(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};
|
|
108
108
|
tc.prototype.h=function(){this.g.clear()};tc.prototype.j=function(){return this.g.getStreams()};M("shaka.media.ClosedCaptionParser",tc);tc.findDecoder=function(){return vc};tc.unregisterDecoder=function(){vc=null};tc.registerDecoder=function(a){vc=a};tc.findParser=function(a){return uc[a]};tc.unregisterParser=function(a){delete uc[a]};tc.registerParser=function(a,b){uc[a]=b};var uc={},vc=null;function wc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function xc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function yc(a,b,c){c||(c=wc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={He:d.He},e=a.next()){d.He=e.value;e=b.findIndex(function(f){return function(g){return c(f.He,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
109
|
-
function
|
|
110
|
-
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={ec:32,rows:15}}function
|
|
111
|
-
function
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
var
|
|
115
|
-
|
|
116
|
-
function
|
|
117
|
-
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
|
|
118
|
-
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
function
|
|
122
|
-
function
|
|
123
|
-
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",
|
|
124
|
-
|
|
125
|
-
function
|
|
126
|
-
function
|
|
127
|
-
function
|
|
128
|
-
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=
|
|
129
|
-
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=hc();var q=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=
|
|
109
|
+
function zc(a,b,c){c||(c=wc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Ac(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Bc;this.position=null;this.positionAlign=Cc;this.size=0;this.textAlign=Dc;this.direction=Ec;this.writingMode=Fc;this.lineInterpretation=Gc;this.line=null;this.lineHeight="";this.lineAlign=Hc;this.displayAlign=Ic;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Jc;this.fontStyle=Kc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
110
|
+
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={ec:32,rows:15}}function Lc(a,b){a=new Ac(a,b,"");a.lineBreak=!0;return a}Ac.prototype.clone=function(){var a=new Ac(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
111
|
+
function Mc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!zc(a.nestedCues,b.nestedCues,Mc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!zc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",Ac);Ac.equal=Mc;Ac.prototype.clone=Ac.prototype.clone;var Cc="auto";
|
|
112
|
+
Ac.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Cc};var Dc="center",Nc={LEFT:"left",RIGHT:"right",CENTER:Dc,START:"start",END:"end"};Ac.textAlign=Nc;var Ic="after",Oc={BEFORE:"before",CENTER:"center",AFTER:Ic};Ac.displayAlign=Oc;var Ec="ltr";Ac.direction={HORIZONTAL_LEFT_TO_RIGHT:Ec,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Fc="horizontal-tb";Ac.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Fc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Gc=0;
|
|
113
|
+
Ac.lineInterpretation={LINE_NUMBER:Gc,PERCENTAGE:1};var Hc="start",Pc={CENTER:"center",START:Hc,END:"end"};Ac.lineAlign=Pc;var Qc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ac.defaultTextColor=Qc;var Rc={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ac.defaultTextBackgroundColor=Rc;var Jc=400;Ac.fontWeight={NORMAL:Jc,BOLD:700};
|
|
114
|
+
var Kc="normal",Sc={NORMAL:Kc,ITALIC:"italic",OBLIQUE:"oblique"};Ac.fontStyle=Sc;Ac.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Bc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Tc;this.scroll=Uc}M("shaka.text.CueRegion",Bc);var Tc=1;Bc.units={PX:0,PERCENTAGE:Tc,LINES:2};var Uc="";Bc.scrollMode={NONE:Uc,UP:"up"};function Vc(){}Vc.prototype.destroy=function(){};function Wc(a,b,c){Xc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,xe:b}}function Yc(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([Zc,$c,ad,bd]),e=d.next();!e.done;e=d.next())if(e=Xc[c+"-"+e.value]){var f=e.xe(),g=f.isSupported(a,b);f.destroy();if(g)return e.xe}return null}M("shaka.transmuxer.TransmuxerEngine",Vc);Vc.findTransmuxer=Yc;Vc.unregisterTransmuxer=function(a,b){delete Xc[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
115
|
+
Vc.registerTransmuxer=Wc;Vc.prototype.destroy=Vc.prototype.destroy;var Xc={},bd=1,ad=2,$c=3,Zc=4;Vc.PluginPriority={FALLBACK:bd,PREFERRED_SECONDARY:ad,PREFERRED:$c,APPLICATION:Zc};function cd(){}function dd(a,b){var c=a;b&&!ed.includes(a)&&(c+='; codecs="'+b+'"');return c}function fd(a,b){b&&(a+='; codecs="'+b+'"');return a}function gd(a,b,c){var d=dd(a,b);b=fd(a,b);Yc(b)?(a=Yc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
116
|
+
function hd(a){var b=id(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"===
|
|
117
|
+
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 jd(a){return a.split(";")[0]}function kd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function id(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}M("shaka.util.MimeUtils",cd);
|
|
118
|
+
cd.getFullTypeWithAllCodecs=fd;cd.getFullType=dd;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var ed=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function ld(a){this.i=null;this.j=a;this.C=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.D="";this.s=new Map}function md(a){return nd[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!vc:!1}ld.prototype.destroy=function(){this.j=this.i=null;this.s.clear();return Promise.resolve()};
|
|
119
|
+
function od(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return D(l,Promise.resolve(),2);if(!a.i||!a.j)return l.return();if(null==c||null==d)return a.i.parseInit(nc(b)),l.return();f=a.C?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(nc(b),g,e);k=h.filter(function(m){return m.startTime>=a.l&&m.startTime<a.m});a.j.append(k);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);E(l)})}
|
|
120
|
+
ld.prototype.remove=function(a,b){var c=this;return K(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));E(d)})};function pd(a,b,c){a.l=b;a.m=c}function qd(a,b,c){a.D=b;if(b=a.s.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
121
|
+
function rd(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())rd(a,d.value,c)}
|
|
122
|
+
function sd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);rd(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.D&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.s.has(f)||a.s.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.s.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
123
|
+
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",ld);ld.prototype.destroy=ld.prototype.destroy;ld.findParser=function(a){return nd[a]};ld.unregisterParser=function(a){delete nd[a]};ld.registerParser=function(a,b){nd[a]=b};var nd={};function td(a,b){return a.concat(b)}function ud(){}function vd(a){return null!=a};function wd(a){this.h=a;this.g=null}wd.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};wd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function xd(a){this.h=a;this.g=null}xd.prototype.La=function(){this.stop();this.h();return this};xd.prototype.S=function(a){var b=this;this.stop();this.g=(new wd(function(){b.h()})).S(a);return this};xd.prototype.ua=function(a){var b=this;this.stop();this.g=(new wd(function(){b.g.S(a);b.h()})).S(a);return this};xd.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",xd);xd.prototype.stop=xd.prototype.stop;xd.prototype.tickEvery=xd.prototype.ua;
|
|
124
|
+
xd.prototype.tickAfter=xd.prototype.S;xd.prototype.tickNow=xd.prototype.La;function yd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function zd(a){return""!=Ad().canPlayType(a)}function Bd(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Cd(){return Dd("Xbox One")}function Ed(){return Dd("Tizen")}function Fd(){return Dd("Tizen 3")}function Gd(){return Dd("Tizen 2")}function Hd(){return Dd("Web0S")&&Dd("Chrome/38.0.2125.122 Safari/537.36")}
|
|
125
|
+
function Id(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Ed()&&!Dd("PC=EOS")&&!Dd("VirginMedia")&&!Dd("SOPOpenBrowser")&&!Jd()&&!Dd("AFT")}function Jd(){return Dd("PlayStation 4")}function Kd(){if(!Id())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Dd(a){return(navigator.userAgent||"").includes(a)}
|
|
126
|
+
function Ad(){if(Ld)return Ld;Md||(Md=new xd(function(){Ld=null}));(Ld=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ld=document.createElement("video"));Md.S(1);return Ld}var Md=null,Ld=null;function Od(){}
|
|
127
|
+
function Pd(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Qd(e,b,c);if(d.length){b=new bb;c=t(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(u,v){u=0;var x=[],z={};v=t(v);for(var y=v.next();!y.done;z={ed:z.ed},y=v.next())z.ed=y.value,y=d.filter(function(C){return function(A){return C.ed.decodingInfos[0][A]}}(z)).length,y>u?(u=y,x=[z.ed]):y==u&&x.push(z.ed);f.push.apply(f,w(x))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
|
|
128
|
+
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=hd(m.codecs),r=hd(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(u,
|
|
129
|
+
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=hc();var q=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=hd(m.codecs),r=hd(g.codecs),n!==r))continue;g.width>m.width||g.height>m.height?(l.push(g),q.push(g.id)):g.width==m.width&&g.height==m.height&&(n=hd(m.codecs),r=hd(g.codecs),n==r&&g.bandwidth<m.bandwidth&&(l.push(g),q.push(g.id)))}else l.push(g),
|
|
130
130
|
q.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!q.includes(u.id)?!1:!0})}
|
|
131
|
-
function
|
|
132
|
-
function
|
|
133
|
-
function
|
|
134
|
-
function
|
|
135
|
-
|
|
136
|
-
function
|
|
137
|
-
function
|
|
138
|
-
function
|
|
139
|
-
|
|
140
|
-
function
|
|
141
|
-
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f
|
|
131
|
+
function Qd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Oe:d.Oe},e=b.next())if(d.Oe=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Oe)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Fe:d.Fe},b=c.next())if(d.Fe=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Fe)}}(d)),b.length){a=b;break}return a}function Rd(a,b,c){a.variants=a.variants.filter(function(d){return Sd(d,b,c)})}
|
|
132
|
+
function Sd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
|
|
133
|
+
function Td(a,b){return K(function(c){if(1==c.g)return D(c,Ud(a,b,0<b.offlineSessionIds.length),2);Vd(b);return D(c,Wd(b),0)})}
|
|
134
|
+
function Ud(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return D(h,Xd(b.variants,c,!1,[]),2);d=null;a&&(e=a.g)&&(d=e.keySystem);f=Mb;g=Cd();b.variants=b.variants.filter(function(k){var l=k.video,m=l&&l.width||0,n=l&&l.height||0;if(g&&l&&(1920<m||1080<n)&&(l.codecs.includes("avc1.")||l.codecs.includes("avc3.")))return Za(Yd(k)),!1;if(l){m=Zd(l.codecs);if(l.codecs.includes(",")){n=l.codecs.split(",");m=Ib(f.qa,n);m=Zd(m);n=Ib(f.W,n);n=$d(n);var r=gd(l.mimeType,n,f.W);if(!fc(r))return!1;m=[m,n].join()}n=
|
|
135
|
+
gd(l.mimeType,m,f.qa);if(!fc(n))return!1;l.codecs=m}if(l=k.audio){m=$d(l.codecs);n=gd(l.mimeType,m,f.W);if(!fc(n))return!1;l.codecs=m}(l=k.decodingInfos.some(function(q){return!q.supported||d&&(q=q.keySystemAccess)&&q.keySystem!=d?!1:!0}))||Za(Yd(k));return l});E(h)})}
|
|
136
|
+
function ae(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=ae(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
137
|
+
function be(a,b){var c,d,e;return K(function(f){switch(f.g){case 1:c=ae(b);ta(f,2);d=ce;if(d[c]){a.decodingInfos.push(d[c]);f.F(4);break}return D(f,navigator.mediaCapabilities.decodingInfo(b),5);case 5:e=f.h,d[c]=e,a.decodingInfos.push(e);case 4:va(f,0);break;case 2:wa(f),JSON.stringify(b),E(f)}})}
|
|
138
|
+
function Xd(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A;return K(function(B){switch(B.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return B.return();f={};g=t(d);h=g.next();case 2:if(h.done){B.F(4);break}f.Je=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){B.F(7);break}n=m.value;r=de(n,b,c).filter(function(F){return function(H){return(H.keySystemConfiguration&&H.keySystemConfiguration.keySystem)===F.Je}}(f));q=t(r);u=q.next();case 8:if(u.done){B.F(10);break}v=u.value;return D(B,
|
|
139
|
+
be(n,v),9);case 9:u=q.next();B.F(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();B.F(5);break;case 7:if(k)return B.return();f={Je:f.Je};h=g.next();B.F(2);break;case 4:x=t(a),m=x.next();case 12:if(m.done){B.F(0);break}z=m.value;y=de(z,b,c).filter(function(F){F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});C=t(y);u=C.next();case 15:if(u.done){m=x.next();B.F(12);break}A=u.value;return D(B,be(z,A),16);case 16:u=C.next(),B.F(15)}})}
|
|
140
|
+
function de(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ib("video",g);f=Zd(f);g=Ib("audio",g);g=$d(g);g=gd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Zd(f);f=gd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction=
|
|
141
|
+
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=$d(d.codecs),f=gd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,
|
|
142
142
|
[]);f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var r=new Set,q=t(h.initData),u=q.next();!u.done;u=q.next())r.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
143
143
|
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
|
|
144
|
-
function
|
|
145
|
-
function
|
|
146
|
-
function
|
|
147
|
-
function
|
|
144
|
+
function $d(a){return"fLaC"===a?"flac":"Opus"===a?"opus":Ed()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function Zd(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Vd(a){a.textStreams=a.textStreams.filter(function(b){b=dd(b.mimeType,b.codecs);return md(b)})}
|
|
145
|
+
function Wd(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.F(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(ee.has(f)){l.F(5);break}g=fe.get(f);if(!g){ee.set(f,!1);l.F(5);break}return D(l,ge(g),7);case 7:h=l.h,ee.set(f,h);case 5:(k=ee.get(f))&&b.push(e);d=c.next();l.F(2);break;case 4:a.imageStreams=b,E(l)}})}
|
|
146
|
+
function ge(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
|
|
147
|
+
function he(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),r=n.next();!r.done;r=n.next())m.add(r.value);if(c)for(n=t(c.roles),r=n.next();!r.done;r=n.next())m.add(r.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
148
148
|
kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null};
|
|
149
149
|
c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null,a.hdr=c.hdr||null,a.videoLayout=c.videoLayout||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles,a.accessibilityPurpose=
|
|
150
150
|
b.accessibilityPurpose,a.originalLanguage=b.originalLanguage);return a}
|
|
151
|
-
function
|
|
151
|
+
function ie(a){return{id:a.id,active:!1,type:Lb,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,
|
|
152
152
|
originalVideoId:null,originalAudioId:null,originalTextId:a.originalId,originalImageId:null,accessibilityPurpose:a.accessibilityPurpose,originalLanguage:a.originalLanguage}}
|
|
153
|
-
function
|
|
154
|
-
primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId,accessibilityPurpose:null,originalLanguage:null}}function
|
|
155
|
-
function
|
|
156
|
-
function
|
|
157
|
-
originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function
|
|
158
|
-
function
|
|
159
|
-
|
|
160
|
-
function
|
|
161
|
-
var
|
|
162
|
-
a.chooseVariant();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}})}p=
|
|
153
|
+
function je(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,
|
|
154
|
+
primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId,accessibilityPurpose:null,originalLanguage:null}}function ke(a){a.__shaka_id||(a.__shaka_id=le++);return a.__shaka_id}
|
|
155
|
+
function me(a){var b=ne(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function oe(a){var b=ne(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
156
|
+
function ne(a){var b=a.language;return{id:ke(a),active:!1,type:"",bandwidth:0,language:Pb(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
|
|
157
|
+
originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function pe(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function qe(a){return a.filter(function(b){return pe(b)})}
|
|
158
|
+
function re(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=Xb(Pb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Pb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=se(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(td,[]);return a.length?
|
|
159
|
+
se(e,a[0]):e}function se(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Yd(a){var b=[];a.audio&&b.push(te(a.audio));a.video&&b.push(te(a.video));return b.join(", ")}
|
|
160
|
+
function te(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"}M("shaka.util.StreamUtils",Od);Od.meetsRestrictions=Sd;
|
|
161
|
+
var ce={},le=0,ee=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),fe=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ue(){var a=this;this.s=null;this.m=!1;this.i=new ec;this.C=null;navigator.connection&&navigator.connection.addEventListener&&(this.C=function(){if(a.m&&a.g.useNetworkInformation){a.i=new ec;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}},navigator.connection.addEventListener("change",this.C));this.l=[];this.D=1;this.H=!1;this.h=this.j=this.g=this.u=null;this.G=new xd(function(){if(a.g.restrictToElementSize){var b=
|
|
162
|
+
a.chooseVariant();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}})}p=ue.prototype;p.stop=function(){this.s=null;this.m=!1;this.l=[];this.D=1;this.j=this.u=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop()};p.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.C),this.C=null);this.G=null};p.init=function(a){this.s=a};
|
|
163
163
|
p.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.j.clientHeight*d);c=Math.min(c,this.j.clientWidth*d)}var e=this.l.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
|
|
164
|
-
this.l);d=e;a&&e.length!=this.l.length&&(d=this.l.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=
|
|
164
|
+
this.l);d=e;a&&e.length!=this.l.length&&(d=this.l.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=ve(this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=we(a);a=t(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=ve(this.g.restrictions,d,b,c)}b=this.i.getBandwidthEstimate(xe(this));d.length&&!a.length&&(a=ve(null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
165
165
|
a[d];for(var f=isNaN(this.D)?1:Math.abs(this.D),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.u=Date.now();return c};p.enable=function(){this.m=!0};p.disable=function(){this.m=!1};
|
|
166
|
-
p.segmentDownloaded=function(a,b,c){this.i.sample(a,b);if(c&&null!=this.u&&this.m)a:{if(!this.H){a=this.i;if(!(a.g>=a.i))break a;this.H=!0}else if(Date.now()-this.u<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(
|
|
167
|
-
p.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.S(
|
|
168
|
-
function
|
|
169
|
-
|
|
170
|
-
var
|
|
171
|
-
function
|
|
172
|
-
function
|
|
173
|
-
function
|
|
174
|
-
|
|
175
|
-
function
|
|
176
|
-
function Pe(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
|
|
177
|
-
function Ze(a){var b,c;return
|
|
166
|
+
p.segmentDownloaded=function(a,b,c){this.i.sample(a,b);if(c&&null!=this.u&&this.m)a:{if(!this.H){a=this.i;if(!(a.g>=a.i))break a;this.H=!0}else if(Date.now()-this.u<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(xe(this));a&&this.s(a,this.g.clearBufferSwitch,this.g.safeMarginSwitch)}};p.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(xe(this))};p.setVariants=function(a){this.l=a};p.playbackRateChanged=function(a){this.D=a};
|
|
167
|
+
p.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.S(ye)}),this.h.observe(this.j))};p.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function xe(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
|
|
168
|
+
function ve(a,b,c,d){a&&(b=b.filter(function(e){return Sd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}function we(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}M("shaka.abr.SimpleAbrManager",ue);ue.prototype.configure=ue.prototype.configure;ue.prototype.setMediaElement=ue.prototype.setMediaElement;
|
|
169
|
+
ue.prototype.playbackRateChanged=ue.prototype.playbackRateChanged;ue.prototype.setVariants=ue.prototype.setVariants;ue.prototype.getBandwidthEstimate=ue.prototype.getBandwidthEstimate;ue.prototype.segmentDownloaded=ue.prototype.segmentDownloaded;ue.prototype.disable=ue.prototype.disable;ue.prototype.enable=ue.prototype.enable;ue.prototype.chooseVariant=ue.prototype.chooseVariant;ue.prototype.init=ue.prototype.init;ue.prototype.release=ue.prototype.release;ue.prototype.stop=ue.prototype.stop;
|
|
170
|
+
var ye=1;function ze(a,b){this.g=a;this.h=b}ze.prototype.toString=function(){return"v"+this.g+"."+this.h};function Ae(a,b){var c=new ze(5,0),d=Be,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Ce(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 De(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 Be=null;M("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});M("shaka.config.CodecSwitchingStrategy",{Jj:"reload",rh:"smooth"});function Ee(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Ee.prototype.add=function(a,b,c){return Fe(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
171
|
+
function Fe(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&&!Ge(e,f)||!He(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Ge(a,b))&&He(a.roles,b.roles)));return d?!1:!0}Ee.prototype.values=function(){return this.g.values()};
|
|
172
|
+
function Ge(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return id(d)[0]});b=b.codecs.split(",").map(function(d){return id(d)[0]});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 He(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Ie(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 Je(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"","","",b,c)}Ie.prototype.create=function(a){var b=this,c="smooth"==this.h&&hc(),d=a.filter(function(e){return Fe(b.i,e,!c,b.g)});return d.length?new Ee(d[0],d,!c,this.g):this.j.create(a)};
|
|
173
|
+
function Je(a,b,c,d,e,f,g,h){this.s=a;this.u=b;this.g=c;this.h=d;this.j=e;this.i=void 0===f?"":f;this.l=void 0===g?"reload":g;this.m=void 0===h?!1:h}
|
|
174
|
+
Je.prototype.create=function(a){var b=[];b=Ke(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Le(b,this.u);a.length&&(b=a);this.j&&(a=Me(b,this.j),a.length&&(b=a));this.h&&(a=Pe(b,this.h),a.length&&(b=a));this.g&&(a=Qe(b,this.g),a.length&&(b=a));this.i&&(a=Re(b,this.i),a.length&&(b=a));return new Ee(b[0],b,!("smooth"==this.l&&hc()),this.m)};function Ke(a,b){b=Pb(b);var c=Xb(b,a.map(function(d){return Wb(d)}));return c?a.filter(function(d){return c==Wb(d)}):[]}
|
|
175
|
+
function Le(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Re(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Qe(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}
|
|
176
|
+
function Pe(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 Me(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})};function Se(){this.g=Te;this.h=(new Map).set(Te,2).set(Ue,1)}function We(a,b,c){a.h.set(Te,c).set(Ue,b)}var Ue=0,Te=1;function Xe(a,b){var c=Ye();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}
|
|
177
|
+
function Ze(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return D(d,new Promise(function(e){(new xd(e)).S(c/1E3)}),2)}a.h*=a.m;E(d)})}function Ye(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function $e(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}$e.prototype.resolve=function(){};$e.prototype.reject=function(){};function af(a,b){this.promise=a;this.i=b;this.g=!1}function bf(a){return new af(Promise.reject(a),function(){return Promise.resolve()})}function cf(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new af(a,function(){return Promise.resolve()})}function df(a){return new af(Promise.resolve(a),function(){return Promise.resolve()})}function ef(a){return new af(a,function(){return a.catch(function(){})})}af.prototype.abort=function(){this.g=!0;return this.i()};
|
|
178
178
|
function ff(a){return new af(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}af.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
179
|
-
af.prototype.Ba=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=gf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new $e,g=new
|
|
179
|
+
af.prototype.Ba=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=gf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new $e,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new af(f,function(){return d()})};
|
|
180
180
|
function gf(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",af);af.prototype.chain=af.prototype.Ba;af.prototype["finally"]=af.prototype.finally;af.all=ff;af.prototype.abort=af.prototype.abort;af.notAbortable=ef;af.completed=df;af.aborted=cf;af.failed=bf;function hf(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function jf(a){var b={},c;for(c in a)b[c]=a[c];return b};function kf(){this.g=[]}function lf(a,b){a.g.push(b.finally(function(){xc(a.g,b)}))}kf.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function mf(a,b,c,d,e){cb.call(this);this.i=!1;this.m=new kf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.u=c||null;this.C=d||null;this.D=e||null;this.s=!1}pa(mf,cb);p=mf.prototype;p.dg=function(a){this.s=a};function nf(a,b,c,d){c=c||of;var e=pf[a];if(!e||c>=e.priority)pf[a]={priority:c,xe:b,Mi:void 0===d?!1:d}}p.Ni=function(a){this.g.add(a)};p.ej=function(a){this.g.delete(a)};p.Bh=function(){this.g.clear()};p.Oi=function(a){this.h.add(a)};p.fj=function(a){this.h.delete(a)};
|
|
181
181
|
p.Ch=function(){this.h.clear()};function qf(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}}p.destroy=function(){this.i=!0;this.g.clear();this.h.clear();cb.prototype.release.call(this);return this.m.destroy()};
|
|
182
|
-
p.request=function(a,b,c){var d=this,e=new rf;if(this.i){var f=Promise.reject(new
|
|
182
|
+
p.request=function(a,b,c){var d=this,e=new rf;if(this.i){var f=Promise.reject(new P(2,7,7001));f.catch(function(){});return new sf(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?hf(b.retryParameters):Ye();b.uris=hf(b.uris);f=tf(this,a,b,c);var g=f.Ba(function(){return uf(d,a,b,c,new Xe(b.retryParameters,!1),0,null,e)}),h=g.Ba(function(r){return vf(d,a,r,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
183
183
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Ba(function(r){var q=Date.now()-m,u=r.response;u.timeMs+=l;u.timeMs+=q;r.pi||!d.l||u.fromCache||"HEAD"==b.method||a!=wf||d.l(u.timeMs,u.data.byteLength,xf(c));return u},function(r){r&&(r.severity=2);throw r;});f=new sf(n.promise,function(){return n.abort()},e);lf(this.m,f);return f};
|
|
184
|
-
function tf(a,b,c,d){function e(h){f=f.Ba(function(){c.body&&(c.body=oc(c.body));return h(b,c,d)})}var f=df(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Ba(void 0,function(h){if(h instanceof
|
|
185
|
-
function uf(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.D&&a.D(b,d,c.uris[f],c.uris[f-1]);var k=new
|
|
186
|
-
m=!0,h.g=H)},function(B){a.j&&a.j(B,c,b);x=!0});if(!r)return y;var
|
|
187
|
-
A,
|
|
188
|
-
function vf(a,b,c,d){var e=df(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Le:f.Le},g=a.next())f.Le=g.value,e=e.Ba(function(h){return function(){var k=c.response;k.data&&(k.data=oc(k.data));return h.Le(b,k,d)}}(f));return e.Ba(function(){return c},function(h){var k=2;if(h instanceof
|
|
184
|
+
function tf(a,b,c,d){function e(h){f=f.Ba(function(){c.body&&(c.body=oc(c.body));return h(b,c,d)})}var f=df(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Ba(void 0,function(h){if(h instanceof P&&7001==h.code)throw h;throw new P(2,1,1006,h);})}
|
|
185
|
+
function uf(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.D&&a.D(b,d,c.uris[f],c.uris[f-1]);var k=new kb(c.uris[f]),l=k.qb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),nb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=pf[l])?l.xe:null;if(!n)return bf(new P(2,1,1E3,k));var r=l.Mi,q=null,u=null,v=!1,x=!1,z;return ef(Ze(e)).Ba(function(){if(a.i)return cf();z=Date.now();var y=n(c.uris[f],c,b,function(B,F,H){q&&q.stop();u&&u.S(A/1E3);a.l&&b==wf&&(a.l(B,F,xf(d)),
|
|
186
|
+
m=!0,h.g=H)},function(B){a.j&&a.j(B,c,b);x=!0});if(!r)return y;var C=c.retryParameters.connectionTimeout;C&&(q=new xd(function(){v=!0;y.abort()}),q.S(C/1E3));var A=c.retryParameters.stallTimeout;A&&(u=new xd(function(){v=!0;y.abort()}));return y}).Ba(function(y){q&&q.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-z);var C={response:y,pi:m};!x&&a.j&&a.j(y.headers,c,b);return C},function(y){q&&q.stop();u&&u.stop();if(a.u){var C=null,A=0;y instanceof P&&(C=y,1001==y.code&&(A=y.data[1]));a.u(c,
|
|
187
|
+
C,A,v)}if(a.i)return cf();v&&(y=new P(1,1,1003,c.uris[f],b));if(y instanceof P){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return C=(new Map).set("error",y),C=new N("retry",C),a.dispatchEvent(C),f=(f+1)%c.uris.length,uf(a,b,c,d,e,f,y,h)}throw y;})}
|
|
188
|
+
function vf(a,b,c,d){var e=df(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Le:f.Le},g=a.next())f.Le=g.value,e=e.Ba(function(h){return function(){var k=c.response;k.data&&(k.data=oc(k.data));return h.Le(b,k,d)}}(f));return e.Ba(function(){return c},function(h){var k=2;if(h instanceof P){if(7001==h.code)throw h;k=h.severity}throw new P(k,1,1007,h);})}function xf(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.G&&!b.D)return!1}return!0}M("shaka.net.NetworkingEngine",mf);
|
|
189
189
|
mf.prototype.request=mf.prototype.request;mf.prototype.destroy=mf.prototype.destroy;mf.makeRequest=qf;mf.defaultRetryParameters=function(){return Ye()};mf.prototype.clearAllResponseFilters=mf.prototype.Ch;mf.prototype.unregisterResponseFilter=mf.prototype.fj;mf.prototype.registerResponseFilter=mf.prototype.Oi;mf.prototype.clearAllRequestFilters=mf.prototype.Bh;mf.prototype.unregisterRequestFilter=mf.prototype.ej;mf.prototype.registerRequestFilter=mf.prototype.Ni;mf.unregisterScheme=function(a){delete pf[a]};
|
|
190
|
-
mf.registerScheme=nf;mf.prototype.setForceHTTPS=mf.prototype.dg;function rf(){this.g=0}mf.NumBytesRemainingClass=rf;function sf(a,b,c){af.call(this,a,b);this.h=c}pa(sf,af);mf.PendingRequest=sf;var wf=1;mf.RequestType={MANIFEST:0,SEGMENT:wf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};mf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var of=3;mf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:of};var pf={};function yf(a){this.g=!1;this.h=new $e;this.i=a}yf.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 zf(a,b){if(a.g){if(b instanceof
|
|
190
|
+
mf.registerScheme=nf;mf.prototype.setForceHTTPS=mf.prototype.dg;function rf(){this.g=0}mf.NumBytesRemainingClass=rf;function sf(a,b,c){af.call(this,a,b);this.h=c}pa(sf,af);mf.PendingRequest=sf;var wf=1;mf.RequestType={MANIFEST:0,SEGMENT:wf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};mf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var of=3;mf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:of};var pf={};function yf(a){this.g=!1;this.h=new $e;this.i=a}yf.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 zf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Af(){this.g=new bb}p=Af.prototype;p.release=function(){this.Kb();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Bf(a,b,c,d),this.g.push(b,a))};p.ka=function(a,b,c,d){function e(g){f.bc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.bc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.bc(),this.g.remove(b,e))}};
|
|
191
191
|
p.Kb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.bc();this.g.g={}}};M("shaka.util.EventManager",Af);Af.prototype.removeAll=Af.prototype.Kb;Af.prototype.unlisten=Af.prototype.bc;Af.prototype.listenOnce=Af.prototype.ka;Af.prototype.listen=Af.prototype.o;Af.prototype.release=Af.prototype.release;function Bf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Cf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
192
192
|
Bf.prototype.bc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Cf(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 Df(a)?b:b.capture||!1}
|
|
193
193
|
function Df(a){var b=Ef;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}Ef=b}return b||!1}var Ef=void 0;function Ff(a){this.h=a;this.g=void 0}Ff.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Gf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Hf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function If(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Jf(){}
|
|
194
|
-
function Kf(a){if(!a)return"";a=nc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!
|
|
194
|
+
function Kf(a){if(!a)return"";a=nc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Jd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ta('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
195
195
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
196
|
-
function Lf(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new
|
|
197
|
-
function Nf(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=nc(a);if(239==c[0]&&187==c[1]&&191==c[2])return Kf(c);if(254==c[0]&&255==c[1])return Lf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Lf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Lf(a,!1);if(0==c[1]&&0==c[3])return Lf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Kf(a);throw new
|
|
198
|
-
function Of(a){if(window.TextEncoder&&!
|
|
196
|
+
function Lf(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=rc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Mf.value()(d)}
|
|
197
|
+
function Nf(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=nc(a);if(239==c[0]&&187==c[1]&&191==c[2])return Kf(c);if(254==c[0]&&255==c[1])return Lf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Lf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Lf(a,!1);if(0==c[1]&&0==c[3])return Lf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Kf(a);throw new P(2,2,2003);}
|
|
198
|
+
function Of(a){if(window.TextEncoder&&!Jd()){var b=new TextEncoder;return oc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return oc(b)}function Pf(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Jf);Jf.resetFromCharCode=function(){Mf.g=void 0};Jf.toUTF16=Pf;Jf.toUTF8=Of;Jf.fromBytesAutoDetect=Nf;Jf.fromUTF16=Lf;
|
|
199
199
|
Jf.fromUTF8=Kf;var Mf=new Ff(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ob:65536};0<b.Ob;b={Ob:b.Ob},b.Ob/=2)if(a(b.Ob))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ob)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ob));return e}}(b);return null});function Qf(a,b){this.h=rc(a);this.i=b==Rf;this.g=0}p=Qf.prototype;p.Fa=function(){return this.g<this.h.byteLength};p.Ca=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.Qa=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Sf();}};p.ob=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Sf();}};p.N=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Sf();}};
|
|
200
|
-
p.Xg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Sf();}};p.
|
|
201
|
-
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Sf();this.g+=a};p.Wi=function(a){if(this.g<a)throw Sf();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw Sf();this.g=a};p.
|
|
202
|
-
Qf.prototype.skip=Qf.prototype.skip;Qf.prototype.readBytes=Qf.prototype.Jb;Qf.prototype.readUint64=Qf.prototype.
|
|
203
|
-
p.
|
|
204
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ca(),b.getLength()-b.Ca()))}};function
|
|
205
|
-
function
|
|
206
|
-
Tf.prototype.parse=Tf.prototype.parse;Tf.prototype.stop=Tf.prototype.stop;Tf.prototype.fullBox=Tf.prototype.
|
|
207
|
-
function
|
|
208
|
-
|
|
209
|
-
function
|
|
210
|
-
function
|
|
211
|
-
function
|
|
212
|
-
function
|
|
213
|
-
function
|
|
214
|
-
function
|
|
215
|
-
function
|
|
216
|
-
var
|
|
217
|
-
p.destroy=function(){return this.j.destroy()};function
|
|
218
|
-
function
|
|
219
|
-
function
|
|
220
|
-
function
|
|
221
|
-
v.next())x=q.value,
|
|
222
|
-
function
|
|
223
|
-
p.yc=function(a){var b=this;return
|
|
224
|
-
b.C.size?D(c,
|
|
225
|
-
function
|
|
226
|
-
ta(g,6);return D(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new
|
|
227
|
-
function
|
|
228
|
-
function
|
|
229
|
-
p.tf=function(){var a=this,b=this.i.keys();b=db(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)};p.
|
|
230
|
-
function
|
|
231
|
-
f.keySystem;var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
6,6018);zf(a.j);va(y,7,4);break;case 8:x=wa(y,4);if(x instanceof
|
|
235
|
-
function
|
|
200
|
+
p.Xg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Sf();}};p.Nc=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 Sf();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.Jb=function(a){if(this.g+a>this.h.byteLength)throw Sf();var b=nc(this.h,this.g,a);this.g+=a;return b};
|
|
201
|
+
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Sf();this.g+=a};p.Wi=function(a){if(this.g<a)throw Sf();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw Sf();this.g=a};p.yd=function(){for(var a=this.g;this.Fa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=nc(this.h,a,this.g-a);this.g+=1;return Kf(a)};function Sf(){return new P(2,3,3E3)}M("shaka.util.DataViewReader",Qf);Qf.prototype.readTerminatedString=Qf.prototype.yd;Qf.prototype.seek=Qf.prototype.seek;Qf.prototype.rewind=Qf.prototype.Wi;
|
|
202
|
+
Qf.prototype.skip=Qf.prototype.skip;Qf.prototype.readBytes=Qf.prototype.Jb;Qf.prototype.readUint64=Qf.prototype.Nc;Qf.prototype.readInt32=Qf.prototype.Xg;Qf.prototype.readUint32=Qf.prototype.N;Qf.prototype.readUint16=Qf.prototype.ob;Qf.prototype.readUint8=Qf.prototype.Qa;Qf.prototype.getLength=Qf.prototype.getLength;Qf.prototype.getPosition=Qf.prototype.Ca;Qf.prototype.hasMoreData=Qf.prototype.Fa;var Rf=1;Qf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Rf};function Tf(){this.i=[];this.h=[];this.g=!1}p=Tf.prototype;p.box=function(a,b){a=Uf(a);this.i[a]=Vf;this.h[a]=b;return this};p.V=function(a,b){a=Uf(a);this.i[a]=Wf;this.h[a]=b;return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Qf(a,0);for(this.g=!1;a.Fa()&&!this.g;)this.wd(0,a,b,c)};
|
|
203
|
+
p.wd=function(a,b,c,d){var e=b.Ca();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.N(),g=b.N(),h=Xf(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ca()+8>b.getLength()){this.g=!0;return}f=b.Nc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Wf){if(d&&b.Ca()+4>b.getLength()){this.g=!0;return}n=b.N();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.Ca(),b=0<d?b.Jb(d):new Uint8Array(0),b=new Qf(b,0),l({name:h,parser:this,
|
|
204
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ca(),b.getLength()-b.Ca()))}};function Yf(a){for(var b=Zf(a);a.reader.Fa()&&!a.parser.g;)a.parser.wd(a.start+b,a.reader,a.partialOkay)}function $f(a){for(var b=Zf(a),c=a.reader.N(),d=0;d<c&&(a.parser.wd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function ag(a){var b=Zf(a);for(a.reader.skip(78);a.reader.Fa()&&!a.parser.g;)a.parser.wd(a.start+b,a.reader,a.partialOkay)}
|
|
205
|
+
function bg(a){return function(b){a(b.reader.Jb(b.reader.getLength()-b.reader.Ca()))}}function Uf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Xf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Zf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Tf);Tf.headerSize=Zf;Tf.typeToString=Xf;Tf.allData=bg;Tf.visualSampleEntry=ag;Tf.sampleDescription=$f;Tf.children=Yf;Tf.prototype.parseNext=Tf.prototype.wd;
|
|
206
|
+
Tf.prototype.parse=Tf.prototype.parse;Tf.prototype.stop=Tf.prototype.stop;Tf.prototype.fullBox=Tf.prototype.V;Tf.prototype.box=Tf.prototype.box;var Vf=0,Wf=1;function cg(){}function dg(a){a=nc(a);a=Mf.value()(a);return btoa(a)}function eg(a,b){b=void 0==b?!0:b;a=dg(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function fg(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function gg(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
207
|
+
function ig(a){var b=nc(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function jg(){for(var a=Ga.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,d instanceof Uint8Array?b.set(d,c):b.set(nc(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",cg);cg.concat=jg;cg.toHex=ig;cg.fromHex=gg;cg.fromBase64=fg;
|
|
208
|
+
cg.toBase64=eg;cg.toStandardBase64=dg;function kg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Tf).box("moov",Yf).box("moof",Yf).V("pssh",function(c){if(!(1<c.version)){var d=nc(c.reader.h,-12,c.size);b.data.push(d);b.g.push(ig(c.reader.Jb(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=ig(c.reader.Jb(16));b.h.push(f)}}}}).parse(a)}
|
|
209
|
+
function lg(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=rc(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=gg(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function mg(a,b){a=ng(a,b);return 1!=a.length?null:a[0]}function og(a,b,c){a=pg(a,b,c);return 1!=a.length?null:a[0]}function ng(a,b){var c=[];a=t(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function qg(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
210
|
+
function pg(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function rg(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function sg(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function tg(a){return Array.from(a.childNodes).every(ug)?a.textContent.trim():null}
|
|
211
|
+
function ug(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function vg(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function wg(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}
|
|
212
|
+
function xg(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}
|
|
213
|
+
function yg(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 zg(a){a=Number(a);return 0===a%1?a:null}function Ag(a){a=Number(a);return 0===a%1&&0<a?a:null}function Bg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Cg(a){a=Number(a);return isNaN(a)?null:a}function Dg(a){return a?"true"===a.toLowerCase():!1}
|
|
214
|
+
function Eg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
215
|
+
function Fg(a,b){var c=new DOMParser,d=Gg.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 Hg(a,b){try{var c=Nf(a);return Fg(c,b)}catch(d){return null}}
|
|
216
|
+
var Gg=new Ff(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 Ig(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.m=this.u=null;this.ha=this.$=!1;this.J=0;this.g=null;this.D=new Af;this.i=new Map;this.C=new Map;this.l=new $e;this.h=null;this.s=function(d){2==d.severity&&c.l.reject(d);a.onError(d)};this.T=new Map;this.va=new Map;this.U=new xd(function(){return Jg(c)});this.M=!1;this.L=[];this.P=!1;this.ea=(new xd(function(){Kg(c)})).ua(b);this.l.catch(function(){});this.j=new yf(function(){return Lg(c)});this.Z=!1;this.K=this.H=null}p=Ig.prototype;
|
|
217
|
+
p.destroy=function(){return this.j.destroy()};function Lg(a){return K(function(b){switch(b.g){case 1:return a.D.release(),a.D=null,a.l.reject(),a.ea.stop(),a.ea=null,a.U.stop(),a.U=null,D(b,Mg(a),2);case 2:if(!a.m){b.F(3);break}ta(b,4);return D(b,a.m.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.m=null;case 3:a.g=null,a.I.clear(),a.u=null,a.C=new Map,a.h=null,a.s=function(){},a.G=null,a.Z=!1,a.H=null,E(b)}})}p.configure=function(a){this.h=a};
|
|
218
|
+
function Ng(a,b,c){a.ha=!0;a.C=new Map;a.M=c;return Og(a,b)}function Pg(a,b,c){a.C=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.C.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.C.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.M=0<a.C.size;return Og(a,b)}
|
|
219
|
+
function Qg(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 Rg(a,g,[])}
|
|
220
|
+
function Og(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(C){if(1==C.g){if(c=Sg(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});g||(h=Gf(a.h.servers),Tg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Ug(m),r=t(n),q=r.next();!q.done;q=r.next())u=q.value,k.add(u);v=t(k);for(q=v.next();!q.done;q=
|
|
221
|
+
v.next())x=q.value,Vg(x,Gf(a.h.servers),Gf(a.h.advanced||{}),a.h.keySystemsMapping);return D(C,Xd(b,a.M,a.Z,a.h.preferredKeySystems),2)}z=g||Object.keys(a.h.servers).length;if(!z)return a.$=!0,C.return(Promise.resolve());y=Rg(a,void 0,b);return C.return(g?y:y.catch(function(){}))})}
|
|
222
|
+
function Wg(a){var b;return K(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.H){c.F(2);break}return D(c,a.H,3);case 3:return zf(a.j),c.return();case 2:return ta(c,4),a.H=a.m.setMediaKeys(a.u),D(c,a.H,6);case 6:va(c,5);break;case 4:b=wa(c),a.s(new P(2,6,6003,b.message));case 5:zf(a.j),E(c)}})}function Xg(a,b){return K(function(c){if(1==c.g)return D(c,Wg(a),2);Yg(a,b.initDataType,nc(b.initData));E(c)})}
|
|
223
|
+
p.yc=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.u)return b.D.ka(a,"encrypted",function(){b.s(new P(2,6,6010))}),c.return();b.m=a;b.D.ka(b.m,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())Zg(b,e.value);b.P=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.D.o(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Mg(b)});b.K=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.K||"com.apple.fps"!==b.g.keySystem||
|
|
224
|
+
b.C.size?D(c,Wg(b),2):c.F(2)}$g(b).catch(function(){});b.K||b.C.size||b.h.parseInbandPsshEnabled||b.D.o(b.m,"encrypted",function(d){return Xg(b,d)});E(c)})};
|
|
225
|
+
function ah(a){var b,c,d,e,f;return K(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.F(2);break}b=qf([a.g.serverCertificateUri],a.h.retryParameters);ta(g,3);c=a.G.rc.request(5,b);return D(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=nc(d.data);va(g,4);break;case 3:throw e=wa(g),new P(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();
|
|
226
|
+
ta(g,6);return D(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new P(2,6,6004,f.message);}})}function bh(a,b){var c,d,e;return K(function(f){if(1==f.g)return D(f,ch(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.wb=new $e,d.push(e.wb);d.push(c.remove());return D(f,Promise.all(d),3)}a.i.delete(c);E(f)})}
|
|
227
|
+
function $g(a){var b,c,d,e,f;return K(function(g){if(1==g.g){if(!a.C.size)return g.F(2);a.C.forEach(function(h,k){ch(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&&dh(a))return g.return(a.l);a.l=new $e;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Yg(a,f.initDataType,f.initData);c.length||a.l.resolve();return g.return(a.l)})}
|
|
228
|
+
function Yg(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(lc(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&eh(a)&&(a.l.resolve(),a.l=new $e,a.l.catch(function(){}));fh(a,b,c,a.g.sessionType)}}function gh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function hh(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}
|
|
229
|
+
p.tf=function(){var a=this,b=this.i.keys();b=db(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)};p.md=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};p.Zd=function(){return Hf(this.va)};
|
|
230
|
+
function Rg(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z;return K(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=ih(a,c,d);y.F(2);break}return D(y,jh(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new P(2,6,6001);zf(a.j);ta(y,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.I.add(n.contentType.toLowerCase());r=t(k);for(m=r.next();!m.done;m=r.next())q=m.value,a.I.add(q.contentType.toLowerCase());if(c.length){var C=
|
|
231
|
+
f.keySystem;var A=d.get(f.keySystem);var B=[],F=[],H=[],G=[],J=new Set;kh(A,B,H,F,G,J);var I=a.M?"persistent-license":"temporary";C={keySystem:C,licenseServerUri:B[0],distinctiveIdentifierRequired:A[0].distinctiveIdentifierRequired,persistentStateRequired:A[0].persistentStateRequired,sessionType:A[0].sessionType||I,audioRobustness:A[0].audioRobustness||"",videoRobustness:A[0].videoRobustness||"",serverCertificate:H[0],serverCertificateUri:F[0],initData:G,keyIds:J};A=t(A);for(B=A.next();!B.done;B=
|
|
232
|
+
A.next())B=B.value,B.distinctiveIdentifierRequired&&(C.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(C.persistentStateRequired=B.persistentStateRequired);A=C}else A=f.keySystem,C=b.get(f.keySystem),B=[],F=[],H=[],G=[],J=new Set,kh(C.drmInfos,B,H,F,G,J),A={keySystem:A,licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==C.distinctiveIdentifier,persistentStateRequired:"required"==C.persistentState,sessionType:C.sessionTypes[0]||"temporary",audioRobustness:(C.audioCapabilities?
|
|
233
|
+
C.audioCapabilities[0].robustness:"")||"",videoRobustness:(C.videoCapabilities?C.videoCapabilities[0].robustness:"")||"",serverCertificate:H[0],serverCertificateUri:F[0],initData:G,keyIds:J};a.g=A;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return D(y,f.createMediaKeys(),6);case 6:u=y.h;zf(a.j);a.u=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.u)){y.F(7);break}ta(y,8);return D(y,a.u.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:v=y.h;if("usable"!=v)throw new P(2,
|
|
234
|
+
6,6018);zf(a.j);va(y,7,4);break;case 8:x=wa(y,4);if(x instanceof P)throw x;throw new P(2,6,6019,x.message);case 7:return a.$=!0,D(y,ah(a),11);case 11:zf(a.j);va(y,0);break;case 4:z=wa(y);zf(a.j,z);a.g=null;a.I.clear();if(z instanceof P)throw z;throw new P(2,6,6002,z.message);}})}
|
|
235
|
+
function ih(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ug(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 P(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Ke:d.Ke},e=a.next())for(d.Ke=e.value,f=t(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==
|
|
236
236
|
l.Ke}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(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=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
237
|
-
function
|
|
237
|
+
function jh(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x;return K(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){z.F(4);break}k=h.value;if(!b.has(k)){z.F(3);break}l=b.get(k);ta(z,6);return D(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
238
238
|
z.h,z.return(c);case 6:wa(z);case 7:zf(a.j);case 3:h=g.next();z.F(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.F(11);break}r=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();z.F(9);break}u=h.value;v=b.get(u);x=v.drmInfos.some(function(y){return!!y.licenseServerUri});if(x!=r){z.F(13);break}ta(z,15);return D(z,navigator.requestMediaKeySystemAccess(u,[v]),17);case 17:return c=z.h,z.return(c);case 15:wa(z);case 16:zf(a.j);case 13:h=q.next();z.F(12);break;case 11:return z.return(c)}})}
|
|
239
|
-
function
|
|
240
|
-
videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}function
|
|
241
|
-
function
|
|
242
|
-
d.load(b),4);case 4:return g=m.h,zf(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.s(new
|
|
243
|
-
function
|
|
244
|
-
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
|
|
245
|
-
function
|
|
246
|
-
Lf(g.body,!0,!0);if(x.includes("PlayReadyKeyMessage")){x=
|
|
247
|
-
wa(v),n=new
|
|
248
|
-
function
|
|
249
|
-
|
|
250
|
-
function
|
|
251
|
-
r;return
|
|
252
|
-
function
|
|
253
|
-
function
|
|
254
|
-
function
|
|
239
|
+
function Sg(a){a=Gf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=eg(gg(f),!1));f=e;22!=f.length&&(f=eg(gg(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:nc(Of(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
|
|
240
|
+
videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}function lh(a){eh(a)&&a.l.resolve()}function mh(a,b){(new xd(function(){b.loaded=!0;lh(a)})).S(nh)}
|
|
241
|
+
function ch(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:try{d=a.u.createSession("persistent-license")}catch(n){return e=new P(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.D.o(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.P?a.L.push(n):Zg(a,n)});a.D.o(d,"keystatuseschange",function(n){return oh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Of:Infinity,wb:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return D(m,
|
|
242
|
+
d.load(b),4);case 4:return g=m.h,zf(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.s(new P(h,6,6013)),f.loaded=!0),mh(a,f),lh(a),m.return(d);case 2:k=wa(m),zf(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.s(new P(l,6,6005,k.message)),f.loaded=!0,lh(a);case 3:return m.return(Promise.resolve())}})}
|
|
243
|
+
function fh(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.s(new P(2,6,6005,f.message));return}a.D.o(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.P?a.L.push(f):Zg(a,f)});a.D.o(e,"keystatuseschange",function(f){return oh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Of:Infinity,wb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.s(b);return}a.h.logLicenseExchange&&eg(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
244
|
+
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 P(2,6,6006,f.message,f,h))}})}
|
|
245
|
+
function Zg(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u;K(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&eg(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=qf([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(gh(a.g.keySystem)){var x=
|
|
246
|
+
Lf(g.body,!0,!0);if(x.includes("PlayReadyKeyMessage")){x=Fg(x,"PlayReadyKeyMessage");for(var z=t(x.getElementsByTagName("HttpHeader")),y=z.next();!y.done;y=z.next())y=y.value,g.headers[y.getElementsByTagName("name")[0].textContent]=y.getElementsByTagName("value")[0].textContent;g.body=fg(x.getElementsByTagName("Challenge")[0].textContent)}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ta(v,2);l=a.G.rc.request(2,g);return D(v,l.promise,4);case 4:k=v.h;va(v,3);break;case 2:return m=
|
|
247
|
+
wa(v),n=new P(2,6,6007,m),a.s(n),d&&d.wb&&d.wb.reject(n),v.return();case 3:if(a.j.g)return v.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&eg(k.data);ta(v,5);return D(v,c.update(k.data),7);case 7:va(v,6);break;case 5:return r=wa(v),q=new P(2,6,6008,r.message),a.s(q),d&&d.wb&&d.wb.reject(q),v.return();case 6:if(a.j.g)return v.return();u=new N("drmsessionupdate");a.G.onEvent(u);d&&(d.wb&&d.wb.resolve(),mh(a,d));E(v)}})}
|
|
248
|
+
function oh(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(gh(a.g.keySystem)&&16==g.byteLength&&(Bd()||Jd())){h=rc(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=ig(g).slice(0,32);a.T.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.wb&&(a.i.delete(b),b.close().catch(function(){}));
|
|
249
|
+
eh(a)&&(a.l.resolve(),a.U.S(ph))}function Jg(a){var b=a.T,c=a.va;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 P(2,6,6014));a.G.we(Hf(c))}
|
|
250
|
+
function qh(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,
|
|
251
|
+
r;return K(function(q){switch(q.g){case 1:ta(q,2);if("org.w3.clearkey"===l&&Kd())throw Error("Unsupported keySystem");return D(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,r=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Fd()&&(r=!1),f.set(l,{persistentState:r}),D(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:wa(q),f.set(l,null),E(q)}})},h=a.map(function(l){return g(l)}),D(k,Promise.all(h),2)):k.return(Hf(f))})}
|
|
252
|
+
function rh(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new xd(e)).S(sh)}),ta(c,2),D(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);wa(c);E(c)})}
|
|
253
|
+
function Mg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return D(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return ta(g,2),a.ha||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?D(g,rh(e),5):D(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);E(g)})})),0)})}function th(a,b){return a.length&&b.length&&a!==b?0<uh(a,b).length:!0}
|
|
254
|
+
function uh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(w(d.keyIds),w(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
255
255
|
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}
|
|
256
|
-
function
|
|
257
|
-
function
|
|
258
|
-
function
|
|
259
|
-
m.
|
|
260
|
-
function
|
|
261
|
-
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
|
|
262
|
-
function(l){g.push({box:l,$b:1701733217})}).
|
|
263
|
-
function
|
|
264
|
-
k.setUint32(b,a+1);return e}function
|
|
265
|
-
function
|
|
266
|
-
this.C&&this.h.length&&this.h[this.h.length-1].Rg()}p=
|
|
256
|
+
function Ug(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Kg(a){a.i.forEach(function(b,c){var d=b.Of,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Of=e)})}function eh(a){a=a.i.values();return eb(a,function(b){return b.loaded})}function dh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.T.get(c.value))return!1;return!0}
|
|
257
|
+
function Tg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
258
|
+
function kh(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={Ra:g.Ra},h=a.next()){g.Ra=h.value;b.includes(g.Ra.licenseServerUri)||b.push(g.Ra.licenseServerUri);d.includes(g.Ra.serverCertificateUri)||d.push(g.Ra.serverCertificateUri);g.Ra.serverCertificate&&(c.some(function(m){return function(n){return lc(n,m.Ra.serverCertificate)}}(g))||c.push(g.Ra.serverCertificate));if(g.Ra.initData){h={};for(var k=t(g.Ra.initData),l=k.next();!l.done;h={Jd:h.Jd},l=k.next())h.Jd=l.value,e.some(function(m){return function(n){var r=
|
|
259
|
+
m.Jd;return n.keyId&&n.keyId==r.keyId?!0:n.initDataType==r.initDataType&&lc(n.initData,r.initData)}}(h))||e.push(h.Jd)}if(g.Ra.keyIds)for(h=t(g.Ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
260
|
+
function Vg(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=
|
|
261
|
+
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 sh=1,nh=5,ph=.5,vh=new Ff(function(){return oc(new Uint8Array([0]))});function wh(){}function xh(a,b){if(b&&(b=yh[b.toLowerCase()]))return b;throw new P(2,4,4E3,a);}M("shaka.media.ManifestParser",wh);wh.unregisterParserByMime=function(a){delete yh[a]};wh.registerParserByMime=function(a,b){yh[a]=b};wh.registerParserByExtension=function(){Ae("ManifestParser","Please use an ManifestParser with registerParserByMime function.")};wh.AccessibilityPurpose={$j:"visually impaired",wj:"hard of hearing"};var yh={};function zh(a){function b(){d=!0}function c(l){f.push(l);Yf(l)}a=nc(a);var d=!1,e,f=[],g=[];(new Tf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).V("stsd",function(l){e=l;f.push(l);$f(l)}).V("encv",b).V("enca",b).V("hev1",function(l){g.push({box:l,$b:1701733238})}).V("hvc1",function(l){g.push({box:l,$b:1701733238})}).V("avc1",function(l){g.push({box:l,$b:1701733238})}).V("avc3",function(l){g.push({box:l,$b:1701733238})}).V("ac-3",function(l){g.push({box:l,$b:1701733217})}).V("ec-3",
|
|
262
|
+
function(l){g.push({box:l,$b:1701733217})}).V("ac-4",function(l){g.push({box:l,$b:1701733217})}).V("mp4a",function(l){g.push({box:l,$b:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ab(ig(a)),new P(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Ah(a,e,k.box,f,k.$b);return a}
|
|
263
|
+
function Ah(a,b,c,d,e){var f=Bh.value(),g=a.subarray(c.start,c.start+c.size),h=rc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=rc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ch(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Cd()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Ch(e,d.start,d.size+k.byteLength);k=rc(e,b.start);b=Zf(b);a=k.getUint32(b);
|
|
264
|
+
k.setUint32(b,a+1);return e}function Ch(a,b,c){a=rc(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 Bh=new Ff(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 Dh(a,b,c,d,e,f,g){this.aa=a;this.bb=b;this.Ia=c;this.Jf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g}Dh.prototype.Wb=function(){return this.bb};Dh.prototype.Sb=function(){return this.Ia};function Eh(a,b){return a&&b?a.Wb()==b.Wb()&&a.Sb()==b.Sb()&&zc(a.aa(),b.aa())&&lc(a.g,b.g):a==b}M("shaka.media.InitSegmentReference",Dh);Dh.prototype.getEndByte=Dh.prototype.Sb;Dh.prototype.getStartByte=Dh.prototype.Wb;
|
|
265
|
+
function Fh(a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v){l=void 0===l?[]:l;q=void 0===q?Gh:q;this.startTime=a;this.j=this.endTime=b;this.J=c;this.bb=d;this.Ia=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.I=void 0===n?null:n;this.i=void 0===r?null:r;this.status=q;this.m=!1;this.u=!0;this.s=!1;this.aes128Key=void 0===u?null:u;this.H=null;this.l=0;this.C=void 0===v?!1:v;this.D=this.G=!1;a=t(this.h);for(b=a.next();!b.done;b=a.next())b.value.Sg();
|
|
266
|
+
this.C&&this.h.length&&this.h[this.h.length-1].Rg()}p=Fh.prototype;p.aa=function(){return this.J()};p.getStartTime=function(){return this.startTime};p.Th=function(){return this.endTime};p.Wb=function(){return this.bb};p.Sb=function(){return this.Ia};p.ki=function(){return this.tilesLayout};p.ji=function(){return this.I};p.kc=function(){return this.status};p.Fi=function(){this.status=Hh};p.If=function(){this.m=!0};p.Ai=function(){return this.m};p.oe=function(){this.u=!1};p.wi=function(){return this.u};
|
|
267
267
|
p.Sg=function(){this.G=!0};p.zi=function(){return this.G};p.Rg=function(){this.D=!0};p.xi=function(){return this.D};p.Qg=function(){this.s=!0};p.ri=function(){return this.s};p.ih=function(a){this.H=a};p.ii=function(){return this.H};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
268
|
-
p.jg=function(a){null==this.i?Ta("Sync attempted without sync time!"):(a=this.i-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};M("shaka.media.SegmentReference",
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
function
|
|
268
|
+
p.jg=function(a){null==this.i?Ta("Sync attempted without sync time!"):(a=this.i-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};M("shaka.media.SegmentReference",Fh);Fh.prototype.syncAgainst=Fh.prototype.jg;Fh.prototype.offset=Fh.prototype.offset;Fh.prototype.getThumbnailSprite=Fh.prototype.ii;Fh.prototype.setThumbnailSprite=Fh.prototype.ih;Fh.prototype.hasByterangeOptimization=Fh.prototype.ri;Fh.prototype.markAsByterangeOptimization=Fh.prototype.Qg;Fh.prototype.isLastPartial=Fh.prototype.xi;
|
|
269
|
+
Fh.prototype.markAsLastPartial=Fh.prototype.Rg;Fh.prototype.isPartial=Fh.prototype.zi;Fh.prototype.markAsPartial=Fh.prototype.Sg;Fh.prototype.isIndependent=Fh.prototype.wi;Fh.prototype.markAsNonIndependent=Fh.prototype.oe;Fh.prototype.isPreload=Fh.prototype.Ai;Fh.prototype.markAsPreload=Fh.prototype.If;Fh.prototype.markAsUnavailable=Fh.prototype.Fi;Fh.prototype.getStatus=Fh.prototype.kc;Fh.prototype.getTileDuration=Fh.prototype.ji;Fh.prototype.getTilesLayout=Fh.prototype.ki;
|
|
270
|
+
Fh.prototype.getEndByte=Fh.prototype.Sb;Fh.prototype.getStartByte=Fh.prototype.Wb;Fh.prototype.getEndTime=Fh.prototype.Th;Fh.prototype.getStartTime=Fh.prototype.getStartTime;Fh.prototype.getUris=Fh.prototype.aa;var Gh=0,Hh=1;Fh.Status={jj:Gh,Yj:Hh,Cj:2};function Ih(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Jh(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Kh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Lh(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
271
|
+
function Mh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Lh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Lh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
|
|
272
272
|
@license
|
|
273
273
|
Shaka Player
|
|
274
274
|
Copyright 2022 Google LLC
|
|
275
275
|
SPDX-License-Identifier: Apache-2.0
|
|
276
276
|
*/
|
|
277
|
-
function
|
|
278
|
-
function
|
|
277
|
+
function Nh(){}function Oh(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Ph(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Qh(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
|
|
278
|
+
function Rh(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Kf(nc(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Kf(nc(a.data,3+c,f)),h;"--\x3e"===d?h=Kf(nc(a.data,4+c+f)):h=oc(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
|
|
279
279
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Kf(nc(a.data,1,d));a=Kf(nc(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Kf(nc(a.data,1,d));a=Kf(nc(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Kf(nc(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
280
280
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=oc(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Kf(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Kf(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=oc(a.data),b):null}
|
|
281
|
-
function
|
|
282
|
-
|
|
283
|
-
function
|
|
284
|
-
function
|
|
281
|
+
function Sh(a){for(var b=0,c=[];Oh(a,b);){var d=Qh(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=Qh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Rh(e))&&c.push(f);b+=e.size+10}Ph(a,b)&&(b+=10)}return c}function Th(a,b){for(var c=b=void 0===b?0:b,d=0;Oh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Qh(a,b+6),Ph(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}M("shaka.util.Id3Utils",Nh);Nh.getID3Data=Th;
|
|
282
|
+
Nh.getID3Frames=Sh;function Uh(a,b){var c=null,d=null,e=null,f=a.N();b&1&&(e=a.Nc());b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:f,Eg:c,Gh:d,ck:e}}function Wh(a,b){return 1==b?(b=a.N(),a=a.N(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.N()}}function Xh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.N();a.skip(4);a=a.ob();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
283
|
+
function Yh(a,b,c){var d=a.N(),e=[],f=null;c&1&&(f=a.N());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Yf:null,sampleSize:null,ze:null};c&256&&(h.Yf=a.N());c&512&&(h.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(h.ze=0==b?a.N():a.Xg());e.push(h)}return{gk:d,$g:e,Fh:f}}
|
|
284
|
+
function Zh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.N();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.ob()+a.ob()/16;a=a.ob()+a.ob()/16;return{trackId:c,width:b,height:a}}function $h(a){var b="mp4a";a.skip(11);b+="."+this.g(a.Qa());b+="."+this.g(a.Qa()>>>2&63).replace(/^0/,"");return{ra:b}}function ai(a,b){a.skip(87);return{ra:b+"."+this.g(a.Qa())+this.g(a.Qa())+this.g(a.Qa())}}function bi(a){a=a.N();return{ra:Xf(a)}};/*
|
|
285
285
|
|
|
286
286
|
Copyright Brightcove, Inc.
|
|
287
287
|
|
|
@@ -297,125 +297,125 @@ function $h(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.N();1=
|
|
|
297
297
|
See the License for the specific language governing permissions and
|
|
298
298
|
limitations under the License.
|
|
299
299
|
*/
|
|
300
|
-
function
|
|
301
|
-
function
|
|
302
|
-
function
|
|
303
|
-
p.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,
|
|
304
|
-
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(-1==g.audio&&0<m)for(var n=h+5,r=m;2<r;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var q=f[n+1]+2;n+=q;r-=q}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.
|
|
305
|
-
"hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.H=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.u=f.audio,this.s=f.audioCodec);-1!=f.
|
|
306
|
-
(f=this.i[this.i.length-1])&&(this.i[this.i.length-1]=
|
|
307
|
-
function
|
|
308
|
-
p.Li=function(a){
|
|
309
|
-
p.Rf=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);for(var f=0,g=[],h=-1,k=0,l,m=0;m<d;++m){var n=a[m];if(n){if(2<=f&&1==n){b&&!g.length&&-1==h&&(n=m-(3<f?3:f),0!=n&&(n=a.subarray(0,n),b.data=
|
|
310
|
-
a[m]&31}f=0}else f++;m>=d-1&&0<=h&&0<=f&&(l={data:a.subarray(h+e,d),na:a.subarray(h,d),type:k,time:c})}l&&g.push(l);!g.length&&b&&(b.data=
|
|
311
|
-
p.hc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){c=c.value;var d=
|
|
312
|
-
p.Fc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=
|
|
313
|
-
(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.hc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Fc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.
|
|
314
|
-
p.
|
|
315
|
-
function
|
|
300
|
+
function ci(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=nc(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function di(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 Qf(c,0)).N(),a.g=8*d,a.i-=d)}function ei(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;di(a)}a.h<<=b;a.g-=b}
|
|
301
|
+
function fi(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&&di(a);c=b-c;return 0<c?d<<c|fi(a,c):d}function gi(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;di(a);return b+gi(a)}function hi(a){ei(a,1+gi(a))}function R(a){var b=gi(a);return fi(a,b+1)-1}function ii(a){a=R(a);return 1&a?1+a>>>1:-1*(a>>>1)}function S(a){return 1===fi(a,1)}function ji(a){return fi(a,8)}
|
|
302
|
+
function ki(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=ii(a),d=(c+d+256)%256),c=0===d?c:d}function li(a){ji(a);R(a);return R(a)}M("shaka.util.ExpGolomb",ci);function mi(){this.D=null;this.G=!1;this.m=this.H=null;this.j=[];this.g=[];this.s=this.u=null;this.i=[];this.h=[];this.C=null;this.l=[]}p=mi.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
303
|
+
p.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,ni(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.D=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.D:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,ie:-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<
|
|
304
|
+
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(-1==g.audio&&0<m)for(var n=h+5,r=m;2<r;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var q=f[n+1]+2;n+=q;r-=q}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.ie&&(g.ie=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=
|
|
305
|
+
"hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.H=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.u=f.audio,this.s=f.audioCodec);-1!=f.ie&&(this.C=f.ie);d&&!this.G&&(d=!1,e=b-188);this.G=!0;break;case this.H:h=a.subarray(h,e+188);f?this.j.push(h):this.j.length&&(f=this.j[this.j.length-1])&&(this.j[this.j.length-1]=jg(f,h));break;case this.u:h=a.subarray(h,e+188);f?this.i.push(h):this.i.length&&
|
|
306
|
+
(f=this.i[this.i.length-1])&&(this.i[this.i.length-1]=jg(f,h));break;case this.C:h=a.subarray(h,e+188);f?this.l.push(h):this.l.length&&(f=this.l[this.l.length-1])&&(this.l[this.l.length-1]=jg(f,h));break;default:d=!0}}return this};
|
|
307
|
+
function oi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),Wg:a[4]<<8|a[5],pts:null,dts:null,Zb:[]};if(b.Wg&&b.Wg>a.byteLength-6)return null;var c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));c=a[8]+9;if(a.byteLength<=c)return null;b.data=a.subarray(c);return b}
|
|
308
|
+
p.Li=function(a){Ae("TsParser","Please use parseNalus function instead.");return this.Rf(a)};
|
|
309
|
+
p.Rf=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);for(var f=0,g=[],h=-1,k=0,l,m=0;m<d;++m){var n=a[m];if(n){if(2<=f&&1==n){b&&!g.length&&-1==h&&(n=m-(3<f?3:f),0!=n&&(n=a.subarray(0,n),b.data=jg(b.data,n),b.na=jg(b.na,n)));0<=h?(f=m-((3<f?3:f)+1),g.push({data:a.subarray(h+e,f+1),na:a.subarray(h,f+1),type:k,time:c})):b&&!g.length&&(h=m-f,0<h&&(h=a.subarray(0,h),b.data=jg(b.data,h),b.na=jg(b.na,h)));if(m>=d-e)return g;m++;h=m;k="hvc"==this.m?a[m]>>1&63:
|
|
310
|
+
a[m]&31}f=0}else f++;m>=d-1&&0<=h&&0<=f&&(l={data:a.subarray(h+e,d),na:a.subarray(h,d),type:k,time:c})}l&&g.push(l);!g.length&&b&&(b.data=jg(b.data,a),b.na=jg(b.na,a));return g};p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())(c=oi(c.value))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Sh(c.data),dts:c.dts,pts:c.pts});return a};
|
|
311
|
+
p.hc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){c=c.value;var d=oi(c);d&&null!=d.pts&&null!=d.dts?(this.h.length&&d.dts<(this.h[this.h.length-1].dts||0)&&(a=!0),this.h.push(d)):this.h.length&&(c=d?d.data:c)&&(d=this.h.pop(),d.data=jg(d.data,c),this.h.push(d))}a&&(this.h=this.h.sort(function(e,f){var g=(e.pts||0)-(f.pts||0);return(e.dts||0)-(f.dts||0)||g}))}return this.h};
|
|
312
|
+
p.Fc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=oi(d);e&&null!=e.pts&&null!=e.dts?(this.g.length&&e.dts<(this.g[this.g.length-1].dts||0)&&(b=!0),this.g.push(e)):this.g.length&&(d=e?e.data:d)&&(e=this.g.pop(),e.data=jg(e.data,d),this.g.push(e))}if(a){var f;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.Zb=this.Rf(d,f),d.Zb.length&&(f=d.Zb[d.Zb.length-1]);this.g=this.g.filter(function(g){return g.Zb.length})}b&&
|
|
313
|
+
(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.hc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Fc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.kd=function(){return{audio:this.s,video:this.m}};
|
|
314
|
+
p.ce=function(){for(var a=[],b=t(this.Fc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.Zb));return a};p.ni=function(){Ae("TsParser","Please use getVideoInfo function instead.");var a=this.zf();return{height:a.height,width:a.width}};p.zf=function(){return"hvc"==this.m?pi(this):qi(this)};
|
|
315
|
+
function qi(a){var b={height:null,width:null,ra:null};a=a.ce();if(!a.length)return b;a=a.find(function(r){return 7==r.type});if(!a)return b;a=new ci(a.data);var c=ji(a),d=ji(a),e=ji(a);hi(a);if(ri.includes(c)){var f=R(a);3===f&&ei(a,1);hi(a);hi(a);ei(a,1);if(S(a)){f=3!==f?8:12;for(var g=0;g<f;g++)S(a)&&(6>g?ki(a,16):ki(a,64))}}hi(a);f=R(a);if(0===f)R(a);else if(1===f)for(ei(a,1),hi(a),hi(a),f=R(a),g=0;g<f;g++)hi(a);hi(a);ei(a,1);f=R(a);g=R(a);var h=fi(a,1);0===h&&ei(a,1);ei(a,1);var k=0,l=0,m=0,n=
|
|
316
316
|
0;S(a)&&(k=R(a),l=R(a),m=R(a),n=R(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.ra="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
317
|
-
function
|
|
318
|
-
R(c),z+=R(c),y+=R(c),
|
|
319
|
-
b.ra=e;return b}function
|
|
320
|
-
|
|
321
|
-
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
|
|
322
|
-
|
|
317
|
+
function pi(a){var b={height:null,width:null,ra:null};a=a.ce();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new ci(a.na,!0);ji(c);ji(c);fi(c,4);var d=fi(c,3);S(c);var e=fi(c,2),f=fi(c,1),g=fi(c,5),h=fi(c,32);a=ji(c);for(var k=ji(c),l=ji(c),m=ji(c),n=ji(c),r=ji(c),q=ji(c),u=[],v=[],x=0;x<d;x++)u.push(S(c)),v.push(S(c));if(0<d)for(x=d;8>x;x++)fi(c,2);for(x=0;x<d;x++)u[x]&&fi(c,88),v[x]&&ji(c);R(c);d=R(c);3==d&&fi(c,1);u=R(c);v=R(c);var z=x=0,y=0,C=0;S(c)&&(x+=
|
|
318
|
+
R(c),z+=R(c),y+=R(c),C+=R(c));b.width=String(u-(x+z)*(1===d||2===d?2:1));b.height=String(v-(y+C)*(1===d?2:1));c=function(A){for(var B=0,F=0;32>F;F++)B|=(A>>F&1)<<31-F;return B>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+q;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+="."+a.toString(16).toUpperCase());
|
|
319
|
+
b.ra=e;return b}function si(a){return 0>ni(a)?!1:!0}function ni(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}M("shaka.util.TsParser",mi);mi.syncOffset=ni;mi.probe=si;mi.prototype.getVideoInfo=mi.prototype.zf;mi.prototype.getVideoResolution=mi.prototype.ni;mi.prototype.getVideoNalus=mi.prototype.ce;mi.prototype.getCodecs=mi.prototype.kd;mi.prototype.getStartTime=mi.prototype.getStartTime;mi.prototype.getVideoData=mi.prototype.Fc;
|
|
320
|
+
mi.prototype.getAudioData=mi.prototype.hc;mi.prototype.getMetadata=mi.prototype.getMetadata;mi.prototype.parseNalus=mi.prototype.Rf;mi.prototype.parseAvcNalus=mi.prototype.Li;mi.prototype.parse=mi.prototype.parse;mi.prototype.clearData=mi.prototype.clearData;mi.Timescale=9E4;var ri=[100,110,122,244,44,83,86,118,128,138,139,134];function ti(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,Ae("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"),
|
|
321
|
+
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 ui(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
322
|
+
ti.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function vi(a,b,c){var d=wi,e=xi;switch(b.mimeType){case "video/webm":d=yi;break;case "video/mp4":d=zi}switch(c){case "DASH":e=Ai;break;case "HLS":e=Bi}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}M("shaka.lcevc.Dec",ti);ti.prototype.release=ti.prototype.release;var wi=0,yi=1,zi=2,Bi=0,Ai=1,xi=-1;function Di(a,b,c,d){var e=this;this.i=a;this.G=null;this.H=b;this.g={};this.I={};this.ea={};this.h=null;this.U=!1;this.oa=c||function(){};this.P=d||null;this.j={};this.s=new Af;this.u={};this.J=null;this.L=new $e;this.M="";this.Z=!1;this.l=Ei(this,this.L);this.D=!1;this.K=new yf(function(){return Fi(e)});this.C=!1;this.T="UNKNOWN";this.va=this.ha=!1;this.xa=new $e;this.m=!1;this.$=!0}
|
|
323
323
|
function Ei(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.s.o(c,"startstreaming",function(){a.$=!0});a.s.o(c,"endstreaming",function(){a.$=!1});a.s.ka(a.i,"playing",function(){a.Z=!0});a.M=Gi(c);a.i.src=a.M;return c}c=new MediaSource;a.s.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.s.ka(a.i,"playing",function(){a.Z=!0});a.M=Gi(c);a.i.src=a.M;return c}
|
|
324
324
|
p=Di.prototype;p.destroy=function(){return this.K.destroy()};
|
|
325
|
-
function Fi(a){var b,c,d,e,f,g,h,k;return
|
|
326
|
-
a.j={};a.P=null;
|
|
327
|
-
function Hi(a,b,c,d){var e=
|
|
328
|
-
}a.C&&(h.mode=Ji);a.s.o(h,"error",function(){a.j[b][0].p.reject(new
|
|
329
|
-
function Ii(a,b,c,d){a.h||(a.h=new
|
|
330
|
-
function Mi(a,b){a.D||!Object.keys(a.g).length?a=null:b==
|
|
331
|
-
p.Eb=function(){var a={total:this.D?[]:
|
|
332
|
-
function Qi(a,b,c,d,e,f){var g=null,h=nc(c);if(
|
|
333
|
-
k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!
|
|
334
|
-
function Ri(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,q,u,v,x,z,y,A
|
|
335
|
-
case 6:if(!a.g[b])return B.return();r=a.g[b].timestampOffset;q=a.I[b];a.u[b]&&(q=a.u[b].getOriginalMimeType());d&&(u=Qi(a,b,c,d,q,r),null!=u&&(v=d.startTime-u,x=Math.abs(r-v),(.1<=x||g||h)&&(!k||0<v||!r)&&(r=v,a.va&&(Si(a,b,function(){return Ti(a,b)}),Si(a,b,function(){return Ui(a,b,r)}))),z=b==m.qa||!(m.qa in a.g),a.C&&z&&a.xa.resolve(r)));f&&b==m.qa&&(a.h||Ii(a,"application/cea-608",a.C,!1),a.J||(y=q.split(";",1)[0],a.J=new tc(y)),d?(
|
|
336
|
-
if(!a.u[b]){B.F(9);break}return D(B,a.u[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=B.h;case 9:return c=Vi(a,c,d?d.startTime:null,b),d&&a.C&&b!=m.wa&&(g||h)&&(
|
|
337
|
-
p.remove=function(a,b,c){var d=this,e;return
|
|
338
|
-
p.flush=function(a){var b=this,c;return
|
|
339
|
-
function $i(a,b,c,d,e,f,g,h){var k,l,m;return
|
|
340
|
-
k.W,function(){var r=k.W;a.g[r].appendWindowStart=0;a.g[r].appendWindowEnd=e;a.g[r].appendWindowStart=d;Ki(a,r)}));return D(n,Promise.all(l),0)})}function bj(a,b,c){var d;return
|
|
341
|
-
p.endOfStream=function(a){var b=this;return
|
|
325
|
+
function Fi(a){var b,c,d,e,f,g,h,k;return K(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(ud)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.h&&b.push(a.h.destroy());a.H&&b.push(a.H.destroy());for(k in a.u)b.push(a.u[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.G=null;a.l=null;a.h=null;a.H=null;a.g={};a.u={};a.J=null;
|
|
326
|
+
a.j={};a.P=null;E(l)})}p.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 K(function(m){if(1==m.g)return f=Mb,D(m,e.L,2);e.C=b;e.T=c;e.ha=d;e.va=!e.C&&"HLS"==e.T&&!e.ha;g=t(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=a.get(k),Hi(e,k,l,l.codecs),e.m?(e.j[f.W]=[],e.j[f.qa]=[]):e.j[k]=[];E(m)})};
|
|
327
|
+
function Hi(a,b,c,d){var e=dd(c.mimeType,d);if(b==Lb)Ii(a,e,a.C,c.external);else{var f=a.G.forceTransmux;if(!fc(e)||!a.C&&ed.includes(e))f=!0;var g=fd(c.mimeType,d);if(f){f=Jb("audio",(d||"").split(","));d=Jb("video",(d||"").split(","));if(f&&d){a.m=!0;Hi(a,"audio",c,f);Hi(a,"video",c,d);return}if(d=Yc(g))e=d(),a.u[b]=e,e=e.convertCodecs(b,g)}g=e+a.G.sourceBufferExtraFeatures;zf(a.K);try{var h=a.l.addSourceBuffer(g)}catch(k){throw new P(2,3,3015,k,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");
|
|
328
|
+
}a.C&&(h.mode=Ji);a.s.o(h,"error",function(){a.j[b][0].p.reject(new P(2,3,3014,a.i.error?a.i.error.code:0))});a.s.o(h,"updateend",function(){return Ki(a,b)});a.g[b]=h;a.I[b]=e;a.ea[b]=!!c.drmInfos.length}}p.configure=function(a){this.G=a};
|
|
329
|
+
function Ii(a,b,c,d){a.h||(a.h=new ld(a.H));var e=a.h;d=d||a.U;a=a.T;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,nd[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Ua('Text parsers should have a "setManifestType" method!'),e.C=d)}function Li(a){return a.D?!1:a.l?"ended"==a.l.readyState:!0}
|
|
330
|
+
function Mi(a,b){a.D||!Object.keys(a.g).length?a=null:b==Lb?a=a.h.g:(a=Ni(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 Oi(a,b){return a.D?null:b==Lb?a.h.h:Ih(Ni(a,b))}function Pi(a,b,c){if(a.D)return 0;if(b==Lb)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Ni(a,b);return Kh(a,c)}
|
|
331
|
+
p.Eb=function(){var a={total:this.D?[]:Lh(this.i.buffered),audio:this.D?[]:Lh(Ni(this,"audio")),video:this.D?[]:Lh(Ni(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Ni(a,b){try{return a.g[b].buffered}catch(c){return null}}
|
|
332
|
+
function Qi(a,b,c,d,e,f){var g=null,h=nc(c);if(ed.includes(e))f=Sh(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.oa([{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.g&&d.g.timescale){var k=d.g.timescale;if(!isNaN(k)){var l=0,m=!1;(new Tf).box("moof",Yf).box("traf",Yf).V("tfdt",function(n){l=Wh(n.reader,n.version).baseMediaDecodeTime/
|
|
333
|
+
k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!si(h)||(h=(new mi).parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.oa(h,f,d?d.endTime:null));return g}
|
|
334
|
+
function Ri(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,q,u,v,x,z,y,C,A;return K(function(B){switch(B.g){case 1:m=Mb;if(b!=m.wa){B.F(2);break}if(!a.C){B.F(3);break}return D(B,a.xa,4);case 4:n=B.h,a.h.u=n;case 3:return D(B,od(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.aa()[0]:null),5);case 5:return B.return();case 2:if(l||!a.m){B.F(6);break}return D(B,Ri(a,m.W,c,d,e,f,g,h,k,!0),7);case 7:return D(B,Ri(a,m.qa,c,d,e,f,g,h,k,!0),8);case 8:return B.return();
|
|
335
|
+
case 6:if(!a.g[b])return B.return();r=a.g[b].timestampOffset;q=a.I[b];a.u[b]&&(q=a.u[b].getOriginalMimeType());d&&(u=Qi(a,b,c,d,q,r),null!=u&&(v=d.startTime-u,x=Math.abs(r-v),(.1<=x||g||h)&&(!k||0<v||!r)&&(r=v,a.va&&(Si(a,b,function(){return Ti(a,b)}),Si(a,b,function(){return Ui(a,b,r)}))),z=b==m.qa||!(m.qa in a.g),a.C&&z&&a.xa.resolve(r)));f&&b==m.qa&&(a.h||Ii(a,"application/cea-608",a.C,!1),a.J||(y=q.split(";",1)[0],a.J=new tc(y)),d?(C=a.J.i(c),C.length&&sd(a.h,C,d.startTime,d.endTime,r)):a.J.init(c));
|
|
336
|
+
if(!a.u[b]){B.F(9);break}return D(B,a.u[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=B.h;case 9:return c=Vi(a,c,d?d.startTime:null,b),d&&a.C&&b!=m.wa&&(g||h)&&(A=d.startTime,Si(a,b,function(){return Ti(a,b)}),Si(a,b,function(){return Ui(a,b,A)})),D(B,Si(a,b,function(){var F=c;if("video"==b&&a.P){var H=a.P;H.g&&H.g.appendBuffer(F,"video",H.s,-r)}a.g[b].appendBuffer(F)}),11);case 11:E(B)}})}function Wi(a,b){var c=Oi(a,"video")||0;qd(a.h,b,c)}function Xi(a){a.h&&qd(a.h,"",0)}
|
|
337
|
+
p.remove=function(a,b,c){var d=this,e;return K(function(f){return 1==f.g?(e=Mb,a==e.wa?D(f,d.h.remove(b,c),0):D(f,Si(d,a,function(){return Yi(d,a,b,c)}),4)):d.m?D(f,Si(d,e.W,function(){return Yi(d,e.W,b,c)}),0):f.F(0)})};function Zi(a,b){var c;return K(function(d){return 1==d.g?(c=Mb,b==c.wa?a.h?D(d,a.h.remove(0,Infinity),0):d.return():D(d,Si(a,b,function(){return Yi(a,b,0,a.l.duration)}),4)):a.m?D(d,Si(a,c.W,function(){return Yi(a,c.W,0,a.l.duration)}),0):d.F(0)})}
|
|
338
|
+
p.flush=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Mb,a==c.wa?d.return():D(d,Si(b,a,function(){b.i.currentTime-=.001;Ki(b,a)}),2)):b.m?D(d,Si(b,c.W,function(){var e=c.W;b.i.currentTime-=.001;Ki(b,e)}),0):d.F(0)})};
|
|
339
|
+
function $i(a,b,c,d,e,f,g,h){var k,l,m;return K(function(n){if(1==n.g){k=Mb;if(b==k.wa)return f||(a.h.u=c),pd(a.h,d,e),n.return();l=[];return D(n,aj(a,b,g,h),2)}m=n.h;m||(l.push(Si(a,b,function(){return Ti(a,b)})),a.m&&l.push(Si(a,k.W,function(){return Ti(a,k.W)})));f||(l.push(Si(a,b,function(){return Ui(a,b,c)})),a.m&&l.push(Si(a,k.W,function(){return Ui(a,k.W,c)})));l.push(Si(a,b,function(){a.g[b].appendWindowStart=0;a.g[b].appendWindowEnd=e;a.g[b].appendWindowStart=d;Ki(a,b)}));a.m&&l.push(Si(a,
|
|
340
|
+
k.W,function(){var r=k.W;a.g[r].appendWindowStart=0;a.g[r].appendWindowEnd=e;a.g[r].appendWindowStart=d;Ki(a,r)}));return D(n,Promise.all(l),0)})}function bj(a,b,c){var d;return K(function(e){if(1==e.g){d=Mb;if(b==d.wa)return e.return();Si(a,b,function(){return Ti(a,b)});a.m&&Si(a,d.W,function(){return Ti(a,d.W)});return D(e,Si(a,b,function(){return Ui(a,b,c)}),2)}return a.m?D(e,Si(a,d.W,function(){return Ui(a,d.W,c)}),0):e.F(0)})}
|
|
341
|
+
p.endOfStream=function(a){var b=this;return K(function(c){return D(c,cj(b,function(){Li(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};p.ab=function(a){var b=this;return K(function(c){return D(c,cj(b,function(){if(a<b.l.duration)for(var d in b.g){var e={start:function(){},p:new $e};b.j[d].unshift(e)}b.l.duration=a}),0)})};p.getDuration=function(){return this.l.duration};function Yi(a,b,c,d){d<=c?Ki(a,b):a.g[b].remove(c,d)}
|
|
342
342
|
function Ti(a,b){var c=a.g[b].appendWindowStart,d=a.g[b].appendWindowEnd;a.g[b].abort();a.g[b].appendWindowStart=c;a.g[b].appendWindowEnd=d;Ki(a,b)}function Ui(a,b,c){0>c&&(c+=.001);a.g[b].timestampOffset=c;Ki(a,b)}function Ki(a,b){if(!a.D){var c=a.j[b][0];c&&(c.p.resolve(),dj(a,b))}}function Si(a,b,c){zf(a.K);c={start:c,p:new $e};a.j[b].push(c);1==a.j[b].length&&ej(a,b);return c.p}
|
|
343
|
-
function cj(a,b){var c,d,e,f,g,h,k;return
|
|
344
|
-
}})}function dj(a,b){a.j[b].shift();ej(a,b)}function ej(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new
|
|
345
|
-
function fj(a,b,c,d){return Si(a,b,function(){b!==
|
|
346
|
-
function gj(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,
|
|
347
|
-
4);case 4:return a.u={},a.g={},x=a.l.duration,a.L=new $e,a.l=Ei(a,a.L),D(
|
|
343
|
+
function cj(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:zf(a.K);c=[];d={};for(e in a.g)d.Xc=new $e,f={start:function(m){return function(){return m.Xc.resolve()}}(d),p:d.Xc},a.j[e].push(f),c.push(d.Xc),1==a.j[e].length&&f.start(),d={Xc:d.Xc};ta(l,2);return D(l,Promise.all(c),4);case 4:va(l,3);break;case 2:throw g=wa(l),g;case 3:return ta(l,5,6),D(l,b(),6);case 6:xa(l);for(h in a.g)dj(a,h);ya(l,0);break;case 5:throw k=wa(l),new P(2,3,3015,k,a.i.error||"No error in the media element");
|
|
344
|
+
}})}function dj(a,b){a.j[b].shift();ej(a,b)}function ej(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d,a.i.error||"No error in the media element")),dj(a,b)}}function Vi(a,b,c,d){var e=a.ea[d];a.G.insertFakeEncryptionInInit&&null==c&&e&&(Ed()||Cd()||Dd("SOPOpenBrowser"))&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=zh(b));return b}
|
|
345
|
+
function fj(a,b,c,d){return Si(a,b,function(){b!==Lb&&(hc()&&(a.u[b]&&a.u[b].destroy(),d&&(a.u[b]=d),a.g[b].changeType(c+a.G.sourceBufferExtraFeatures),a.I[b]=c),Ki(a,b))})}
|
|
346
|
+
function gj(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A,B,F,H,G;return K(function(J){switch(J.g){case 1:c=Mb;a.D=!0;a.m=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.Z&&(a.i.autoplay=!1);ua(J,2);a.s.Kb();g=[];for(h in a.u)g.push(a.u[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(ud)),n=t(l.slice(1)),r=n.next();!r.done;r=n.next())q=r.value,q.p.reject(new P(2,7,7003,void 0));for(u in a.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(I){}}return D(J,Promise.all(g),
|
|
347
|
+
4);case 4:return a.u={},a.g={},x=a.l.duration,a.L=new $e,a.l=Ei(a,a.L),D(J,a.L,5);case 5:a.l.duration=x;z=new $e;y=a.l.sourceBuffers;C=b.size;A=0;a.s.o(y,"addsourcebuffer",function(){A++;A===C&&z.resolve()});B=t(b.keys());for(F=B.next();!F.done;F=B.next())H=F.value,G=b.get(H),Hi(a,H,G,G.codecs),a.m?(a.j[c.W]=[],a.j[c.qa]=[]):a.j[H]=[];a.i.currentTime=d;return D(J,z,2);case 2:xa(J),a.D=!1,zf(a.K),a.s.ka(a.i,"canplay",function(){zf(a.K);a.i.autoplay=e;f||a.i.play()}),ya(J,0)}})}
|
|
348
348
|
function hj(a,b){return cj(a,function(){return gj(a,b)})}
|
|
349
|
-
function aj(a,b,c,d){var e,f,g,h,k,l,m,n,r;return
|
|
350
|
-
function ij(a,b,c){if(b==
|
|
349
|
+
function aj(a,b,c,d){var e,f,g,h,k,l,m,n,r;return K(function(q){if(1==q.g){if(b==Lb)return q.return(!1);e=id(kd(a.I[b]))[0];f=jd(a.I[b]);h=dd(c.mimeType,c.codecs);k=a.G.forceTransmux;if(!fc(h)||!a.C&&ed.includes(h))k=!0;l=fd(c.mimeType,c.codecs);k&&(m=Yc(l))&&(g=m(),h=g.convertCodecs(b,l));n=id(kd(h))[0];r=jd(h);if(e===n&&f===r)return q.return(!1);if("smooth"===a.G.codecSwitchingStrategy&&hc()&&!a.m)return D(q,fj(a,b,h,g),3);g&&g.destroy();return D(q,hj(a,d),3)}return q.return(!0)})}
|
|
350
|
+
function ij(a,b,c){if(b==Lb)var d=!1;else{d=id(kd(a.I[b]))[0];var e=jd(a.I[b]),f=dd(c.mimeType,c.codecs),g=a.G.forceTransmux;if(!fc(f)||!a.C&&ed.includes(f))g=!0;c=fd(c.mimeType,c.codecs);g&&(g=Yc(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=id(kd(f))[0];f=jd(f);d=d!==b||e!==f}return d?"smooth"!==a.G.codecSwitchingStrategy||!hc()||a.m:!1}var Gi=window.URL.createObjectURL,Ji="sequence";function jj(a,b,c){this.i=a;this.m=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.G=!0;this.H=0;this.C=void 0===c?!0:c;this.I=0;this.D=!1}p=jj.prototype;p.getDuration=function(){return this.j};p.$h=function(){return this.g};p.hh=function(a){this.i=a};p.ab=function(a){this.j=a};p.ci=function(){return this.i};p.dh=function(a){this.s=a};p.Oc=function(a){this.G=a};p.Ce=function(a){this.u=a};p.eh=function(a){this.m=a};p.Sh=function(){return this.m};
|
|
351
351
|
p.Vg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.ue(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.C&&!this.D&&(this.i=(Date.now()+this.s)/1E3-this.h-this.g)}};
|
|
352
|
-
p.
|
|
352
|
+
p.vd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.s)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.ue(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.D&&(this.i=d-this.h-this.g)}};p.le=function(){this.D=!0};p.ue=function(a){this.l=null==this.l?a:Math.min(this.l,a)};p.Lf=function(a){this.g=Math.max(this.g,a)};
|
|
353
353
|
p.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};p.R=function(){return Infinity==this.j&&!this.G};p.mc=function(){return Infinity!=this.j&&!this.G};p.Gb=function(){return Math.max(this.H,this.Vb()-this.u)};p.jh=function(a){this.H=a};p.Vb=function(){return this.R()||this.mc()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.i)+this.I,this.j):this.h?Math.min(this.h,this.j):this.j};
|
|
354
|
-
p.
|
|
355
|
-
jj.prototype.getSeekRangeEnd=jj.prototype.Fb;jj.prototype.getSeekRangeStart=jj.prototype.Ec;jj.prototype.getSafeSeekRangeStart=jj.prototype.
|
|
356
|
-
jj.prototype.notifyMinSegmentStartTime=jj.prototype.ue;jj.prototype.lockStartTime=jj.prototype.
|
|
357
|
-
jj.prototype.setPresentationStartTime=jj.prototype.hh;jj.prototype.getMaxSegmentDuration=jj.prototype.$h;jj.prototype.getDuration=jj.prototype.getDuration;function kj(a,b,c){this.j=c;this.l=a;this.u=lj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}kj.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function mj(a,b){a.i=b}function nj(a){this.g=a}function lj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(
|
|
358
|
-
function pj(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=lj(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.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new N("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=
|
|
354
|
+
p.nd=function(a){var b=Math.max(this.l,this.H);return Infinity==this.u?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Vb()-this.u+a,this.Fb()))};p.Ec=function(){return this.nd(0)};p.Fb=function(){return Math.max(0,this.Vb()-(this.R()||this.mc()?this.m:0))};p.oh=function(){return null==this.i||null!=this.h&&this.C?!1:!0};p.bh=function(a){this.I=a};M("shaka.media.PresentationTimeline",jj);jj.prototype.setAvailabilityTimeOffset=jj.prototype.bh;jj.prototype.usingPresentationStartTime=jj.prototype.oh;
|
|
355
|
+
jj.prototype.getSeekRangeEnd=jj.prototype.Fb;jj.prototype.getSeekRangeStart=jj.prototype.Ec;jj.prototype.getSafeSeekRangeStart=jj.prototype.nd;jj.prototype.getSegmentAvailabilityEnd=jj.prototype.Vb;jj.prototype.setUserSeekStart=jj.prototype.jh;jj.prototype.getSegmentAvailabilityStart=jj.prototype.Gb;jj.prototype.isInProgress=jj.prototype.mc;jj.prototype.isLive=jj.prototype.R;jj.prototype.offset=jj.prototype.offset;jj.prototype.notifyMaxSegmentDuration=jj.prototype.Lf;
|
|
356
|
+
jj.prototype.notifyMinSegmentStartTime=jj.prototype.ue;jj.prototype.lockStartTime=jj.prototype.le;jj.prototype.notifySegments=jj.prototype.vd;jj.prototype.notifyTimeRange=jj.prototype.Vg;jj.prototype.getDelay=jj.prototype.Sh;jj.prototype.setDelay=jj.prototype.eh;jj.prototype.setSegmentAvailabilityDuration=jj.prototype.Ce;jj.prototype.setStatic=jj.prototype.Oc;jj.prototype.setClockOffset=jj.prototype.dh;jj.prototype.getPresentationStartTime=jj.prototype.ci;jj.prototype.setDuration=jj.prototype.ab;
|
|
357
|
+
jj.prototype.setPresentationStartTime=jj.prototype.hh;jj.prototype.getMaxSegmentDuration=jj.prototype.$h;jj.prototype.getDuration=jj.prototype.getDuration;function kj(a,b,c){this.j=c;this.l=a;this.u=lj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}kj.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function mj(a,b){a.i=b}function nj(a){this.g=a}function lj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Lh(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 oj(a,b,c,d,e){var f=this;this.C=e;this.g=a;this.D=b;this.u=c;this.l=new Af;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 pj(f)});this.m=(new xd(function(){pj(f)})).ua(this.u.gapJumpTimerTime)}oj.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.D=this.C=null};oj.prototype.Pf=function(){this.s=!0;pj(this)};
|
|
358
|
+
function pj(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=lj(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.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new N("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Mh(c,b,a.u.gapDetectionThreshold),null==
|
|
359
359
|
d||0==d&&!a.s||(e=c.start(d),e>=a.D.Fb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.C(new N("gapjumped")))))}}};function qj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=rj.value().get(b),c.ka(a,b,d))}var rj=new Ff(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function sj(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 Af;this.i=new tj(a);qj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){uj(e,e.j())})}sj.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 vj(a){return a.s?a.g.currentTime:a.j()}
|
|
360
360
|
function wj(a,b){0<a.g.readyState?xj(a.i,b):qj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){uj(a,a.j())})}function uj(a,b){.001>Math.abs(a.g.currentTime-b)?yj(a):(a.h.ka(a.g,"seeking",function(){yj(a)}),xj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function yj(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
|
|
361
|
-
function tj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new
|
|
361
|
+
function tj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new xd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}tj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function xj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ua(.1)};function zj(a){this.g=a;this.j=!1;this.h=null;this.i=new Af}p=zj.prototype;p.Pe=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ka(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;qj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};p.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};p.Qe=function(a){this.h=this.j?this.h:a};p.Pd=function(){return(this.j?this.g.currentTime:this.h)||0};p.sg=function(){return 0};
|
|
362
362
|
p.rg=function(){return 0};p.Ug=function(){};
|
|
363
363
|
function Aj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.D=b.minBufferTime||0;this.l=c;this.C=e;this.u=null;this.s=Bj(a,c,f);this.j=new oj(a,b.presentationTimeline,c,this.s,f);this.h=new sj(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=vj(g.h);h=Cj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;wj(g.h,h);h=void 0;break a}g.C();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()?
|
|
364
|
-
g.g.Ec():g.g.Fb():0>h&&(h=g.g.Fb()+h);return Dj(g,Ej(g,h))});this.m=new
|
|
365
|
-
p.
|
|
366
|
-
function Cj(a,b){var c=Math.max(a.D,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ec(),f=a.g.Fb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.
|
|
364
|
+
g.g.Ec():g.g.Fb():0>h&&(h=g.g.Fb()+h);return Dj(g,Ej(g,h))});this.m=new xd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=vj(g.h),k=g.g.Ec(),l=g.g.Fb();3>l-k&&(k=l-3);h<k&&(h=Cj(g,h),g.i.currentTime=h)}})}p=Aj.prototype;p.Pe=function(){this.m.ua(.25)};p.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.C=function(){}};p.Qe=function(a){wj(this.h,a)};
|
|
365
|
+
p.Pd=function(){var a=vj(this.h);return 0<this.i.readyState&&!this.i.paused?Ej(this,a):a};p.sg=function(){return this.s?this.s.s:0};p.rg=function(){return this.j.G};p.Ug=function(){this.j.Pf()};function Dj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
366
|
+
function Cj(a,b){var c=Math.max(a.D,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ec(),f=a.g.Fb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.nd(c),k=a.g.nd(d);c=a.g.nd(c+d);return b>=g?Dj(a,b):b>f?f:b<e?Jh(a.i.buffered,k)?k:c:b>=h||Jh(a.i.buffered,b)?b:c}function Ej(a,b){var c=a.g.Ec();if(b<c)return c;a=a.g.Fb();return b>a?a:b}
|
|
367
367
|
function Bj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new kj(new nj(a),b.stallThreshold,c);mj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Fj(a){this.g=a;this.l=null;this.j=0;this.s=!1}p=Fj.prototype;p.jc=function(){return this.g.length};p.release=function(){this.s||(this.g=[],this.l&&this.l.stop(),this.l=null)};p.Gi=function(){this.s=!0};function Gj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.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};
|
|
368
368
|
p.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};p.qe=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,w(a))}};
|
|
369
|
-
p.
|
|
370
|
-
p.Ac=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],this.g[this.g.length-1]=new
|
|
371
|
-
p.De=function(a,b){var c=this;this.s||(this.l&&this.l.stop(),this.l=new
|
|
372
|
-
Fj.prototype.ic=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.u;)e--,f=c.h[e];if(!f.u)return Ta("No independent partial segment found!"),null;b++;d=e-1;break}}return new Hj(this,b,d)};function Ij(a,b,c){a=new
|
|
373
|
-
Fj.prototype.getIteratorForTime=Fj.prototype.ic;Fj.prototype.updateEvery=Fj.prototype.De;Fj.prototype.fit=Fj.prototype.Ac;Fj.prototype.evict=Fj.prototype.rb;Fj.prototype.mergeAndEvict=Fj.prototype.
|
|
369
|
+
p.ud=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.qe(a);this.rb(b)};p.rb=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}};
|
|
370
|
+
p.Ac=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],this.g[this.g.length-1]=new Fh(a.startTime,b,a.J,a.bb,a.Ia,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.I,a.i,a.status,a.aes128Key),this.g[this.g.length-1].l=a.l)}};
|
|
371
|
+
p.De=function(a,b){var c=this;this.s||(this.l&&this.l.stop(),this.l=new xd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.l.stop(),c.l=null)}),this.l.ua(a))};Fj.prototype[Symbol.iterator]=function(){return this.ic(0)};
|
|
372
|
+
Fj.prototype.ic=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.u;)e--,f=c.h[e];if(!f.u)return Ta("No independent partial segment found!"),null;b++;d=e-1;break}}return new Hj(this,b,d)};function Ij(a,b,c){a=new Fh(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Fj([a])}M("shaka.media.SegmentIndex",Fj);Fj.forSingleSegment=Ij;
|
|
373
|
+
Fj.prototype.getIteratorForTime=Fj.prototype.ic;Fj.prototype.updateEvery=Fj.prototype.De;Fj.prototype.fit=Fj.prototype.Ac;Fj.prototype.evict=Fj.prototype.rb;Fj.prototype.mergeAndEvict=Fj.prototype.ud;Fj.prototype.offset=Fj.prototype.offset;Fj.prototype.get=Fj.prototype.get;Fj.prototype.find=Fj.prototype.find;Fj.prototype.markImmutable=Fj.prototype.Gi;Fj.prototype.release=Fj.prototype.release;function Hj(a,b,c){this.i=a;this.g=b;this.h=c}Hj.prototype.Eh=function(){return this.g};
|
|
374
374
|
Hj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.C&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};Hj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.C&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Hj);Hj.prototype.next=Hj.prototype.next;Hj.prototype.current=Hj.prototype.current;
|
|
375
375
|
Hj.prototype.currentPosition=Hj.prototype.Eh;function Jj(){Fj.call(this,[]);this.h=[]}pa(Jj,Fj);p=Jj.prototype;p.clone=function(){var a=new Jj;a.h=this.h.slice();return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};p.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.j+d.jc()}return null};
|
|
376
|
-
p.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.jc()}return null};p.offset=function(){};p.qe=function(){};p.rb=function(){};p.
|
|
377
|
-
Jj.prototype.get=Jj.prototype.get;Jj.prototype.find=Jj.prototype.find;Jj.prototype.release=Jj.prototype.release;function Kj(a){var b=this;this.g=a;this.h=this.g.
|
|
378
|
-
Nj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.
|
|
379
|
-
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.Cg=d,JSON.stringify(d),c=new N("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Qj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.
|
|
376
|
+
p.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.jc()}return null};p.offset=function(){};p.qe=function(){};p.rb=function(){};p.ud=function(){};p.Ac=function(){};p.De=function(){};M("shaka.media.MetaSegmentIndex",Jj);Jj.prototype.updateEvery=Jj.prototype.De;Jj.prototype.fit=Jj.prototype.Ac;Jj.prototype.mergeAndEvict=Jj.prototype.ud;Jj.prototype.evict=Jj.prototype.rb;Jj.prototype.merge=Jj.prototype.qe;Jj.prototype.offset=Jj.prototype.offset;
|
|
377
|
+
Jj.prototype.get=Jj.prototype.get;Jj.prototype.find=Jj.prototype.find;Jj.prototype.release=Jj.prototype.release;function Kj(a){var b=this;this.g=a;this.h=this.g.be();this.i=new xd(function(){b.g.Tg(.25*b.h)})}Kj.prototype.release=function(){this.i&&(this.i.stop(),this.i=null);this.g=null};Kj.prototype.set=function(a){if(this.h!=a)a:{this.h=a,this.i.stop();if(0<=this.h)try{var b=this.h;this.g.be()!=b&&this.g.fg(b);break a}catch(c){}this.i.ua(.25);0!=this.g.be()&&this.g.fg(0)}};Kj.prototype.ld=function(){return this.g.ld()};function Lj(a){var b=this;this.h=a;this.g=new Set;this.i=(new xd(function(){Mj(b,!1)})).ua(.25)}Lj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Mj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Nj(a){cb.call(this);this.g=new Map;this.h=a}pa(Nj,cb);Nj.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function Oj(a,b){var c=a.g.get(b);c||(c={xd:[],Cg:null,contentType:b},a.g.set(b,c));return c}function Pj(a,b,c){var d=Oj(a,b.contentType);Qj(a,d);a={Jf:b,position:c};d=d.xd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
378
|
+
Nj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.xd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Jf;break a}}d=null}if(e=d)e=c.Cg,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);
|
|
379
|
+
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.Cg=d,JSON.stringify(d),c=new N("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Qj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.xd;b.xd=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.xd=[]};function Rj(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new xd(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new N("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ua(2)}pa(Rj,cb);Rj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function Sj(a,b){cb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{vc:null,uc:Tj,lc:function(d,e){return Uj(c,"enter",d,e)}},{vc:Vj,uc:Tj,lc:function(d,e){return Uj(c,"enter",d,e)}},{vc:Wj,uc:Tj,lc:function(d,e){return Uj(c,"enter",d,e)}},{vc:Tj,uc:Vj,lc:function(d,e){return Uj(c,"exit",d,e)}},{vc:Tj,uc:Wj,lc:function(d,e){return Uj(c,"exit",d,e)}},{vc:Vj,uc:Wj,lc:function(d,e){return Uj(c,"skip",d,e)}},{vc:Wj,uc:Vj,lc:function(d,e){return Uj(c,"skip",d,e)}}];this.h=new Af;this.h.o(this.i,
|
|
380
380
|
"regionremove",function(d){c.g.delete(d.region)})}pa(Sj,cb);Sj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};Sj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Vj:a>d.endTime?Wj:Tj;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.vc==e&&h.uc==f&&h.lc(d,b)}}};
|
|
381
381
|
function Uj(a,b,c,d){b=new N(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Vj=1,Tj=2,Wj=3;function Xj(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function Yj(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.ic(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.size<a.i&&null!=e;)b=!0,e.m&&null!=e.Ia&&(b=!1),2==e.kc()&&(b=!1),b&&!a.g.has(e)&&(b=new Zj(a.l),ak(b,e,a.h),a.g.set(e,b)),a.j=e.startTime,e=d.next().value}}}
|
|
382
382
|
function bk(a,b){if(a.h.segmentIndex&&a.g.size<a.i&&!a.g.has(b)){var c=new Zj(a.l);ak(c,b,a.h);a.g.set(b,c)}}function ck(a){if(0!==a.g.size){for(var b=t(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&dk(a,c);a.j=0}}function ek(a,b){b&&b!==a.h&&(ck(a),a.h=b)}function dk(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function Zj(a){this.i=a;this.g=this.h=null}
|
|
383
|
-
function ak(a,b,c){var d=new Uint8Array(0);a.g=a.i(b,c,function(e){return
|
|
383
|
+
function ak(a,b,c){var d=new Uint8Array(0);a.g=a.i(b,c,function(e){return K(function(f){if(1==f.g)return 0<d.byteLength?d=jg(d,e):d=e,a.h?D(f,a.h(d),3):f.F(0);d=new Uint8Array(0);E(f)})})}Zj.prototype.abort=function(){this.g&&this.g.abort()};function fk(a,b,c,d,e){a=qf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function gk(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.s=this.j=null;this.H=0;this.G=!1;this.h=new Map;this.D=!1;this.I=null;this.u=!1;this.l=new yf(function(){return hk(c)})}p=gk.prototype;p.destroy=function(){return this.l.destroy()};function hk(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,ik(e),b.push(jk(e));return D(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;E(f)})}
|
|
384
384
|
p.configure=function(a){this.i=a;this.I=new Xe({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);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=this.h.get(c.value),c.Ea){var d=c.Ea,e=a.segmentPrefetchLimit;d.i=e;for(var f=Array.from(d.g.keys());f.length>e;){var g=f.pop();g&&dk(d,g)}0<a.segmentPrefetchLimit||
|
|
385
|
-
(c.Ea=null)}else 0<a.segmentPrefetchLimit&&(c.Ea=kk(this,c.stream))};p.start=function(){var a=this;return
|
|
386
|
-
function mk(a,b){var c,d,e,f,g,h,k;
|
|
387
|
-
function qk(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.sc&&(rk(a,b,!1,0,!1),c.sc=d);else if(d=c.sc)c.sc=null,rk(a,d,!0,0,!1)}}function sk(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.D&&(b.video&&rk(a,b.video,c,d,e,f),b.audio&&rk(a,b.audio,c,d,e,f))}function tk(a,b){
|
|
388
|
-
function rk(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=
|
|
389
|
-
function vk(a,b){var c,d;return
|
|
390
|
-
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Za.h.g>h?!0:!1):f=!1;f&&b.Za.abort();
|
|
391
|
-
p.
|
|
392
|
-
function wk(a,b){b.
|
|
393
|
-
function lk(a){var b,c,d,e,f,g,h,k,l;return
|
|
394
|
-
0));
|
|
395
|
-
function yk(a,b){var c,d,e,f,g;return
|
|
396
|
-
wa(h),D(h,Ak(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.values());if(!a.D||!f.every(function(k){return k.endOfStream})){h.F(0);break}return D(h,a.g.Y.endOfStream(),10);case 10:zf(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.ab(g),
|
|
397
|
-
function zk(a,b){if(Bk(b))return Wi(a.g.Y,b.stream.originalId||""),null;b.type==
|
|
398
|
-
2;e=Ck(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;f=Infinity;g=Array.from(a.h.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Bk(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.Oa?h.Oa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.Ea&&b.ba&&(d=e.g,!d||b.Oa&&
|
|
385
|
+
(c.Ea=null)}else 0<a.segmentPrefetchLimit&&(c.Ea=kk(this,c.stream))};p.start=function(){var a=this;return K(function(b){if(1==b.g)return D(b,lk(a),2);zf(a.l);a.D=!0;E(b)})};
|
|
386
|
+
function mk(a,b){var c,d,e,f,g,h,k;K(function(l){switch(l.g){case 1:return c=Mb,a.H++,d=a.H,ta(l,2),D(l,Zi(a.g.Y,c.wa),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=dd(b.mimeType,b.codecs),Ii(a.g.Y,f,a.m.sequenceMode,b.external),g=a.g.Y.H,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.H==d&&(k=nk(a,b),a.h.set(c.wa,k),ok(a,k,0)),E(l)}})}function pk(a){var b=a.h.get(Lb);b&&(ik(b),jk(b).catch(function(){}),a.h.delete(Lb));a.s=null}
|
|
387
|
+
function qk(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.sc&&(rk(a,b,!1,0,!1),c.sc=d);else if(d=c.sc)c.sc=null,rk(a,d,!0,0,!1)}}function sk(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.D&&(b.video&&rk(a,b.video,c,d,e,f),b.audio&&rk(a,b.audio,c,d,e,f))}function tk(a,b){K(function(c){if(1==c.g)return a.s=b,a.D?b.segmentIndex?c.F(2):D(c,b.createSegmentIndex(),2):c.return();rk(a,b,!0,0,!1);E(c)})}
|
|
388
|
+
function rk(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Lb?g&&(g.sc&&(b.trickModeVideo?(g.sc=b,b=b.trickModeVideo):g.sc=null),g.stream!=b||e)&&(g.Ea&&ek(g.Ea,b),b.type==Lb&&(e=dd(b.mimeType,b.codecs),Ii(a.g.Y,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.ug=!!f,c&&(g.gd?g.Ee=!0:g.Pa?(g.Mb=!0,g.Ud=d,g.Ee=!0):(ik(g),uk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),vk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):mk(a,b)}
|
|
389
|
+
function vk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.Za)return e.return();c=b.stream;d=b.Za;return c.segmentIndex?e.F(2):D(e,c.createSegmentIndex(),2)}if(b.Za!=d||b.stream!=c)return e.return();var f=a.g.ae();var g=Oi(a.g.Y,b.type),h=b.stream.segmentIndex.find(b.Oa?b.Oa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ia?k.Ia-k.bb:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.Ia?k.Ia-k.bb:null)||0),k=a.g.getBandwidthEstimate(),
|
|
390
|
+
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Za.h.g>h?!0:!1):f=!1;f&&b.Za.abort();E(e)})}
|
|
391
|
+
p.Cd=function(){if(this.g)for(var a=this.g.ae(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e=null;c.ba&&(e=c.ba.current());if(!e||e.startTime>a||e.endTime<a)c.ba=null;e=this.g.Y;e.D?e=!1:d==Lb?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Ni(e,d),e=Jh(e,a));e||((null!=Oi(this.g.Y,d)||c.Pa)&&wk(this,c),c.Za&&(c.Za.abort(),c.Za=null),d===Lb&&(d=this.g.Y,d.J&&d.J.h()),c.Cd=!0)}};
|
|
392
|
+
function wk(a,b){b.gd||b.Mb||(b.Pa?(b.Mb=!0,b.Ud=0):null==Mi(a.g.Y,b.type)?null==b.xb&&ok(a,b,0):(ik(b),uk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
393
|
+
function lk(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Mb;if(!a.j)throw new P(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.W,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.qa,a.j.video),d.add(a.j.video));a.s&&(c.set(b.wa,a.s),d.add(a.s));e=a.g.Y;return D(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}zf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.h.has(h)||(l=nk(a,k),a.h.set(h,l),ok(a,l,
|
|
394
|
+
0));E(m)})}function nk(a,b){return{stream:b,type:b.type,ba:null,Ea:kk(a,b),Oa:null,Jc:null,Gf:null,Ef:null,Df:null,sc:null,endOfStream:!1,Pa:!1,xb:null,Mb:!1,Ud:0,Ee:!1,gd:!1,Cd:!0,Kf:!1,Vf:!1,pd:!1,Za:null}}function kk(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.i.segmentPrefetchLimit?new Xj(a.i.segmentPrefetchLimit,b,function(c,d,e){return xk(a,c,d,e)}):null}p.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Y.ab(a):this.g.Y.ab(Math.pow(2,32))};
|
|
395
|
+
function yk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:zf(a.l);if(b.Pa||null==b.xb||b.gd)return h.return();b.xb=null;if(!b.Mb){h.F(2);break}return D(h,uk(a,b,b.Ee,b.Ud),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.F(4);break}c=b.stream;return D(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Pa||b.xb||ok(a,b,0),h.return();case 4:ta(h,6);d=zk(a,b);null!=d&&(ok(a,b,d),b.pd=!1);va(h,7);break;case 6:return e=
|
|
396
|
+
wa(h),D(h,Ak(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.values());if(!a.D||!f.every(function(k){return k.endOfStream})){h.F(0);break}return D(h,a.g.Y.endOfStream(),10);case 10:zf(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.ab(g),E(h)}})}
|
|
397
|
+
function zk(a,b){if(Bk(b))return Wi(a.g.Y,b.stream.originalId||""),null;b.type==Lb&&Xi(a.g.Y);if(!a.g.Y.$&&b.type!=Lb)return a.i.updateIntervalSeconds/2;var c=a.g.ae(),d=b.Oa?b.Oa.endTime:c,e=Pi(a.g.Y,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=Oi(a.g.Y,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(Lb))&&Bk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/
|
|
398
|
+
2;e=Ck(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;f=Infinity;g=Array.from(a.h.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Bk(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.Oa?h.Oa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.Ea&&b.ba&&(d=e.g,!d||b.Oa&&Eh(d,b.Jc)||bk(b.Ea,d),Yj(b.Ea,e));Dk(a,b,c,e).catch(function(){});return null}
|
|
399
399
|
function Ck(a,b,c,d){if(b.ba)return b.ba.current();if(b.Oa||d)return c=b.Oa?b.Oa.endTime:d,b.Kf=!0,b.ba=b.stream.segmentIndex.ic(c),b.ba&&b.ba.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.ic(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.ic(c),e=b.ba&&b.ba.next().value);return e}
|
|
400
|
-
function Dk(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return
|
|
401
|
-
n=Fk(n,
|
|
402
|
-
10);case 10:b.Ea&&b.ba&&Yj(b.Ea,d,!0);case 6:zf(a.l);if(a.u)return A.return();b.Oa=d;g.next();b.Pa=!1;b.Vf=!1;
|
|
403
|
-
function Jk(a,b,c){var d,e,f,g;return
|
|
404
|
-
function Ik(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Vf})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.
|
|
405
|
-
function Ek(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v;return
|
|
406
|
-
new Map,a.j.audio&&z.set(d.W,a.j.audio),a.j.video&&z.set(d.qa,a.j.video),ta(B,2),b.Ef=f,b.Df=g,b.Ff=h,b.Pg=k,b.Gf=l,y=a.m.sequenceMode||"HLS"==a.m.type,D(B,$i(a.g.Y,b.type,l,f,g,y,b.stream,z),4);if(2!=B.g)return m&&(
|
|
407
|
-
2),D(H,q,4);case 4:return z=H.h,zf(a.l),y=null,
|
|
408
|
-
0<b.stream.closedCaptions.size,D(H,a.g.wg(b.type,z),5);case 5:return D(H,Ri(a.g.Y,b.type,z,null,b.stream,B),6);case 6:va(H,0);break;case 2:throw
|
|
409
|
-
function Gk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return
|
|
410
|
-
y+e.timestampOffset,
|
|
411
|
-
x||(x=
|
|
412
|
-
a.G=!0}});(l||m)&&k.parse(f);return D(q,Kk(a,b,c),2);case 2:return zf(a.l),n=b.
|
|
413
|
-
function Bk(a){return a&&a.type==
|
|
414
|
-
function Hk(a,b,c,d){var e,f,g,h,k;return
|
|
415
|
-
function xk(a,b,c,d){var e=b instanceof
|
|
416
|
-
function uk(a,b,c,d){var e,f;return
|
|
417
|
-
function ok(a,b,c){var d=b.type;if(d!=
|
|
418
|
-
function Ak(a,b,c){var d;return
|
|
400
|
+
function Dk(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C;return K(function(A){switch(A.g){case 1:e=Mb;f=b.stream;g=b.ba;b.Pa=!0;ta(A,2);if(2==d.kc())throw new P(1,1,1011);return D(A,Ek(a,b,d),4);case 4:zf(a.l);if(a.u)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.s))return n=new Uint8Array(0),q=r=!1,v=function(B){var F,H,G,J;return K(function(I){switch(I.g){case 1:if(r)return I.return();q=!0;zf(a.l);if(a.u)return I.return();
|
|
401
|
+
ta(I,2);n=Fk(n,B);F=!1;H=0;(new Tf).box("mdat",function(L){H=L.size+L.start;F=!0}).parse(n,!1,!0);if(!F){I.F(4);break}G=n.subarray(0,H);n=n.subarray(H);return D(I,Gk(a,b,c,f,d,G,!0),5);case 5:b.Ea&&b.ba&&Yj(b.Ea,d,!0);case 4:va(I,0);break;case 2:u=J=wa(I),E(I)}})},D(A,Hk(a,b,d,v),9);l=Hk(a,b,d);return D(A,l,7);case 7:m=A.h;zf(a.l);if(a.u)return A.return();zf(a.l);return b.Mb?(b.Pa=!1,ok(a,b,0),A.return()):D(A,Gk(a,b,c,f,d,m),6);case 9:x=A.h;if(u)throw u;if(q){A.F(10);break}r=!0;zf(a.l);return a.u?
|
|
402
|
+
A.return():b.Mb?(b.Pa=!1,ok(a,b,0),A.return()):D(A,Gk(a,b,c,f,d,x),10);case 10:b.Ea&&b.ba&&Yj(b.Ea,d,!0);case 6:zf(a.l);if(a.u)return A.return();b.Oa=d;g.next();b.Pa=!1;b.Vf=!1;z=a.g.Y.Eb();y=z[b.type];$a(JSON.stringify(y));b.Mb||a.g.Pf(d.startTime,d.endTime,b.type);ok(a,b,0);va(A,0);break;case 2:C=wa(A);zf(a.l,C);if(a.u)return A.return();b.Pa=!1;if(7001==C.code)b.Pa=!1,ik(b),ok(a,b,0),A.F(0);else if(b.type==e.wa&&a.i.ignoreTextStreamFailures)a.h.delete(e.wa),A.F(0);else if(3017==C.code)Ik(a,b,C),
|
|
403
|
+
A.F(0);else return b.pd=!0,C.severity=2,D(A,Ak(a,b,C),0)}})}function Jk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.F(2):D(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=nc(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Fk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
404
|
+
function Ik(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Vf})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.pd=!0;a.u=!0;a.g.onError(c);return}b.Vf=!0}ok(a,b,4)}
|
|
405
|
+
function Ek(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v;return K(function(x){if(1==x.g){d=Mb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=id(b.stream.codecs)[0];k=jd(b.stream.mimeType);l=c.timestampOffset;if(l==b.Gf&&f==b.Ef&&g==b.Df&&h==b.Ff&&k==b.Pg)return x.F(2);if(m=b.Ff&&b.Pg&&ij(a.g.Y,b.type,b.stream))n=null,b.type===d.qa?n=a.h.get(d.W):b.type===d.W&&(n=a.h.get(d.qa)),n&&(n.Jc=null,wk(a,n),jk(n).catch(function(){}));r=function(){var z,y,C,A;return K(function(B){if(1==B.g)return z=
|
|
406
|
+
new Map,a.j.audio&&z.set(d.W,a.j.audio),a.j.video&&z.set(d.qa,a.j.video),ta(B,2),b.Ef=f,b.Df=g,b.Ff=h,b.Pg=k,b.Gf=l,y=a.m.sequenceMode||"HLS"==a.m.type,D(B,$i(a.g.Y,b.type,l,f,g,y,b.stream,z),4);if(2!=B.g)return m&&(C=null,b.type===d.qa?C=a.h.get(d.W):b.type===d.W&&(C=a.h.get(d.qa)),C&&(C.Mb=!1,C.Pa=!1,wk(a,C))),va(B,0);A=wa(B);b.Ef=null;b.Df=null;b.Ff=null;b.Gf=null;throw A;})};return D(x,r(),2)}!Eh(c.g,b.Jc)&&(b.Jc=c.g)&&(q=Hk(a,b,c.g),u=function(){var z,y,C,A,B,F;return K(function(H){switch(H.g){case 1:return ta(H,
|
|
407
|
+
2),D(H,q,4);case 4:return z=H.h,zf(a.l),y=null,C=new Map,A=new Tf,A.box("moov",Yf).box("trak",Yf).box("mdia",Yf).V("mdhd",function(G){y=Xh(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.Jb(4);var J=String.fromCharCode(G[0]);J+=String.fromCharCode(G[1]);J+=String.fromCharCode(G[2]);J+=String.fromCharCode(G[3]);switch(J){case "soun":C.set(d.W,y);break;case "vide":C.set(d.qa,y)}y=null}).parse(z),C.has(b.type)?c.g.timescale=C.get(b.type):null!=y&&(c.g.timescale=y),B=b.stream.closedCaptions&&
|
|
408
|
+
0<b.stream.closedCaptions.size,D(H,a.g.wg(b.type,z),5);case 5:return D(H,Ri(a.g.Y,b.type,z,null,b.stream,B),6);case 6:va(H,0);break;case 2:throw F=wa(H),b.Jc=null,F;}})},a.g.Ii(c.startTime,c.g),e.push(u()));a.m.sequenceMode&&(v=b.Oa?b.Oa.l:null,c.l!=v||b.Kf)&&(b.Kf=!1,e.push(bj(a.g.Y,b.type,c.startTime)));return D(x,Promise.all(e),0)})}
|
|
409
|
+
function Gk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return K(function(q){switch(q.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;m=a.i.parsePrftBox&&!a.G;if(l||m)k=new Tf;l&&k.V("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var x=u.reader.yd();var z=u.reader.yd();var y=u.reader.N();var C=u.reader.N();var A=u.reader.N();var B=u.reader.N();var F=e.startTime+C/y}else y=u.reader.N(),F=u.reader.Nc()/
|
|
410
|
+
y+e.timestampOffset,C=F-e.startTime,A=u.reader.N(),B=u.reader.N(),x=u.reader.yd(),z=u.reader.yd();u=u.reader.Jb(u.reader.getLength()-u.reader.Ca());if(v&&v.includes(x)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.Ji():(v=(new Map).set("detail",{startTime:F,endTime:F+A/y,schemeIdUri:x,value:z,timescale:y,presentationTimeDelta:C,eventDuration:A,id:B,messageData:u}),v=new N("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
411
|
+
x||(x=Sh(u),x.length&&e&&a.g.Ki([{cueTime:e.startTime,data:u,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.V("prft",function(u){if(!a.G&&e.g.timescale){var v=u.reader,x=u.version;v.N();u=v.N();var z=v.N();u=1E3*u+z/Math.pow(2,32)*1E3;0===x?v=v.N():(x=v.N(),v=v.N(),v=x*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.g.timescale*1E3)});v=new N("prft",v);a.g.onEvent(v);
|
|
412
|
+
a.G=!0}});(l||m)&&k.parse(f);return D(q,Kk(a,b,c),2);case 2:return zf(a.l),n=b.Cd,b.Cd=!1,r=b.ug,b.ug=!1,D(q,a.g.wg(b.type,f),3);case 3:return D(q,Ri(a.g.Y,b.type,f,e,d,h,n,r,g),4);case 4:zf(a.l),E(q)}})}function Kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Mi(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():D(h,a.g.Y.remove(b.type,e,e+g),2)}zf(a.l);E(h)})}
|
|
413
|
+
function Bk(a){return a&&a.type==Lb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
414
|
+
function Hk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Dh&&(e=c.g))return l.return(e);f=null;if(b.Ea){var m=b.Ea;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=xk(a,c,b.stream,d));g=0;b.ba&&(g=b.ba.g);b.Za=f;return D(l,f.promise,2);case 2:h=l.h;b.Za=null;k=h.data;if(!c.aes128Key){l.F(3);break}return D(l,Jk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
415
|
+
function xk(a,b,c,d){var e=b instanceof Fh?b:void 0,f=e?1:0;b=fk(b.aa(),b.bb,b.Ia,a.i.retryParameters,d);return a.g.rc.request(wf,b,{type:f,stream:c,segment:e})}
|
|
416
|
+
function uk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Mb=!1,b.Ee=!1,b.Ud=0,b.gd=!0,b.Oa=null,b.Jc=null,b.ba=null,b.Ea&&ck(b.Ea),d?(e=a.g.ae(),f=a.g.Y.getDuration(),D(g,a.g.Y.remove(b.type,e+d,f),3)):D(g,Zi(a.g.Y,b.type),4);if(3!=g.g)return zf(a.l),c?D(g,a.g.Y.flush(b.type),3):g.F(3);zf(a.l);b.gd=!1;b.endOfStream=!1;b.Pa||b.xb||ok(a,b,0);E(g)})}
|
|
417
|
+
function ok(a,b,c){var d=b.type;if(d!=Lb||a.h.has(d))b.xb=(new wd(function(){var e;return K(function(f){if(1==f.g)return ta(f,2),D(f,yk(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);E(f)})})).S(c)}function ik(a){null!=a.xb&&(a.xb.stop(),a.xb=null)}function jk(a){return K(function(b){return a.Za?D(b,a.Za.abort(),0):b.F(0)})}
|
|
418
|
+
function Ak(a,b,c){var d;return K(function(e){if(1==e.g)return D(e,Ze(a.I),2);zf(a.l);d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Ze(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.i.failureCallback(c);E(e)})};function Lk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){var k=(new kb(a)).Sa.split("/").pop().split(".");d=1==k.length?"":k.pop().toLowerCase();if(e=Mk[d])return h.return(e);f=qf([a],c);f.method="HEAD";return D(h,b.request(0,f).promise,2)}g=h.h;e=g.headers["content-type"];return h.return(e?e.toLowerCase().split(";").shift():"")})}
|
|
419
419
|
var Mk={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 Nk(a){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(Nk).join("");var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push(["b"]);d&&b.push(["i"]);e&&b.push(["u"]);c="";(d=Ok(a.color))&&(c+="."+d);(d=Ok(a.backgroundColor))&&(c+=".bg_"+d);c&&b.push(["c",c]);return b.reduceRight(function(f,g){var h=t(g);g=h.next().value;h=h.next().value;return"<"+g+(void 0===h?"":h)+">"+f+"</"+g+">"},a.payload)}
|
|
420
420
|
function Ok(a){switch(a.toLowerCase()){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}
|
|
421
421
|
function Pk(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.isContainer)Pk(c.nestedCues,b);else{var d=c.clone();d.nestedCues=[];d.payload=Nk(c);b.push(d)}return b};function Qk(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}p=Qk.prototype;p.remove=function(a,b){if(!this.g)return!1;Rk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
@@ -428,177 +428,177 @@ function Rk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t
|
|
|
428
428
|
Copyright 2023 Google LLC
|
|
429
429
|
SPDX-License-Identifier: Apache-2.0
|
|
430
430
|
*/
|
|
431
|
-
function Tk(){}p=Tk.prototype;p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};M("shaka.text.StubTextDisplayer",Tk);Tk.prototype.setTextVisibility=Tk.prototype.setTextVisibility;Tk.prototype.isTextVisible=Tk.prototype.isTextVisible;Tk.prototype.destroy=Tk.prototype.destroy;Tk.prototype.append=Tk.prototype.append;Tk.prototype.remove=Tk.prototype.remove;function Uk(){}function
|
|
432
|
-
!0)}),this.l.observe(this.g));this.s=new Map}p=Xk.prototype;p.append=function(a){var b=[].concat(w(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={
|
|
431
|
+
function Tk(){}p=Tk.prototype;p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};M("shaka.text.StubTextDisplayer",Tk);Tk.prototype.setTextVisibility=Tk.prototype.setTextVisibility;Tk.prototype.isTextVisible=Tk.prototype.isTextVisible;Tk.prototype.destroy=Tk.prototype.destroy;Tk.prototype.append=Tk.prototype.append;Tk.prototype.remove=Tk.prototype.remove;function Uk(){}function U(a){return document.createElement(a)}function Vk(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Wk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Uk);Uk.removeAllChildren=Wk;function Xk(a,b){var c=this;this.j=!1;this.i=[];this.D=a;this.m=b;this.g=U("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.C=(new xd(function(){Yk(c)})).ua(.25);this.h=new Map;this.u=new Af;this.u.o(document,"fullscreenchange",function(){Yk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){Yk(c,
|
|
432
|
+
!0)}),this.l.observe(this.g));this.s=new Map}p=Xk.prototype;p.append=function(a){var b=[].concat(w(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={Id:c.Id},d=a.next())c.Id=d.value,b.some(function(e){return function(f){return Mc(f,e.Id)}}(c))||this.i.push(c.Id);Yk(this)};p.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.u&&(this.u.release(),this.u=null);this.l&&(this.l.disconnect(),this.l=null)};
|
|
433
433
|
p.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Yk(this,c>this.i.length);return!0};p.isTextVisible=function(){return this.j};p.setTextVisibility=function(a){this.j=a};function Zk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
434
|
-
function $k(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ph:null;l&&(g.push(l.Ye),l.
|
|
435
|
-
q.startTime?r.startTime-q.startTime:r.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.
|
|
436
|
-
function al(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=
|
|
437
|
-
e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.s.set(e,g);c=g}e=f;d&&(e=
|
|
438
|
-
"normal",f.appendChild(e));a.h.set(b,{Ye:f,ph:e,
|
|
434
|
+
function $k(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ph:null;l&&(g.push(l.Ye),l.zd&&g.push(l.zd),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Zk(a,n)||(f=!0):(al(a,k,e),l=a.h.get(k),n=l.ph,f=!0));0<k.nestedCues.length&&n&&$k(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(r,q){return r.startTime!=
|
|
435
|
+
q.startTime?r.startTime-q.startTime:r.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.zd?(c.appendChild(d.zd),d.zd.appendChild(d.Ye)):c.appendChild(d.Ye)}}function Yk(a,b){if(a.g){var c=a.D.currentTime;if(!a.j||(void 0===b?0:b)){b=t(a.s.values());for(var d=b.next();!d.done;d=b.next())Wk(d.value);Wk(a.g);a.h.clear();a.s.clear()}if(a.j){b=new Map;d=t(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));$k(a,a.i,a.g,c,[])}}}
|
|
436
|
+
function al(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=U(e);"br"!=e&&bl(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Tc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Tc?"%":"px"),a.s.has(e))c=a.s.get(e);else{var g=U("span"),h=c.heightUnits==Tc?"%":"px",k=c.widthUnits==Tc?"%":"px",l=c.viewportAnchorUnits==Tc?"%":"px";g.id="shaka-text-region---"+
|
|
437
|
+
e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.s.set(e,g);c=g}e=f;d&&(e=U("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight=
|
|
438
|
+
"normal",f.appendChild(e));a.h.set(b,{Ye:f,ph:e,zd:c})}function cl(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Cc?c:"left"===a||"start"===a&&b===Ec||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ec?"line-right":"center"}
|
|
439
439
|
function bl(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=dl(c.linePadding,c,a.m);f.paddingRight=dl(c.linePadding,c,a.m);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
440
|
-
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=
|
|
441
|
-
f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=dl(c.fontSize,c,a.m);null!=c.line&&(a=c.lineInterpretation,0==c.line&&a==
|
|
442
|
-
c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==
|
|
443
|
-
c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==
|
|
440
|
+
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=U("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=el(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=el(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?
|
|
441
|
+
f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=dl(c.fontSize,c,a.m);null!=c.line&&(a=c.lineInterpretation,0==c.line&&a==Gc&&(a=1),1==a&&(f.position="absolute",c.writingMode==Fc?(f.width="100%",c.lineAlign==Hc?f.top=
|
|
442
|
+
c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Hc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==Hc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Fc?f.paddingLeft=c.position:f.paddingTop=c.position);a=cl(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=
|
|
443
|
+
c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Fc?f.width=c.size+"%":f.height=c.size+"%")}
|
|
444
444
|
function dl(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function el(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Xk);Xk.prototype.setTextVisibility=Xk.prototype.setTextVisibility;
|
|
445
445
|
Xk.prototype.isTextVisible=Xk.prototype.isTextVisible;Xk.prototype.remove=Xk.prototype.remove;Xk.prototype.destroy=Xk.prototype.destroy;Xk.prototype.append=Xk.prototype.append;function fl(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Pk(a,[]);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
446
|
-
break;case "right":g.push("align:right");break;case
|
|
446
|
+
break;case "right":g.push("align:right");break;case Dc:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}M("shaka.text.WebVttGenerator",function(){});function gl(a,b){this.h=a;this.g=b;this.j="";this.s=void 0;this.i=!1;this.m=!0;this.l=!1}gl.prototype.configure=function(a){this.g=a};
|
|
447
447
|
function hl(a,b,c){try{if(!a.g.enabled)return b;var d=il(a);a:{switch(c.toLowerCase()){case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":var e=jl;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":e=kl;break a}e=void 0}d.ot=e;d.su=!0;var f=ll(d);return ml(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
|
|
448
448
|
function il(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.s,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function nl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,il(a));c.pr=a.h.Ub();var e=c.ot===ol||c.ot===jl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=pl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=ll(c);f&&(b.uris=b.uris.map(function(g){return ml(g,f)}))}}}
|
|
449
449
|
function ql(a){if(0===a.type)return rl;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?jl:ol;if("audio"==b)return sl;if("text"==b)return"application/mp4"===a.mimeType?tl:ul}}function vl(a,b){b=a.h.Eb()[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}
|
|
450
450
|
function wl(a,b){var c=a.h.gb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case ol:return a.videoBandwidth||NaN;case sl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
451
451
|
function ll(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
452
452
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function pl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=ll(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
453
|
-
function ml(a,b){if(!b||a.includes("offline:"))return a;a=new
|
|
453
|
+
function ml(a,b){if(!b||a.includes("offline:"))return a;a=new kb(a);a.g.set("CMCD",b);return a.toString()}var kl="m",sl="a",ol="v",jl="av",rl="i",ul="c",tl="tt";M("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",rh:"s",OTHER:"o"});function xl(){}
|
|
454
454
|
function yl(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]=hf(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=hf(l)),k=yl(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 "+
|
|
455
|
-
k),g=!1)}return g}function zl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Al(a,b){return a&&b}M("shaka.util.ConfigUtils",xl);xl.convertToConfigObject=zl;xl.mergeConfigObjects=yl;function Bl(){this.g=null;this.h=[]}function Cl(a,b){return
|
|
456
|
-
function Hl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}M("shaka.util.FairPlayUtils",Dl);Dl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Kf(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=oc(
|
|
457
|
-
Dl.conaxFairPlayRequest=function(a,b){Hl(a,b)};Dl.ezdrmFairPlayRequest=function(a,b){Hl(a,b)};Dl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=nc(b.body),a=
|
|
455
|
+
k),g=!1)}return g}function zl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Al(a,b){return a&&b}M("shaka.util.ConfigUtils",xl);xl.convertToConfigObject=zl;xl.mergeConfigObjects=yl;function Bl(){this.g=null;this.h=[]}function Cl(a,b){return K(function(c){if(1==c.g)return a.g?D(c,new Promise(function(d){return a.h.push(d)}),2):c.F(2);a.g=b;E(c)})}Bl.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function Dl(){}function El(a){a=Nf(a);return(new kb(a)).Db}function Fl(a,b,c){function d(h){rc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(nc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=Pf(b,!0):e=b;a=Nf(a);a=Pf(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Gl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Nf(a).split("skd://").pop();return Fl(a,c,b)}
|
|
456
|
+
function Hl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}M("shaka.util.FairPlayUtils",Dl);Dl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Kf(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=oc(fg(c)))}};Dl.expressplayFairPlayRequest=function(a,b){Hl(a,b)};
|
|
457
|
+
Dl.conaxFairPlayRequest=function(a,b){Hl(a,b)};Dl.ezdrmFairPlayRequest=function(a,b){Hl(a,b)};Dl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=nc(b.body),a=eg(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Of("spc="+a))};Dl.expressplayInitDataTransform=function(a,b,c){return Gl(a,b,c)};
|
|
458
458
|
Dl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Nf(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=qc(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Fl(a,d,b)};Dl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Nf(a).split(";").pop();return Fl(a,c,b)};Dl.verimatrixInitDataTransform=function(a,b,c){return Gl(a,b,c)};Dl.initDataTransform=Fl;
|
|
459
|
-
Dl.defaultGetContentId=El;Dl.isFairPlaySupported=function(){var a;return
|
|
460
|
-
function Jl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ye(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){window.shakaMediaKeysPolyfill&&"skd"==k&&(k=l.serverCertificate,l=El(h),h=Fl(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:
|
|
461
|
-
ignoreDuplicateInitData:!
|
|
459
|
+
Dl.defaultGetContentId=El;Dl.isFairPlaySupported=function(){var a;return K(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ta(b,2),D(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);wa(b);return b.return(!1)})};function Il(){}
|
|
460
|
+
function Jl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ye(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){window.shakaMediaKeysPolyfill&&"skd"==k&&(k=l.serverCertificate,l=El(h),h=Fl(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Cd(),minHdcpVersion:"",
|
|
461
|
+
ignoreDuplicateInitData:!Gd()},c={retryParameters:Ye(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,
|
|
462
462
|
keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(h){return Al([h],h)},sequenceMode:!1,
|
|
463
|
-
enableAudioGroups:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:
|
|
463
|
+
enableAudioGroups:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Fd()||Gd()||Hd()||Jd()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:function(h){return Al([h],h)},
|
|
464
464
|
sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},d={retryParameters:Ye(),failureCallback:function(h){return Al([h])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,
|
|
465
|
-
inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1};if(
|
|
466
|
-
downloadSizeCallback:function(h){var k;return
|
|
467
|
-
minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0};var f="reload";
|
|
468
|
-
sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:e,abrFactory:function(){return new
|
|
469
|
-
maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};e.trackSelectionCallback=function(h){return
|
|
465
|
+
inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1};if(Dd("Web0S")||Ed()||Dd("CrKey")||Dd("Hisense")||Dd("VIDAA"))d.stallSkip=0;var e={trackSelectionCallback:function(h){return K(function(k){return k.return(h)})},
|
|
466
|
+
downloadSizeCallback:function(h){var k;return K(function(l){if(1==l.g)return navigator.storage&&navigator.storage.estimate?D(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<.95*k.quota)})},progressCallback:function(h,k){return Al([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,
|
|
467
|
+
minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0};var f="reload";Gd()||Fd()||Dd("Tizen 4")||Hd()||navigator.userAgent.match(/webOS\/4/i)||navigator.userAgent.match(/webOS\/5/i)||(f="smooth");var g={drm:b,manifest:c,streaming:d,mediaSource:{codecSwitchingStrategy:f,
|
|
468
|
+
sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:e,abrFactory:function(){return new ue},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,
|
|
469
|
+
maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};e.trackSelectionCallback=function(h){return K(function(k){return k.return(Kl(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};
|
|
470
470
|
return g}function Ll(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 yl(a,b,c||Jl(),d,"")}
|
|
471
|
-
function Kl(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=
|
|
472
|
-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=
|
|
473
|
-
this.h.preferredVideoHdrLevel,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ha=this.h.preferredTextLanguage;this.yb=this.h.preferredTextRole;this.Ab=this.h.preferForcedSubs;this.Ua=[];b&&b(this);this.T=Ul(this);this.J=Vl(this);this.J.dg(this.h.streaming.forceHTTPS);this.D=null;Wl&&(this.D=Wl());this.
|
|
474
|
-
"Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.yc(a,!0))}pa(V,cb);function Zl(a){null!=a.L&&(
|
|
475
|
-
function $l(a,b){if(b.lcevc.enabled){var c=a.gb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(
|
|
476
|
-
p.destroy=function(){var a=this,b;return
|
|
477
|
-
function cm(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||
|
|
478
|
-
p.yc=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return
|
|
479
|
-
p.vg=function(a){this.nh=a};p.detach=function(a){a=void 0===a?!1:a;var b=this;return
|
|
480
|
-
p.
|
|
481
|
-
7);case 7:c.H=null,c.se=null;case 6:if(!c.u){r.F(8);break}return D(r,c.u.stop(),8);case 8:if(!c.j){r.F(10);break}return D(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.K&&(c.K.release(),c.K=null);c.G&&(c.G.release(),c.G=null);if(!c.I){r.F(12);break}return D(r,c.I.destroy(),13);case 13:c.I=null;case 12:if(c.D&&!b)c.D.onAssetUnload();c.g&&Wk(c.g);if(!c.g||!c.g.src){r.F(14);break}return D(r,new Promise(function(q){return(new
|
|
482
|
-
break}return D(r,c.s.destroy(),17);case 17:c.s=null;case 16:c.$=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.C=new Rl;c.Tf=null;c.Bb=[];c.P=NaN;km(c);case 3:xa(r);c.
|
|
471
|
+
function Kl(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=Xb(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Pb(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-
|
|
472
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Lb&&"image"!=c.type||b.push(c);return b}M("shaka.util.PlayerConfiguration",Il);Il.mergeConfigObjects=Ll;Il.createDefault=Jl;function Ml(){this.g=null;this.h=[]}function Nl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Ol(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Pl(){this.i=this.h=null;this.g=[]}function Ql(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 Rl(){this.C=this.D=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.M=this.P=this.J=this.K=this.L=this.l=this.s=NaN;this.g=new Ml;this.h=new Pl};function V(a,b){cb.call(this);var c=this;this.l=Sl;this.Vd=this.g=null;this.Z=!1;this.ke=new Af;this.Ta=new Af;this.m=new Af;this.G=this.I=this.s=this.J=null;this.me=0;this.U=new Bl;this.ea=this.$=this.i=this.se=this.H=this.j=this.ha=this.L=this.nh=this.T=this.oa=this.M=this.K=this.Ma=null;this.Qb=!1;this.Nf=this.u=null;this.Xf=1E9;this.Bb=[];this.P=NaN;this.h=Tl(this);this.Uf={width:Infinity,height:Infinity};this.C=null;this.xa=new Je(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,
|
|
473
|
+
this.h.preferredVideoHdrLevel,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ha=this.h.preferredTextLanguage;this.yb=this.h.preferredTextRole;this.Ab=this.h.preferForcedSubs;this.Ua=[];b&&b(this);this.T=Ul(this);this.J=Vl(this);this.J.dg(this.h.streaming.forceHTTPS);this.D=null;Wl&&(this.D=Wl());this.ke.o(window,"online",function(){Xl(c);c.Wf()});this.ee=new xd(function(){return Yl(c)});a&&(Ae("Player",
|
|
474
|
+
"Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.yc(a,!0))}pa(V,cb);function Zl(a){null!=a.L&&(ui(a.L),a.L.release(),a.L=null)}
|
|
475
|
+
function $l(a,b){if(b.lcevc.enabled){var c=a.gb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Bd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Ua("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Zl(a);null==a.L&&(a.L=new ti(a.g,a.nh,b.lcevc),a.I&&(a.I.P=a.L))}else Zl(a)}function am(a,b){return new N(a,b)}p=V.prototype;
|
|
476
|
+
p.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==bm)return c.return();Zl(a);b=a.detach();a.l=bm;return D(c,b,2);case 2:a.ke&&(a.ke.release(),a.ke=null);a.Ta&&(a.Ta.release(),a.Ta=null);a.m&&(a.m.release(),a.m=null);a.Nf=null;a.h=null;a.C=null;a.Vd=null;a.T=null;if(!a.J){c.F(3);break}return D(c,a.J.destroy(),4);case 4:a.J=null;case 3:a.u&&(a.u.release(),a.u=null),cb.prototype.release.call(a),E(c)}})};
|
|
477
|
+
function cm(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Dd("Trident/"))return!1;var a=Kd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:yd()?!0:zd("application/x-mpegurl")}function dm(a,b){a.dispatchEvent(am("onstatechange",(new Map).set("state",b)))}
|
|
478
|
+
p.yc=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return K(function(f){switch(f.g){case 1:if(c.l==bm)throw new P(2,7,7E3);if(!c.g||c.g==a){f.F(2);break}return D(f,c.detach(),2);case 2:return D(f,gm(c,"attach"),4);case 4:if(f.h)return f.return();ta(f,5,6);dm(c,"attach");d=function(){var g=hm(c);g&&im(c,g)};c.Ta.o(a,"error",d);c.g=a;if(!b||!yd()||c.I){f.F(6);break}return D(f,jm(c),6);case 6:xa(f);c.U.release();ya(f,0);break;case 5:return e=wa(f),D(f,c.detach(),10);case 10:throw e;}})};
|
|
479
|
+
p.vg=function(a){this.nh=a};p.detach=function(a){a=void 0===a?!1:a;var b=this;return K(function(c){if(1==c.g){if(b.l==bm)throw new P(2,7,7E3);return D(c,b.Pc(!1,a),2)}if(3!=c.g)return D(c,gm(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Ta.Kb(),b.g=null),dm(b,"detach"),b.D&&!a&&b.D.release()}finally{b.U.release()}E(c)})};function gm(a,b){var c;return K(function(d){return 1==d.g?(c=++a.me,D(d,Cl(a.U,b),2)):c!=a.me?(a.U.release(),d.return(!0)):d.return(!1)})}
|
|
480
|
+
p.Pc=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 K(function(r){switch(r.g){case 1:return c.l!=bm&&(c.l=Sl),D(r,gm(c,"unload"),2);case 2:if(r.h)return r.return();ua(r,3);c.Qb=!1;dm(c,"unload");a&&!yd()&&(a=!1);Zl(c);d=c.Ua.map(function(q){return q()});c.Ua=[];return D(r,Promise.all(d),5);case 5:c.dispatchEvent(am("unloading"));c.oa&&(c.oa.release(),c.oa=null);c.g&&c.m.Kb();c.ee.stop();c.Ma&&(c.Ma.release(),c.Ma=null);if(!c.H){r.F(6);break}return D(r,c.H.stop(),
|
|
481
|
+
7);case 7:c.H=null,c.se=null;case 6:if(!c.u){r.F(8);break}return D(r,c.u.stop(),8);case 8:if(!c.j){r.F(10);break}return D(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.K&&(c.K.release(),c.K=null);c.G&&(c.G.release(),c.G=null);if(!c.I){r.F(12);break}return D(r,c.I.destroy(),13);case 13:c.I=null;case 12:if(c.D&&!b)c.D.onAssetUnload();c.g&&Wk(c.g);if(!c.g||!c.g.src){r.F(14);break}return D(r,new Promise(function(q){return(new xd(q)).S(.1)}),15);case 15:c.g.removeAttribute("src"),c.g.load();case 14:if(!c.s){r.F(16);
|
|
482
|
+
break}return D(r,c.s.destroy(),17);case 17:c.s=null;case 16:c.$=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.C=new Rl;c.Tf=null;c.Bb=[];c.P=NaN;km(c);case 3:xa(r);c.U.release();ya(r,4);break;case 4:if(a&&yd()&&!c.I)return D(r,jm(c),0);
|
|
483
483
|
r.F(0)}})};p.hj=function(a){this.ea=a};
|
|
484
|
-
p.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return
|
|
485
|
-
d.ea=b;d.Qb=!1;d.dispatchEvent(am("loading"));h=Date.now()/1E3;d.C=new Rl;d.$=a;if(c){m.F(7);break}return D(m,g(function(){return
|
|
486
|
-
om(d,c),0)})},"parseManifestInner_"),13);case 13:return D(m,g(function(){return
|
|
487
|
-
function lm(a){var b,c;return
|
|
488
|
-
function jm(a){var b,c,d,e,f;return
|
|
489
|
-
function om(a,b){var c,d,e,f,g,h,k,l;return
|
|
484
|
+
p.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:if(d.l==bm)throw new P(2,7,7E3);return D(m,Cl(d.U,"load"),2);case 2:d.U.release();if(!d.g)throw new P(2,7,7002);if(!d.$){m.F(3);break}return D(m,d.Pc(!1),3);case 3:e=++d.me;f=function(){if(d.me!=e)throw new P(2,7,7E3);};g=function(n,r){return K(function(q){switch(q.g){case 1:return ua(q,2),D(q,Cl(d.U,r),4);case 4:return f(),D(q,n(),5);case 5:f();case 2:xa(q),d.U.release(),ya(q,0)}})};ta(m,5);
|
|
485
|
+
d.ea=b;d.Qb=!1;d.dispatchEvent(am("loading"));h=Date.now()/1E3;d.C=new Rl;d.$=a;if(c){m.F(7);break}return D(m,g(function(){return K(function(n){if(1==n.g)return D(n,lm(d),2);c=n.h;E(n)})},"guessMimeType_"),7);case 7:if(k=mm(d,c))return D(m,g(function(){return K(function(n){return D(n,nm(d,c),0)})},"initializeSrcEqualsDrmInner_"),16);if(d.I){m.F(11);break}return D(m,g(function(){return K(function(n){return D(n,jm(d),0)})},"initializeMediaSourceEngineInner_"),11);case 11:return D(m,g(function(){return K(function(n){return D(n,
|
|
486
|
+
om(d,c),0)})},"parseManifestInner_"),13);case 13:return D(m,g(function(){return K(function(n){return D(n,pm(d),0)})},"initializeDrmInner_"),14);case 14:return D(m,g(function(){return K(function(n){return D(n,qm(d,h),0)})},"loadInner_"),10);case 16:return D(m,g(function(){return K(function(n){return D(n,rm(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(am("loaded"));va(m,0);break;case 5:l=wa(m);if(7E3==l.code){m.F(18);break}return D(m,d.Pc(!1),18);case 18:throw l;}})};
|
|
487
|
+
function lm(a){var b,c;return K(function(d){if(1==d.g)return b=a.h.manifest.retryParameters,D(d,Lk(a.$,a.J,b),2);c=d.h;"application/x-mpegurl"==c&&Id()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function mm(a,b){if(!yd())return!0;if(b){if(""==(a.g||Ad()).canPlayType(b))return!1;if(!(yd()&&b in yh))return!0;if("application/x-mpegurl"===b||"application/vnd.apple.mpegurl"===b){if(a.h.streaming.preferNativeHls)return!0;if(Id())return a.h.streaming.useNativeHlsOnSafari}}return!1}
|
|
488
|
+
function jm(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return dm(a,"media-source"),b=a.h.textDisplayFactory,c=b(),a.Tf=b,d=sm(a.g,c,function(h,k,l){tm(a,h,k,l)},a.L),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.U=f,D(g,d.L,2);a.I=d;E(g)})}
|
|
489
|
+
function om(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.J,dm(a,"manifest-parser"),a.se=xh(a.$,b||null),a.H=a.se(),d=hf(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.H.configure(d),a.oa=new Rj(function(){return a.ya()}),a.oa.addEventListener("regionadd",function(n){n=n.region;um(a,"timelineregionadded",n);if(a.D)a.D.onDashTimedMetadata(n)}),a.ha=null,a.h.streaming.observeQualityChanges&&(a.ha=new Nj(function(){return a.Eb()}),a.ha.addEventListener("qualitychange",
|
|
490
490
|
function(n){var r=n.quality;n=n.position;r=(new Map).set("mediaQuality",{bandwidth:r.bandwidth,audioSamplingRate:r.audioSamplingRate,codecs:r.codecs,contentType:r.contentType,frameRate:r.frameRate,height:r.height,mimeType:r.mimeType,channelsCount:r.channelsCount,pixelAspectRatio:r.pixelAspectRatio,width:r.width}).set("position",n);a.dispatchEvent(am("mediaqualitychanged",r))})),e={networkingEngine:c,filter:function(n){return vm(a,n)},makeTextStreamsForClosedCaptions:function(n){return wm(a,n)},onTimelineRegionAdded:function(n){var r=
|
|
491
491
|
a.oa;a:{var q=t(r.g);for(var u=q.next();!u.done;u=q.next())if(u=u.value,u.schemeIdUri==n.schemeIdUri&&u.id==n.id&&u.startTime==n.startTime&&u.endTime==n.endTime){q=u;break a}q=null}null==q&&(r.g.add(n),n=new N("regionadd",new Map([["region",n]])),r.dispatchEvent(n))},onEvent:function(n){return a.dispatchEvent(n)},onError:function(n){return im(a,n)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",
|
|
492
|
-
!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(n){var r=a.s?a.s.g:null;r&&a.s.u&&xm(a,r.keySystem,n)},onManifestUpdated:function(){var n=(new Map).set("isLive",a.R());a.dispatchEvent(am("manifestupdated",n));if(a.D)a.D.onManifestUpdated(a.R())},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()}},f=Date.now()/1E3,dm(a,"manifest"),g=a,D(m,a.H.start(a.$,e),2);g.i=m.h;h=am("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new
|
|
493
|
-
ym(a.i);k=Date.now()/1E3;l=k-f;a.C.H=l;
|
|
494
|
-
function qm(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A
|
|
495
|
-
(
|
|
496
|
-
a.h.playRangeEnd);a.u.init(function(
|
|
497
|
-
m.next())(r=n.value)&&!r.segmentIndex&&k.push(r.createSegmentIndex());if(!(0<k.length)){B.F(2);break}return D(B,Promise.all(k),2);case 2:if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(l);Em(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.G=Km(a,a.ea);a.Ma=Lm(a,b);q=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Mm(a,c,q);if(h){B.F(4);break}Fm(a,g,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){B.F(4);break}u=a.G;v=u.Qe;return D(B,Nm(g,a.G.
|
|
498
|
-
B.h);case 4:return a.G.Pe(),x=a.Xb().find(function(
|
|
499
|
-
"timeupdate",
|
|
500
|
-
function nm(a,b){var c,d,e,f;return
|
|
501
|
-
mimeType:b?
|
|
502
|
-
function rm(a,b,c){var d,e,f,g,h,k,l,m,n,r;return
|
|
492
|
+
!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(n){var r=a.s?a.s.g:null;r&&a.s.u&&xm(a,r.keySystem,n)},onManifestUpdated:function(){var n=(new Map).set("isLive",a.R());a.dispatchEvent(am("manifestupdated",n));if(a.D)a.D.onManifestUpdated(a.R())},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()}},f=Date.now()/1E3,dm(a,"manifest"),g=a,D(m,a.H.start(a.$,e),2);g.i=m.h;h=am("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);
|
|
493
|
+
ym(a.i);k=Date.now()/1E3;l=k-f;a.C.H=l;E(m)})}function pm(a){var b,c;return K(function(d){return 1==d.g?(dm(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.s=zm(a,{rc:a.J,onError:function(e){im(a,e)},we:function(e){Am(a,e)},onExpirationUpdated:function(e,f){Bm(a,e,f)},onEvent:function(e){a.dispatchEvent(e);"drmsessionupdate"==e.type&&c&&(c=!1,a.C.j=Date.now()/1E3-b,a.L&&ui(a.L))}}),a.s.configure(a.h.drm),D(d,Pg(a.s,a.i.variants,a.i.offlineSessionIds),2)):3!=d.g?D(d,a.s.yc(a.g),3):D(d,vm(a,a.i),0)})}
|
|
494
|
+
function qm(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A;return K(function(B){switch(B.g){case 1:dm(a,"load");c=a.g;a.K=new Kj({be:function(){return c.playbackRate},ld:function(){return c.defaultPlaybackRate},fg:function(F){c.playbackRate=F},Tg:function(F){c.currentTime+=F}});d=function(){return Cm(a)};e=function(){return Dm(a)};a.m.o(c,"playing",d);a.m.o(c,"pause",d);a.m.o(c,"ended",d);a.m.o(c,"ratechange",e);$l(a,a.h);f=a.h.abrFactory;a.u&&a.Nf==f||(a.Nf=f,a.u=f(),"function"!=typeof a.u.setMediaElement&&
|
|
495
|
+
(Ae("AbrManager","Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.xa=new Je(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.Ha=a.h.preferredTextLanguage;a.yb=a.h.preferredTextRole;a.Ab=a.h.preferForcedSubs;Em(a.i.presentationTimeline,a.h.playRangeStart,
|
|
496
|
+
a.h.playRangeEnd);a.u.init(function(F,H,G){a.j&&F!=a.j.j&&Fm(a,F,!0,void 0===H?!1:H,void 0===G?0:G)});a.u.setMediaElement(c);Pd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);a.j=Gm(a);a.j.configure(a.h.streaming);a.l=Hm;c.textTracks&&a.m.o(c.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":Im(a,F)}});a.dispatchEvent(am("streaming"));g=null;(h=a.j.j)||(g=Jm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=
|
|
497
|
+
m.next())(r=n.value)&&!r.segmentIndex&&k.push(r.createSegmentIndex());if(!(0<k.length)){B.F(2);break}return D(B,Promise.all(k),2);case 2:if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(l);Em(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.G=Km(a,a.ea);a.Ma=Lm(a,b);q=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Mm(a,c,q);if(h){B.F(4);break}Fm(a,g,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){B.F(4);break}u=a.G;v=u.Qe;return D(B,Nm(g,a.G.Pd()),6);case 6:v.call(u,
|
|
498
|
+
B.h);case 4:return a.G.Pe(),x=a.Xb().find(function(F){return F.active}),x||((z=re(a.i.textStreams,a.Ha,a.yb,a.Ab)[0]||null)&&Ql(a.C.h,z,!0),g&&(z?(g.audio&&Om(a,g.audio,z)&&(a.Z=!0),a.Z&&a.I.H.setTextVisibility(!0),Pm(a)):a.Z=!1),z&&(a.h.streaming.alwaysStreamText||a.pc())&&tk(a.j,z)),D(B,a.j.start(),7);case 7:a.h.abr.enabled&&(a.u.enable(),Qm(a));Rm(a);Sm(a);a.i.variants.some(function(F){return F.primary});(y=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription)?(C=function(){return Tm(a)},a.m.o(c,
|
|
499
|
+
"timeupdate",C)):y||(A=function(){return Um(a)},a.m.o(c,"timeupdate",A),Um(a));if(a.D)a.D.onManifestUpdated(y);a.Qb=!0;a.m.ka(c,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b});E(B)}})}
|
|
500
|
+
function nm(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Mb,d=Date.now()/1E3,e=!0,a.s=zm(a,{rc:a.J,onError:function(h){im(a,h)},we:function(h){Am(a,h)},onExpirationUpdated:function(h,k){Bm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.C.j=Date.now()/1E3-d)}}),a.s.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
|
|
501
|
+
mimeType:b?jd(b):"",codecs:b?kd(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.s.Z=!0,D(g,Pg(a.s,[f],[]),2)):D(g,a.s.yc(a.g),0)})}
|
|
502
|
+
function rm(a,b,c){var d,e,f,g,h,k,l,m,n,r;return K(function(q){if(1==q.g)return dm(a,"src-equals"),d=a.g,a.G=new zj(d),e=!1,a.Ua.push(function(){e=!0}),null!=a.ea&&a.G.Qe(a.ea),a.K=new Kj({be:function(){return d.playbackRate},ld:function(){return d.defaultPlaybackRate},fg:function(u){d.playbackRate=u},Tg:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,Mm(a,d,f),g=function(){return Cm(a)},h=function(){return Dm(a)},a.m.o(d,"playing",g),a.m.o(d,"pause",g),a.m.o(d,"ended",g),a.m.o(d,
|
|
503
503
|
"ratechange",h),"none"!=d.preload&&a.m.ka(d,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.o(d.audioTracks,"addtrack",function(){return Rm(a)}),a.m.o(d.audioTracks,"removetrack",function(){return Rm(a)}),a.m.o(d.audioTracks,"change",function(){return Rm(a)})),d.textTracks&&(a.m.o(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Vm(a,u);break;case "chapters":Im(a,u);break;default:Rm(a)}}),a.m.o(d.textTracks,"removetrack",function(){return Rm(a)}),
|
|
504
|
-
a.m.o(d.textTracks,"change",function(){return Rm(a)})),d.src=hl(a.T,a.$,c),(
|
|
505
|
-
Zm(a);
|
|
506
|
-
n),Um(a));a.D&&(a.D.onManifestUpdated(l),l&&(r=a.ya().end,a.m.o(d,"progress",function(){var u=a.ya().end;r!=u&&(a.D.onManifestUpdated(a.R()),r=u)})));a.Qb=!0;
|
|
507
|
-
function Vm(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,$m(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new
|
|
504
|
+
a.m.o(d.textTracks,"change",function(){return Rm(a)})),d.src=hl(a.T,a.$,c),(Ed()||Dd("Web0S"))&&d.load(),a.l=Wm,a.dispatchEvent(am("streaming")),k=new $e,qj(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.G.Pe();k.resolve()}),qj(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var u;return K(function(v){if(1==v.g)return Xm(a),u=Ym(a),u.find(function(x){return"disabled"!=x.mode})?(0<u.length&&(a.Z=!0),v.F(2)):D(v,new Promise(function(x){a.m.ka(d.textTracks,"change",x);(new xd(x)).S(1)}),2);if(e)return v.return();
|
|
505
|
+
Zm(a);E(v)})}),d.error?k.reject(hm(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.ka(d,"error",function(){k.reject(hm(a))}),D(q,k,2);(l=a.R())&&a.h.streaming.liveSync?(m=function(){return Tm(a)},a.m.o(d,"timeupdate",m)):l||(n=function(){return Um(a)},a.m.o(d,"timeupdate",
|
|
506
|
+
n),Um(a));a.D&&(a.D.onManifestUpdated(l),l&&(r=a.ya().end,a.m.o(d,"progress",function(){var u=a.ya().end;r!=u&&(a.D.onManifestUpdated(a.R()),r=u)})));a.Qb=!0;E(q)})}function Xm(a){var b=a.h.preferredAudioLanguage;""!=b&&a.Ae(b,a.h.preferredVariantRole)}function Zm(a){var b=a.h.preferredTextLanguage;""!=b&&a.ah(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
|
|
507
|
+
function Vm(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,$m(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new xd(function(){var d=an(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).La().S(.5);a.Ua.push(function(){c.stop()})}}
|
|
508
508
|
function tm(a,b,c,d){b=t(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=t(e.frames),k=h.next();!k.done;k=h.next())$m(a,f,g,"org.id3",k.value);if(a.D)a.D.onHlsTimedMetadata(e,f)}}function $m(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(am("metadata",b))}
|
|
509
|
-
function Im(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new
|
|
509
|
+
function Im(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new xd(function(){b.mode="hidden"})).La().S(.5);a.Ua.push(function(){c.stop()})}}function ym(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}p.Qi=function(){for(var a=this.U;a.g;)a.release()};function zm(a,b){return new Ig(b,a.h.drm.updateExpirationTime)}
|
|
510
510
|
function Vl(a){return new mf(function(b,c,d){a.u&&a.u.segmentDownloaded(b,c,d)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(am("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(am("downloadfailed",b))},function(b,c,d){var e=a.T;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)nl(e,c);else switch(b){case 0:try{if(e.g.enabled){if(d.type){a:{switch(d.type){case 4:var f=
|
|
511
511
|
"d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.s=f}nl(e,c,{ot:kl,su:!e.i})}}catch(m){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case wf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.R()?"l":"v"};h.ot=ql(b);var k=h.ot===ol||h.ot===sl||h.ot===jl||h.ot===tl,l=b.stream;l&&(k&&(h.bl=vl(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==tl&&(h.tb=wl(e,h.ot)/1E3);nl(e,c,h)}}catch(m){Va("CMCD_SEGMENT_ERROR",
|
|
512
|
-
"Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:nl(e,c,{ot:"k"});break;case 4:nl(e,c,{ot:"o"})}},function(b,c,d,e){a.H&&a.H.banLocation&&a.H.banLocation(e)})}function Km(a,b){return new Aj(a.g,a.i,a.h.streaming,b,function(){a.Ma&&Mj(a.Ma,!0);a.j&&a.j.
|
|
512
|
+
"Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:nl(e,c,{ot:"k"});break;case 4:nl(e,c,{ot:"o"})}},function(b,c,d,e){a.H&&a.H.banLocation&&a.H.banLocation(e)})}function Km(a,b){return new Aj(a.g,a.i,a.h.streaming,b,function(){a.Ma&&Mj(a.Ma,!0);a.j&&a.j.Cd();a.M&&bn(a)},function(c){return a.dispatchEvent(c)})}
|
|
513
513
|
function Lm(a,b){b=new Sj(a.oa,a.R()||0<b);b.addEventListener("enter",function(d){um(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){um(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(um(a,"timelineregionenter",e),um(a,"timelineregionexit",e))});var c=new Lj(a.g);c.g.add(b);a.ha&&c.g.add(a.ha);return c}
|
|
514
514
|
function Mm(a,b,c){a.M=new Se;a.M.g=Ue;We(a.M,c,Math.min(.5,c/2));km(a);a.m.o(b,"waiting",function(){return bn(a)});a.m.o(b,"stalled",function(){return bn(a)});a.m.o(b,"canplaythrough",function(){return bn(a)});a.m.o(b,"progress",function(){return bn(a)})}
|
|
515
|
-
function bn(a){switch(a.l){case Wm:if(a.g.ended)var b=!0;else{var c=
|
|
515
|
+
function bn(a){switch(a.l){case Wm:if(a.g.ended)var b=!0;else{var c=Ih(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Hm:a:if(a.g.ended||Li(a.I))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Vb();var d=Ih(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Kh(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Te:Ue;c.g=d;b!=d&&km(a)}function sm(a,b,c,d){return new Di(a,b,c,d)}
|
|
516
516
|
function Ul(a){return new gl({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Eb:function(){return a.Eb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ub:function(){return a.Ub()},Tb:function(){return a.Tb()},gb:function(){return a.gb()},R:function(){return a.R()}},a.h.cmcd)}
|
|
517
|
-
function Gm(a){return new gk(a.i,{
|
|
518
|
-
!d.K&&["audio","video"].includes(b)){c=new
|
|
519
|
-
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(
|
|
517
|
+
function Gm(a){return new gk(a.i,{ae:function(){return a.G?a.G.Pd():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Y:a.I,rc:a.J,onError:function(b){return im(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ji:function(){a.H&&a.H.update&&a.H.update()},Pf:function(b,c,d){a.G&&a.G.Ug();bn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(am("segmentappended",b))},Ii:function(b,c){(c=c.Jf)&&a.ha&&Pj(a.ha,c,b)},wg:function(b,c){var d=a.s;if(d.h.parseInbandPsshEnabled&&
|
|
518
|
+
!d.K&&["audio","video"].includes(b)){c=new kg(nc(c));var e=0,f=t(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=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Yg(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Ki:function(b,c,d){tm(a,b,c,d)},Ze:function(b,c){return a.Ze(b,c)}})}
|
|
519
|
+
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Ae("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Ae("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
520
520
|
a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2));var c=Ll(this.h,a,Tl(this));cn(this);return c};
|
|
521
|
-
function cn(a){if(a.H){var b=hf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.s&&a.s.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{dn(a,a.i)}catch(f){im(a,f)}a.u&&Sm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||en(a)}a.J&&a.J.dg(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.
|
|
522
|
-
e.destroy());d.h&&(d.h.j=c);a.Tf=b;a.j&&(b=a.j,(c=b.h.get(
|
|
523
|
-
p.Kh=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.ya().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};p.Ui=function(){for(var a in this.h)delete this.h[a];Ll(this.h,Tl(this),Tl(this));cn(this)};p
|
|
524
|
-
p.Tb=function(){return this.J};p.uf=function(){return this.$};p.
|
|
525
|
-
p.ya=function(){if(this.i){if(!this.Qb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Ec(),end:a.Fb()}}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}};p.oi=function(){this.R()&&(this.g.currentTime=this.ya().end)};p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.s?this.s.g:null};p.
|
|
526
|
-
p.tf=function(){return this.s?this.s.tf():[]};p.
|
|
527
|
-
p.gb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,
|
|
528
|
-
p.Xb=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=
|
|
529
|
-
p.Hh=function(a){var b=this,c,d,e,f;return
|
|
521
|
+
function cn(a){if(a.H){var b=hf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.s&&a.s.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{dn(a,a.i)}catch(f){im(a,f)}a.u&&Sm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||en(a)}a.J&&a.J.dg(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.U=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Tf!=b)){var c=b(),d=a.I,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),
|
|
522
|
+
e.destroy());d.h&&(d.h.j=c);a.Tf=b;a.j&&(b=a.j,(c=b.h.get(Lb))&&rk(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Qm(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),We(a.M,b,Math.min(.5,b/2)));a.i&&Em(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.D&&a.D.configure(a.h.ads);a.T&&a.T.configure(a.h.cmcd)}p.getConfiguration=function(){var a=Tl(this);Ll(a,this.h,Tl(this));return a};
|
|
523
|
+
p.Kh=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.ya().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};p.Ui=function(){for(var a in this.h)delete this.h[a];Ll(this.h,Tl(this),Tl(this));cn(this)};p.$d=function(){return this.l};p.wf=function(){return this.i?this.i.type:null};p.ai=function(){return this.g};
|
|
524
|
+
p.Tb=function(){return this.J};p.uf=function(){return this.$};p.Xd=function(){return this.D?this.D:null};p.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};p.mc=function(){return this.i?this.i.presentationTimeline.mc():!1};p.Hc=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};
|
|
525
|
+
p.ya=function(){if(this.i){if(!this.Qb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Ec(),end:a.Fb()}}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}};p.oi=function(){this.R()&&(this.g.currentTime=this.ya().end)};p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.s?this.s.g:null};p.md=function(){return this.s?this.s.md():Infinity};
|
|
526
|
+
p.tf=function(){return this.s?this.s.tf():[]};p.Zd=function(){return this.s?this.s.Zd():{}};p.rd=function(){return this.M?this.M.g==Ue:!1};p.Ub=function(){return this.g?this.K?this.K.h:1:0};p.Gd=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.K.set(a),this.l==Hm&&(this.u.playbackRateChanged(a),qk(this.j,1<Math.abs(a))))};p.Ve=function(){var a=this.K.ld();this.l==Wm&&this.K.set(a);this.l==Hm&&(this.K.set(a),this.u.playbackRateChanged(a),qk(this.j,!1))};
|
|
527
|
+
p.gb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,pe(e)){var f=he(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 oe(g)}):[]};
|
|
528
|
+
p.Xb=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ie(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Ym(this).map(function(f){return me(f)}):[]};p.Yd=function(){var a=this.Bb;this.i&&(a=this.i.imageStreams);return a.map(function(b){return je(b)})};
|
|
529
|
+
p.Hh=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Hm&&b.l!=Wm)return g.return(null);c=b.Bb;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.F(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Gj(d.segmentIndex,function(h){var k=fn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.ec;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.yf(a,h.startTime+l*m/k))}}),D(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
530
530
|
function fn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{ec:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
531
|
-
p.yf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A
|
|
532
|
-
u=g.I||q/r;v=g.startTime;z=x=0;1<r&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.ec*m,z=Math.floor(y/h.ec)*n);
|
|
533
|
-
p.$f=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Ql(this.C.h,b,!1),tk(this.j,b),gn(this),this.Ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Ym(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,
|
|
534
|
-
p.Be=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&&
|
|
535
|
-
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
536
|
-
p.Ae=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.G){this.xa=new
|
|
537
|
-
f;c?(a=
|
|
538
|
-
p.Zi=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=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.xa=new
|
|
539
|
-
p.pc=function(){var a=this.Z;return this.I&&this.l==Hm?this.I.H.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Ym(this).some(function(b){return"showing"==b.mode}):a};p.Ig=function(){return this.g&&this.g.src&&this.g.textTracks?ln(this).map(function(a){return
|
|
540
|
-
p.vf=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=
|
|
531
|
+
p.yf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A;return K(function(B){if(1==B.g){if(c.l!=Hm&&c.l!=Wm)return B.return(null);d=c.Bb;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?B.F(2):D(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=fn(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.ec;n=l/h.rows;r=h.ec*h.rows;q=g.j-g.startTime;
|
|
532
|
+
u=g.I||q/r;v=g.startTime;z=x=0;1<r&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.ec*m,z=Math.floor(y/h.ec)*n);C=!1;if(A=g.H)C=!0,n=A.height,x=A.positionX,z=A.positionY,m=A.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:v,duration:u,uris:g.aa(),width:m,sprite:C})})};
|
|
533
|
+
p.$f=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Ql(this.C.h,b,!1),tk(this.j,b),gn(this),this.Ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Ym(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ke(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";gn(this)}};
|
|
534
|
+
p.Be=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&&pe(d)&&(Fm(this,d,!1,b,c),this.xa=new Ie(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),Sm(this))}else if(this.g&&this.g.audioTracks)for(b=
|
|
535
|
+
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,ke(c)==a.id){hn(this,c);break}};p.Jh=function(){return jn(this.gb())};p.gi=function(){return jn(this.Xb())};p.Ih=function(){return Array.from(kn(this.gb()))};p.ei=function(){return Array.from(kn(this.Xb()))};
|
|
536
|
+
p.Ae=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.G){this.xa=new Je(a,b||"",c,"","","",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.xa.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,b))c=
|
|
537
|
+
f;c?(a=he(c),this.Be(a,!0,d)):en(this)}else this.g&&this.g.audioTracks&&(d=re(this.gb(),a,b||"",!1)[0])&&this.Be(d)};p.ah=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ha=a,this.yb=b||"",this.Ab=c,(a=re(this.i.textStreams,this.Ha,this.yb,this.Ab)[0]||null)&&a!=this.j.s&&(Ql(this.C.h,a,!1),this.h.streaming.alwaysStreamText||this.pc()))tk(this.j,a),gn(this)}else(a=re(this.Xb(),a,b||"",c)[0])&&this.$f(a)};
|
|
538
|
+
p.Zi=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=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.xa=new Je(d.language,"",0,"","",a,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),en(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&hn(this,b)}};
|
|
539
|
+
p.pc=function(){var a=this.Z;return this.I&&this.l==Hm?this.I.H.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Ym(this).some(function(b){return"showing"==b.mode}):a};p.Ig=function(){return this.g&&this.g.src&&this.g.textTracks?ln(this).map(function(a){return me(a)}):[]};
|
|
540
|
+
p.vf=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=Pb(a),c=ln(this).filter(function(h){return Pb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
541
541
|
function Ym(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function an(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function ln(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
542
|
-
p.hg=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==Hm)this.I.H.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=
|
|
543
|
-
p.bi=function(){if(!this.R())return null;if(this.G)var a=this.G.
|
|
544
|
-
p.Kg=function(){if(!this.R())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};p.Eb=function(){if(this.l==Hm)return this.I.Eb();var a={total:[],audio:[],video:[],text:[]};this.l==Wm&&(a.total=
|
|
542
|
+
p.hg=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==Hm)this.I.H.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=re(this.i.textStreams,this.Ha,this.yb,this.Ab),0<a.length&&(tk(this.j,a[0]),gn(this))):pk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Ym(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Pm(this)}};
|
|
543
|
+
p.bi=function(){if(!this.R())return null;if(this.G)var a=this.G.Pd();else{if(null==this.ea)return new Date;a=this.ea}if(this.i)return new Date(1E3*(this.i.presentationTimeline.i+a));if(this.g&&this.g.getStartDate){var b=this.g.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)}return null};
|
|
544
|
+
p.Kg=function(){if(!this.R())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};p.Eb=function(){if(this.l==Hm)return this.I.Eb();var a={total:[],audio:[],video:[],text:[]};this.l==Wm&&(a.total=Lh(this.g.buffered));return a};
|
|
545
545
|
p.getStats=function(){if(this.l!=Hm&&this.l!=Wm)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,switchHistory:[],stateHistory:[]};Cm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=
|
|
546
546
|
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.C.M=this.G.rg(),this.C.P=this.G.sg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.C;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.C.J=Number(c.corruptedVideoFrames)}this.s?(c=this.s,c=c.J?c.J:NaN):c=NaN;this.C.u=c;if(this.l==Hm){if(c=this.j.j)this.C.D=(this.K?this.K.h:1)*c.bandwidth;c&&c.video&&(b=this.C,d=c.video.height||NaN,b.s=c.video.width||NaN,b.l=d);this.R()&&(c=this.Kg().valueOf()+
|
|
547
|
-
1E3*this.ya().end,this.C.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.C.I=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.C.C=c}this.l==Wm&&(c=this.C,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.C;a=e.s;c=e.l;b=e.D;d=e.K;var f=e.L,g=e.J,h=e.P,k=e.M,l=e.C,m=e.i,n=e.m,r=e.H,q=e.j,u=Nl(e.g,"playing"),v=Nl(e.g,"paused"),x=Nl(e.g,"buffering"),z=e.u,y=e.G,
|
|
548
|
-
id:
|
|
549
|
-
p.vh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,q,u,v,x,z,y;return
|
|
550
|
-
(
|
|
551
|
-
primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};
|
|
552
|
-
p.wh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return
|
|
553
|
-
vttOffset:0};l=nc(f);m=h.parseMedia(l,k,a);n=[];r={};q=t(m);for(u=q.next();!u.done;r={
|
|
554
|
-
segmentIndex:new Fj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.
|
|
555
|
-
p.uh=function(a,b,c){var d=this,e,f,g,h;return
|
|
556
|
-
2,2012);}})};function mn(a,b){var c;return
|
|
557
|
-
function nn(a,b,c,d,e,f,g){var h,k,l,m;return
|
|
558
|
-
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function on(a,b,c,d){var e,f,g;return
|
|
559
|
-
function pn(a,b,c,d){var e=
|
|
547
|
+
1E3*this.ya().end,this.C.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.C.I=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.C.C=c}this.l==Wm&&(c=this.C,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.C;a=e.s;c=e.l;b=e.D;d=e.K;var f=e.L,g=e.J,h=e.P,k=e.M,l=e.C,m=e.i,n=e.m,r=e.H,q=e.j,u=Nl(e.g,"playing"),v=Nl(e.g,"paused"),x=Nl(e.g,"buffering"),z=e.u,y=e.G,C=e.I,A=Ol(e.g),B=[];e=t(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,B.push({timestamp:F.timestamp,
|
|
548
|
+
id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:r,drmTimeSeconds:q,playTime:u,pauseTime:v,bufferingTime:x,licenseTime:z,liveLatency:y,maxSegmentDuration:C,stateHistory:A,switchHistory:B}};
|
|
549
|
+
p.vh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,q,u,v,x,z,y,C;return K(function(A){switch(A.g){case 1:if(h.l!=Hm&&h.l!=Wm)throw new P(1,7,7004);if(d){A.F(2);break}return D(A,mn(h,a),3);case 3:d=A.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=Wm){A.F(4);break}g&&(c="forced");return D(A,nn(h,a,b,c,d,f||"",k),5);case 5:l=Pb(b);m=h.Xb();if(n=m.find(function(B){return Pb(B.language)==l&&B.label==(f||"")&&B.kind==c}))return Rm(h),A.return(n);throw new P(1,2,2012);case 4:r=Mb;q=h.g.duration;
|
|
550
|
+
h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new P(1,4,4033);if(!k.length){A.F(6);break}return D(A,on(h,a,h.J,h.h.streaming.retryParameters),7);case 7:u=A.h,v=pn(h,u,d,k),x=new Blob([v],{type:"text/vtt"}),a=Gi(x),d="text/vtt";case 6:z={id:h.Xf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ij(0,q,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:r.wa,
|
|
551
|
+
primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};y=dd(z.mimeType,z.codecs);C=md(y);if(!C)throw new P(2,2,2014,d);h.i.textStreams.push(z);Rm(h);return A.return(ie(z))}})};
|
|
552
|
+
p.wh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(C){switch(C.g){case 1:if(c.l!=Hm&&c.l!=Wm)throw new P(1,7,7004);if(b){C.F(2);break}return D(C,mn(c,a),3);case 3:b=C.h;case 2:if("text/vtt"!=b)throw new P(1,2,2017,a);d=Mb;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new P(1,4,4045);return D(C,on(c,a,c.J,c.h.streaming.retryParameters),4);case 4:f=C.h;g=nd[b];if(!g)throw new P(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
553
|
+
vttOffset:0};l=nc(f);m=h.parseMedia(l,k,a);n=[];r={};q=t(m);for(u=q.next();!u.done;r={Tc:r.Tc},u=q.next())v=u.value,r.Tc=Eb([a],[v.payload])[0],x=new Fh(v.startTime,v.endTime,function(A){return function(){return[A.Tc]}}(r),0,null,null,0,0,Infinity),r.Tc.includes("#xywh")&&(z=r.Tc.split("#xywh=")[1].split(","),4===z.length&&x.ih({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),n.push(x);y={id:c.Xf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
554
|
+
segmentIndex:new Fj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.fd,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};c.l==Wm?c.Bb.push(y):c.i.imageStreams.push(y);Rm(c);return C.return(je(y))}})};
|
|
555
|
+
p.uh=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Hm&&d.l!=Wm)throw new P(1,7,7004);if(c){k.F(2);break}return D(k,mn(d,a),3);case 3:c=k.h;case 2:return e=[],d.D&&(e=d.D.getCuePoints()),D(k,nn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ig();h=g.find(function(l){return l.language==b});if(!h){k.F(5);break}return D(k,new Promise(function(l,m){d.m.ka(f,"load",l);d.m.ka(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return Rm(d),k.return(h);case 5:throw new P(1,
|
|
556
|
+
2,2012);}})};function mn(a,b){var c;return K(function(d){switch(d.g){case 1:return ta(d,2),D(d,Lk(b,a.J,a.h.streaming.retryParameters),4);case 4:c=d.h;va(d,3);break;case 2:wa(d);case 3:if(c)return d.return(c);throw new P(1,2,2011,b);}})}
|
|
557
|
+
function nn(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?D(n,on(a,b,a.J,a.h.streaming.retryParameters),3):n.F(2);2!=n.g&&(h=n.h,k=pn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Gi(l),e="text/vtt");m=document.createElement("track");var r=a.T,q=b;try{if(r.g.enabled){var u=il(r);u.ot=ul;u.su=!0;var v=ll(u);var x=ml(q,v)}else x=q}catch(z){Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
558
|
+
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function on(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=wf;f=qf([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&nl(k,f,{ot:ul,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)})}
|
|
559
|
+
function pn(a,b,c,d){var e=nd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=nc(b),b=c.parseMedia(b,a,null),fl(b,d);throw new P(2,2,2014,c);}p.eg=function(a,b){this.Uf.width=a;this.Uf.height=b};p.Wf=function(a){if(this.l==Hm){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.u)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.pd||d.Pa||d.xb||(d.pd=!1,ok(b,d,a));b=!0}}else b=!1;return b};
|
|
560
560
|
p.Yh=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};p.Zh=function(){return this.se};
|
|
561
|
-
function Tl(a){var b=Jl();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Wf(d))}};b.textDisplayFactory=function(){return a.
|
|
561
|
+
function Tl(a){var b=Jl();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Wf(d))}};b.textDisplayFactory=function(){return a.Vd?new Xk(a.g,a.Vd):HTMLMediaElement.prototype.addTextTrack?new Qk(a.g):new Tk};return b}p.ig=function(a){this.Vd=a};
|
|
562
562
|
function wm(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Jj,l=e.closedCaptions.get(g);h={id:a.Xf++,originalId:g,groupId:null,
|
|
563
|
-
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:
|
|
564
|
-
function vm(a,b){return
|
|
565
|
-
function dn(a,b){if(a.l!=bm){for(var c=a.h.restrictions,d=a.Uf,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=
|
|
566
|
-
function xm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value
|
|
567
|
-
function Nm(a,b){var c,d,e,f,g;return
|
|
568
|
-
function km(a){var b=a.
|
|
563
|
+
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:Lb,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};b.textStreams.push(h);c.add(g)}}
|
|
564
|
+
function vm(a,b){return K(function(c){if(1==c.g)return D(c,qn(a,b),2);dn(a,b);E(c)})}function qn(a,b){return K(function(c){if(1==c.g)return D(c,Td(a.s,b),2);if(!b.variants.some(pe))throw new P(2,4,4032);E(c)})}
|
|
565
|
+
function dn(a,b){if(a.l!=bm){for(var c=a.h.restrictions,d=a.Uf,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Sd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Rm(a);if((c=a.s?a.s.g:null)&&a.s.u)for(d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,xm(a,c.keySystem,e.video),xm(a,c.keySystem,e.audio);rn(a,b)}}
|
|
566
|
+
function xm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Yg(a.s,e.initDataType,e.initData)}}}
|
|
567
|
+
function Nm(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,r;return K(function(q){if(1==q.g)return k?D(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.ic(l))?m.next().value:null;if(!n)return q.return(null);r=n.startTime;return q.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)})}
|
|
568
|
+
function km(a){var b=a.rd();if(a.C&&a.M&&a.G){if(a.T){var c=a.T;b||c.i||(c.i=!0);c.i&&b&&(c.l=!0);c.m=b}Cm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(am("buffering",b))}function Dm(a){var b=a.g.playbackRate;0!=b&&(a.K&&a.K.set(b),b=am("ratechange"),a.dispatchEvent(b))}
|
|
569
569
|
function Cm(a){if(a.C&&a.M){var b=a.C.g,c="playing";a.M.g==Ue?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(am("statechanged",c)))}}
|
|
570
570
|
function Tm(a){if(a.R()){var b=a.ya();if(Number.isFinite(b.end)&&!(a.g.currentTime<b.start)){if(a.h.streaming.liveSync){var c=a.h.streaming.liveSyncMaxLatency;var d=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var e=a.h.streaming.liveSyncMinLatency;var f=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&
|
|
571
|
-
a.i.serviceDescription&&(e=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,f=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);var g=a.g.playbackRate,h=b.end-a.g.currentTime,k=0;if(a.l==Wm){var l=a.g.buffered;0<l.length&&(k=l.end(l.length-1),k=Math.max(d,k-b.end))}c&&d&&h-k>c?g!=d&&a.
|
|
572
|
-
function Um(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.P)?(a.P=c,b=!0):(c=Math.max(a.P,c),a.P!=c&&(a.P=c,b=!0)));if(b){var d;0==a.P?d=am("started"):25==a.P?d=am("firstquartile"):50==a.P?d=am("midpoint"):75==a.P?d=am("thirdquartile"):100==a.P&&(d=am("complete"));d&&a.dispatchEvent(d)}}}function Sm(a){try{rn(a,a.i)}catch(c){return im(a,c),!1}var b=
|
|
571
|
+
a.i.serviceDescription&&(e=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,f=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);var g=a.g.playbackRate,h=b.end-a.g.currentTime,k=0;if(a.l==Wm){var l=a.g.buffered;0<l.length&&(k=l.end(l.length-1),k=Math.max(d,k-b.end))}c&&d&&h-k>c?g!=d&&a.Gd(d):e&&f&&h-k<e?g!=f&&a.Gd(f):g!==a.K.ld()&&a.Ve()}}}
|
|
572
|
+
function Um(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.P)?(a.P=c,b=!0):(c=Math.max(a.P,c),a.P!=c&&(a.P=c,b=!0)));if(b){var d;0==a.P?d=am("started"):25==a.P?d=am("firstquartile"):50==a.P?d=am("midpoint"):75==a.P?d=am("thirdquartile"):100==a.P&&(d=am("complete"));d&&a.dispatchEvent(d)}}}function Sm(a){try{rn(a,a.i)}catch(c){return im(a,c),!1}var b=qe(a.i.variants);b=a.xa.create(b);a.u.setVariants(Array.from(b.values()));return!0}
|
|
573
573
|
function Jm(a,b){b=void 0===b?!1:b;return Sm(a)?a.u.chooseVariant(b):null}
|
|
574
|
-
function Yl(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=t(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,ab("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.
|
|
575
|
-
function en(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=Jm(a);f&&Fm(a,f,e,b,c,d)}function Fm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&sk(a.j,b,d,e,!0);else{var h=a.C.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));sk(a.j,b,d,e,f,c);d=null;g&&(d=
|
|
576
|
-
function hn(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=
|
|
577
|
-
function tn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&
|
|
578
|
-
p.Ze=function(a,b){if(!this.h.abr.enabled||this.l===bm||!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=t(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.
|
|
574
|
+
function Yl(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=t(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,ab("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.ee.stop();d&&en(a,!0,void 0,!1,!1)}
|
|
575
|
+
function en(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=Jm(a);f&&Fm(a,f,e,b,c,d)}function Fm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&sk(a.j,b,d,e,!0);else{var h=a.C.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));sk(a.j,b,d,e,f,c);d=null;g&&(d=he(g));b=he(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&vi(a.L,b,a.wf()),c=am("adaptation",c),sn(a,c)):tn(a,d,b)}}
|
|
576
|
+
function hn(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=oe(c);b=oe(b);tn(a,c,b)}function Om(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=Pb(a.h.preferredTextLanguage);c=Pb(c.language);if(2==a.h.autoShowText)return Ob(c,d);if(3==a.h.autoShowText)return a=Pb(b.language),Ob(c,d)&&!Ob(a,c);Ua("Invalid autoShowText setting!");return!1}function Rm(a){var b=am("trackschanged");sn(a,b)}
|
|
577
|
+
function tn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&vi(a.L,c,a.wf());c=am("variantchanged",b);sn(a,c)}function gn(a){var b=am("textchanged");sn(a,b)}function Pm(a){var b=am("texttrackvisibility");sn(a,b)}function Qm(a){a.h.abr.enabled||Xl(a);var b=(new Map).set("newStatus",a.h.abr.enabled);sn(a,am("abrstatuschanged",b))}function Xl(a,b){b=void 0===b?!0:b;if(a.l==Hm){a.ee.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Sm(a)}}
|
|
578
|
+
p.Ze=function(a,b){if(!this.h.abr.enabled||this.l===bm||!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=t(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.ee.ua(1);b=this.Eb().video.reduce(function(f,g){return f+g.end-g.start},0);en(this,!0,b,!0,!1);return!0}return!1};
|
|
579
579
|
function im(a,b){if(a.l!=bm){2===b.severity&&Xl(a,!1);var c=am("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function um(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(am(b,c))}
|
|
580
|
-
function hm(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
|
|
580
|
+
function hm(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new P(2,3,3016,b,c,a.g.error.message)}
|
|
581
581
|
function Am(a,b){if(a.j){var c=am("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b),e=1==d.length&&"00"==d[0];c=!1;if(d.length){d=t(a.i.variants);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[e?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&
|
|
582
582
|
!!l&&!un.includes(l)}h!=f.allowedByKeySystem&&(c=!0)}}}if(!c||Sm(a))(b=a.j.j)&&!b.allowedByKeySystem&&en(a),c&&Rm(a)}}function Bm(a,b,c){if(a.H&&a.H.onExpirationUpdated)a.H.onExpirationUpdated(b,c);b=am("expirationupdated");a.dispatchEvent(b)}function Em(a,b,c){0<b&&(a.R()||a.jh(b));b=a.getDuration();c<b&&(a.R()||a.ab(c))}
|
|
583
|
-
function rn(a,b){a=a.s?a.s.
|
|
584
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new
|
|
585
|
-
function jn(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=
|
|
583
|
+
function rn(a,b){a=a.s?a.s.Zd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?un.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
584
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a);}function sn(a,b){K(function(c){if(1==c.g)return D(c,Promise.resolve(),2);a.l!=bm&&a.dispatchEvent(b);E(c)})}function kn(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Pb(c.language)):b.add("und");return b}
|
|
585
|
+
function jn(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Pb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
586
586
|
h.push({language:l,role:m,label:n})}});return h}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.ig;V.prototype.getManifestParserFactory=V.prototype.Zh;V.prototype.getManifest=V.prototype.Yh;V.prototype.retryStreaming=V.prototype.Wf;V.prototype.setMaxHardwareResolution=V.prototype.eg;V.prototype.addChaptersTrack=V.prototype.uh;V.prototype.addThumbnailsTrack=V.prototype.wh;V.prototype.addTextTrackAsync=V.prototype.vh;V.prototype.getStats=V.prototype.getStats;
|
|
587
587
|
V.prototype.getBufferedInfo=V.prototype.Eb;V.prototype.getPresentationStartTimeAsDate=V.prototype.Kg;V.prototype.getPlayheadTimeAsDate=V.prototype.bi;V.prototype.setTextTrackVisibility=V.prototype.hg;V.prototype.getChapters=V.prototype.vf;V.prototype.getChaptersTracks=V.prototype.Ig;V.prototype.isTextTrackVisible=V.prototype.pc;V.prototype.selectVariantsByLabel=V.prototype.Zi;V.prototype.selectTextLanguage=V.prototype.ah;V.prototype.selectAudioLanguage=V.prototype.Ae;
|
|
588
|
-
V.prototype.getTextLanguages=V.prototype.ei;V.prototype.getAudioLanguages=V.prototype.Ih;V.prototype.getTextLanguagesAndRoles=V.prototype.gi;V.prototype.getAudioLanguagesAndRoles=V.prototype.Jh;V.prototype.selectVariantTrack=V.prototype.Be;V.prototype.selectTextTrack=V.prototype.$f;V.prototype.getThumbnails=V.prototype.yf;V.prototype.getAllThumbnails=V.prototype.Hh;V.prototype.getImageTracks=V.prototype.
|
|
589
|
-
V.prototype.cancelTrickPlay=V.prototype.Ve;V.prototype.trickPlay=V.prototype.
|
|
590
|
-
V.prototype.isInProgress=V.prototype.mc;V.prototype.isLive=V.prototype.R;V.prototype.getAdManager=V.prototype.
|
|
591
|
-
V.prototype.releaseAllMutexes=V.prototype.Qi;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.hj;V.prototype.unload=V.prototype.
|
|
592
|
-
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return
|
|
593
|
-
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=
|
|
594
|
-
|
|
588
|
+
V.prototype.getTextLanguages=V.prototype.ei;V.prototype.getAudioLanguages=V.prototype.Ih;V.prototype.getTextLanguagesAndRoles=V.prototype.gi;V.prototype.getAudioLanguagesAndRoles=V.prototype.Jh;V.prototype.selectVariantTrack=V.prototype.Be;V.prototype.selectTextTrack=V.prototype.$f;V.prototype.getThumbnails=V.prototype.yf;V.prototype.getAllThumbnails=V.prototype.Hh;V.prototype.getImageTracks=V.prototype.Yd;V.prototype.getTextTracks=V.prototype.Xb;V.prototype.getVariantTracks=V.prototype.gb;
|
|
589
|
+
V.prototype.cancelTrickPlay=V.prototype.Ve;V.prototype.trickPlay=V.prototype.Gd;V.prototype.getPlaybackRate=V.prototype.Ub;V.prototype.isBuffering=V.prototype.rd;V.prototype.getKeyStatuses=V.prototype.Zd;V.prototype.getActiveSessionsMetadata=V.prototype.tf;V.prototype.getExpiration=V.prototype.md;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.oi;V.prototype.seekRange=V.prototype.ya;V.prototype.isAudioOnly=V.prototype.Hc;
|
|
590
|
+
V.prototype.isInProgress=V.prototype.mc;V.prototype.isLive=V.prototype.R;V.prototype.getAdManager=V.prototype.Xd;V.prototype.getAssetUri=V.prototype.uf;V.prototype.getNetworkingEngine=V.prototype.Tb;V.prototype.getMediaElement=V.prototype.ai;V.prototype.getManifestType=V.prototype.wf;V.prototype.getLoadMode=V.prototype.$d;V.prototype.resetConfiguration=V.prototype.Ui;V.prototype.getBufferFullness=V.prototype.Kh;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
|
|
591
|
+
V.prototype.releaseAllMutexes=V.prototype.Qi;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.hj;V.prototype.unload=V.prototype.Pc;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.vg;V.prototype.attach=V.prototype.yc;
|
|
592
|
+
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?D(h,qh(),3):h.F(2);2!=h.g&&(b=h.h);var k={};if(yd())for(var l in yh)k[l]=!0;l=t(["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]=yd()?!!yh[m]:zd(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(w(ed));
|
|
593
|
+
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=yd()?md(m)?!0:fc(m)||(Yc(m)?!0:!1):zd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=vn;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=cm;V.setAdManagerFactory=function(a){Wl=a};V.registerSupportPlugin=function(a,b){vn[a]=b};V.prototype.destroy=V.prototype.destroy;var bm=0,Sl=1,Hm=2,Wm=3;V.LoadMode={DESTROYED:bm,NOT_LOADED:Sl,MEDIA_SOURCE:Hm,SRC_EQUALS:Wm};V.version="v4.6.1";var wn=["4","6"];
|
|
594
|
+
Be=new function(a){this.g=a;this.i=Ce;this.h=De}(new ze(Number(wn[0]),Number(wn[1])));var un=["output-restricted","internal-error"],vn={},Wl=null;function xn(){this.h=[];this.j=this.i=this.g=0};function yn(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.l=this.h.getVolume();this.j=new Af;this.j.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=yn.prototype;p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};
|
|
595
595
|
p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){return this.h.setVolume(a)};p.isMuted=function(){return 0==this.h.getVolume()};
|
|
596
596
|
p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};p.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
597
597
|
p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};
|
|
598
598
|
p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};M("shaka.ads.ClientSideAd",yn);yn.prototype.release=yn.prototype.release;yn.prototype.getPodIndex=yn.prototype.getPodIndex;yn.prototype.getTimeOffset=yn.prototype.getTimeOffset;
|
|
599
599
|
yn.prototype.getMediaUrl=yn.prototype.getMediaUrl;yn.prototype.getAdvertiserName=yn.prototype.getAdvertiserName;yn.prototype.getCreativeAdId=yn.prototype.getCreativeAdId;yn.prototype.getAdId=yn.prototype.getAdId;yn.prototype.getVastMediaWidth=yn.prototype.getVastMediaWidth;yn.prototype.getVastMediaHeight=yn.prototype.getVastMediaHeight;yn.prototype.getVastMediaBitrate=yn.prototype.getVastMediaBitrate;yn.prototype.getDescription=yn.prototype.getDescription;yn.prototype.getTitle=yn.prototype.getTitle;
|
|
600
600
|
yn.prototype.getPositionInSequence=yn.prototype.getPositionInSequence;yn.prototype.getSequenceLength=yn.prototype.getSequenceLength;yn.prototype.setMuted=yn.prototype.setMuted;yn.prototype.resize=yn.prototype.resize;yn.prototype.isLinear=yn.prototype.isLinear;yn.prototype.isMuted=yn.prototype.isMuted;yn.prototype.setVolume=yn.prototype.setVolume;yn.prototype.getVolume=yn.prototype.getVolume;yn.prototype.play=yn.prototype.play;yn.prototype.pause=yn.prototype.pause;yn.prototype.skip=yn.prototype.skip;
|
|
601
|
-
yn.prototype.canSkipNow=yn.prototype.canSkipNow;yn.prototype.getTimeUntilSkippable=yn.prototype.getTimeUntilSkippable;yn.prototype.isSkippable=yn.prototype.isSkippable;yn.prototype.isPaused=yn.prototype.isPaused;yn.prototype.getRemainingTime=yn.prototype.getRemainingTime;yn.prototype.getMinSuggestedDuration=yn.prototype.getMinSuggestedDuration;yn.prototype.getDuration=yn.prototype.getDuration;function zn(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new Af;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.
|
|
601
|
+
yn.prototype.canSkipNow=yn.prototype.canSkipNow;yn.prototype.getTimeUntilSkippable=yn.prototype.getTimeUntilSkippable;yn.prototype.isSkippable=yn.prototype.isSkippable;yn.prototype.isPaused=yn.prototype.isPaused;yn.prototype.getRemainingTime=yn.prototype.getRemainingTime;yn.prototype.getMinSuggestedDuration=yn.prototype.getMinSuggestedDuration;yn.prototype.getDuration=yn.prototype.getDuration;function zn(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new Af;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.1");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
602
602
|
function(g){An(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Bn(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.ka(this.i,"play",function(){f.D=!0})}zn.prototype.configure=function(a){this.G=a};zn.prototype.stop=function(){this.g&&this.g.stop();this.s&&Wk(this.s)};zn.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
603
603
|
function Bn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new N("ad-error",b));Cn(a,null);a.m(new N("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
604
604
|
function An(a,b){a.m(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.G.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume)})}else a.g=b.getAdsManager(a.i,a.C);a.m(new N("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -616,13 +616,13 @@ p.isLinear=function(){return this.l};p.resize=function(){};p.setMuted=function(a
|
|
|
616
616
|
p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.j=this.i=this.g=this.h=null};M("shaka.ads.MediaTailorAd",Gn);Gn.prototype.release=Gn.prototype.release;Gn.prototype.getPodIndex=Gn.prototype.getPodIndex;Gn.prototype.getTimeOffset=Gn.prototype.getTimeOffset;Gn.prototype.getMediaUrl=Gn.prototype.getMediaUrl;Gn.prototype.getAdvertiserName=Gn.prototype.getAdvertiserName;
|
|
617
617
|
Gn.prototype.getCreativeAdId=Gn.prototype.getCreativeAdId;Gn.prototype.getAdId=Gn.prototype.getAdId;Gn.prototype.getVastMediaWidth=Gn.prototype.getVastMediaWidth;Gn.prototype.getVastMediaHeight=Gn.prototype.getVastMediaHeight;Gn.prototype.getVastMediaBitrate=Gn.prototype.getVastMediaBitrate;Gn.prototype.getDescription=Gn.prototype.getDescription;Gn.prototype.getTitle=Gn.prototype.getTitle;Gn.prototype.getPositionInSequence=Gn.prototype.getPositionInSequence;Gn.prototype.getSequenceLength=Gn.prototype.getSequenceLength;
|
|
618
618
|
Gn.prototype.setMuted=Gn.prototype.setMuted;Gn.prototype.resize=Gn.prototype.resize;Gn.prototype.isLinear=Gn.prototype.isLinear;Gn.prototype.isMuted=Gn.prototype.isMuted;Gn.prototype.setVolume=Gn.prototype.setVolume;Gn.prototype.getVolume=Gn.prototype.getVolume;Gn.prototype.play=Gn.prototype.play;Gn.prototype.pause=Gn.prototype.pause;Gn.prototype.skip=Gn.prototype.skip;Gn.prototype.canSkipNow=Gn.prototype.canSkipNow;Gn.prototype.getTimeUntilSkippable=Gn.prototype.getTimeUntilSkippable;
|
|
619
|
-
Gn.prototype.isSkippable=Gn.prototype.isSkippable;Gn.prototype.isPaused=Gn.prototype.isPaused;Gn.prototype.getRemainingTime=Gn.prototype.getRemainingTime;Gn.prototype.getMinSuggestedDuration=Gn.prototype.getMinSuggestedDuration;Gn.prototype.getDuration=Gn.prototype.getDuration;function Hn(a,b,c,d){this.D=a;this.K=b;this.g=c;this.l=null;this.
|
|
619
|
+
Gn.prototype.isSkippable=Gn.prototype.isSkippable;Gn.prototype.isPaused=Gn.prototype.isPaused;Gn.prototype.getRemainingTime=Gn.prototype.getRemainingTime;Gn.prototype.getMinSuggestedDuration=Gn.prototype.getMinSuggestedDuration;Gn.prototype.getDuration=Gn.prototype.getDuration;function Hn(a,b,c,d){this.D=a;this.K=b;this.g=c;this.l=null;this.U=NaN;this.i=d;this.J=!1;this.C=null;this.j=[];this.M=[];this.L=this.G=this.h=null;this.H=new Map;this.m=[];this.u=[];this.P="";this.T=!0;this.I="";this.s=new Af}Hn.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.bc(b.target,b.type,b.listener);In(this);this.m=[];this.u=[];this.P="";this.T=!0;this.I="";this.C=null;this.j=[];this.M=[];this.H.clear()};
|
|
620
620
|
Hn.prototype.release=function(){this.stop();this.s&&this.s.release()};Hn.prototype.onManifestUpdated=function(a){this.J=a;""!=this.P&&(Jn(this,this.P,this.T),this.T=!1)};Hn.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
621
|
-
function Kn(a,b,c){var d,e,f,g,h,k,l,m,n,r,q;
|
|
622
|
-
return va(u,0)}wa(u);if(!a.I.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.I);a.l=null;
|
|
623
|
-
function Jn(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z;
|
|
624
|
-
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new N("ad-cue-points-changed",(new Map).set("cuepoints",g))),In(a),a.j=[];c&&(a.J||0<g.length)&&Mn(a);return va(y,0)}wa(y);
|
|
625
|
-
function Ln(a,b){var c,d,e,f,g,h,k,l;
|
|
621
|
+
function Kn(a,b,c){var d,e,f,g,h,k,l,m,n,r,q;K(function(u){if(1==u.g)return d=qf([b],Ye()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Of(e)),f=a.K.request(7,d),ta(u,2),D(u,f.promise,4);if(2!=u.g){g=u.h;h=Kf(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new kb(b),m=new kb(k.trackingUrl),a.P=l.resolve(m).toString(),n=Date.now()/1E3,r=n-a.U,a.i(new N("ads-loaded",(new Map).set("loadTime",r))),q=new kb(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
622
|
+
return va(u,0)}wa(u);if(!a.I.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.I);a.l=null;E(u)})}
|
|
623
|
+
function Jn(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z;K(function(y){if(1==y.g)return d=qf([b],Ye()),e=a.K.request(7,d),ta(y,2),D(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=Kf(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=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,r=t(n.nonLinearAdsList),q=r.next();!q.done;q=r.next())for(u=q.value,v=t(u.nonLinearAdList),x=v.next();!x.done;x=v.next())z=x.value,Ln(a,z);g=a.getCuePoints();a.i(new N("ad-cue-points-changed",
|
|
624
|
+
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new N("ad-cue-points-changed",(new Map).set("cuepoints",g))),In(a),a.j=[];c&&(a.J||0<g.length)&&Mn(a);return va(y,0)}wa(y);E(y)})}
|
|
625
|
+
function Ln(a,b){var c,d,e,f,g,h,k,l;K(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Nn(b);if(d=a.H.get(c))return m.return();e=qf([b.staticResource],Ye());f=a.K.request(7,e);ta(m,2);a.H.set(c,[]);return D(m,f.promise,4)}if(2!=m.g)return g=m.h,h=Kf(g.data),k=JSON.parse(h),l=k.apps,a.H.set(c,l),va(m,0);wa(m);a.H.delete(c);E(m)})}
|
|
626
626
|
function Nn(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Mn(a){On(a);a.J||(Pn(a),a.s.o(a.g,"seeked",function(){Pn(a)}),a.s.o(a.g,"ended",function(){In(a)}));a.s.o(a.g,"timeupdate",function(){On(a)})}
|
|
627
627
|
function Pn(a){var b=a.g.currentTime;if(0!=b&&null==a.C){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.M.includes(d.adId)&&(a.C=b,a.g.currentTime=c.startTimeInSeconds)}}
|
|
628
628
|
function On(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"),Qn(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),Qn(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),Qn(a,"thirdQuartile"));d=a.h.getRemainingTime();
|
|
@@ -644,73 +644,73 @@ e.j.resolve(e.D):e.j.reject("IMA Stream request returned an error and there was
|
|
|
644
644
|
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.C=f.getStreamData().adProgressData;e.m&&(e.m.i=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new N("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new N("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new N("ad-third-quartile"))});
|
|
645
645
|
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new N("ad-complete"));e.i(new N("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 N("ad-skipped"));e.i(new N("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
|
|
646
646
|
f;e.i(new N("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=Tn.prototype;p.configure=function(){};p.stop=function(){this.D="";this.s=null;this.G=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.G};
|
|
647
|
-
function Un(a,b){a.i(new N("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 W(){cb.call(this);this.g=this.i=this.h=null;this.j=new xn;this.m=navigator.language;this.l=null}pa(W,cb);p=W.prototype;p.setLocale=function(a){this.m=a};p.configure=function(a){this.l=a;this.h&&this.h.configure(this.l);this.g&&this.g.configure(this.l)};p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new
|
|
648
|
-
p.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};p.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.j=new xn};p.requestClientSideAds=function(a){if(!this.h)throw new
|
|
649
|
-
p.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new
|
|
650
|
-
p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new
|
|
651
|
-
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new
|
|
652
|
-
(c.I=!0),c.j=new $e,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new
|
|
653
|
-
p.getServerSideCuePoints=function(){
|
|
647
|
+
function Un(a,b){a.i(new N("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 W(){cb.call(this);this.g=this.i=this.h=null;this.j=new xn;this.m=navigator.language;this.l=null}pa(W,cb);p=W.prototype;p.setLocale=function(a){this.m=a};p.configure=function(a){this.l=a;this.h&&this.h.configure(this.l);this.g&&this.g.configure(this.l)};p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.h&&this.h.release();this.h=new zn(a,b,this.m,c,function(e){return Vn(d,e)});this.h.configure(this.l)};
|
|
648
|
+
p.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};p.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.j=new xn};p.requestClientSideAds=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.H=Date.now()/1E3;b.l.requestAds(a)};
|
|
649
|
+
p.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Hn(a,b,c,function(e){return Vn(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new P(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new P(1,10,10004)):(d.l=new $e,Kn(d,a,b),d.I=c||"",d.U=Date.now()/1E3,a=d.l);return a};
|
|
650
|
+
p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Tn(a,b,this.m,function(d){return Vn(c,d)});this.g.configure(this.l)};
|
|
651
|
+
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&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.6.1";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
652
|
+
(c.I=!0),c.j=new $e,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(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.6.1";this.g.g.replaceAdTagParameters(a)};
|
|
653
|
+
p.getServerSideCuePoints=function(){Ae("AdManager","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
654
654
|
p.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};p.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
655
655
|
function Vn(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)}M("shaka.ads.AdManager",W);W.prototype.onCueMetadataChange=W.prototype.onCueMetadataChange;W.prototype.onHlsTimedMetadata=W.prototype.onHlsTimedMetadata;W.prototype.onDashTimedMetadata=W.prototype.onDashTimedMetadata;W.prototype.onManifestUpdated=W.prototype.onManifestUpdated;W.prototype.getStats=W.prototype.getStats;
|
|
656
656
|
W.prototype.getCuePoints=W.prototype.getCuePoints;W.prototype.getServerSideCuePoints=W.prototype.getServerSideCuePoints;W.prototype.replaceServerSideAdTagParameters=W.prototype.replaceServerSideAdTagParameters;W.prototype.requestServerSideStream=W.prototype.requestServerSideStream;W.prototype.initServerSide=W.prototype.initServerSide;W.prototype.requestMediaTailorStream=W.prototype.requestMediaTailorStream;W.prototype.initMediaTailor=W.prototype.initMediaTailor;
|
|
657
657
|
W.prototype.updateClientSideAdsRenderingSettings=W.prototype.updateClientSideAdsRenderingSettings;W.prototype.requestClientSideAds=W.prototype.requestClientSideAds;W.prototype.onAssetUnload=W.prototype.onAssetUnload;W.prototype.release=W.prototype.release;W.prototype.initClientSide=W.prototype.initClientSide;W.prototype.configure=W.prototype.configure;W.prototype.setLocale=W.prototype.setLocale;W.ADS_LOADED="ads-loaded";W.AD_STARTED="ad-started";W.AD_FIRST_QUARTILE="ad-first-quartile";
|
|
658
658
|
W.AD_MIDPOINT="ad-midpoint";W.AD_THIRD_QUARTILE="ad-third-quartile";W.AD_COMPLETE="ad-complete";W.AD_STOPPED="ad-stopped";W.AD_SKIPPED="ad-skipped";W.AD_VOLUME_CHANGED="ad-volume-changed";W.AD_MUTED="ad-muted";W.AD_PAUSED="ad-paused";W.AD_RESUMED="ad-resumed";W.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";W.CUEPOINTS_CHANGED="ad-cue-points-changed";W.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";W.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";W.AD_CLICKED="ad-clicked";W.AD_PROGRESS="ad-progress";
|
|
659
659
|
W.AD_BUFFERING="ad-buffering";W.AD_IMPRESSION="ad-impression";W.AD_DURATION_CHANGED="ad-duration-changed";W.AD_CLOSED="ad-closed";W.AD_LOADED="ad-loaded";W.ALL_ADS_COMPLETED="all-ads-completed";W.AD_LINEAR_CHANGED="ad-linear-changed";W.AD_METADATA="ad-metadata";W.AD_RECOVERABLE_ERROR="ad-recoverable-error";W.AD_ERROR="ad-error";W.AD_BREAK_READY="ad-break-ready";W.AD_INTERACTION="ad-interaction";Wl=function(){return new W};function Wn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof N){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
|
|
660
|
-
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(
|
|
660
|
+
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Lh(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
661
661
|
function Xn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Yn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
662
662
|
function Yn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
663
663
|
var Zn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),$n="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ao=["loop","playbackRate"],bo=["pause","play"],co={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
664
664
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},eo={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},fo={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},go=[["getConfiguration","configure"]],ho=[["isTextTrackVisible","setTextTrackVisibility"]],io="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
665
|
-
jo=["attach","attachCanvas","detach","load","unload"];function ko(a,b,c,d,e,f,g){var h=this;this.I=a;this.M=g;this.j=new
|
|
665
|
+
jo=["attach","attachCanvas","detach","load","unload"];function ko(a,b,c,d,e,f,g){var h=this;this.I=a;this.M=g;this.j=new xd(b);this.P=c;this.C=!1;this.u=d;this.H=e;this.K=f;this.h=this.m=!1;this.L="";this.s=null;this.D=function(){return lo(h)};this.G=function(k,l){k=Xn(l);switch(k.type){case "event":var m=k.targetName,n=Qa(k.event);h.u(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.C&&(h.P(),h.C=!1);break;case "asyncComplete":if(n=k.id,r=k.error,k=h.i[n],delete h.i[n],k)if(r){n=new P(r.severity,r.category,
|
|
666
666
|
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.l=null;mo.add(this)}p=ko.prototype;p.destroy=function(){mo.delete(this);no(this);oo&&po(this);this.j&&(this.j.stop(),this.j=null);this.H=this.u=null;this.h=this.m=!1;this.G=this.D=this.l=this.i=this.g=this.s=null;return Promise.resolve()};p.Da=function(){return this.h};p.ye=function(){return this.L};
|
|
667
667
|
p.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.La();var a=new chrome.cast.SessionRequest(this.I,[],null,this.M,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(mo),d=c.next();!d.done;d=c.next())qo(d.value,b)},function(b){for(var c=t(mo),d=c.next();!d.done;d=c.next())d=d.value,ro="available"==b,d.j.La()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});ro&&this.j.S(so);(a=oo)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
668
|
-
qo(this,a):oo=null}else window.__onGCastApiAvailable!==to&&(uo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=to)};p.ag=function(a){this.s=a;this.h&&vo(this,{type:"appData",appData:this.s})};p.cast=function(a){var b=this;return
|
|
668
|
+
qo(this,a):oo=null}else window.__onGCastApiAvailable!==to&&(uo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=to)};p.ag=function(a){this.s=a;this.h&&vo(this,{type:"appData",appData:this.s})};p.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new P(1,8,8E3);if(!ro)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new $e;chrome.cast.requestSession(function(d){return wo(b,a,d)},function(d){return xo(b,d)});return D(c,b.l,0)})};
|
|
669
669
|
function yo(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return wo(a,b,c)},function(c){return xo(a,c)})}}p.Bc=function(){if(this.h){no(this);if(oo){po(this);try{oo.stop(function(){},function(){})}catch(a){}oo=null}lo(this)}};
|
|
670
670
|
p.get=function(a,b){var c=this;if("video"==a){if(bo.includes(b))return function(){return c.Zg.apply(c,[a,b].concat(w(Ga.apply(0,arguments))))}}else if("player"==a){if(fo[b]&&!this.get("player","isLive")())return function(){};if(io.includes(b))return function(){return c.Zg.apply(c,[a,b].concat(w(Ga.apply(0,arguments))))};if(jo.includes(b))return function(){return c.Ri.apply(c,[a,b].concat(w(Ga.apply(0,arguments))))};if(co[b]||eo[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
671
|
-
p.set=function(a,b,c){this.g[a][b]=c;vo(this,{type:"set",targetName:a,property:b,value:c})};function wo(a,b,c){oo=c;c.addUpdateListener(a.D);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);lo(a);vo(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}function xo(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new
|
|
671
|
+
p.set=function(a,b,c){this.g[a][b]=c;vo(this,{type:"set",targetName:a,property:b,value:c})};function wo(a,b,c){oo=c;c.addUpdateListener(a.D);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);lo(a);vo(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}function xo(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new P(2,8,c,b))}
|
|
672
672
|
p.Zg=function(a,b){vo(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};p.Ri=function(a,b){var c=Ga.apply(2,arguments),d=new $e,e=this.J.toString();this.J++;this.i[e]=d;try{vo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function qo(a,b){var c=a.K();a.l=new $e;a.C=!0;wo(a,c,b)}function po(a){var b=oo;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
673
|
-
function lo(a){var b=oo?"connected"==oo.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};no(a)}a.h=b;a.L=b?oo.receiver.friendlyName:"";a.j.La()}function no(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new
|
|
673
|
+
function lo(a){var b=oo?"connected"==oo.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};no(a)}a.h=b;a.L=b?oo.receiver.friendlyName:"";a.j.La()}function no(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function vo(a,b){b=Wn(b);var c=oo;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new P(2,8,8005,d),c=new N("error",(new Map).set("detail",b)),a.u("player",c),a.Bc(),b;}}var so=.02,ro=!1,oo=null,uo=null,mo=new Set;
|
|
674
674
|
function to(a){uo?window.__onGCastApiAvailable=uo:delete window.__onGCastApiAvailable;uo=null;if(a)for(var b=t(mo),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function zo(a,b,c,d){d=void 0===d?!1:d;cb.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.D=d;this.C=new Map;this.g=new ko(c,function(){return Ao(e)},function(){return Bo(e)},function(f,g){return Co(e,f,g)},function(){return Do(e)},function(){return Eo(e)},d);Fo(this)}pa(zo,cb);p=zo.prototype;
|
|
675
675
|
p.destroy=function(a){a&&this.g.Bc();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;cb.prototype.release.call(this);return Promise.all(a)};p.Yb=function(){return this.l};p.Dc=function(){return this.u};p.Ue=function(){return this.g.m&&ro};p.Da=function(){return this.g.Da()};p.ye=function(){return this.g.ye()};
|
|
676
|
-
p.cast=function(){var a=this,b;return
|
|
677
|
-
p.zg=function(a,b){b=void 0===b?!1:b;var c=this;return
|
|
678
|
-
function Fo(a){a.g.init();a.m=new Af;for(var b=t(Zn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Da()||(f=Qa(f),a.j.dispatchEvent(f))});for(var d in Ra)a.m.o(a.h,Ra[d],function(f){a.g.Da()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.
|
|
679
|
-
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Io(a,f)}})});Jo(a);a.j=new cb;a.j.
|
|
676
|
+
p.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Eo(a),D(c,a.g.cast(b),2)):a.h?D(c,a.h.Pc(),0):c.return()})};p.ag=function(a){this.g.ag(a)};p.lh=function(){yo(this.g)};p.Bc=function(){this.g.Bc()};
|
|
677
|
+
p.zg=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.D)return d.return();c.G=a;c.D=b;c.g.Bc();return D(d,c.g.destroy(),2)}c.g=null;c.g=new ko(a,function(){return Ao(c)},function(){return Bo(c)},function(e,f){return Co(c,e,f)},function(){return Do(c)},function(){return Eo(c)},b);c.g.init();E(d)})};
|
|
678
|
+
function Fo(a){a.g.init();a.m=new Af;for(var b=t(Zn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Da()||(f=Qa(f),a.j.dispatchEvent(f))});for(var d in Ra)a.m.o(a.h,Ra[d],function(f){a.g.Da()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Uc=e,Object.defineProperty(a.l,b.Uc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Go(a,f.Uc)}}(b),set:function(f){return function(g){var h=f.Uc;a.g.Da()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Uc:b.Uc};a.u={};Ho(a,
|
|
679
|
+
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Io(a,f)}})});Jo(a);a.j=new cb;a.j.ge=a.l;a.s=new cb;a.s.ge=a.u}function Jo(a){var b=new Map;Ho(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
|
|
680
680
|
function Ho(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
681
681
|
function Eo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.uf(),startTime:null};a.i.pause();for(var c=t(ao),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(go);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(ho);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 Ao(a){var b=new N("caststatuschanged");a.dispatchEvent(b)}
|
|
682
682
|
function Bo(a){var b=new N(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
683
683
|
function Do(a){for(var b=t(go),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(ao);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(ao),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(ho);for(k=
|
|
684
684
|
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new N("error",h);a.h.dispatchEvent(h)})}
|
|
685
685
|
function Go(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.Da()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Da()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
686
|
-
function Io(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Tb()};if("getDrmEngine"==b)return function(){return a.h.s};if("getAdManager"==b)return function(){return a.h.
|
|
686
|
+
function Io(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Tb()};if("getDrmEngine"==b)return function(){return a.h.s};if("getAdManager"==b)return function(){return a.h.Xd()};
|
|
687
687
|
if("setVideoContainer"==b)return function(c){return a.h.ig(c)};if(a.g.Da()){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.Da()&&0==Object.keys(a.g.g.video).length&&(co[b]||eo[b])||!a.g.Da()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
688
688
|
function Co(a,b,c){a.g.Da()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}M("shaka.cast.CastProxy",zo);zo.prototype.changeReceiverId=zo.prototype.zg;zo.prototype.forceDisconnect=zo.prototype.Bc;zo.prototype.suggestDisconnect=zo.prototype.lh;zo.prototype.setAppData=zo.prototype.ag;zo.prototype.cast=zo.prototype.cast;zo.prototype.receiverName=zo.prototype.ye;zo.prototype.isCasting=zo.prototype.Da;zo.prototype.canCast=zo.prototype.Ue;zo.prototype.getPlayer=zo.prototype.Dc;
|
|
689
|
-
zo.prototype.getVideo=zo.prototype.Yb;zo.prototype.destroy=zo.prototype.destroy;function Ko(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new Af;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.D=!1;this.C=!0;this.u=this.l=null;this.I=new
|
|
689
|
+
zo.prototype.getVideo=zo.prototype.Yb;zo.prototype.destroy=zo.prototype.destroy;function Ko(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new Af;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.D=!1;this.C=!0;this.u=this.l=null;this.I=new xd(function(){Lo(e)});Mo(this)}pa(Ko,cb);p=Ko.prototype;p.isConnected=function(){return this.H};p.ti=function(){return this.s};p.bj=function(a){this.i=a};p.Dh=function(){this.i=null};
|
|
690
690
|
p.cj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.aj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.$i=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
691
|
-
p.destroy=function(){var a=this,b,c;return
|
|
691
|
+
p.destroy=function(){var a=this,b,c;return K(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,cb.prototype.release.call(a),D(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();E(d)})};
|
|
692
692
|
function Mo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return No(a)};b.onSenderDisconnected=function(){return No(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Oo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Oo(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 Po(a,
|
|
693
693
|
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Qo(a,e)};b.start();b=t(Zn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Ro(a,"video",e)});for(var d in Ra)a.j.o(a.h,Ra[d],function(e){return Ro(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.eg(3840,2160):a.h.eg(1920,1080);a.j.o(a.g,"loadeddata",function(){a.D=!0});a.j.o(a.h,"loading",function(){a.s=
|
|
694
|
-
!1;So(a)});a.j.o(a.g,"playing",function(){a.s=!1;So(a)});a.j.o(a.g,"pause",function(){So(a)});a.j.o(a.h,"unloading",function(){a.s=!0;So(a)});a.j.o(a.g,"ended",function(){(new
|
|
695
|
-
function So(a){var b;
|
|
696
|
-
function Wo(a,b,c){var d,e,f,g,h,k,l,m,n,r;
|
|
697
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),Vo(a));
|
|
694
|
+
!1;So(a)});a.j.o(a.g,"playing",function(){a.s=!1;So(a)});a.j.o(a.g,"pause",function(){So(a)});a.j.o(a.h,"unloading",function(){a.s=!0;So(a)});a.j.o(a.g,"ended",function(){(new xd(function(){a.g&&a.g.ended&&(a.s=!0,So(a))})).S(To)})}function No(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;So(a)}
|
|
695
|
+
function So(a){var b;K(function(c){if(1==c.g)return D(c,Promise.resolve(),2);if(!a.h)return c.return();b=new N("caststatuschanged");a.dispatchEvent(b);Uo(a)||Vo(a);E(c)})}
|
|
696
|
+
function Wo(a,b,c){var d,e,f,g,h,k,l,m,n,r;K(function(q){switch(q.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,ta(q,5),D(q,a.h.load(b.manifest,b.startTime),7)):D(q,Promise.resolve(),3);case 7:va(q,3);break;case 5:return g=wa(q),h=(new Map).set("detail",g),k=new N("error",h),a.h&&a.h.dispatchEvent(k),q.return();case 3:if(!a.h)return q.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);
|
|
697
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),Vo(a));E(q)}})}function Ro(a,b,c){a.h&&(Lo(a),Oo(a,{type:"event",targetName:b,event:c},a.l))}
|
|
698
698
|
function Lo(a){a.I.S(Xo);for(var b={video:{},player:{}},c=t($n),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in fo)0==a.m%fo[e]&&(b.player[e]=a.h[e]());for(var f in co)0==a.m%co[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Oo(a,{type:"update",update:b},a.l);for(var g in eo)0==a.m%eo[g]&&(b={player:{}},b.player[g]=a.h[g](),Oo(a,{type:"update",update:b},a.l));a.D&&(a.m+=
|
|
699
699
|
1);Uo(a)}function Uo(a){return a.C&&(a.g.duration||a.h.R())?(Yo(a),a.C=!1,!0):!1}function Yo(a,b){var c={contentId:a.h.uf(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Vo(a,void 0===b?0:b,c)}
|
|
700
700
|
function Qo(a,b){var c=Xn(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.C=!0;Wo(a,c.initState,c.appData);Lo(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
701
701
|
"player"==d&&"load"==e&&(a.m=0,a.D=!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.C=!0}));c.then(function(){return Zo(a,g,f,null)},function(h){return Zo(a,g,f,h)})}}
|
|
702
|
-
function Po(a,b){var c=Xn(b.data);switch(c.type){case "PLAY":a.g.play();Vo(a);break;case "PAUSE":a.g.pause();Vo(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(),Vo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Vo(a));break;case "STOP":a.h.
|
|
702
|
+
function Po(a,b){var c=Xn(b.data);switch(c.type){case "PLAY":a.g.play();Vo(a);break;case "PAUSE":a.g.pause();Vo(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(),Vo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Vo(a));break;case "STOP":a.h.Pc().then(function(){a.h&&Vo(a)});break;case "GET_STATUS":Yo(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));
|
|
703
703
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Vo(a);break;case "LOAD":a.m=0;a.D=!1;a.C=!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&&Yo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Oo(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:Oo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
704
|
-
function Zo(a,b,c,d){a.h&&Oo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Oo(a,b,c,d){a.H&&(a=Wn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Vo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?$o:a.h.
|
|
705
|
-
M("shaka.cast.CastReceiver",Ko);Ko.prototype.destroy=Ko.prototype.destroy;Ko.prototype.setContentArtist=Ko.prototype.$i;Ko.prototype.setContentImage=Ko.prototype.aj;Ko.prototype.setContentTitle=Ko.prototype.cj;Ko.prototype.clearContentMetadata=Ko.prototype.Dh;Ko.prototype.setContentMetadata=Ko.prototype.bj;Ko.prototype.isIdle=Ko.prototype.ti;Ko.prototype.isConnected=Ko.prototype.isConnected;var Xo=.5,To=5,$o="IDLE",cp="PLAYING",ap="BUFFERING",bp="PAUSED";function dp(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(
|
|
706
|
-
q||-1===u)r=fp(d,e),a.nestedCues.push(r);else{for(;q<=u;q++)if(v=r[q]){var x=v.l,z=v.i,y=v.j,
|
|
707
|
-
function ep(a,b,c,d,e,f){a=new
|
|
704
|
+
function Zo(a,b,c,d){a.h&&Oo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Oo(a,b,c,d){a.H&&(a=Wn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Vo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?$o:a.h.rd()?ap:a.g.paused?bp:cp,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Oo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
705
|
+
M("shaka.cast.CastReceiver",Ko);Ko.prototype.destroy=Ko.prototype.destroy;Ko.prototype.setContentArtist=Ko.prototype.$i;Ko.prototype.setContentImage=Ko.prototype.aj;Ko.prototype.setContentTitle=Ko.prototype.cj;Ko.prototype.clearContentMetadata=Ko.prototype.Dh;Ko.prototype.setContentMetadata=Ko.prototype.bj;Ko.prototype.isIdle=Ko.prototype.ti;Ko.prototype.isConnected=Ko.prototype.isConnected;var Xo=.5,To=5,$o="IDLE",cp="PLAYING",ap="BUFFERING",bp="PAUSED";function dp(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=ep(d,e,h,k,l,m);f<=g;f++){for(var r=c[f],q=-1,u=-1,v=0;v<r.length;v++)if(null!=r[v]&&""!==r[v].g.trim()){q=v;break}for(v=r.length-1;0<=v;v--)if(null!=r[v]&&""!==r[v].g.trim()){u=v;break}if(-1===
|
|
706
|
+
q||-1===u)r=fp(d,e),a.nestedCues.push(r);else{for(;q<=u;q++)if(v=r[q]){var x=v.l,z=v.i,y=v.j,C=v.h;if(x!=h||z!=k||y!=l||C!=m)n.payload&&a.nestedCues.push(n),n=ep(d,e,x,z,y,C),h=x,k=z,l=y,m=C;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=fp(d,e),a.nestedCues.push(n));n=ep(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
707
|
+
function ep(a,b,c,d,e,f){a=new Ac(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function fp(a,b){a=new Ac(a,b,"");a.lineBreak=!0;return a}function gp(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function hp(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.u=b;this.j=this.m=!1;this.l="white";this.s="black";ip(this)}function jp(a,b,c){var d="CC"+(a.C<<1|a.u+1),e=new Ac(b,c,"");e.lineInterpretation=1;e.line=a.g/16*100;return dp(e,d,a.i,b,c)}function ip(a){kp(a,0,15);a.g=1}
|
|
708
708
|
function lp(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case mp:d=np.has(c)?np.get(c):String.fromCharCode(c);break;case op:d=pp.get(c);break;case qp:a.i[a.g].pop();d=rp.get(c);break;case sp:a.i[a.g].pop(),d=tp.get(c)}d&&a.i[a.g].push(new gp(d,a.m,a.j,a.s,a.l))}}function up(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 kp(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
709
709
|
var mp=0,op=1,qp=2,sp=3,np=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"]]),pp=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),rp=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
|
|
710
710
|
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),tp=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
711
711
|
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function vp(a,b){this.h=wp;this.s=new hp(a,b);this.i=new hp(a,b);this.g=this.j=new hp(a,b);this.l=0;this.m=null}function xp(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==yp&&a.h!==zp&&(e=jp(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,kp(c,0,15),c=a.j,c.g=0<c.h?c.h:0,kp(c,0,15),d.g=15);a.h=yp;d.h=b;return e}function Ap(a){a.h=Bp;a.g=a.j;a.g.h=0}function Cp(a){Va("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=zp}
|
|
712
712
|
var wp=0,Bp=1,yp=3,zp=4,Dp="black green blue cyan red yellow magenta black".split(" "),Ep="white green blue cyan red yellow magenta white_italics".split(" ");function Fp(){this.l=!1;this.D=this.H=0;this.G=Gp;this.i=[];this.g=this.h=this.j=0;this.C=this.s=!1;this.u="white";this.m="black";Hp(this)}function Hp(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Ip())}function Ip(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Jp(a,b){Kp(a)&&(a.i[a.h][a.g]=new gp(b,a.C,a.s,a.m,a.u),a.g++)}function Kp(a){var b=a.g<a.D&&0<=a.g;return a.h<a.H&&0<=a.h&&b}Fp.prototype.isVisible=function(){return this.l};
|
|
713
|
-
function Lp(a,b,c){var d=new
|
|
713
|
+
function Lp(a,b,c){var d=new Ac(a.j,b,"");d.textAlign=a.G===Mp?"left":a.G===Np?"right":Dc;if(c=dp(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Mp=0,Np=1,Gp=2;function Op(){this.i=[];this.h=null;this.g=0}function Pp(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 Qp(a.h)),a.h=null,a.g=0))}function Qp(a){this.g=0;this.h=a}Qp.prototype.Fa=function(){return this.g<this.h.length};Qp.prototype.Ca=function(){return this.g};function Rp(a){if(!a.Fa())throw new P(2,2,3E3);return a.h[a.g++]}Qp.prototype.skip=function(a){if(this.g+a>this.h.length)throw new P(2,2,3E3);this.g+=a};function Sp(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
714
714
|
function Tp(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=Rp(b).value;b=null;c=t(Up(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Lp(e,d,a.i)),Hp(e);return b}if(137===c)for(b=Rp(b).value,b=t(Up(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=Rp(b).value;b=null;c=t(Up(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Lp(e,d,a.i)),e.l=!1;return b}if(139===c){c=Rp(b).value;
|
|
715
715
|
b=null;c=t(Up(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Lp(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Rp(b).value,Vp(a,b,d);if(143===c)return d=Vp(a,255,d),Wp(a),d;if(144===c)b.skip(1),d=Rp(b).value,a.g&&(a.g.s=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Rp(b).value,c=Rp(b).value,b.skip(1),a.g&&(b=Xp((c&48)>>4,(c&12)>>2,c&3),a.g.u=Xp((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Rp(b).value,b=Rp(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
716
716
|
b.skip(1),d=Rp(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Fp;f.j=d;a.h[c]=f}d=Rp(b).value;Rp(b);Rp(b);f=Rp(b).value;var g=Rp(b).value;b=Rp(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.s=!1,b.u="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.D=(g&63)+1;a.g=a.h[c]}}}return null}function Up(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
|
|
@@ -725,355 +725,356 @@ function bq(a,b){var c=b.type;if(16===(b.eb&112)){var d=b.eb>>3&1;0===c?a.s=d:a.
|
|
|
725
725
|
f-1),kp(b,b.g,15-b.g),c.l=a);break;case 46:kp(c.j,0,15);break;case 47:b=null,c.h!==zp&&(b=jp(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ap(c),c.l=a,d=b}a=d;break a}a=null}else d=b.Cb,lp(c.g,mp,b.eb),lp(c.g,mp,d);return a}
|
|
726
726
|
function cq(a,b){var c=[];try{for(;b.Fa();){var d=Rp(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Rp(b).value&63);if(0!=e){a.C.add("svc"+e);a.j.has(e)||a.j.set(e,new Sp(e));for(var g=a.j.get(e),h=b.Ca();b.Ca()-h<f;){e=b;var k=Rp(e),l=k.value,m=k.pts;if(16===l){var n=Rp(e);l=l<<16|n.value}if(0<=l&&31>=l){var r=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Kp(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.D-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Lp(q,r,g.i));if(q.h+1>=q.H){r=q;for(var u=
|
|
727
727
|
0,v=1;16>v;v++,u++)r.i[u]=r.i[v];for(v=0;1>v;v++,u++)r.i[u]=Ip()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Lp(q,r,g.i));q.i[q.h]=Ip();q.g=0;break;case 12:q.isVisible()&&(e=Lp(q,r,g.i)),Hp(q),r=q,r.h=0,r.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Tp(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?Jp(g.g,
|
|
728
|
-
"\u266a"):Jp(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Jp(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Zp.has(e)){var z=Zp.get(e);Jp(g.g,z)}else Jp(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Jp(g.g,"_"):Jp(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(y){if(y instanceof
|
|
728
|
+
"\u266a"):Jp(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Jp(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Zp.has(e)){var z=Zp.get(e);Jp(g.g,z)}else Jp(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Jp(g.g,"_"):Jp(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(y){if(y instanceof P&&3E3===y.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}function dq(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
729
729
|
$p.prototype.getStreams=function(){return Array.from(this.C)};M("shaka.cea.CeaDecoder",$p);vc=function(){return new $p};function eq(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(w(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 fq(){this.j=new Map;this.i=this.h=0;this.g=gq}
|
|
730
|
-
fq.prototype.init=function(a){function b(f){f=f.name;f in hq&&(c.g=hq[f])}var c=this,d=[],e=[];(new Tf).box("moov"
|
|
731
|
-
b).box("encv",
|
|
732
|
-
fq.prototype.parse=function(a){var b=this;if(this.g==gq)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Tf).box("moof",function(l){f=l.start;g=[]
|
|
733
|
-
new
|
|
730
|
+
fq.prototype.init=function(a){function b(f){f=f.name;f in hq&&(c.g=hq[f])}var c=this,d=[],e=[];(new Tf).box("moov",Yf).box("mvex",Yf).V("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.N();g=g.N();c.h=f;c.i=g}).box("trak",Yf).V("tkhd",function(f){f=Zh(f.reader,f.version);d.push(f.trackId)}).box("mdia",Yf).V("mdhd",function(f){f=Xh(f.reader,f.version);e.push(f.timescale)}).box("minf",Yf).box("stbl",Yf).V("stsd",$f).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",
|
|
731
|
+
b).box("encv",ag).box("sinf",Yf).box("frma",function(f){f=bi(f.reader).ra;f in hq&&(c.g=hq[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new P(2,2,2010);this.g==gq&&Ua("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
732
|
+
fq.prototype.parse=function(a){var b=this;if(this.g==gq)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Tf).box("moof",function(l){f=l.start;g=[];Yf(l)}).box("traf",Yf).V("trun",function(l){l=Yh(l.reader,l.version,l.flags);g.push(l)}).V("tfhd",function(l){l=Uh(l.reader,l.flags);d=l.Eg||b.h;e=l.Gh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).V("tfdt",function(l){h=Wh(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Ua("Unable to find base media decode time for CEA captions!"),
|
|
733
|
+
new P(2,2,2010);iq(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
734
734
|
function iq(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.$g});n=[].concat.apply([],w(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Fh);b.Fa();){g=b.N();var r=b.Qa(),q=null;q=!1;h=1;switch(a.g){case jq:q=r&31;q=6==q;break;case kq:h=2;b.skip(1);q=r>>1&63;q=39==q||40==q;break;default:return}if(q)for(r=0,l<n.length&&(r=n[l].ze||0),r=(c+r)/d,h=t(eq(b.Jb(g-h))),q=h.next();!q.done;q=h.next())k.push({packet:q.value,pts:r});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
735
|
-
c+(n[l].Yf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}M("shaka.cea.Mp4CeaParser",fq);var gq=0,jq=1,kq=2,hq={avc1:jq,avc3:jq,hev1:kq,hvc1:kq,dvh1:kq,dvhe:kq};uc["video/mp4"]=function(){return new fq};function lq(){}lq.prototype.init=function(){};lq.prototype.parse=function(a){var b=[];a=nc(a);if(!
|
|
736
|
-
c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(
|
|
737
|
-
function qq(a,b,c,d){var e=mq(a,c,d);if(b.Hg){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.Hg=!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
|
|
735
|
+
c+(n[l].Yf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}M("shaka.cea.Mp4CeaParser",fq);var gq=0,jq=1,kq=2,hq={avc1:jq,avc3:jq,hev1:kq,hvc1:kq,dvh1:kq,dvhe:kq};uc["video/mp4"]=function(){return new fq};function lq(){}lq.prototype.init=function(){};lq.prototype.parse=function(a){var b=[];a=nc(a);if(!si(a))return b;a=(new mi).parse(a);var c=a.kd(),d=a.ce();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(eq(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};M("shaka.cea.TsCeaParser",lq);uc["video/mp2t"]=function(){return new lq};function mq(a,b,c){var d=nq(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(k){return k.keyId}));h.delete(null);if(1<h.size)throw new P(2,4,4010);if(!b){f=d.filter(function(k){return"urn:mpeg:dash:sea:2012"==k.Bd});if(1<f.length)throw new P(2,4,4050);f.length&&(g=oq(f[0]));f=d.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.Bd?(e=k.init||e,!1):"urn:mpeg:dash:sea:2012"!=k.Bd});f.length&&(a=pq(e,f,c,h),0==a.length&&(a=[Hb("",e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),
|
|
736
|
+
c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Hb(c,e));if(h=Array.from(h)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Dg:h,dk:e,drmInfos:a,Re:g,Hg:!0}}
|
|
737
|
+
function qq(a,b,c,d){var e=mq(a,c,d);if(b.Hg){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.Hg=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new P(2,4,4008);return e.Dg||b.Dg}
|
|
738
738
|
function rq(a){var b=0,c=rc(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=nc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
739
739
|
function sq(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}
|
|
740
|
-
function tq(a){var b=
|
|
741
|
-
function pq(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.
|
|
742
|
-
226,251,75]),m=new Uint8Array([]);k=[{initData:
|
|
743
|
-
function wq(a){var b=a.getAttribute("schemeIdUri"),c=
|
|
744
|
-
function oq(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
|
|
745
|
-
if(!a||!b)throw new
|
|
746
|
-
var uq=1,vq=(new Map).set("com.widevine.alpha",function(a){var b=
|
|
747
|
-
b.textContent:(a=
|
|
740
|
+
function tq(a){var b=og(a.node,"https://dashif.org/CPS","Laurl");if(b&&b.textContent)return b.textContent;a=og(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=fg(a.textContent);a=rq(a).filter(function(c){return c.type===uq})[0];if(!a)return"";a=Lf(a.value,!0);return(a=Fg(a,"WRMHEADER"))?sq(a):""}
|
|
741
|
+
function pq(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Bd];if(g){var h;if(h=og(f.node,"urn:microsoft:playready","pro")){h=fg(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:lg(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Bd)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
|
|
742
|
+
226,251,75]),m=new Uint8Array([]);k=[{initData:lg(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Hb(g,f.init||a||h||k);if(g=vq.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function nq(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=wq(c.value))&&b.push(c);return b}
|
|
743
|
+
function wq(a){var b=a.getAttribute("schemeIdUri"),c=rg(a,"urn:mpeg:cenc:2013","default_KID"),d=pg(a,"urn:mpeg:cenc:2013","pssh").map(tg);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:fg(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,Bd:b,keyId:c,init:0<e.length?e:null}}
|
|
744
|
+
function oq(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 P(2,4,4042);var b=og(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new P(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.getAttribute("schemeIdUri"))throw new P(2,4,4051);b=og(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new P(2,4,4051);a=b.getAttribute("IV");b=b.getAttribute("keyUriTemplate");
|
|
745
|
+
if(!a||!b)throw new P(2,4,4051);a=gg(a.substr(2));if(16!=a.byteLength)throw new P(2,4,4048);return{Ci:b,iv:a}}
|
|
746
|
+
var uq=1,vq=(new Map).set("com.widevine.alpha",function(a){var b=og(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?b.textContent:(a=og(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",tq).set("com.microsoft.playready.recommendation",tq).set("com.microsoft.playready.software",tq).set("com.microsoft.playready.hardware",tq).set("org.w3.clearkey",function(a){var b=og(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?
|
|
747
|
+
b.textContent:(a=og(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function xq(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();
|
|
748
748
|
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})}
|
|
749
|
-
function yq(a,b){var c=zq(a,b,"timescale"),d=1;c&&(d=
|
|
750
|
-
q=null!=q?q:l;v=v||0;if(0>v)if(r){r=
|
|
751
|
-
function zq(a,b,c){b=Bq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.getAttribute(c));d=b.next());return a}function Aq(a,b,c){b=Bq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=
|
|
752
|
-
function Cq(a,b,c,d,e,f){for(var g=
|
|
749
|
+
function yq(a,b){var c=zq(a,b,"timescale"),d=1;c&&(d=Ag(c)||1);var e=zq(a,b,"duration");c=Ag(e||"");"image"==a.O.contentType&&(c=Cg(e||""));c&&(c/=d);var f=zq(a,b,"startNumber");e=Number(zq(a,b,"presentationTimeOffset"))||0;var g=Bg(f||"");if(null==f||null==g)g=1;var h=Aq(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ia.duration||Infinity;f=g;h=ng(h,"S");for(var k=[],l=-e,m=0;m<h.length;++m){var n=h[m],r=h[m+1],q=vg(n,"t",Bg),u=vg(n,"d",Bg),v=vg(n,"r",zg);n=vg(n,"k",zg)||0;null!=q&&(q-=e);if(!u)break;
|
|
750
|
+
q=null!=q?q:l;v=v||0;if(0>v)if(r){r=vg(r,"t",Bg);if(null==r)break;else if(q>=r)break;v=Math.ceil((r-q)/u)-1}else{if(Infinity==a)break;else if(q/b>=a)break;v=Math.ceil((a*b-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/b);for(r=0;r<=v;++r)l=q+u,k.push({start:q/b,end:l/b,qg:q,ub:n,Yi:k.length+f}),q=l}b=k}return{timescale:d,Ka:c,Fd:g,Lb:e/d||0,pg:e,timeline:b}}function Bq(a,b){return[b(a.O),b(a.Aa),b(a.Ga)].filter(vd)}
|
|
751
|
+
function zq(a,b,c){b=Bq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.getAttribute(c));d=b.next());return a}function Aq(a,b,c){b=Bq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=mg(d.value,c));d=b.next());return a}
|
|
752
|
+
function Cq(a,b,c,d,e,f){for(var g=rg(a,"http://www.w3.org/1999/xlink","href"),h=rg(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return bf(new P(2,4,4028));if("onLoad"!=h)return bf(new P(2,4,4027));var m=Eb([d],[g]);return e.request(0,qf(m,b)).Ba(function(n){n=Hg(n.data,a.tagName);if(!n)return bf(new P(2,4,4001,g));
|
|
753
753
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var r=n.childNodes[0];n.removeChild(r);a.appendChild(r)}n=t(Array.from(n.attributes));for(r=n.next();!r.done;r=n.next())a.setAttributeNode(r.value.cloneNode(!1));return Dq(a,b,c,m[0],e,f+1)})}
|
|
754
|
-
function Dq(a,b,c,d,e,f){f=void 0===f?0:f;if(
|
|
755
|
-
function Fq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new
|
|
756
|
-
function Hq(a){var b=Iq(a);if(7<b.length)throw new
|
|
757
|
-
d)}function Iq(a){var b=a.g.Ca(),c=a.g.Qa();if(0==c)throw new
|
|
758
|
-
function Lq(a){if(8<a.g.byteLength)throw new
|
|
759
|
-
function Nq(a){var b=new Gq(a.g);a=Hq(b);if(179!=a.id)throw new
|
|
760
|
-
function Qq(a,b,c){var d=Number(zq(a,Rq,"presentationTimeOffset"))||0,e=zq(a,Rq,"timescale"),f=1;e&&(f=
|
|
761
|
-
function Uq(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,A,
|
|
762
|
-
H=G.g.byteOffset;G=new Gq(G.g);for(var
|
|
763
|
-
!0);return
|
|
764
|
-
function Pq(a){var b=a.O;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.ve,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Wq(a,b,c){var d=Oq(a,Xq,c),e=Yq(a);if(!e.Ka&&!e.timeline&&1<e.Kc.length)throw new
|
|
765
|
-
a.ia.duration:Infinity,b);g&&(g.segmentIndex=f);return{Cc:function(){f&&0!=f.jc()||f.qe(h);return Promise.resolve(f)}}}function Xq(a){return a.ac}function Yq(a){var b=$q(a);a=yq(a,Xq);var c=a.
|
|
766
|
-
function Zq(a,b,c,d,e,f){var g=d.Kc.length;d.timeline&&d.timeline.length!=d.Kc.length&&(g=Math.min(d.timeline.length,d.Kc.length));for(var h=a-d.Lb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},r=0;r<g;n={
|
|
767
|
-
function $q(a){return[a.O.ac,a.Aa.ac,a.Ga.ac].filter(
|
|
768
|
-
Infinity,q=!(a.Rb&&a.ia.Af);m?(c=m,fr(c,k,n,r,q),c.rb(a.presentationTimeline.Gb())):m=new gr(k,a.O.id,a.bandwidth,a.O.sb,n,r,h,q,g,a.O.Zf);k.timeline&&"image"!==a.Aa.contentType&&a.presentationTimeline.Vg(k.timeline,n);d&&a.Rb&&(d.segmentIndex=m);return{Cc:function(){m instanceof gr&&0==m.jc()&&fr(m,k,n,r,q);return Promise.resolve(m)}}}function hr(a){return a.
|
|
769
|
-
function cr(a){var b=yq(a,hr),c=zq(a,hr,"media");a=zq(a,hr,"index");return{Ka:b.Ka,timescale:b.timescale,
|
|
770
|
-
function er(a,b,c,d,e,f){function g(
|
|
771
|
-
m+
|
|
772
|
-
function br(a,b){var c=zq(a,hr,"initialization");if(!c)return null;var d=a.O.id,e=a.bandwidth||null,f=a.O.sb;return new
|
|
773
|
-
p.rb=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.jc()&&this.release())}};function fr(a,b,c,d,e){if(a.h){c=a.h.timeline;var
|
|
754
|
+
function Dq(a,b,c,d,e,f){f=void 0===f?0:f;if(rg(a,"http://www.w3.org/1999/xlink","href")){var g=Cq(a,b,c,d,e,f);c&&(g=g.Ba(void 0,function(){return Dq(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==rg(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Dq(k,b,c,d,e,f)));return ff(g).Ba(function(){return a})};function Eq(a,b,c,d,e,f,g){var h,k=(new Tf).V("sidx",function(l){h=Fq(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
|
|
755
|
+
function Fq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Nc(),m=g.reader.Nc();g.reader.skip(2);var n=g.reader.ob();a=a+g.size+m;for(m=0;m<n;m++){var r=g.reader.N(),q=(r&2147483648)>>>31;r&=2147483647;var u=g.reader.N();g.reader.skip(4);if(1==q)throw new P(2,3,3006);h.push(new Fh(l/k+c,(l+u)/k+c,function(){return f},a,a+r-1,b,c,d,e));l+=u;a+=r}g.parser.stop();return h};function Gq(a){this.h=rc(a);this.g=new Qf(this.h,0)}Gq.prototype.Fa=function(){return this.g.Fa()};
|
|
756
|
+
function Hq(a){var b=Iq(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Iq(a);a:{d=t(Jq);for(var e=d.next();!e.done;e=d.next())if(lc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Ca();else{if(8==b.length&&b[1]&224)throw new P(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.Ca()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Ca();d=rc(a.h,a.g.Ca(),b);a.g.skip(b);return new Kq(c,
|
|
757
|
+
d)}function Iq(a){var b=a.g.Ca(),c=a.g.Qa();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return nc(a.h,b,c)}var Jq=[[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 Kq(a,b){this.id=a;this.g=b}
|
|
758
|
+
function Lq(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Mq(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Gq(a.g);for(var n=null,r=null;a.Fa();){var q=Hq(a);if(187==q.id){var u=Nq(q);u&&(q=c*u.gj,u=b+u.Pi,null!=n&&m.push(new Fh(n+g,q+g,l,r,u-1,f,g,h,k)),n=q,r=u)}}null!=n&&m.push(new Fh(n+g,d+g,l,r,null,f,g,h,k));return m}
|
|
759
|
+
function Nq(a){var b=new Gq(a.g);a=Hq(b);if(179!=a.id)throw new P(2,3,3013);a=Lq(a);b=Hq(b);if(183!=b.id)throw new P(2,3,3012);b=new Gq(b.g);for(var c=0;b.Fa();){var d=Hq(b);if(241==d.id){c=Lq(d);break}}return{gj:a,Pi:c}};function Oq(a,b,c){b=Aq(a,b,"Initialization");if(!b)return null;var d=a.O.sb(),e=b.getAttribute("sourceURL");e&&(d=Eb(d,[e]));e=0;var f=null;if(b=vg(b,"range",yg))e=b.start,f=b.end;return new Dh(function(){return d},e,f,Pq(a),null,null,c)}
|
|
760
|
+
function Qq(a,b,c){var d=Number(zq(a,Rq,"presentationTimeOffset"))||0,e=zq(a,Rq,"timescale"),f=1;e&&(f=Ag(e)||1);var g=d/f||0,h=Oq(a,Rq,c);Sq(a,h);var k=jf(a);return{Cc:function(){var l=Aq(k,Rq,"RepresentationIndex");var m=k.O.sb();l&&(l=l.getAttribute("sourceURL"))&&(m=Eb(m,[l]));l=Tq(k);return Uq(k,b,h,m,l.start,l.end,g)}}}
|
|
761
|
+
function Uq(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,C,A,B;return K(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.Rb||!a.ia.Af,l=a.ia.start,m=a.ia.duration,n=a.O.mimeType.split("/")[1],r=b,q=null,u=[r(d,e,f,!1),"webm"==n?r(c.aa(),c.bb,c.Ia,!0):null],r=null,D(F,Promise.all(u),2);v=F.h;x=v[0];z=v[1]||null;y=null;C=l-g;A=l;B=m?l+m:Infinity;if("mp4"==n)var H=Eq(x,e,d,c,C,A,B);else{H=new Gq(z);if(440786851!=Hq(H).id)throw new P(2,3,3008);var G=Hq(H);if(408125543!=G.id)throw new P(2,3,3009);
|
|
762
|
+
H=G.g.byteOffset;G=new Gq(G.g);for(var J=null;G.Fa();){var I=Hq(G);if(357149030==I.id){J=I;break}}if(!J)throw new P(2,3,3010);J=new Gq(J.g);I=1E6;for(G=null;J.Fa();){var L=Hq(J);if(2807729==L.id)I=Lq(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new P(2,3,3003);}if(null==G)throw new P(2,3,3011);J=I/1E9;G*=J;I=Hq(new Gq(x));if(475249515!=I.id)throw new P(2,3,3007);H=Mq(I,H,J,G,d,c,C,A,B)}y=H;h.vd(y);q=new Fj(y);k&&q.Ac(A,B,
|
|
763
|
+
!0);return F.return(q)})}function Rq(a){return a.Dd}function Tq(a){var b=Aq(a,Rq,"RepresentationIndex");a=zq(a,Rq,"indexRange");a=yg(a||"");b&&(a=vg(b,"range",yg,a));return a}function Sq(a,b){Vq(a,b);if(!Tq(a))throw new P(2,4,4002);}function Vq(a,b){var c=a.O.mimeType.split("/")[1];if(a.O.contentType!=Lb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
|
|
764
|
+
function Pq(a){var b=a.O;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.ve,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Wq(a,b,c){var d=Oq(a,Xq,c),e=Yq(a);if(!e.Ka&&!e.timeline&&1<e.Kc.length)throw new P(2,4,4002);if(!e.Ka&&!a.ia.duration&&!e.timeline&&1==e.Kc.length)throw new P(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new P(2,4,4002);var f=null,g=null;a.Ga.id&&a.O.id&&(g=b[a.Ga.id+","+a.O.id])&&(f=g.segmentIndex);var h=Zq(a.ia.start,a.ia.duration,a.O.sb,e,d,c);b=!f;f?f.ud(h,a.presentationTimeline.Gb()):f=new Fj(h);a.presentationTimeline.vd(h);a.Rb&&a.ia.Af||f.Ac(a.ia.start,a.ia.duration?a.ia.start+
|
|
765
|
+
a.ia.duration:Infinity,b);g&&(g.segmentIndex=f);return{Cc:function(){f&&0!=f.jc()||f.qe(h);return Promise.resolve(f)}}}function Xq(a){return a.ac}function Yq(a){var b=$q(a);a=yq(a,Xq);var c=a.Fd;0==c&&(c=1);var d=0;a.Ka?d=a.Ka*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ka:a.Ka,startTime:d,Fd:c,Lb:a.Lb,timeline:a.timeline,Kc:b}}
|
|
766
|
+
function Zq(a,b,c,d,e,f){var g=d.Kc.length;d.timeline&&d.timeline.length!=d.Kc.length&&(g=Math.min(d.timeline.length,d.Kc.length));for(var h=a-d.Lb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},r=0;r<g;n={cd:n.cd,Zc:n.Zc},r++){n.Zc=d.Kc[r];var q=void 0;q=null!=d.Ka?m+d.Ka:d.timeline?d.timeline[r].end:m+b;n.cd=null;l.push(new Fh(a+m,a+q,function(u){return function(){null==u.cd&&(u.cd=Eb(c(),[u.Zc.Hi]));return u.cd}}(n),n.Zc.start,n.Zc.end,e,h,a,k,[],"",null,null,Gh,f));m=q}return l}
|
|
767
|
+
function $q(a){return[a.O.ac,a.Aa.ac,a.Ga.ac].filter(vd).map(function(b){return ng(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ng&&(a.Ng=!0);var c=b.getAttribute("media");b=vg(b,"mediaRange",yg,{start:0,end:null});return{Hi:c,start:b.start,end:b.end}})};function ar(a,b,c,d,e,f,g){var h=br(a,g),k=cr(a);dr(k);var l=jf(a);if(k.qd)return Vq(a,h),{Cc:function(){var u=xq(k.qd,l.O.id,null,null,l.bandwidth||null,null);u=Eb(l.O.sb(),[u]);return Uq(l,b,h,u,0,null,k.Lb)}};if(k.Ka)return d||"image"===a.Aa.contentType||(a.presentationTimeline.Lf(k.Ka),a.presentationTimeline.ue(a.ia.start)),{Cc:function(){return er(l,k,e,h,f,g)}};var m=null;d=d=null;a.Ga.id&&a.O.id&&(d=a.Ga.id+","+a.O.id,d=c[d])&&(m=d.segmentIndex);var n=a.ia.start,r=a.ia.duration?n+a.ia.duration:
|
|
768
|
+
Infinity,q=!(a.Rb&&a.ia.Af);m?(c=m,fr(c,k,n,r,q,h),c.rb(a.presentationTimeline.Gb())):m=new gr(k,a.O.id,a.bandwidth,a.O.sb,n,r,h,q,g,a.O.Zf);k.timeline&&"image"!==a.Aa.contentType&&a.presentationTimeline.Vg(k.timeline,n);d&&a.Rb&&(d.segmentIndex=m);return{Cc:function(){m instanceof gr&&0==m.jc()&&fr(m,k,n,r,q,h);return Promise.resolve(m)}}}function hr(a){return a.Ed}
|
|
769
|
+
function cr(a){var b=yq(a,hr),c=zq(a,hr,"media");a=zq(a,hr,"index");return{Ka:b.Ka,timescale:b.timescale,Fd:b.Fd,Lb:b.Lb,pg:b.pg,timeline:b.timeline,Lc:c,qd:a}}function dr(a){var b=a.qd?1:0;b+=a.timeline?1:0;b+=a.Ka?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.qd&&(a.timeline=null),a.Ka=null);if(!a.qd&&!a.Lc)throw new P(2,4,4002);}
|
|
770
|
+
function er(a,b,c,d,e,f){function g(I){var L=(I-u)*q,O=L+b.Lb,Q=L+m;L=Q+q;var T=Math.min(L,k());Q=new Fh(Q,T,function(){var Z=O*v;"BigInt"in window&&Z>Number.MAX_SAFE_INTEGER&&(Z=BigInt(O)*BigInt(v));Z=xq(x,y,I,null,z,Z);return Eb(C(),[Z])},0,null,d,A,m,k(),[],"",null,null,Gh,f);Q.j=L;return Q}function h(){var I=[Math.max(l.Gb(),m),Math.min(l.Vb(),k())].map(function(L){return L-m});return[Math.ceil(I[0]/q),Math.ceil(I[1]/q)-1].map(function(L){return L+u})}function k(){var I=null!=n&&e[n]||r;return I?
|
|
771
|
+
m+I:Infinity}var l=a.presentationTimeline,m=a.ia.start,n=a.Ga.id,r=a.ia.duration,q=b.Ka,u=b.Fd,v=b.timescale,x=b.Lc,z=a.bandwidth||null,y=a.O.id,C=a.O.sb,A=m-b.Lb,B=h();a=a.Rb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var H=g(F);c.push(H)}var G=new Fj(c);c=l.Vb()<k();F=l.R();if(c||F){var J=Math.max(a,B+1);G.De(q,function(){var I=l.Gb();G.rb(I);var L=t(h());L.next();L=L.next().value;for(var O=[];J<=L;){var Q=g(J);O.push(Q);J++}return I>k()&&!O.length?null:O})}return Promise.resolve(G)}
|
|
772
|
+
function br(a,b){var c=zq(a,hr,"initialization");if(!c)return null;var d=a.O.id,e=a.bandwidth||null,f=a.O.sb;return new Dh(function(){var g=xq(c,d,null,null,e,null);return Eb(f(),[g])},0,null,Pq(a),null,null,b)}function gr(a,b,c,d,e,f,g,h,k,l){Fj.call(this,[]);this.h=a;this.H=b;this.D=c;this.G=d;this.i=e;this.m=f;this.u=g;this.C=k;this.I=l;h&&ir(this)}pa(gr,Fj);p=gr.prototype;p.jc=function(){return this.h?this.h.timeline.length:0};p.release=function(){Fj.prototype.release.call(this);this.h=null};
|
|
773
|
+
p.rb=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.jc()&&this.release())}};function fr(a,b,c,d,e,f){a.u=f;if(a.h){c=a.h.timeline;a.h.Lc=b.Lc;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,w(b));a.m!==d&&(a.m=d)}else a.h=b,a.i=c,a.m=d;e&&ir(a)}
|
|
774
774
|
function ir(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.m)b.pop();else break;a.rb(a.i);0!==b.length&&Infinity!==a.m&&(b[b.length-1].end=a.m-a.i)}}
|
|
775
775
|
p.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.m)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=e.end+this.i;d<c&&(e=b[d+1].start+this.i);if(a>=f&&a<e)return d+this.j}return null};
|
|
776
|
-
p.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.jc()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.
|
|
777
|
-
0==this.I?0<m&&n.
|
|
778
|
-
function lr(a,b){var c,d,e,f,g,h,k;return
|
|
779
|
-
function mr(a,b){if(!a.m.length)return b;b=new
|
|
776
|
+
p.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.jc()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Lc,e=this.h.timeline[a],f=e.Yi,g=this.h.pg+e.qg;c=this.i-this.h.Lb;for(var h=[],k=(e.end-e.start)/e.ub,l={},m=0;m<e.ub;l={dd:l.dd,Ne:l.Ne},m++){var n=e.start+k*m,r=n+k;l.Ne=m+1;l.dd=null;n=new Fh(this.i+n,this.i+r,function(q){return function(){if(!b.h)return[];null==q.dd&&(q.dd=jr(b.h.Lc,b.H,f,b.D,g,q.Ne,b.G));return q.dd}}(l),0,null,this.u,c,this.i,this.m,[],"",null,null,Gh,this.C);
|
|
777
|
+
0==this.I?0<m&&n.oe():0!=m%this.I&&n.oe();h.push(n)}c=new Fh(this.i+e.start,this.i+e.end,function(){return 0<e.ub?[]:jr(d,b.H,f,b.D,g,null,b.G)},0,null,this.u,c,this.i,this.m,h,"",null,null,Gh,this.C,0<e.ub);this.g[a]=c}return c};function jr(a,b,c,d,e,f,g){a=xq(a,b,c,f,d||null,e);return Eb(g(),[a]).map(function(h){return h.toString()})};function kr(a){this.s=null;this.C=a;this.I=new kf;this.j=[];this.h=null;this.m=[];this.D=null;this.H=[];this.G=300;this.l=new Map;this.i=new Map;this.g=null;this.u="UNKNOWN"}kr.prototype.configure=function(a){this.s=a};kr.prototype.destroy=function(){this.C=this.s=null;this.j=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};kr.prototype.setManifestType=function(a){this.u=a};
|
|
778
|
+
function lr(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=Eb(a.j,[mr(a,b)]),d=qf(c,a.s.retryParameters),e=a.C.networkingEngine.request(8,d),lf(a.I,e),ta(l,2),D(l,e.promise,4);if(2!=l.g)return f=l.h,g=Kf(f.data),h=JSON.parse(g),1==h.VERSION&&nr(a,h,f.uri),va(l,0);if((k=wa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new xd(function(){lr(a,b)});a.g.S(a.G);E(l)})}
|
|
779
|
+
function mr(a,b){if(!a.m.length)return b;b=new kb(b);var c=a.D||a.m[0],d=Math.round(a.C.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)));Cb(e)&&qb(b,e);return b.toString()}function nr(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new xd(function(){lr(a,d)});if(c=b.TTL)a.G=c;a.g.S(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
780
780
|
function or(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
|
|
781
|
-
function pr(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={dc:d.dc},f=e.next())if(d.dc=f.value,f=b.get(d.dc))c.push({Sf:d.dc,location:f});else if(f=a.H.find(function(h){return function(k){return k.xj==h.dc}}(d))){var g=b.get(f["BASE-ID"]);g&&(f["URI-REPLACEMENT"].qh?(g=new
|
|
782
|
-
a.
|
|
783
|
-
p.Ag=function(a,b){var c,d,e,f,g=this,h,k,l,m,n,r,q,u,v,x,z,y,A,
|
|
784
|
-
|
|
785
|
-
Z.drmInfos.length&&
|
|
786
|
-
drmInfos:L.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});g.j=H;
|
|
781
|
+
function pr(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={dc:d.dc},f=e.next())if(d.dc=f.value,f=b.get(d.dc))c.push({Sf:d.dc,location:f});else if(f=a.H.find(function(h){return function(k){return k.xj==h.dc}}(d))){var g=b.get(f["BASE-ID"]);g&&(f["URI-REPLACEMENT"].qh?(g=new kb(g),ob(g,f["URI-REPLACEMENT"].qh),c.push({Sf:d.dc,location:g.toString()})):c.push({Sf:d.dc,location:g}))}d=Date.now();e=t(a.i.keys());for(f=e.next();!f.done;f=e.next())f=f.value,g=a.i.get(f),d>g&&
|
|
782
|
+
a.i.delete(f);c=c.filter(function(h){for(var k=t(a.i.keys()),l=k.next();!l.done;l=k.next())if(l.value.includes((new kb(h.location)).Db))return!1;return!0});c.length&&(a.D=c[0].Sf);c=c.map(function(h){return h.location});if(!c.length&&a.h)for(d=t(a.h.split(",")),f=d.next();!f.done;f=d.next())if(e=b.get(f.value))a.D=a.h,c.push(e);if(!c.length)for(b=t(b.values()),d=b.next();!d.done;d=b.next())c.push(d.value);return Eb(a.j,c)};function qr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=new Set}p=qr.prototype;p.release=function(){for(var a=t(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=[]};p.li=function(){return this.j};p.xf=function(){return this.l.slice()};p.Uh=function(){return this.i};
|
|
783
|
+
p.Ag=function(a,b){var c,d,e,f,g=this,h,k,l,m,n,r,q,u,v,x,z,y,C,A,B,F,H,G,J,I,L,O,Q,T,Z,aa,la,Na,Xa,Fb;return K(function(lb){if(1==lb.g){h=Mb;rr(a);if(!b&&1==a.length)return k=a[0],g.h=k.audioStreams,g.g=k.videoStreams,g.l=k.textStreams,g.i=k.imageStreams,lb.F(2);l=-1;for(m=0;m<a.length;m++)n=a[m],g.m.has(n.id)||(g.m.add(n.id),-1==l&&(l=m));if(-1==l)return lb.return();for(var ac=[],Aa=[],mb=[],hb=[],Gb=t(a),ib=Gb.next();!ib.done;ib=Gb.next())ib=ib.value,ac.push(ib.audioStreams),Aa.push(ib.videoStreams),
|
|
784
|
+
mb.push(ib.textStreams),hb.push(ib.imageStreams);c=ac;d=Aa;e=mb;f=hb;r=c;q=d;u=e;v=f;x=t(u);for(z=x.next();!z.done;z=x.next())y=z.value,y.push(sr(h.wa));C=t(v);for(A=C.next();!A.done;A=C.next())B=A.value,B.push(sr(h.fd));return D(lb,Promise.all([tr(g.h,r,l,ur,vr),tr(g.g,q,l,ur,vr),tr(g.l,u,l,ur,vr),tr(g.i,v,l,ur,vr)]),2)}F=0;H=[];if(g.g.length&&g.h.length)for(Q=t(g.h),T=Q.next();!T.done;T=Q.next())for(Z=T.value,aa=t(g.g),la=aa.next();!la.done;la=aa.next())Na=la.value,Xa=uh(Z.drmInfos,Na.drmInfos),
|
|
785
|
+
Z.drmInfos.length&&Na.drmInfos.length&&!Xa.length||(Fb=F++,H.push({id:Fb,language:Z.language,disabledUntilTime:0,primary:Z.primary,audio:Z,video:Na,bandwidth:(Z.bandwidth||0)+(Na.bandwidth||0),drmInfos:Xa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(G=g.g.length?g.g:g.h,J=t(G),I=J.next();!I.done;I=J.next())L=I.value,O=F++,H.push({id:O,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L.type==h.W?L:null,video:L.type==h.qa?L:null,bandwidth:L.bandwidth||0,
|
|
786
|
+
drmInfos:L.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});g.j=H;E(lb)})};
|
|
787
787
|
function rr(a){a=t(a);for(var b=a.next();!b.done;b=a.next())b=b.value,b.videoStreams=wr(b.videoStreams,function(c,d){return c.id!==d.id&&c.fastSwitching==d.fastSwitching&&c.width===d.width&&c.frameRate===d.frameRate&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&c.label===d.label&&yc(c.roles,d.roles)&&If(c.closedCaptions,d.closedCaptions)&&c.bandwidth===d.bandwidth}),b.audioStreams=wr(b.audioStreams,function(c,d){return c.id!==d.id&&c.fastSwitching==d.fastSwitching&&c.channelsCount===d.channelsCount&&
|
|
788
788
|
c.language===d.language&&c.bandwidth===d.bandwidth&&c.label===d.label&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&yc(c.roles,d.roles)&&c.audioSamplingRate===d.audioSamplingRate&&c.primary===d.primary}),b.textStreams=wr(b.textStreams,function(c,d){return c.id!==d.id&&c.language===d.language&&c.label===d.label&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&c.bandwidth===d.bandwidth&&yc(c.roles,d.roles)}),b.imageStreams=wr(b.imageStreams,function(c,d){return c.id!==d.id&&c.width===d.width&&c.codecs===
|
|
789
|
-
d.codecs&&c.mimeType===d.mimeType})}function wr(a,b){var c=[],d={};a=t(a);for(var e=a.next();!e.done;d={
|
|
790
|
-
function xr(a){var b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,
|
|
791
|
-
l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(yr(b.
|
|
792
|
-
[x++];return
|
|
793
|
-
function tr(a,b,c,d,e){var f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,
|
|
794
|
-
|
|
795
|
-
function Er(a,b){var c,d,e,f,g,h,k;return
|
|
796
|
-
function Cr(a,b,c,d,e){var f=c(a);Dr(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return
|
|
789
|
+
d.codecs&&c.mimeType===d.mimeType})}function wr(a,b){var c=[],d={};a=t(a);for(var e=a.next();!e.done;d={Nd:d.Nd},e=a.next())d.Nd=e.value,c.some(function(f){return function(g){return b(f.Nd,g)}}(d))||c.push(d.Nd);return c}
|
|
790
|
+
function xr(a){var b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A,B,F,H,G,J,I,L;return K(function(O){switch(O.g){case 1:b=Mb;if(1==a.length)return O.return(a[0]);c=a.map(function(Q){return Q.filter(function(T){return T.type==b.W})});d=a.map(function(Q){return Q.filter(function(T){return T.type==b.qa})});e=a.map(function(Q){return Q.filter(function(T){return T.type==b.wa})});f=a.map(function(Q){return Q.filter(function(T){return T.type==b.fd})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,k.push(yr(b.wa));
|
|
791
|
+
l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(yr(b.fd));return D(O,tr([],c,0,zr,Ar),2);case 2:return r=O.h,D(O,tr([],d,0,zr,Ar),3);case 3:return q=O.h,D(O,tr([],e,0,zr,Ar),4);case 4:return u=O.h,D(O,tr([],f,0,zr,Ar),5);case 5:v=O.h;x=0;if(q.length&&r.length)for(B=t(r),F=B.next();!F.done;F=B.next())for(H=F.value,G=t(q),J=G.next();!J.done;J=G.next())I=J.value,L=x++,I.variantIds.push(L),H.variantIds.push(L);else for(z=q.concat(r),y=t(z),C=y.next();!C.done;C=y.next())A=C.value,A.variantIds=
|
|
792
|
+
[x++];return O.return(q.concat(r).concat(u).concat(v))}})}
|
|
793
|
+
function tr(a,b,c,d,e){var f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A,B,F,H,G,J;return K(function(I){switch(I.g){case 1:f=Mb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){I.F(4);break}m=l.value;return D(I,Br(m,b,c,e,g),5);case 5:n=I.h;if(!n)throw new P(2,4,4037);l=k.next();I.F(2);break;case 4:r=t(g);for(q=r.next();!q.done;q=r.next())for(u=q.value,v=t(u),x=v.next();!x.done;x=v.next())z=x.value,(y=Cr(z,b,d,e,g))&&a.push(y);C=t(g);for(q=C.next();!q.done;q=
|
|
794
|
+
C.next())for(A=q.value,B={},F=t(A),x=F.next();!x.done;B={Pb:B.Pb},x=F.next())if(B.Pb=x.value,H=B.Pb.type==f.wa&&!B.Pb.language,G=B.Pb.type==f.fd&&!B.Pb.tilesLayout,!H&&!G&&(J=a.some(function(L){return function(O){return O.mimeType==L.Pb.mimeType&&hd(O.codecs)==hd(L.Pb.codecs)}}(B))))throw new P(2,4,4037);return I.return(a)}})}function Br(a,b,c,d,e){return K(function(f){if(1==f.g)return Dr(b,a),a.matchedStreams?a.segmentIndex?D(f,Er(a,c),2):f.F(2):f.return(!1);Fr(a,c,d,e);return f.return(!0)})}
|
|
795
|
+
function Er(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return D(l,Promise.all(c),2)}if(a.segmentIndex instanceof Jj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);E(l)})}
|
|
796
|
+
function Cr(a,b,c,d,e){var f=c(a);Dr(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.F(0);f.segmentIndex=new Jj;return D(g,Er(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Fr(f,0,d,e);return f}function Fr(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==Vb(a.language,f.language)&&(g=!1);g&&d[b].delete(f)}}
|
|
797
797
|
function ur(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
798
798
|
function zr(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
799
|
-
function vr(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(w(f),w(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=
|
|
799
|
+
function vr(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(w(f),w(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=uh(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
800
800
|
(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=ur(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),vr(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&vr(a.trickModeVideo,b)}
|
|
801
801
|
function Ar(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(w(a.keyIds),w(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,w(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
|
|
802
802
|
function Dr(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Gr,video:Gr,text:Hr,image:Ir}[e.type],g={audio:Jr,video:Kr,text:Lr,image:Mr}[e.type],h=null;d=t(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}
|
|
803
|
-
function Gr(a,b){function c(d){if(!Nr.has(d)){var e=
|
|
804
|
-
function Jr(a,b,c){if(a.id==c.id)return!0;var d=
|
|
803
|
+
function Gr(a,b){function c(d){if(!Nr.has(d)){var e=hd(d);Nr.set(d,e)}return Nr.get(d)}return b.mimeType!=a.mimeType||c(b.codecs)!=c(a.codecs)||a.drmInfos&&!th(a.drmInfos,b.drmInfos)?!1:!0}function Hr(a,b){return a.language?b.language?0==Vb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Ir(a){return a.tilesLayout?!0:!1}
|
|
804
|
+
function Jr(a,b,c){if(a.id==c.id)return!0;var d=Vb(a.language,b.language),e=Vb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
|
|
805
805
|
d=Or(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Pr)return!0;if(d==Qr)return!1;d=Or(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Pr?!0:d==Qr?!1:a.bandwidth&&Rr(a.bandwidth,b.bandwidth,c.bandwidth)==Pr?!0:!1}
|
|
806
806
|
function Kr(a,b,c){if(a.id==c.id)return!0;var d=Or(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Pr)return!0;if(d==Qr)return!1;if(a.frameRate){d=Or(a.frameRate,b.frameRate,c.frameRate);if(d==Pr)return!0;if(d==Qr)return!1}return a.bandwidth&&Rr(a.bandwidth,b.bandwidth,c.bandwidth)==Pr?!0:!1}
|
|
807
|
-
function Lr(a,b,c){if(a.id==c.id)return!0;var d=
|
|
807
|
+
function Lr(a,b,c){if(a.id==c.id)return!0;var d=Vb(a.language,b.language),e=Vb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
|
|
808
808
|
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Mr(a,b,c){return a.id==c.id?!0:Or(a.width*a.height,b.width*b.height,c.width*c.height)==Pr?!0:!1}
|
|
809
809
|
function yr(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
|
|
810
810
|
function sr(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1}}
|
|
811
811
|
function Or(a,b,c){if(b==a&&a!=c)return Qr;if(c==a&&a!=b)return Pr;if(b>a){if(c<=a||c-a<b-a)return Pr;if(c-a>b-a)return Qr}else{if(c>a)return Qr;if(a-c<a-b)return Pr;if(a-c>a-b)return Qr}return Sr}function Rr(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Pr:b<a?Qr:Sr}M("shaka.util.PeriodCombiner",qr);qr.prototype.combinePeriods=qr.prototype.Ag;qr.prototype.getImageStreams=qr.prototype.Uh;qr.prototype.getTextStreams=qr.prototype.xf;qr.prototype.getVariants=qr.prototype.li;
|
|
812
|
-
var Pr=1,Sr=0,Qr=-1,Nr=new Map;function Tr(){var a=this;this.i=this.g=null;this.s=[];this.j=null;this.K=1;this.m={};this.M={};this.l=new qr;this.H=0;this.J=new cc(5);this.I=new
|
|
813
|
-
p.stop=function(){for(var a=t(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.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();return this.G.destroy()};p.update=function(){var a=this,b;return
|
|
814
|
-
p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Vb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Wr(this,0))}}};p.banLocation=function(a){this.h&&this.h.
|
|
815
|
-
function Vr(a){var b,c,d,e,f;return
|
|
816
|
-
function Yr(a,b,c){var d,e,f,g,h;return
|
|
817
|
-
function Zr(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
aa.
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
function as(a){a=
|
|
824
|
-
function $r(a,b,c,d){var e=
|
|
812
|
+
var Pr=1,Sr=0,Qr=-1,Nr=new Map;function Tr(){var a=this;this.i=this.g=null;this.s=[];this.j=null;this.K=1;this.m={};this.M={};this.l=new qr;this.H=0;this.J=new cc(5);this.I=new xd(function(){Ur(a)});this.G=new kf;this.C=null;this.L=[];this.D=Infinity;this.u=!1;this.h=null}p=Tr.prototype;p.configure=function(a){this.g=a;this.h&&this.h.configure(this.g)};p.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.u=b.isLowLatencyMode(),c.s=[a],c.i=b,D(e,Vr(c),2);d=e.h;c.i&&Wr(c,d);if(!c.i)throw new P(2,7,7001);return e.return(c.j)})};
|
|
813
|
+
p.stop=function(){for(var a=t(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.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();return this.G.destroy()};p.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),D(c,Vr(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.i||!b)return c.return();a.i.onError(b);E(c)})};
|
|
814
|
+
p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Vb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Wr(this,0))}}};p.banLocation=function(a){this.h&&this.h.i.set(a,Date.now()+6E4)};
|
|
815
|
+
function Vr(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return b=qf(a.s,a.g.retryParameters),c=Date.now(),D(g,Xr(a,b,0,{type:4}),2);if(3!=g.g){d=g.h;if(!a.i)return g.return(0);d.uri&&d.uri!=d.originalUri&&!a.s.includes(d.uri)&&a.s.unshift(d.uri);return D(g,Yr(a,d.data,d.uri),3)}e=Date.now();f=(e-c)/1E3;a.J.sample(1,f);return g.return(f)})}
|
|
816
|
+
function Yr(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Hg(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Zr(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Dq(d,a.g.retryParameters,f,c,a.i.networkingEngine);lf(a.G,g);return D(k,g.promise,2)}h=k.h;return k.return(Zr(a,h,c))})}
|
|
817
|
+
function Zr(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A,B,F,H,G,J,I,L,O,Q,T,Z,aa,la,Na,Xa,Fb,lb,ac,Aa,mb,hb,Gb,ib,Vh,Nd,Ne,Oe;return K(function(rb){switch(rb.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=ng(b,"Location").map(tg).filter(vd);0<f.length&&(g=Eb(e,f),e=a.s=g);h=Promise.resolve();if((k=mg(b,"ContentSteering"))&&a.i)if(l=k.getAttribute("defaultServiceLocation"),a.h)a.h.j=e,a.h.h=l;else if(a.h=new kr(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.j=e,a.h.h=l,m=tg(k))(n=
|
|
818
|
+
vg(k,"queryBeforeStart",Dg,!1))?h=lr(a.h,m):lr(a.h,m);r=ng(b,"BaseURL");u=!1;if(a.h)for(a.h.l.clear(),v=t(r),x=v.next();!x.done;x=v.next())z=x.value,y=z.getAttribute("serviceLocation"),C=tg(z),y&&C&&(or(a.h,"BaseURL",y,C),u=!0);u&&a.h||(A=r.map(tg),q=Eb(e,A));B=function(){return a.h&&u?pr(a.h,"BaseURL"):q?q:[]};F=0;r&&r.length&&(F=vg(r[0],"availabilityTimeOffset",Cg)||0);H=a.g.dash.ignoreMinBufferTime;G=0;H||(G=vg(b,"minBufferTime",xg)||0);a.H=vg(b,"minimumUpdatePeriod",xg,-1);J=vg(b,"availabilityStartTime",
|
|
819
|
+
wg);I=vg(b,"timeShiftBufferDepth",xg);L=a.g.dash.ignoreSuggestedPresentationDelay;O=null;L||(O=vg(b,"suggestedPresentationDelay",xg));Q=a.g.dash.ignoreMaxSegmentDuration;T=null;Q||(T=vg(b,"maxSegmentDuration",xg));Z=b.getAttribute("type")||"static";if(a.j)for(aa=a.j.presentationTimeline,la=t(Object.values(a.m)),Na=la.next();!Na.done;Na=la.next())Xa=Na.value,Xa.segmentIndex&&Xa.segmentIndex.rb(aa.Gb());else Fb=a.g.defaultPresentationDelay||1.5*G,lb=null!=O?O:Fb,aa=new jj(J,lb,a.g.dash.autoCorrectDrift);
|
|
820
|
+
aa.Oc("static"==Z);(ac=aa.R())&&!isNaN(a.g.availabilityWindowOverride)&&(I=a.g.availabilityWindowOverride);null==I&&(I=Infinity);aa.Ce(I);Aa=b.getAttribute("profiles")||"";mb={Rb:"static"!=Z,presentationTimeline:aa,Ga:null,ia:null,Aa:null,O:null,bandwidth:0,Ng:!1,zc:F,profiles:Aa.split(",")};hb=$r(a,mb,B,b);Gb=hb.duration;ib=hb.periods;"static"!=Z&&hb.Fg||aa.ab(Gb||Infinity);a.D&&!a.u&&(Vh=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.u=a.i.isLowLatencyMode());a.u?aa.bh(a.D):a.D&&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.");
|
|
821
|
+
aa.Lf(T||1);return D(rb,a.l.Ag(ib,mb.Rb),2);case 2:return D(rb,h,3);case 3:a.u&&(G=0);if(a.j){a.j.variants=a.l.j;Nd=a.l.xf();0<Nd.length&&(a.j.textStreams=Nd);a.j.imageStreams=a.l.i;a.i.filter(a.j);rb.F(4);break}a.j={presentationTimeline:aa,variants:a.l.j,textStreams:a.l.xf(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:G||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:as(b)};if(!aa.oh()){rb.F(5);break}Ne=ng(b,"UTCTiming");return D(rb,
|
|
822
|
+
bs(a,B,Ne),6);case 6:Oe=rb.h;if(!a.i)return rb.return();aa.dh(Oe);case 5:aa.le();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),E(rb)}})}
|
|
823
|
+
function as(a){a=mg(a,"ServiceDescription");if(!a)return null;var b=mg(a,"Latency"),c=mg(a,"PlaybackRate");if(b&&b.getAttribute("max")||c){a=b&&b.getAttribute("max")?parseInt(b.getAttribute("max"),10)/1E3:null;var d=c?parseFloat(c.getAttribute("max")):null;b=b&&b.getAttribute("min")?parseInt(b.getAttribute("min"),10)/1E3:null;c=c?parseFloat(c.getAttribute("min")):null;return{maxLatency:a,maxPlaybackRate:d,minLatency:b,minPlaybackRate:c}}return null}
|
|
824
|
+
function $r(a,b,c,d){var e=vg(d,"mediaPresentationDuration",xg),f=[],g=0;d=ng(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=vg(k,"start",xg,g),n=k.id,r=vg(k,"duration",xg),q=null;if(l){var u=vg(l,"start",xg);null!=u&&(q=u-m)}else null!=e&&(q=e-m);null==q&&(q=r);if(!(null!==a.C&&null!==n&&null!==m&&m<a.C)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.C||m>a.C)&&(a.C=m);g=cs(a,b,c,{start:m,duration:q,node:k,Af:null==q||!l});f.push(g);b.Ga.id&&q&&(a.M[b.Ga.id]=q);if(null==q){g=
|
|
825
825
|
null;break}g=m+q}}a.L=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Fg:!1}:{periods:f,duration:g,Fg:!0}}
|
|
826
|
-
function cs(a,b,c,d){b.Ga=ds(a,d.node,null,c);b.ia=d;b.Ga.zc=b.zc;b.Ga.id||(b.Ga.id="__shaka_period_"+d.start);var e=
|
|
827
|
-
}d=c.filter(function(m){return!m.og});c=c.filter(function(m){return m.og});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.og.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={
|
|
828
|
-
d,
|
|
829
|
-
function fs(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.Aa=ds(a,c,b.Ga,null);var e=!1,f=
|
|
830
|
-
l}}var n;m=
|
|
831
|
-
m.next())q=q.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q.getAttribute("schemeIdUri")&&(n=d(parseInt(q.getAttribute("value"),10)));m=
|
|
832
|
-
C
|
|
833
|
-
u?x="visually impaired":"2"==u&&(x="hard of hearing"));if(l)return null;l=
|
|
834
|
-
k||f)return null;throw new
|
|
835
|
-
return{id:k,contentType:b.Aa.contentType,language:
|
|
836
|
-
function hs(a,b,c,d,e,f,g,h,k,l,m){b.O=ds(a,l,b.Aa,null);a.D=Math.min(a.D,b.O.zc);if(!js(b.O))return null;var n=b.ia.start;b.bandwidth=
|
|
837
|
-
4,4049);
|
|
838
|
-
c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);v=new Set(v?[v]:[]);x=!1;
|
|
839
|
-
(B=l.getAttribute("value")),!B))return null;var
|
|
840
|
-
codecs:b.O.codecs,frameRate:b.O.frameRate,pixelAspectRatio:b.O.pixelAspectRatio,bandwidth:b.bandwidth,width:b.O.width,height:b.O.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.Aa.language,label:f,type:b.Aa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.O.emsgSchemeIdUris,roles:h,forced:
|
|
841
|
-
accessibilityPurpose:m,external:!1,fastSwitching:!1};H.createSegmentIndex=function(){var G;return
|
|
842
|
-
function Ur(a){var b,c;
|
|
843
|
-
function ds(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ve:null,audioSamplingRate:null,zc:0,Zf:0};d=d||c.sb;var e=b.getAttribute("id"),f=
|
|
844
|
-
c.codecs;var n=
|
|
845
|
-
(
|
|
826
|
+
function cs(a,b,c,d){b.Ga=ds(a,d.node,null,c);b.ia=d;b.Ga.zc=b.zc;b.Ga.id||(b.Ga.id="__shaka_period_"+d.start);var e=ng(d.node,"EventStream");c=b.presentationTimeline.Gb();e=t(e);for(var f=e.next();!f.done;f=e.next())es(a,d.start,d.duration,f.value,c);c=ng(d.node,"AdaptationSet").map(function(m){return fs(a,b,m)}).filter(vd);if(b.Rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ti);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
|
|
827
|
+
}d=c.filter(function(m){return!m.og});c=c.filter(function(m){return m.og});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.og.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Od:h.Od},l=k.next())h.Od=l.value,h.Od.trickModeVideo=e.streams.find(function(m){return function(n){return hd(m.Od.codecs)==hd(n.codecs)}}(h))}}}c=gs(a.g.disableAudio,d,"audio");e=gs(a.g.disableVideo,d,"video");f=gs(a.g.disableText,
|
|
828
|
+
d,Lb);d=gs(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new P(2,4,4004);return{id:b.Ga.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function gs(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,w(e.streams));return d},[])}
|
|
829
|
+
function fs(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.Aa=ds(a,c,b.Ga,null);var e=!1,f=ng(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(vd),h=void 0,k=b.Aa.contentType==Lb;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
830
|
+
l}}var n;m=ng(c,"EssentialProperty");f=null;var r=!1;l=!1;m=t(m);for(var q=m.next();!q.done;q=m.next()){q=q.value;var u=q.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==u?f=q.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==u?n=d(parseInt(q.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=u&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=u&&("urn:mpeg:dash:ssr:2023"==u?r=!0:l=!0)}m=ng(c,"SupplementalProperty");m=t(m);for(q=m.next();!q.done;q=
|
|
831
|
+
m.next())q=q.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q.getAttribute("schemeIdUri")&&(n=d(parseInt(q.getAttribute("value"),10)));m=ng(c,"Accessibility");var v=new Map,x;m=t(m);for(q=m.next();!q.done;q=m.next())if(u=q.value,q=u.getAttribute("schemeIdUri"),u=u.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==q)if(q=1,null!=u){u=u.split(";");for(var z=t(u),y=z.next();!y.done;y=z.next()){var C=y.value,A=y=void 0;C.includes("=")?(C=C.split("="),y=C[0].startsWith("CC")?C[0]:"CC"+C[0],
|
|
832
|
+
A=C[1]||"und"):(y="CC"+q,2==u.length?q+=2:q++,A=C);v.set(y,Pb(A))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==q)if(q=1,null!=u)for(u=t(u.split(";")),y=u.next();!y.done;y=u.next())y=y.value,C=z=void 0,y.includes("=")?(y=y.split("="),z="svc"+y[0],C=y[1].split(",")[0].split(":").pop()):(z="svc"+q,q++,C=y),v.set(z,Pb(C));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==q?null!=u&&(g.push(u),"captions"==u&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==q&&("1"==
|
|
833
|
+
u?x="visually impaired":"2"==u&&(x="hard of hearing"));if(l)return null;l=ng(c,"ContentProtection");var B=mq(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),F=Pb(b.Aa.language||"und"),H=c.getAttribute("label");(l=ng(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(H=l.textContent));l=ng(c,"Representation");c=l.map(function(G){if(G=hs(a,b,B,h,F,H,e,g,v,G,x))G.hdr=G.hdr||n,G.fastSwitching=r;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Aa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||
|
|
834
|
+
k||f)return null;throw new P(2,4,4003);}if(!b.Aa.contentType||"application"==b.Aa.contentType)for(b.Aa.contentType=is(c[0].mimeType,c[0].codecs),k=t(c),q=k.next();!q.done;q=k.next())q.value.type=b.Aa.contentType;k=b.Aa.id||"__fake__"+a.K++;m=t(c);for(q=m.next();!q.done;q=m.next()){q=q.value;u=t(B.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&q.keyIds?new Set([].concat(w(z.keyIds),w(q.keyIds))):z.keyIds||q.keyIds;a.g.dash.enableAudioGroups&&(q.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(vd);
|
|
835
|
+
return{id:k,contentType:b.Aa.contentType,language:F,ek:e,streams:c,drmInfos:B.drmInfos,og:f,Ti:l}}
|
|
836
|
+
function hs(a,b,c,d,e,f,g,h,k,l,m){b.O=ds(a,l,b.Aa,null);a.D=Math.min(a.D,b.O.zc);if(!js(b.O))return null;var n=b.ia.start;b.bandwidth=vg(l,"bandwidth",Ag)||0;var r=b.O.contentType,q=r==Lb||"application"==r;r="image"==r;try{var u=void 0;if(c.Re){var v=b.O.sb,x=Eb(v(),[c.Re.Ci]),z=qf(x,a.g.retryParameters);u={method:"AES-128",iv:c.Re.iv,firstMediaSequenceNumber:0,fetchKey:function(){var G,J,I;return K(function(L){if(1==L.g)return D(L,Xr(a,z,6),2);if(3!=L.g){G=L.h;if(!G.data||16!=G.data.byteLength)throw new P(2,
|
|
837
|
+
4,4049);J={name:"AES-CBC"};I=u;return D(L,window.crypto.subtle.importKey("raw",G.data,J,!0,["decrypt"]),3)}I.cryptoKey=L.h;u.fetchKey=void 0;E(L)})}}}v=function(G,J,I,L){return ks(a,G,J,I,L)};if(b.O.Dd)var y=Qq(b,v,u);else if(b.O.ac)y=Wq(b,a.m,u);else if(b.O.Ed)y=ar(b,v,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.M,u);else{var C=b.ia.duration||0;y={Cc:function(){var G=b.O.sb();return Promise.resolve(Ij(n,C,G))}}}}catch(G){if((q||r)&&4002==G.code)return null;throw G;}v=ng(l,"ContentProtection");v=qq(v,
|
|
838
|
+
c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);v=new Set(v?[v]:[]);x=!1;ng(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(x=!0);var A=!1;q&&(A=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(r&&((l=ng(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
|
|
839
|
+
(B=l.getAttribute("value")),!B))return null;var F;l=b.O.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"))&&(F="PQ");l=b.O.id?b.Ga.id+","+b.O.id:"";var H=l&&a.m[l]?a.m[l]:{id:a.K++,originalId:b.O.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){H.segmentIndex&&(H.segmentIndex.release(),H.segmentIndex=null)},segmentIndex:null,mimeType:b.O.mimeType,
|
|
840
|
+
codecs:b.O.codecs,frameRate:b.O.frameRate,pixelAspectRatio:b.O.pixelAspectRatio,bandwidth:b.bandwidth,width:b.O.width,height:b.O.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.Aa.language,label:f,type:b.Aa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.O.emsgSchemeIdUris,roles:h,forced:A,channelsCount:b.O.ve,audioSamplingRate:b.O.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:F,videoLayout:void 0,tilesLayout:B,matchedStreams:[],
|
|
841
|
+
accessibilityPurpose:m,external:!1,fastSwitching:!1};H.createSegmentIndex=function(){var G;return K(function(J){if(1==J.g){if(H.segmentIndex)return J.F(0);G=H;return D(J,y.Cc(),3)}G.segmentIndex=J.h;E(J)})};l&&b.Rb&&!a.m[l]&&(a.m[l]=H);return H}
|
|
842
|
+
function Ur(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,ta(d,2),D(d,Vr(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(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();Wr(a,b);E(d)}})}function Wr(a,b){0>=a.H||a.I.S(Math.max(a.H-b,dc(a.J)))}
|
|
843
|
+
function ds(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ve:null,audioSamplingRate:null,zc:0,Zf:0};d=d||c.sb;var e=b.getAttribute("id"),f=ng(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.getAttribute("serviceLocation");m=tg(m);l&&m&&(or(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(tg));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")||
|
|
844
|
+
c.codecs;var n=vg(b,"frameRate",Eg)||c.frameRate,r=b.getAttribute("sar")||c.pixelAspectRatio,q=ls(ng(b,"InbandEventStream"),c.emsgSchemeIdUris),u=ng(b,"AudioChannelConfiguration");u=ms(u)||c.ve;var v=vg(b,"audioSamplingRate",Bg)||c.audioSamplingRate;k||(k=is(l,m));var x=mg(b,"SegmentBase"),z=mg(b,"SegmentTemplate"),y=x?vg(x,"availabilityTimeOffset",Cg)||0:0,C=z?vg(z,"availabilityTimeOffset",Cg)||0:0,A=f&&f.length?vg(f[0],"availabilityTimeOffset",Cg)||0:0;y=c.zc+A+y+C;C=null;(A=mg(b,"SegmentSequenceProperties"))&&
|
|
845
|
+
(A=mg(A,"SAP"))&&(C=vg(A,"cadence",zg));return{sb:function(){return Eb(d(),f.length?a.h&&h?pr(a.h,e):g?g:[]:[])},Dd:x||c.Dd,ac:mg(b,"SegmentList")||c.ac,Ed:z||c.Ed,width:vg(b,"width",Bg)||c.width,height:vg(b,"height",Bg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:q,id:e,language:b.getAttribute("lang"),ve:u,audioSamplingRate:v,zc:y,Zf:C||c.Zf}}
|
|
846
846
|
function ls(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.getAttribute("schemeIdUri"),b.includes(c)||b.push(c);return b}
|
|
847
847
|
function ms(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
848
|
-
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 js(a){var b=a.
|
|
849
|
-
function ns(a,b,c,d){var e,f,g,h,k,l;return
|
|
850
|
-
function bs(a,b,c){var d,e,f,g,h,k,l,m;return
|
|
848
|
+
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 js(a){var b=a.Dd?1:0;b+=a.ac?1:0;b+=a.Ed?1:0;if(0==b)return a.contentType==Lb||"application"==a.contentType?!0:!1;1!=b&&(a.Dd&&(a.ac=null),a.Ed=null);return!0}
|
|
849
|
+
function ns(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=Eb(b(),[c]),f=qf(e,a.g.retryParameters),f.method=d,g=a.i.networkingEngine.request(4,f),lf(a.G,g),D(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=Kf(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
|
|
850
|
+
function bs(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(r){return{scheme:r.getAttribute("schemeIdUri"),value:r.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.F(4);break}h=g.value;ta(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.F(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.F(8);
|
|
851
851
|
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.F(9);break;case 7:return D(n,ns(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return D(n,ns(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
|
|
852
852
|
3);break;case 5:wa(n);case 3:g=f.next();n.F(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)}})}
|
|
853
|
-
function es(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=
|
|
854
|
-
function ks(a,b,c,d,e){var f,g,h,k;return
|
|
855
|
-
function us(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}ts.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function X(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function vs(a,b){a=a.getAttribute(b);if(!a)throw new
|
|
853
|
+
function es(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=vg(d,"timescale",Bg)||1;d=t(ng(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=vg(k,"presentationTime",Bg)||0,m=vg(k,"duration",Bg)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.i.onTimelineRegionAdded(k))}}
|
|
854
|
+
function ks(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return f=wf,g=e?0:1,h=fk(b,c,d,a.g.retryParameters),D(l,Xr(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function is(a,b){b=dd(a,b);return md(b)?Lb:a.split("/")[0]}function Xr(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);lf(a.G,b);return b.promise}M("shaka.dash.DashParser",Tr);yh["application/dash+xml"]=function(){return new Tr};yh["video/vnd.mpeg.dash.mpd"]=function(){return new Tr};function os(){}M("shaka.dependencies",os);os.has=function(a){return ps.has(a)};os.add=function(a,b){if(!qs[a])throw Error(a+" is not supported");a==rs?Ae("mux.js","mux.js is no longer used in Shaka Player."):ps.set(a,function(){return b})};var rs="muxjs",qs={fk:rs,ISOBoxer:"ISOBoxer"};os.Allowed=qs;var ps=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function ss(a,b,c){this.type=a;this.g=b;this.segments=c||null}function ts(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}ts.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.g?this.g.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};
|
|
855
|
+
function us(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}ts.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function X(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function vs(a,b){a=a.getAttribute(b);if(!a)throw new P(2,4,4023,b);return a.value}function ws(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.ub=c}
|
|
856
856
|
function xs(a,b){this.name=a;this.value=b};function ys(a,b){return a.filter(function(c){return c.name==b})}function zs(a,b){return a.filter(function(c){return vs(c,"TYPE")==b})}function As(a,b){a=ys(a,b);return a.length?a[0]:null}function Bs(a,b,c){c=void 0===c?0:c;return(a=As(a,b))?Number(a.value):c}function Cs(a,b,c){return b?Ds(a,[b],c):[]}
|
|
857
|
-
function Ds(a,b,c){if(!b.length)return[];b=
|
|
858
|
-
function Js(a,b){b=Kf(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
|
|
857
|
+
function Ds(a,b,c){if(!b.length)return[];b=Eb(a,b);a=[];b=t(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=t(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 P(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Es(a){this.h=a||"";this.g=0}function Fs(a){Gs(a,/[ \t]+/gm)}function Gs(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 Hs(a){return a.g==a.h.length?null:(a=Gs(a,/[^ \t\n]*/gm))?a[0]:null};function Is(){this.g=0}
|
|
858
|
+
function Js(a,b){b=Kf(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 P(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Ks(a,f),--a.g,Ls.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=Ks(a,g);if(Ms.includes(g.name)){if(1!=b)throw new P(2,4,4017);g=
|
|
859
859
|
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Ks(a,k),Ls.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==X(k,"TYPE")?f.push(k):"MAP"==X(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new ws(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new ws("",d,f)));return new ss(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
860
|
-
g.name&&(g.g.push(new xs("URI",h)),d=!0)}}return new ss(b,e)}function Ks(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new
|
|
860
|
+
g.name&&(g.g.push(new xs("URI",h)),d=!0)}}return new ss(b,e)}function Ks(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new P(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Es(d);var f;(f=Gs(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Gs(d,g);)c.push(new xs(f[1],f[2]||f[3])),Fs(d)}return new ts(a,b,c,e)}
|
|
861
861
|
var Ls="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(" "),Ms="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Ns(){}function Os(a){try{var b=Ps(a);return df({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return bf(c)}}
|
|
862
|
-
function Ps(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new
|
|
862
|
+
function Ps(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=fg(a):e=Of(a);return{data:e,contentType:c}}M("shaka.net.DataUriPlugin",Ns);Ns.parse=Os;nf("data",Os);function Qs(a){var b=jd(a),c=b.split("/")[0];a=kd(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map}}
|
|
863
863
|
function Rs(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":e.push(v+".42E01E");g=!0;break;case "hev1":case "hvc1":e.push(v+".1.6.L93.90");g=!0;break;case "dvh1":case "dvhe":e.push(v+".05.04");g=!0;break;case "vp09":e.push(v+".00.10.08");g=!0;break;case "av01":e.push(v+".0.01M.08");g=!0;break;case "mp4a":e.push("mp4a.40.2");f=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),f=!0}}var e=[],f=!1,g=!1,h=null,k=null,l=null,m=null,
|
|
864
|
-
n=null;(new Tf).box("moov"
|
|
865
|
-
c).box("Opus",c).box("fLaC",c).box("avc1",function(v){v=
|
|
866
|
-
q.set(b,b);u.h()}return{type:r?"audio":"video",mimeType:r?"audio/mp4":"video/mp4",codecs:Ss(e).join(", "),language:h,height:k,width:l,channelCount:m,sampleRate:n,closedCaptions:q}}function Ss(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=
|
|
867
|
-
this.Ma=new cc(5);this.j=null}p=Ts.prototype;p.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};p.start=function(a,b){var c=this,d;return
|
|
868
|
-
p.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.
|
|
869
|
-
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return
|
|
870
|
-
h&&ct(a);
|
|
871
|
-
function Zs(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,
|
|
872
|
-
b.aa().includes(m)||b.Yg.push(m);n=ys(l.g,"EXT-X-DEFINE");r=et(a,n,m);q=b.stream;u=dt(a,b);v=ft(l,q.mimeType);x=v.keyIds;z=v.drmInfos;y=function(
|
|
873
|
-
|
|
874
|
-
function jt(a,b){for(var c=-1==a.
|
|
875
|
-
function lt(a,b){if(Infinity==a.
|
|
864
|
+
n=null;(new Tf).box("moov",Yf).box("trak",Yf).V("tkhd",function(v){v=Zh(v.reader,v.version);k=String(v.height);l=String(v.width)}).box("mdia",Yf).V("mdhd",function(v){h=Xh(v.reader,v.version).language}).box("minf",Yf).box("stbl",Yf).V("stsd",$f).box("mp4a",function(v){var x=v.reader;x.skip(6);x.skip(2);x.skip(8);var z=x.ob();x.skip(2);x.skip(2);x.skip(2);x=x.ob()+x.ob()/65536;m=z;n=x;v.reader.Fa()?Yf(v):c(v)}).box("esds",function(v){v=$h(v.reader);e.push(v.ra);f=!0}).box("ac-3",c).box("ec-3",c).box("opus",
|
|
865
|
+
c).box("Opus",c).box("fLaC",c).box("avc1",function(v){v=ai(v.reader,v.name);e.push(v.ra);g=!0}).box("avc3",function(v){v=ai(v.reader,v.name);e.push(v.ra);g=!0}).box("hev1",c).box("hvc1",c).box("dvh1",c).box("dvhe",c).box("vp09",c).box("av01",c).box("enca",ag).box("encv",ag).box("sinf",Yf).box("frma",function(v){v=bi(v.reader).ra;d(v)}).parse(a||b,!0);if(!e.length)return null;var r=f&&!g,q=new Map;if(g){var u=new tc("video/mp4");a&&u.init(a);u.i(b);a=t(u.j());for(b=a.next();!b.done;b=a.next())b=b.value,
|
|
866
|
+
q.set(b,b);u.h()}return{type:r?"audio":"video",mimeType:r?"audio/mp4":"video/mp4",codecs:Ss(e).join(", "),language:h,height:k,width:l,channelCount:m,sampleRate:n,closedCaptions:q}}function Ss(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=id(d)[0];b.has(e)||(c.push(d),b.add(e))}return c};function Ts(){var a=this;this.g=this.h=null;this.C=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(Lb,new Map);this.L.set("image",new Map);this.Ha=new Set;this.i=new Map;this.l=null;this.U="";this.ea=new Is;this.K=-1;this.T=Infinity;this.Z=this.Ua=!1;this.u=new xd(function(){Us(a)});this.xa=Vs;this.G=null;this.oa=0;this.m=Infinity;this.va=this.$=this.M=0;this.P=new kf;this.H=new Map;this.I=new Map;this.ha=new Map;this.Ta=this.D=!1;
|
|
867
|
+
this.Ma=new cc(5);this.j=null}p=Ts.prototype;p.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};p.start=function(a,b){var c=this,d;return K(function(e){return 1==e.g?(c.h=b,c.D=b.isLowLatencyMode(),D(e,Ws(c,[a]),2)):3!=e.g?(d=e.h,c.U=d.uri,D(e,Xs(c,d.data,a),3)):e.return(c.G)})};
|
|
868
|
+
p.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.P&&(a.push(this.P.destroy()),this.P=null);this.g=this.h=null;this.Ha.clear();this.G=null;this.i.clear();this.J.clear();this.I.clear();this.s.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
869
|
+
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){if(!Ys(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Zs(a,g));return D(m,Promise.all(b),2)}$s(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.od});d.length&&!h&&(k=at,bt(a,k.sh),l=d.map(function(n){return n.Hb}),a.l.ab(Math.min.apply(Math,w(l))),a.h.updateDuration());
|
|
870
|
+
h&&ct(a);E(m)})};function dt(a,b){return Ys(a)?a.L.get(b.type):b.pe}
|
|
871
|
+
function Zs(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A,B,F,H,G,J,I,L,O,Q,T,Z;return K(function(aa){if(1==aa.g){c=[];d=t(b.aa());for(e=d.next();!e.done;e=d.next())f=e.value,g=new kb(f),h=g.g,b.Sd&&(0<=b.kb&&h.add("_HLS_msn",String(b.kb)),0<=b.mb&&h.add("_HLS_part",String(b.mb))),b.Td&&h.add("_HLS_skip","YES"),Cb(h)&&qb(g,h),c.push(g.toString());return D(aa,Ws(a,c,!0),2)}k=aa.h;if(!b.stream.segmentIndex)return aa.return();l=Js(a.ea,k.data);if(1!=l.type)throw new P(2,4,4017);m=k.uri;m==k.originalUri||
|
|
872
|
+
b.aa().includes(m)||b.Yg.push(m);n=ys(l.g,"EXT-X-DEFINE");r=et(a,n,m);q=b.stream;u=dt(a,b);v=ft(l,q.mimeType);x=v.keyIds;z=v.drmInfos;y=function(la,Na){return la.size===Na.size&&[].concat(w(la)).every(function(Xa){return Na.has(Xa)})};y(q.keyIds,x)||(q.keyIds=x,q.drmInfos=z,a.h.newDrmInfo(q));C=gt(a,l,q,u,r,b.aa);A=C.segments;B=C.bandwidth;q.bandwidth=B;q.segmentIndex.ud(A,a.l.Gb());A.length&&(F=Bs(l.g,"EXT-X-MEDIA-SEQUENCE",0),G=(H=As(l.g,"EXT-X-SKIP"))?Number(X(H,"SKIPPED-SEGMENTS")):0,J=ht(F,A),
|
|
873
|
+
I=J.kb,L=J.mb,b.kb=I+G,b.mb=L,O=u.get(F),q.segmentIndex.rb(O));Q=A[0];b.qc=Q.startTime;T=A[A.length-1];b.Hb=T.endTime;if(Z=As(l.g,"EXT-X-ENDLIST"))b.od=!0;it(a,l);E(aa)})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.i.set(a,Date.now()+6E4)};
|
|
874
|
+
function jt(a,b){for(var c=-1==a.K,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=dt(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.K=Math.max(a.K,k));e.$e=k;break}}}}if(!(0>a.K))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.K-c.$e),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),kt(a,c,d)}
|
|
875
|
+
function lt(a,b){if(Infinity==a.T){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.i&&(a.T=Math.min(a.T,d.i))}}b=a.T;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.i)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.aa(),"Expect AV sync issues!");else for(kt(a,c,f.i-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.jg(b)}}}
|
|
876
876
|
function kt(a,b,c){b.qc+=c;b.Hb+=c;a=dt(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.aa()}
|
|
877
|
-
function Xs(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,
|
|
878
|
-
case 4:return qt(a,l),rt(a,k),f=st(a,l,r,k),g=tt(a,k),D(
|
|
879
|
-
null,bandwidth:
|
|
880
|
-
if(a.
|
|
881
|
-
function mt(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A
|
|
882
|
-
D(B,Bt(a,x,n,{type:1}),4);case 4:z=B.h;(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==y){var
|
|
883
|
-
L=!0}if(
|
|
884
|
-
function ct(a){if(Ys(a)){if(a.xa==Ct){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Hb),c=Math.min(c,e.qc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Ce(b)}}else a.l.ab(Dt(a));a.l.
|
|
885
|
-
function nt(a,b){var c=(new
|
|
886
|
-
function et(a,b,c){c=(new
|
|
887
|
-
function qt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"AUDIO");c=X(d,"VIDEO");var f=X(d,"SUBTITLES");d=Et(a,d);if(f){var g=
|
|
888
|
-
function ot(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"DATA-ID");c=X(d,"URI");var f=X(d,"LANGUAGE");d=X(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Cs([a.
|
|
889
|
-
function pt(a,b){var c,d,e,f,g,h;return
|
|
890
|
-
function tt(a,b){var c=zs(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Ft(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=vs(d.value,"GROUP-ID");if(d=a.
|
|
891
|
-
function ut(a,b,c){var d,e;return
|
|
892
|
-
r=X(g,"CHARACTERISTICS"),q=Jt(a,a.C++,[h],k,"image",m,!1,n,null,null,r,!1,null,!1),u=X(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),x=v.next().value,z=v.next().value;q.stream.width=Number(x)||void 0;q.stream.height=Number(z)||void 0;var y=X(g,"BANDWIDTH");y&&(q.stream.bandwidth=Number(y));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(
|
|
877
|
+
function Xs(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A,B,F,H,G,J,I,L,O,Q,T,Z,aa;return K(function(la){switch(la.g){case 1:d=Js(a.ea,b);e=ys(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},D(la,mt(a,d,v),6);nt(a,e);k=ys(d.g,"EXT-X-MEDIA");l=ys(d.g,"EXT-X-STREAM-INF");m=ys(d.g,"EXT-X-IMAGE-STREAM-INF");n=ys(d.g,"EXT-X-I-FRAME-STREAM-INF");r=ys(d.g,"EXT-X-SESSION-KEY");q=ys(d.g,"EXT-X-SESSION-DATA");u=ys(d.g,"EXT-X-CONTENT-STEERING");ot(a,q);return D(la,pt(a,u),4);
|
|
878
|
+
case 4:return qt(a,l),rt(a,k),f=st(a,l,r,k),g=tt(a,k),D(la,ut(a,m,n),5);case 5:h=la.h;la.F(3);break;case 6:return x=la.h,z=x.type,y=x.mimeType,C=x.codecs,A=x.language,B=x.height,F=x.width,H=x.channelCount,G=x.sampleRate,J=x.closedCaptions,D(la,vt(a,a.C++,d,v,c,C,z,A,!0,"Media Playlist",H,J,null,!1,G,!1,y),7);case 7:I=la.h,a.i.set(c,I),"video"==z&&wt(I.stream,F,B,null,null,null),f.push({id:0,language:Pb(A||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==z?I.stream:null,video:"video"==z?I.stream:
|
|
879
|
+
null,bandwidth:I.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new P(2,7,7001);a.l=new jj(null,0);a.l.Oc(!0);1==d.type&&(Ys(a)&&(xt(a,d),L=a.m,a.u.S(L)),O=Array.from(a.i.values()),yt(a,O),ct(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,type:"HLS",serviceDescription:null};
|
|
880
|
+
if(a.Z||!a.g.hls.disableCodecGuessing){la.F(8);break}Q=[];T=t(a.G.variants);for(Z=T.next();!Z.done;Z=T.next())aa=Z.value,aa.audio&&""===aa.audio.codecs&&Q.push(aa.audio.createSegmentIndex()),aa.video&&""===aa.video.codecs&&Q.push(aa.video.createSegmentIndex());return D(la,Promise.all(Q),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.G),E(la)}})}
|
|
881
|
+
function mt(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A;return K(function(B){switch(B.g){case 1:d=Qs(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return B.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Cs(c(),b.segments[0].h);h=g[0];k=new kb(h);l=k.Sa.split(".").pop();if(m=zt[l])return B.return(Qs(m));n=wf;r=null;q=At(a,b,f.g,c);if(!q){B.F(2);break}u=qf(q.aa(),a.g.retryParameters);return D(B,Bt(a,u,n,{type:0}),3);case 3:v=B.h,r=v.data;case 2:return x=qf(g,a.g.retryParameters),
|
|
882
|
+
D(B,Bt(a,x,n,{type:1}),4);case 4:z=B.h;(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==y){var F=z.data;var H=nc(F);H=(new mi).parse(H);var G=H.kd();H=H.zf();var J=[],I=!1,L=!1;switch(G.audio){case "aac":J.push("mp4a.40.2");I=!0;break;case "mp3":J.push("mp4a.40.34");I=!0;break;case "ac3":J.push("ac-3");I=!0;break;case "ec3":J.push("ec-3"),I=!0}switch(G.video){case "avc":H.ra?J.push(H.ra):J.push("avc1.42E01E");L=!0;break;case "hvc":H.ra?J.push(H.ra):J.push("hvc1.1.6.L93.90"),
|
|
883
|
+
L=!0}if(J.length){G=I&&!L;I=new Map;if(L){L=new tc("video/mp2t");L.i(F);F=t(L.j());for(var O=F.next();!O.done;O=F.next())O=O.value,I.set(O,O);L.h()}H={type:G?"audio":"video",mimeType:"video/mp2t",codecs:J.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,closedCaptions:I}}else H=null;if(C=H)return B.return(C)}else if("mp4"==l||"cmfv"==l||"video/mp4"==y||"audio/mp4"==y||"video/iso.segment"==y)if(A=Rs(r,z.data))return B.return(A);return B.return(d)}})}
|
|
884
|
+
function ct(a){if(Ys(a)){if(a.xa==Ct){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Hb),c=Math.min(c,e.qc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Ce(b)}}else a.l.ab(Dt(a));a.l.le()}
|
|
885
|
+
function nt(a,b){var c=(new kb(a.U)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=X(e,"NAME");var f=X(e,"VALUE");e=X(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)}}
|
|
886
|
+
function et(a,b,c){c=(new kb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=X(f,"NAME"),h=X(f,"VALUE");e=X(f,"QUERYPARAM");f=X(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}
|
|
887
|
+
function qt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"AUDIO");c=X(d,"VIDEO");var f=X(d,"SUBTITLES");d=Et(a,d);if(f){var g=Jb(Lb,d);a.I.set(f,g);xc(d,g)}e&&(f=Jb("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=Jb("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}}
|
|
888
|
+
function ot(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"DATA-ID");c=X(d,"URI");var f=X(d,"LANGUAGE");d=X(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Cs([a.U],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new N("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
889
|
+
function pt(a,b){var c,d,e,f,g,h;return K(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=X(f,"PATHWAY-ID"),h=X(f,"SERVER-URI"),g&&h){a.j=new kr(a.h);a.j.configure(a.g);a.j.j=[a.U];a.j.setManifestType("HLS");a.j.h=g;c=lr(a.j,h);break}return D(k,c,0)})}
|
|
890
|
+
function tt(a,b){var c=zs(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Ft(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=vs(d.value,"GROUP-ID");if(d=a.I.get(e))if(e=a.J.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Gt(Lb,d)||Ht(Lb)}}return b.filter(function(g){return g})}
|
|
891
|
+
function ut(a,b,c){var d,e;return K(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return K(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return D(m,It(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=wa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=vs(g,"URI"),k=X(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=X(g,"LANGUAGE"),n=X(g,"NAME"),
|
|
892
|
+
r=X(g,"CHARACTERISTICS"),q=Jt(a,a.C++,[h],k,"image",m,!1,n,null,null,r,!1,null,!1),u=X(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),x=v.next().value,z=v.next().value;q.stream.width=Number(x)||void 0;q.stream.height=Number(z)||void 0;var y=X(g,"BANDWIDTH");y&&(q.stream.bandwidth=Number(y));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),D(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
893
893
|
function Kt(a,b,c){b=b.filter(function(h){var k=X(h,"URI")||"";return"SUBTITLES"!=X(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=us(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Ft(a,d[g],c)}
|
|
894
894
|
function st(a,b,c,d){var e=[],f=new Set;if(0<c.length){c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=vs(g,"METHOD");if("NONE"!=h&&"AES-128"!=h&&(h=X(g,"KEYFORMAT")||"identity",g=(h=Lt[h])?h(g,""):null)){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}}c={};b=t(b);for(g=b.next();!g.done;g=b.next())g=g.value,h=us(g),c[h]?c[h].push(g):c[h]=[g];b=[];for(var l in c){k=c[l];var m=k[0];g=X(m,"FRAME-RATE");h=Number(X(m,"AVERAGE-BANDWIDTH"))||Number(vs(m,
|
|
895
895
|
"BANDWIDTH"));var n=X(m,"RESOLUTION"),r=t(n?n.split("x"):[null,null]);n=r.next().value;r=r.next().value;var q=X(m,"VIDEO-RANGE");(m=X(m,"REQ-VIDEO-LAYOUT"))&&m.includes(",")&&(m=m.split(",").filter(function(u){return"CH-STEREO"==u||"CH-MONO"==u})[0]);m=m||"CH-MONO";k=Mt(a,k,d);b.push.apply(b,w(Nt(a,k.audio,k.video,h,n,r,g,q,m,e,f)))}return b.filter(function(u){return null!=u})}
|
|
896
|
-
function Mt(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=X(m,"AUDIO");var n=X(m,"VIDEO"),r=l||n;r&&(f.includes(r)||f.push(r),(m=X(m,"PATHWAY-ID"))&&e.set(r,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(vs(v,"GROUP-ID"))}),Kt(a,k,e));k=(e=f.sort().join(","))&&a.
|
|
897
|
-
"URI")});h=d.audio.find(function(v){return v&&v.aa().find(function(x){return q.includes(x)})});g=Et(a,b[0]);n=
|
|
898
|
-
n=X(c,"NAME"),r=Ot(c),Pt(c),m=X(c,"CHARACTERISTICS"),u=Qt(c));a=Rt(a,b,g,h,l,n,r,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}function Et(a,b){var c=X(b,"CODECS")||"";a.
|
|
896
|
+
function Mt(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=X(m,"AUDIO");var n=X(m,"VIDEO"),r=l||n;r&&(f.includes(r)||f.push(r),(m=X(m,"PATHWAY-ID"))&&e.set(r,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(vs(v,"GROUP-ID"))}),Kt(a,k,e));k=(e=f.sort().join(","))&&a.J.has(e)?a.J.get(e):[];g?d.audio.push.apply(d.audio,w(k)):h&&d.video.push.apply(d.video,w(k));l=!1;var q=b.map(function(v){return vs(v,
|
|
897
|
+
"URI")});h=d.audio.find(function(v){return v&&v.aa().find(function(x){return q.includes(x)})});g=Et(a,b[0]);n=Jb("video",g);(r=Jb("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&r&&n?(h="video",g=[[n,r].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=r=n=l=null;!k.length&&(c=c.find(function(v){var x=X(v,"URI")||"",z=X(v,"TYPE");v=vs(v,"GROUP-ID");return"SUBTITLES"!=z&&""==x&&f.includes(v)}))&&(l=X(c,"LANGUAGE"),
|
|
898
|
+
n=X(c,"NAME"),r=Ot(c),Pt(c),m=X(c,"CHARACTERISTICS"),u=Qt(c));a=Rt(a,b,g,h,l,n,r,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}function Et(a,b){var c=X(b,"CODECS")||"";a.Z=0<c.length;a.Z||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),c=b.join(","));a=new Set;b=[];c=t(c.split(/\s*,\s*/));for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=id(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}
|
|
899
899
|
function Ot(a){return(a=X(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function Qt(a){return(a=X(a,"SAMPLE-RATE"))?parseInt(a,10):null}function Pt(a){return(a=X(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
900
900
|
function Nt(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),r=n.next();!r.done;r=n.next())wt(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=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var q=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=q?q.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;r=q?q.stream.drmInfos:null;q=q?q.aa().sort().join(","):"";var u=f?f.aa().sort().join(","):
|
|
901
|
-
"";q=q+" - "+u;h&&k&&!
|
|
902
|
-
function rt(a,b){b=zs(b,"CLOSED-CAPTIONS");b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"LANGUAGE");c=
|
|
903
|
-
function Ft(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=vs(k,"URI");k=vs(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=vs(h,"TYPE").toLowerCase();"subtitles"==k&&(k=
|
|
904
|
-
m=n.next().value;n=n.next().value;(m=c.get(m))&&or(a.j,l,m,n)}}c=X(h,"LANGUAGE");f=X(h,"NAME");m="YES"==X(h,"DEFAULT");n="audio"==k?Ot(h):null;var r="audio"==k?Pt(h):!1,q=X(h,"CHARACTERISTICS"),u="YES"==X(h,"FORCED");h="audio"==k?Qt(h):null;d=Jt(a,l,d,b,k,c,m,f,n,null,q,u,h,r);d.stream&&(d.stream.groupId=g);a.
|
|
905
|
-
function It(a,b){var c,d,e,f,g,h,k,l,m,n;return
|
|
906
|
-
Number(m.split("x")[1]));if(n=X(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return r.return(h)})}
|
|
907
|
-
function
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
901
|
+
"";q=q+" - "+u;h&&k&&!th(n,r)||a.Ha.has(q)||(h={id:a.C++,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.Ha.add(q))}return e}
|
|
902
|
+
function rt(a,b){b=zs(b,"CLOSED-CAPTIONS");b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X(d,"LANGUAGE");c=Pb(e||"und");e||(e=X(d,"NAME"))&&(c=e);e=vs(d,"GROUP-ID");d=vs(d,"INSTREAM-ID").replace("SERVICE","svc");a.H.get(e)||a.H.set(e,new Map);a.H.get(e).set(d,c)}}
|
|
903
|
+
function Ft(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=vs(k,"URI");k=vs(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=vs(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Lb);if(k==Lb)b=X(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.I.has(l)){b=a.I.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.C++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
904
|
+
m=n.next().value;n=n.next().value;(m=c.get(m))&&or(a.j,l,m,n)}}c=X(h,"LANGUAGE");f=X(h,"NAME");m="YES"==X(h,"DEFAULT");n="audio"==k?Ot(h):null;var r="audio"==k?Pt(h):!1,q=X(h,"CHARACTERISTICS"),u="YES"==X(h,"FORCED");h="audio"==k?Qt(h):null;d=Jt(a,l,d,b,k,c,m,f,n,null,q,u,h,r);d.stream&&(d.stream.groupId=g);a.J.has(g)?a.J.get(g).push(d):a.J.set(g,[d]);a.i.set(e,d);return d}
|
|
905
|
+
function It(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(r){if(1==r.g){c=vs(b,"URI");d=X(b,"CODECS","jpeg")||"";if(a.i.has(c))return r.return(a.i.get(c));e=X(b,"LANGUAGE");f=X(b,"NAME");g=X(b,"CHARACTERISTICS");h=Jt(a,a.C++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=X(b,"RESOLUTION"))?D(r,h.stream.createSegmentIndex(),3):r.F(2)}2!=r.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
906
|
+
Number(m.split("x")[1]));if(n=X(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return r.return(h)})}
|
|
907
|
+
function Rt(a,b,c,d,e,f,g,h,k){for(var l=a.C++,m=[],n=t(b),r=n.next();!r.done;r=n.next()){var q=r.value;r=vs(q,"URI");q=X(q,"PATHWAY-ID");a.j&&q&&or(a.j,l,q,r);m.push(r)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=X(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=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=Ib(d,c);d=Jt(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
908
|
+
function Jt(a,b,c,d,e,f,g,h,k,l,m,n,r,q){function u(B){var F,H,G,J,I,L,O,Q,T,Z,aa,la,Na,Xa,Fb,lb,ac;return K(function(Aa){switch(Aa.g){case 1:return F=y.aa(),D(Aa,Ws(a,y.aa(),!0),2);case 2:H=Aa.h;if(B.aborted)return Aa.return();G=H.uri;G==H.originalUri||F.includes(G)||z.push(G);J=Js(a.ea,H.data);I=void 0;if(a.Z||!a.g.hls.disableCodecGuessing){Aa.F(3);break}return D(Aa,mt(a,J,v),4);case 4:L=Aa.h,I=L.mimeType,d=L.codecs;case 3:return O=Ys(a),D(Aa,vt(a,0,J,v,G,d,e,f,g,h,k,l,m,n,r,q,I),5);case 5:Q=Aa.h;
|
|
909
|
+
if(B.aborted)return Aa.return();T=Q.stream;Ys(a)&&!O&&xt(a,J);y.qc=Q.qc;y.Hb=Q.Hb;y.Td=Q.Td;y.Sd=Q.Sd;y.od=Q.od;y.pe=Q.pe;y.kb=Q.kb;y.mb=Q.mb;y.Hf=!0;x.segmentIndex=T.segmentIndex;x.encrypted=T.encrypted;x.drmInfos=T.drmInfos;x.keyIds=T.keyIds;x.mimeType=T.mimeType;x.bandwidth=T.bandwidth;x.codecs=T.codecs||x.codecs;x.drmInfos.length&&a.h.newDrmInfo(x);Z=Mb;if(e==Z.qa||e==Z.W)for(aa=t(a.i.values()),la=aa.next();!la.done;la=aa.next())Na=la.value,Na.Hf||Na.type!=e||(Na.stream.mimeType=T.mimeType);e==
|
|
910
|
+
Z.wa&&(Xa=T.segmentIndex.get(0))&&Xa.g&&(x.mimeType="application/mp4");St(a)&&(a.Ua?yt(a,[y]):(a.Ua=!0,Fb=Array.from(a.i.values()),lb=Fb.filter(function(mb){return mb.stream.segmentIndex}),yt(a,lb),ct(a),ac=a.m,0<ac&&a.u.S(ac)));E(Aa)}})}function v(){return a.j&&1<c.length?pr(a.j,b):z.concat(Ds([a.U],c,a.s))}var x=Tt(a,d,e,f,g,h,k,l,m,n,r,q),z=[],y={stream:x,type:e,Yg:z,aa:v,qc:0,Hb:0,pe:new Map,Td:!1,Sd:!1,od:!1,$e:-1,kb:-1,mb:-1,Hf:!1},C=null,A=new AbortController;x.createSegmentIndex=function(){if(C)return C;
|
|
911
|
+
A=new AbortController;return C=new Promise(function(B){B(u(A.signal))})};x.closeSegmentIndex=function(){C&&!x.segmentIndex&&A.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);C=null};return y}function Dt(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Hb));return b}
|
|
912
|
+
function $s(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Gj(d.segmentIndex,function(e){c.push(e)});a.l.vd(c)}function yt(a,b){if(!Ys(a))for(var c=Dt(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ac(0,c);$s(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?jt(a,b):lt(a,b)}
|
|
912
913
|
function St(a){if(!a.G)return!1;var b=[],c=[];a=t(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}
|
|
913
|
-
function vt(a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x){var z,y,A,
|
|
914
|
-
|
|
915
|
-
return
|
|
916
|
-
function Tt(a,b,c,d,e,f,g,h,k,l,m,n){var r=Gt(c,b)||Ht(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==
|
|
917
|
-
segmentIndex:null,mimeType:r,codecs:b,kind:c==
|
|
914
|
+
function vt(a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x){var z,y,C,A,B,F,H,G,J,I,L,O,Q,T,Z,aa,la,Na,Xa,Fb,lb,ac,Aa;return K(function(mb){if(1==mb.g){if(1!=c.type)throw new P(2,4,4017);z=ys(c.g,"EXT-X-DEFINE");y=et(a,z,e);var hb=As(c.g,"EXT-X-PLAYLIST-TYPE"),Gb=As(c.g,"EXT-X-ENDLIST");Gb=hb&&"VOD"==hb.value||Gb;hb=hb&&"EVENT"==hb.value&&!Gb;hb=!Gb&&!hb;Gb?bt(a,Vs):hb?bt(a,Ct):bt(a,Ut);Ys(a)&&it(a,c);return x?mb.F(2):D(mb,Vt(a,g,f,c,y,d),3)}2!=mb.g&&(x=mb.h);C=ft(c,x);A=C.drmInfos;B=C.keyIds;F=C.encrypted;H=
|
|
915
|
+
C.xh;if(F&&!A.length&&!H)throw new P(2,4,4026);G=Tt(a,f,g,h,k,l,m,n,r,q,u,v);G.encrypted=F;G.drmInfos=A;G.keyIds=B;G.mimeType=x;J=Ys(a)?a.L.get(g):new Map;I=gt(a,c,G,J,y,d);L=I.segments;O=I.bandwidth;G.bandwidth=O;Ys(a)&&it(a,c);Q=L[0].startTime;T=L[L.length-1];Z=T.endTime;aa=new Fj(L);G.segmentIndex=aa;Na=(la=As(c.g,"EXT-X-SERVER-CONTROL"))?null!=la.getAttribute("CAN-SKIP-UNTIL"):!1;Xa=la?null!=la.getAttribute("CAN-BLOCK-RELOAD"):!1;Fb=Bs(c.g,"EXT-X-MEDIA-SEQUENCE",0);lb=ht(Fb,L);ac=lb.kb;Aa=lb.mb;
|
|
916
|
+
return mb.return({stream:G,type:g,Yg:[],aa:d,qc:Q,Hb:Z,Td:Na,Sd:Xa,od:!1,$e:-1,kb:ac,mb:Aa,pe:J,Hf:!1})})}function ht(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{kb:a,mb:c};b=b[b.length-1];var d=b.h;if(!b.h.length)return a++,b.s&&(c=0),{kb:a,mb:c};c=d.length-1;d[d.length-1].m||(a++,c=0);return{kb:a,mb:c}}
|
|
917
|
+
function Tt(a,b,c,d,e,f,g,h,k,l,m,n){var r=Gt(c,b)||Ht(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Lb?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");return{id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
918
|
+
segmentIndex:null,mimeType:r,codecs:b,kind:c==Lb?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Pb(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1}}
|
|
918
919
|
function ft(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=ys(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=vs(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=X(g,"KEYFORMAT")||"identity",g=(h=Lt[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,xh:d}}
|
|
919
|
-
function Wt(a,b,c,d,e){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
|
|
920
|
-
D(u,Bt(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new
|
|
921
|
-
function it(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=As(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=As(b.g,"EXT-X-TARGETDURATION");if(!d)throw new
|
|
922
|
-
b.getAttribute("HOLD-BACK"):null,a.$=c?Number(c.value):0);a.oa=Math.max(d,a.oa)}function xt(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.va)b=a.va;else if(a.$)b=a.$;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.oa*c}a.l.hh(0);a.l.eh(b);a.l.
|
|
920
|
+
function Wt(a,b,c,d,e){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 P(2,4,4042);var f=0,g=X(b,"IV","");if(g){var h=gg(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=Bs(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,r,q;return K(function(u){if(1==u.g)return l=Cs(d(),vs(b,"URI"),e),m=qf([l],a.g.retryParameters),
|
|
921
|
+
D(u,Bt(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new P(2,4,4049);r={name:"AES-CBC"};q=k;return D(u,window.crypto.subtle.importKey("raw",n.data,r,!0,["decrypt"]),3)}q.cryptoKey=u.h;k.fetchKey=void 0;E(u)})}};return k}
|
|
922
|
+
function it(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=As(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=As(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=As(b.g,"EXT-X-PART-INF"))a.M=Number(vs(e,"PART-TARGET"));b=As(b.g,"EXT-X-SERVER-CONTROL");a.D&&a.M?(a.m=a.Ta?5*a.M<=c?Math.min(a.M,a.m):Math.min(c,a.m):Math.min(a.M,a.m),a.va=b?Number(vs(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
923
|
+
b.getAttribute("HOLD-BACK"):null,a.$=c?Number(c.value):0);a.oa=Math.max(d,a.oa)}function xt(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.va)b=a.va;else if(a.$)b=a.$;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.oa*c}a.l.hh(0);a.l.eh(b);a.l.Oc(!1)}
|
|
923
924
|
function At(a,b,c,d,e){var f=As(c,"EXT-X-MAP");if(!f)return null;var g=vs(f,"URI"),h=Cs(d(),g,e);g=[h.toString(),X(f,"BYTERANGE","")].join("-");if(!a.ha.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?"AES-128"==vs(m,"METHOD")&&m.id<f.id&&(k=Wt(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Xt(h,f,l,k);a.ha.set(g,b)}return a.ha.get(g)}
|
|
924
|
-
function Xt(a,b,c,d){var e=0,f=null;b=X(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
|
|
925
|
-
function Yt(a,b,c,d,e,f,g,h,k){var l=d.g,m=As(l,"EXTINF"),n=0,r=0,q=null;d.ub.length&&!a.D&&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 u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=As(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=
|
|
926
|
-
if(!a.D)return null}var z=[];v=!1;var y=null,
|
|
927
|
-
(Q=X(G,"BYTERANGE"),
|
|
928
|
-
1].endTime;else return null;v&&(
|
|
925
|
+
function Xt(a,b,c,d){var e=0,f=null;b=X(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 Dh(function(){return a},e,f,null,null,null,d)}
|
|
926
|
+
function Yt(a,b,c,d,e,f,g,h,k){var l=d.g,m=As(l,"EXTINF"),n=0,r=0,q=null;d.ub.length&&!a.D&&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 u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=As(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=wg(v.value))}var x=Gh;As(l,"EXT-X-GAP")&&(x=2);if(!m){if(0==d.ub.length)throw new P(2,4,4024,"EXTINF");
|
|
927
|
+
if(!a.D)return null}var z=[];v=!1;var y=null,C=!1,A=!1;if(a.D&&d.ub.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=u,F={},H=0;H<d.ub.length;F={bd:F.bd,Ld:F.Ld},H++){var G=d.ub[H],J=0==H?c:z[z.length-1],I=0==H?e:J.endTime,L=Number(X(G,"DURATION"))||a.M;if(L){var O=I+L,Q=0,T=null;"EXT-X-PRELOAD-HINT"==G.name?(Q=(Q=X(G,"BYTERANGE-START"))?Number(Q):0,(J=X(G,"BYTERANGE-LENGTH"))?T=Q+Number(J)-1:Q&&(T=Number.MAX_SAFE_INTEGER)):
|
|
928
|
+
(Q=X(G,"BYTERANGE"),T=t(Zt(J,Q)),Q=T.next().value,T=T.next().value);F.Ld=X(G,"URI");if(F.Ld){J=Gh;"YES"==X(G,"GAP")&&(J=2,C=!0);F.bd=null;var Z=function(la){return function(){null==la.bd&&(la.bd=Cs(h(),la.Ld,f));return la.bd}}(F);n&&0<=Q&&null!=T&&(y=Z,v=!0);I=new Fh(I,O,Z,Q,T,b,0,0,Infinity,[],"",null,B,J,k);"EXT-X-PRELOAD-HINT"==G.name&&(I.If(),A=!0);"YES"!=X(G,"INDEPENDENT")&&0<H&&I.oe();z.push(I);B&&(B+=L)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
|
|
929
|
+
1].endTime;else return null;v&&(C||0!=z[0].bb?(v=!1,y=null):z=[]);(m=As(l,"EXT-X-BYTERANGE"))?(q=t(Zt(c,m.value)),r=q.next().value,q=q.next().value):z.length&&(r=z[0].bb,q=z[z.length-1].Ia);c="";m=null;"image"==g.type&&(c="1x1",g=As(l,"EXT-X-TILES"))&&(c=vs(g,"LAYOUT"),(g=X(g,"DURATION"))&&(m=Number(g)));var aa=null;b=new Fh(e,n,function(){if(y)return y();null==aa&&(aa=Cs(h(),d.h,f));return aa||[]},r,q,b,0,0,Infinity,z,c,m,u,x,k,0<z.length&&!!d.h);v&&(a.Ta=!0,b.Qg(),A&&b.If());return b}
|
|
929
930
|
function Zt(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ia+1,d=c+b-1);return[c,d]}
|
|
930
|
-
function gt(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Bs(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Bs(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=As(b.g,"EXT-X-SKIP"),n=m?Number(X(m,"SKIPPED-SEGMENTS")):0,r=l+n,q=0;Ys(a)&&d.has(r)&&(q=d.get(r));var u=[],v=null;m=[];for(var x=0;x<g.length;x++){var z=g[x],y=0==x?q:v.endTime;r=l+n+x;As(z.g,"EXT-X-DISCONTINUITY")&&k++;var
|
|
931
|
-
b,z.g,f,e);!a.D&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.D=a.h.isLowLatencyMode());if(y=Yt(a,
|
|
932
|
-
u.some(function(B){return null!=B.i}))for(c={},d=0;d<u.length;c={
|
|
933
|
-
t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.i,e=t(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.i=d,d+=f.endTime-f.startTime;a=a.
|
|
934
|
-
function Ht(a){return a==
|
|
931
|
+
function gt(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Bs(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Bs(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=As(b.g,"EXT-X-SKIP"),n=m?Number(X(m,"SKIPPED-SEGMENTS")):0,r=l+n,q=0;Ys(a)&&d.has(r)&&(q=d.get(r));var u=[],v=null;m=[];for(var x=0;x<g.length;x++){var z=g[x],y=0==x?q:v.endTime;r=l+n+x;As(z.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(z.g);for(var A=C.next();!A.done;A=C.next())A=A.value,"EXT-X-KEY"==A.name&&("AES-128"==vs(A,"METHOD")?h=Wt(a,A,b,f,e):h=void 0);d.set(r,y);C=At(a,
|
|
932
|
+
b,z.g,f,e);!a.D&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.D=a.h.isLowLatencyMode());if(y=Yt(a,C,v,z,y,e,c,f,h))(v=Bs(z.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.l=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.K&&r<a.K||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(B,F){return B+F.duration},0),b=Math.round(m.reduce(function(B,F){return B+F.bitrate*F.duration},0)/b*1E3));if(m=
|
|
933
|
+
u.some(function(B){return null!=B.i}))for(c={},d=0;d<u.length;c={Sc:c.Sc,Rc:c.Rc,Hd:c.Hd,Nb:c.Nb,Qc:c.Qc},d++)if(c.Nb=u[d],null==c.Nb.i)for(c.Rc=0,c.Sc=d,e=function(B){return function(){var F=u[B.Sc];if(F){if(null!=F.i)return F.i+B.Rc;B.Rc-=F.endTime-F.startTime;B.Sc+=1}return null}}(c),c.Qc=0,c.Hd=d,f=function(B){return function(){var F=u[B.Hd];if(F){F!=B.Nb&&(B.Qc+=F.endTime-F.startTime);if(null!=F.i)return F.i+B.Qc;--B.Hd}return null}}(c);null==c.Nb.i;)c.Nb.i=f(),null==c.Nb.i&&(c.Nb.i=e());if(m)for(c=
|
|
934
|
+
t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.i,e=t(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.i=d,d+=f.endTime-f.startTime;a=a.T;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.jg(a);return{segments:u,bandwidth:b}}function Gt(a,b){if(a==Lb){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"}
|
|
935
|
+
function Ht(a){return a==Lb?"text/vtt":$t[a].mp4}function Vt(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v;return K(function(x){if(1==x.g){g=wf;h=Math.trunc((d.segments.length-1)/2);k=Cs(f(),d.segments[h].h,e);l=new kb(k[0]);m=l.Sa.split(".").pop();n=$t[b];if((r=n[m])||(r=zt[m])||(r=Gt(b,c)))return x.return(r);q=qf(k,a.g.retryParameters);q.method="HEAD";return D(x,Bt(a,q,g,{type:1}),2)}u=x.h;return(v=u.headers["content-type"])?x.return(v.split(";")[0]):x.return(Ht(b))})}
|
|
935
936
|
function wt(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 Ws(a,b,c){return Bt(a,qf(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
936
|
-
function Us(a){var b,c,d,e,f,g;
|
|
937
|
-
function Ys(a){return a.xa!=Vs}function bt(a,b){a.xa=b;a.l&&a.l.
|
|
937
|
+
function Us(a){var b,c,d,e,f,g;K(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return D(h,a.update(),4);case 4:c=Date.now();Ys(a)&&(d=(c-b)/1E3,a.Ma.sample(1,d),e=a.m,f=Math.max(0,e-dc(a.Ma)),a.u.S(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.u.S(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();E(h)}})}
|
|
938
|
+
function Ys(a){return a.xa!=Vs}function bt(a,b){a.xa=b;a.l&&a.l.Oc(!Ys(a));Ys(a)||a.u.stop()}function Bt(a,b,c,d){if(!a.P)throw new P(2,7,7001);b=a.h.networkingEngine.request(c,b,d);lf(a.P,b);return b.promise}M("shaka.hls.HlsParser",Ts);
|
|
938
939
|
var zt={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},$t={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",
|
|
939
|
-
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"}},Lt={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new
|
|
940
|
-
b=vs(a,"URI");b=Ps(b);b=nc(b.data);b=
|
|
941
|
-
vs(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?
|
|
942
|
-
function cu(a){a=
|
|
940
|
+
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"}},Lt={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);return Hb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=vs(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
941
|
+
b=vs(a,"URI");b=Ps(b);b=nc(b.data);b=Hb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=X(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=vs(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=vs(a,"URI");a=Ps(a);a=nc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=lg(a,b,new Set,0);return Hb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
|
|
942
|
+
vs(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Hb("org.w3.clearkey",null):null}},Vs="VOD",Ut="EVENT",Ct="LIVE",at={sh:Vs,rj:Ut,zj:Ct};yh["application/x-mpegurl"]=function(){return new Ts};yh["application/vnd.apple.mpegurl"]=function(){return new Ts};function au(a){var b=0,c=rc(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=nc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function bu(a){if(a=cu(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=mg(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
|
|
943
|
+
function cu(a){a=fg(a.textContent);a=au(a).filter(function(b){return b.type===du})[0];if(!a)return null;a=Lf(a.value,!0);return(a=Fg(a,"WRMHEADER"))?a:null}var du=1,eu=(new Map).set("com.microsoft.playready",bu).set("com.microsoft.playready.recommendation",bu).set("com.microsoft.playready.software",bu).set("com.microsoft.playready.hardware",bu);function fu(a){if(!gu){gu=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);ju=ku("ftyp",b,d,b,c);b=ku("dref",lu);mu=ku("dinf",b)}this.g=a}
|
|
943
944
|
function nu(a){for(var b=new Uint8Array([]),c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b;b=d.value;d=ku;var f=b.id+1;var g=b.stream.width||0,h=b.stream.height||0;"audio"==b.type&&(h=g=0);var k=b.duration*b.timescale,l=Math.floor(k/(ou+1));k=Math.floor(k%(ou+1));f=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(pu(f,4)),[0,0,0,0],w(pu(l,4)),w(pu(k,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],w(pu(g,2)),[0,0],w(pu(h,
|
|
944
945
|
2)),[0,0]));f=ku("tkhd",f);g=ku;l=b.duration*b.timescale;h=Math.floor(l/(ou+1));l=Math.floor(l%(ou+1));k=b.stream.language;k=k.charCodeAt(0)-96<<10|k.charCodeAt(1)-96<<5|k.charCodeAt(2)-96;h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(pu(b.timescale,4)),w(pu(h,4)),w(pu(l,4)),w(pu(k,2)),[0,0]));h=ku("mdhd",h);l=b;k=new Uint8Array([]);switch(l.type){case "video":k=qu;break;case "audio":k=ru}l=ku("hdlr",k);a:{switch(b.type){case "video":b=ku("minf",ku("vmhd",su),mu,tu(b));break a;
|
|
945
|
-
case "audio":b=ku("minf",ku("smhd",uu),mu,tu(b));break a}b=new Uint8Array([])}b=g("mdia",h,l,b);d=d("trak",f,b);b=
|
|
946
|
-
e);f=new Uint8Array([]);a=t(a.g);for(g=a.next();!g.done;g=a.next())g=new Uint8Array([0,0,0,0].concat(w(pu(g.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),g=ku("trex",g),f=
|
|
946
|
+
case "audio":b=ku("minf",ku("smhd",uu),mu,tu(b));break a}b=new Uint8Array([])}b=g("mdia",h,l,b);d=d("trak",f,b);b=jg(e,d)}d=a.g[0];c=ku;f=d.duration*d.timescale;e=Math.floor(f/(ou+1));f=Math.floor(f%(ou+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(w(pu(d.timescale,4)),w(pu(e,4)),w(pu(f,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]));e=ku("mvhd",
|
|
947
|
+
e);f=new Uint8Array([]);a=t(a.g);for(g=a.next();!g.done;g=a.next())g=new Uint8Array([0,0,0,0].concat(w(pu(g.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),g=ku("trex",g),f=jg(f,g);a=ku("mvex",f);f=new Uint8Array([]);if(d.encrypted)for(d=t(d.stream.drmInfos),g=d.next();!g.done;g=d.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())f=jg(f,h.value.initData);a=c("moov",e,b,a,f);c=new Uint8Array(ju.byteLength+a.byteLength);c.set(ju);c.set(a,ju.byteLength);return c}
|
|
947
948
|
function tu(a){var b=ku,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.za.byteLength)var e=ku("avcC",a.za);else{e=ku;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.cb.length;n++){var r=vu(a.cb[n]);switch(r[0]&31){case 7:g.push(r);f+=r.length+2;break;case 8:h.push(r),f+=r.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
948
949
|
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(w(pu(c,2)),w(pu(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=new Uint8Array([]);
|
|
949
950
|
a.encrypted&&(h=wu(a),d="encv");c=ku(d,c,e,h)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.za.byteLength&&(c=ku("hvcC",a.za)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(w(pu(d,2)),w(pu(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=new Uint8Array([]),a.encrypted&&(h=wu(a),e="encv"),c=ku(e,d,c,h));break;
|
|
950
|
-
case "audio":if(a.codecs.includes("mp3"))a=ku(".mp3",xu(a));else if(a.codecs.includes("ac-3"))c=ku("dac3",a.ma),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=wu(a),d="enca"),a=ku(d,xu(a),c,e);else if(a.codecs.includes("ec-3"))c=ku("dec3",a.ma),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=wu(a),d="enca"),a=ku(d,xu(a),c,e);else{if(0<a.ma.byteLength)c=ku("esds",a.ma);else{c=ku;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=
|
|
951
|
+
case "audio":if(a.codecs.includes("mp3"))a=ku(".mp3",xu(a));else if(a.codecs.includes("ac-3"))c=ku("dac3",a.ma),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=wu(a),d="enca"),a=ku(d,xu(a),c,e);else if(a.codecs.includes("ec-3"))c=ku("dec3",a.ma),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=wu(a),d="enca"),a=ku(d,xu(a),c,e);else{if(0<a.ma.byteLength)c=ku("esds",a.ma);else{c=ku;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Ib("audio",a.codecs.split(","));l={96E3:0,88200:1,
|
|
951
952
|
64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(w(pu(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=wu(a),d="enca");a=ku(d,xu(a),c,e)}c=a}a=ku("stsd",yu,c);return b("stbl",a,ku("stts",zu),ku("stsc",Au),ku("stsz",Bu),ku("stco",Cu))}
|
|
952
953
|
function xu(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(w(pu(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
953
954
|
function wu(a){var b=ku;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(w(pu(d,4))));c=ku("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=ku("schm",d);e=ku;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=vu(h.value)}a=new Uint8Array([0,
|
|
954
955
|
0,0,0,0,0,1,8]);f=ku("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
955
956
|
function Du(a){var b=new Uint8Array([]);a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=ku;var e=new Uint8Array([0,0,0,0].concat(w(pu(c.data?c.data.vb:0,4))));e=ku("mfhd",e);var f;var g=c.data?c.data.$a:[];var h=new Uint8Array(4+g.length);for(f=0;f<g.length;f++){var k=g[f].flags;h[f+4]=k.Wa<<4|k.Ya<<2|k.Xa}g=ku("sdtp",h);var l=g.length+92;h=ku;f=new Uint8Array([0,0,0,58].concat(w(pu(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));f=ku("tfhd",f);k=c.data?c.data.baseMediaDecodeTime:0;
|
|
956
957
|
var m=Math.floor(k%(ou+1));k=new Uint8Array([1,0,0,0].concat(w(pu(Math.floor(k/(ou+1)),4)),w(pu(m,4))));k=ku("tfdt",k);var n=l;l=c.data?c.data.$a:[];m=l.length;var r=12+16*m,q=new Uint8Array(r);n+=8+r;q.set(["video"===c.type?1:0,0,15,1].concat(w(pu(m,4)),w(pu(n,4))),0);for(n=0;n<m;n++){var u=l[n];r=pu(u.duration,4);var v=pu(u.size,4),x=u.flags;u=pu(u.fb,4);q.set([].concat(w(r),w(v),[x.hb<<2|x.Wa,x.Ya<<6|x.Xa<<4|x.ib,x.Va&61440,x.Va&15],w(u)),12+16*n)}l=ku("trun",q);g=h("traf",f,k,l,g);d=d("moof",
|
|
957
|
-
e,g);b=
|
|
958
|
+
e,g);b=jg(b,d,Eu(c))}return b}function Eu(a){a=(a.data?a.data.$a:[]).map(function(b){return b.data});a=jg.apply(cg,w(a));return ku("mdat",a)}function pu(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function vu(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}
|
|
958
959
|
function ku(a){var b=Ga.apply(1,arguments),c=Fu[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Fu[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}
|
|
959
960
|
var gu=!1,ou=Math.pow(2,32)-1,Fu={},qu=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]),ru=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]),zu=new Uint8Array([0,0,0,0,0,0,0,0]),Au=new Uint8Array([0,0,0,0,0,0,0,0]),Cu=new Uint8Array([0,0,0,0,0,0,0,0]),Bu=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),su=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),uu=new Uint8Array([0,
|
|
960
|
-
0,0,0,0,0,0,0]),yu=new Uint8Array([0,0,0,0,0,0,0,1]),ju=new Uint8Array([]),lu=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),mu=new Uint8Array([]);function Gu(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.D=new cc(5);this.s=new
|
|
961
|
-
function Hu(a){var b;
|
|
962
|
-
p.update=function(){var a=this,b;return
|
|
963
|
-
function Iu(a){var b,c,d,e,f,g,h;return
|
|
964
|
-
r=
|
|
965
|
-
[];for(u=0;u<r.length;u++){var v=r[u],x=v.getAttribute("SystemID").toLowerCase(),z=n[x];if(z){var y=cu(v);if(y)a:{y=t(y.getElementsByTagName("DATA"));for(var
|
|
966
|
-
z(v);q.push(x)}}n=q}else n=[];u=n;q=[];n=[];r=[];m=
|
|
967
|
-
|
|
968
|
-
language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!y&&y.primary,audio:u,video:y,bandwidth:
|
|
969
|
-
type:"MSS",serviceDescription:null},a.i.
|
|
970
|
-
function Ju(a,b,c,d,e,f){var g=b.getAttribute("Type");if("audio"!==g&&"video"!==g&&"text"!==g)return Ua("Ignoring unrecognized type:",g),null;var h=b.getAttribute("Language"),k=a.u++,l=
|
|
971
|
-
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:
|
|
961
|
+
0,0,0,0,0,0,0]),yu=new Uint8Array([0,0,0,0,0,0,0,1]),ju=new Uint8Array([]),lu=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),mu=new Uint8Array([]);function Gu(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.D=new cc(5);this.s=new xd(function(){Hu(a)});this.C=new kf;this.m=new Map}p=Gu.prototype;p.configure=function(a){this.g=a};p.start=function(a,b){var c=this;return K(function(d){if(1==d.g)return c.l=[a],c.h=b,D(d,Iu(c),2);if(!c.h)throw new P(2,7,7001);return d.return(c.j)})};
|
|
962
|
+
function Hu(a){var b;K(function(c){switch(c.g){case 1:return ta(c,2),D(c,Iu(a),4);case 4:va(c,3);break;case 2:b=wa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();E(c)}})}p.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.s&&(this.s.stop(),this.s=null);this.m.clear();return this.C.destroy()};
|
|
963
|
+
p.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),D(c,Iu(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);E(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(){};
|
|
964
|
+
function Iu(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=qf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),lf(a.C,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=Hg(f.data,"SmoothStreamingMedia");if(!m)throw new P(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new jj(null,0));if(l=vg(m,"IsLive",Dg,!1))throw new P(2,4,4047);a.i.Oc(!l);var n=vg(m,"TimeScale",Bg,1E7),
|
|
965
|
+
r=vg(m,"DVRWindowLength",Bg);l&&(0===r||isNaN(r))&&(r=Infinity);var q=vg(m,"CanSeek",Dg,!1);0===r&&q&&(r=Infinity);q=null;r&&0<r&&(q=r/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(q=a.g.availabilityWindowOverride);null==q&&(q=Infinity);a.i.Ce(q);r=vg(m,"Duration",Bg,Infinity);l||a.i.ab(r/n);l={variants:[],textStreams:[],timescale:n,duration:r/n};q=ng(m,"Protection");var u;n=a.g.mss.keySystemsBySystemId;r=[];q=t(q);for(u=q.next();!u.done;u=q.next())r=r.concat(ng(u.value,"ProtectionHeader"));if(r.length){q=
|
|
966
|
+
[];for(u=0;u<r.length;u++){var v=r[u],x=v.getAttribute("SystemID").toLowerCase(),z=n[x];if(z){var y=cu(v);if(y)a:{y=t(y.getElementsByTagName("DATA"));for(var C=y.next();!C.done;C=y.next())if(C=mg(C.value,"KID")){y=fg(C.textContent);y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],y[4],y[7],y[6]].concat(w(y.slice(8))));y=ig(y);break a}y=null}else y=null;C=fg(v.textContent);x=gg(x.replace(/-/g,""));x=[{initData:lg(C,x,new Set,0),initDataType:"cenc",keyId:y}];x=Hb(z,x);y&&x.keyIds.add(y);if(z=eu.get(z))x.licenseServerUri=
|
|
967
|
+
z(v);q.push(x)}}n=q}else n=[];u=n;q=[];n=[];r=[];m=ng(m,"StreamIndex");m=t(m);for(v=m.next();!v.done;v=m.next()){v=v.value;z=ng(v,"QualityLevel");x=l.timescale;y=l.duration;C=ng(v,"c");for(var A=[],B=0,F=0;F<C.length;++F){var H=C[F],G=C[F+1],J=vg(H,"t",Bg),I=vg(H,"d",Bg);H=vg(H,"r",zg);if(!I)break;J=null!=J?J:B;H=H||0;if(0>H)if(G){G=vg(G,"t",Bg);if(null==G)break;else if(J>=G)break;H=Math.ceil((G-J)/I)-1}else{if(Infinity==y)break;else if(J/x>=y)break;H=Math.ceil((y*x-J)/I)-1}for(G=0;G<=H;++G)B=J+I,
|
|
968
|
+
A.push({start:J/x,end:B/x,qg:J}),J=B}x=A;z=t(z);for(y=z.next();!y.done;y=z.next())(y=Ju(a,v,y.value,x,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Lb||a.g.disableText||r.push(y):n.push(y):q.push(y))}m=[];q=t(0<q.length?q:[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,v=t(0<n.length?n:[null]),y=v.next();!y.done;y=v.next())z=m,x=z.push,y=y.value,C=0,u&&u.bandwidth&&0<u.bandwidth&&(C+=u.bandwidth),y&&y.bandwidth&&0<y.bandwidth&&(C+=y.bandwidth),y={id:a.u++,
|
|
969
|
+
language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!y&&y.primary,audio:u,video:y,bandwidth:C,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},x.call(z,y);l.variants=m;l.textStreams=r;a.j?(a.j.variants=l.variants,a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,
|
|
970
|
+
type:"MSS",serviceDescription:null},a.i.le());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.D.sample(1,h);E(k)})}
|
|
971
|
+
function Ju(a,b,c,d,e,f){var g=b.getAttribute("Type");if("audio"!==g&&"video"!==g&&"text"!==g)return Ua("Ignoring unrecognized type:",g),null;var h=b.getAttribute("Language"),k=a.u++,l=vg(c,"Bitrate",Ag),m=vg(c,"MaxWidth",Ag),n=vg(c,"MaxHeight",Ag),r=vg(c,"Channels",Ag),q=vg(c,"SamplingRate",Ag),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.ab(Math.min(u,v));var x={id:k,originalId:b.getAttribute("Name")||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
972
|
+
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:Pb(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:r,audioSamplingRate:q,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],
|
|
972
973
|
mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1};if(e=b.getAttribute("Subtype"))(e=Ku[e])&&x.roles.push(e),"main"===e&&(x.primary=!0);e=c.getAttribute("FourCC");if(null===e||""===e)e=b.getAttribute("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(!Lu.includes(e.toUpperCase()))return Ua("Codec not supported:",
|
|
973
|
-
e),null;c=Mu(c,g,e,x);x.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;x.type="audio";x.mimeType="mss/audio/mp4";x.codecs=Nu(e,c);break;case "video":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;x.type="video";x.mimeType="mss/video/mp4";x.codecs=Ou(c);break;case "text":if(x.type=
|
|
974
|
-
if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:x.id,type:x.type,codecs:x.codecs,encrypted:x.encrypted,timescale:x.mssPrivateData.timescale,duration:x.mssPrivateData.duration,cb:z,ma:new Uint8Array([]),za:new Uint8Array([]),data:null,stream:x},z=nu(new fu([z])),a.m.set(x.id,z);z=Pu(a,new
|
|
974
|
+
e),null;c=Mu(c,g,e,x);x.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;x.type="audio";x.mimeType="mss/audio/mp4";x.codecs=Nu(e,c);break;case "video":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;x.type="video";x.mimeType="mss/video/mp4";x.codecs=Ou(c);break;case "text":if(x.type=Lb,x.mimeType="application/mp4","TTML"===e||"DFXP"===e)x.codecs="stpp"}x.createSegmentIndex=function(){if(x.segmentIndex)return Promise.resolve();
|
|
975
|
+
if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:x.id,type:x.type,codecs:x.codecs,encrypted:x.encrypted,timescale:x.mssPrivateData.timescale,duration:x.mssPrivateData.duration,cb:z,ma:new Uint8Array([]),za:new Uint8Array([]),data:null,stream:x},z=nu(new fu([z])),a.m.set(x.id,z);z=Pu(a,new Dh(function(){return[]},0,null,null,void 0,z),x,b,d);x.segmentIndex=new Fj(z);return Promise.resolve()};x.closeSegmentIndex=function(){x.segmentIndex&&
|
|
975
976
|
(x.segmentIndex.release(),x.segmentIndex=null)};return x}
|
|
976
977
|
function Mu(a,b,c,d){if(a=a.getAttribute("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|
|
|
977
978
|
b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Nu(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 Ou(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
978
|
-
function Pu(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={
|
|
979
|
-
|
|
980
|
-
function Vu(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,
|
|
981
|
-
H.value.byteLength;if(!g){
|
|
979
|
+
function Pu(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={$c:g.$c},h=e.next())g.$c=h.value,d.push(new Fh(g.$c.start,g.$c.end,function(k){return function(){return Eb(a.l,[f.replace("{start time}",String(k.$c.qg))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}M("shaka.mss.MssParser",Gu);var Lu="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Ku={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
980
|
+
yh["application/vnd.ms-sstr+xml"]=function(){return new Gu};function Qu(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=Nf(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Ru(){}function Su(a,b,c,d,e){var f=new Tu;Gf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Uu,h={xg:!1,mh:!1};a=Vu(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 af(a,function(){h.xg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new xd(function(){h.mh=!0;g.abort()});k.S(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
981
|
+
function Vu(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,C;return K(function(A){switch(A.g){case 1:return h=Wu,k=Xu,r=n=0,q=Date.now(),ta(A,2),D(A,h(a,c),4);case 4:l=A.h;f(Yu(l.headers));if("HEAD"==c.method){A.F(5);break}u=l.clone().body.getReader();x=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;z=function(B){function F(){var H,G;return K(function(J){switch(J.g){case 1:return ta(J,2),D(J,u.read(),4);case 4:H=J.h;va(J,3);break;case 2:return wa(J),J.return();case 3:if(H.done){J.F(5);break}n+=
|
|
982
|
+
H.value.byteLength;if(!g){J.F(5);break}return D(J,g(H.value),5);case 5:G=Date.now();if(100<G-q||H.done)e(G-q,n-r,x-n),r=n,q=G;H.done?B.close():(B.enqueue(H.value),F());E(J)}})}F()};new k({start:z});return D(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:va(A,3);break;case 2:y=wa(A);if(d.xg)throw new P(1,1,7001,a,b);if(d.mh)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,y,b);case 3:return C=Yu(l.headers),A.return(Qu(C,m,l.status,a,l.url,b))}})}
|
|
982
983
|
function Yu(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Zu(){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)}M("shaka.net.HttpFetchPlugin",Ru);Ru.isSupported=Zu;Ru.parse=Su;var Wu=window.fetch,Uu=window.AbortController,Xu=window.ReadableStream,Tu=window.Headers;
|
|
983
984
|
Zu()&&(nf("http",Su,2,!0),nf("https",Su,2,!0),nf("blob",Su,2,!0));function $u(){}
|
|
984
|
-
function av(a,b,c,d,e){var f=new bv,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
|
|
985
|
-
c))};f.ontimeout=function(){m(new
|
|
985
|
+
function av(a,b,c,d,e){var f=new bv,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 P(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=cv(f);e(q);n=!0}};f.onload=function(){var q=cv(f),u=f.response;try{var v=Qu(q,u,f.status,a,f.responseURL,c);l(v)}catch(x){m(x)}};f.onerror=function(q){m(new P(1,1,1002,a,q,
|
|
986
|
+
c))};f.ontimeout=function(){m(new P(1,1,1003,a,c))};f.onprogress=function(q){var u=Date.now();if(100<u-g||q.lengthComputable&&q.loaded==q.total)d(u-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=u};for(var r in b.headers)f.setRequestHeader(r.toLowerCase(),b.headers[r]);f.send(b.body)});return new af(k,function(){f.abort();return Promise.resolve()})}
|
|
986
987
|
function cv(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",$u);$u.parse=av;var bv=window.XMLHttpRequest;nf("http",av,1,!0);nf("https",av,1,!0);nf("blob",av,1,!0);function dv(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function ev(a){return a.aa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.bb+":"+a.Ia}function fv(a,b){return fk(a.g.aa(),a.g.bb,a.g.Ia,b.streaming.retryParameters)};function gv(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function hv(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}gv.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 iv(a){var b=this;this.s=a;this.j=new Map;this.i=new yf(function(){return jv(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new gv}iv.prototype.destroy=function(){return this.i.destroy()};function kv(a,b,c){a.m=b;a.l=c}function jv(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
987
|
-
function lv(a,b,c,d,e,f){zf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,r,q;return
|
|
988
|
-
function mv(a,b){var c,d,e,f;return
|
|
989
|
-
function pv(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return
|
|
990
|
-
p.updateManifest=function(){return Promise.reject(new
|
|
991
|
-
p.getManifests=function(a){var b=this,c;return
|
|
992
|
-
function uv(a){return Promise.reject(new
|
|
993
|
-
function vv(a,b,c,d){a=rv(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={
|
|
994
|
-
function wv(a,b,c){var d,e,f,g,h,k,l;return
|
|
995
|
-
yv.prototype.remove=function(a){var b=this,c;return
|
|
996
|
-
function Bv(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{jb:d,Na:f},Na:e})})});if(b)return b;throw new
|
|
997
|
-
function Dv(a,b,c){a=a.g.get(b);if(!a)throw new
|
|
998
|
-
function Gv(a){var b,c,d;return
|
|
999
|
-
Iv.prototype.
|
|
988
|
+
function lv(a,b,c,d,e,f){zf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,r,q;return K(function(u){if(1==u.g)return D(u,mv(a,c),2);h=u.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=nc(h),l=new kg(k),l.data)n=Number(m),r=l.data[n],q=l.g[n],a.l(r,q);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function nv(a){return K(function(b){return 1==b.g?D(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
989
|
+
function mv(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=wf,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),D(g,d.promise,2);f=g.h;xc(a.h,e);return g.return(f.data)})};function ov(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new $e;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ov.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return D(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);E(b)})};
|
|
990
|
+
function pv(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return D(g,b(f.key,f.value,f),2)}f.continue();E(g)})}})}ov.prototype.store=function(){return this.h};ov.prototype.promise=function(){return this.g};function qv(a){this.h=a;this.g=[]}qv.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function rv(a,b){return sv(a,b,"readwrite")}function sv(a,b,c){c=a.h.transaction([b],c);var d=new ov(c,b);a.g.push(d);d.promise().then(function(){xc(a.g,d)},function(){xc(a.g,d)});return d};function tv(a,b,c){this.h=new qv(a);this.i=b;this.g=c}p=tv.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return uv(this.i)};p.removeSegments=function(a,b){return vv(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return D(d,wv(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Bg(e)}))})};p.addManifests=function(){return uv(this.g)};
|
|
991
|
+
p.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function xv(a,b,c){a=rv(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=rv(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()};p.removeManifests=function(a,b){return vv(this,this.g,a,b)};
|
|
992
|
+
p.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return D(d,wv(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.hd(e)})))})};p.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=sv(a.h,a.g,"readonly"),c=new Map,D(d,pv(b,function(e,f){var g;return K(function(h){if(1==h.g)return D(h,a.hd(f),2);g=h.h;c.set(e,g);E(h)})}),2)):3!=d.g?D(d,b.promise(),3):d.return(c)})};p.Bg=function(a){return a};p.hd=function(a){return Promise.resolve(a)};
|
|
993
|
+
function uv(a){return Promise.reject(new P(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=rv(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Md:g.Md},k=h.next())l=k.value,g.Md=e.add(l),g.Md.onsuccess=function(n){return function(){f.push(n.Md.result)}}(g);return D(m,d.promise(),2)}return m.return(f)})};
|
|
994
|
+
function vv(a,b,c,d){a=rv(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Kd:e.Kd},f=c.next())e.Kd=f.value,b.delete(e.Kd).onsuccess=function(g){return function(){return d(g.Kd)}}(e);return a.promise()}
|
|
995
|
+
function wv(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=sv(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Yc:h.Yc,Vc:h.Vc},l=k.next())h.Vc=l.value,h.Yc=e.get(h.Vc),h.Yc.onsuccess=function(n){return function(){void 0==n.Yc.result&&g.push(n.Vc);f[n.Vc]=n.Yc.result}}(h);return D(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function yv(a){this.g=new qv(a)}yv.prototype.destroy=function(){return this.g.destroy()};yv.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=sv(a.g,"session-ids","readonly"),c=[],D(d,pv(b,function(e,f){c.push(f)}),2)):3!=d.g?D(d,b.promise(),3):d.return(c)})};yv.prototype.add=function(a){var b=rv(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
996
|
+
yv.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=rv(b.g,"session-ids"),D(d,pv(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):D(d,c.promise(),0)})};function zv(){this.g=new Map}zv.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};zv.prototype.init=function(){var a=this;Av.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
997
|
+
function Bv(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{jb:d,Na:f},Na:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Cv(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({jb:d,Na:f},e)})})}
|
|
998
|
+
function Dv(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function Ev(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Fv(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
999
|
+
function Gv(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Av,d.forEach(function(f){(f=f())&&b.push(f)})),D(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.F(0):D(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Hv(a,b){Av.set(a,b)}M("shaka.offline.StorageMuxer",zv);zv.unregister=function(a){Av.delete(a)};zv.register=Hv;zv.prototype.destroy=zv.prototype.destroy;var Av=new Map;function Iv(){tv.apply(this,arguments)}pa(Iv,tv);Iv.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=rv(c.h,c.g);e=d.store();f=new $e;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return D(g,Promise.all([d.promise(),f]),0)})};
|
|
1000
|
+
Iv.prototype.hd=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Jv(a.periods[c],e),b.push(f);return D(h,xr(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1000
1001
|
function Jv(a,b){Kv(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Lv(e,a.startTime,b)})}
|
|
1001
1002
|
function Lv(a,b,c){var d=a.initSegmentUri?Mv(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1002
1003
|
Mv(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Iv.prototype.Bg=function(a){return{data:a.data}};
|
|
1003
|
-
function Mv(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new
|
|
1004
|
+
function Mv(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new P(2,9,9004,"Could not parse uri "+a);}
|
|
1004
1005
|
function Kv(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
1005
1006
|
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Nv(){tv.apply(this,arguments)}pa(Nv,tv);
|
|
1006
|
-
Nv.prototype.
|
|
1007
|
+
Nv.prototype.hd=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Ov(n,k.startTime,k.startTime+e));f=l;b.push(f)}return D(h,xr(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1007
1008
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1008
1009
|
function Ov(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1009
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function Pv(){tv.apply(this,arguments)}pa(Pv,tv);p=Pv.prototype;p.hasFixedKeySpace=function(){return!1};p.addSegments=function(a){return this.add(this.i,a)};p.addManifests=function(a){return this.add(this.g,a)};p.updateManifest=function(a,b){return xv(this,a,b)};p.
|
|
1010
|
-
p.init=function(){var a=this,b=new $e,c=!1,d=new
|
|
1011
|
-
new Nv(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Pv(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new yv(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new
|
|
1012
|
-
9,9001,e.error)),d.stop(),f.preventDefault())};return b};p.destroy=function(){var a=this;return
|
|
1010
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function Pv(){tv.apply(this,arguments)}pa(Pv,tv);p=Pv.prototype;p.hasFixedKeySpace=function(){return!1};p.addSegments=function(a){return this.add(this.i,a)};p.addManifests=function(a){return this.add(this.g,a)};p.updateManifest=function(a,b){return xv(this,a,b)};p.hd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Qv(){this.m=this.j=this.i=this.h=this.g=this.l=null}p=Qv.prototype;
|
|
1011
|
+
p.init=function(){var a=this,b=new $e,c=!1,d=new xd(function(){c=!0;b.reject(new P(2,9,9017))});d.S(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Iv(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Nv(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1012
|
+
new Nv(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Pv(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new yv(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new P(2,
|
|
1013
|
+
9,9001,e.error)),d.stop(),f.preventDefault())};return b};p.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.F(2);break}return D(b,a.g.destroy(),2);case 2:if(!a.h){b.F(4);break}return D(b,a.h.destroy(),4);case 4:if(!a.i){b.F(6);break}return D(b,a.i.destroy(),6);case 6:if(!a.j){b.F(8);break}return D(b,a.j.destroy(),8);case 8:if(!a.m){b.F(10);break}return D(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),E(b)}})};
|
|
1013
1014
|
p.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};p.getEmeSessionCell=function(){return this.m};
|
|
1014
|
-
p.erase=function(){var a=this;return
|
|
1015
|
-
function Rv(){var a=new $e,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new
|
|
1015
|
+
p.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.F(2);break}return D(b,a.g.destroy(),2);case 2:if(!a.h){b.F(4);break}return D(b,a.h.destroy(),4);case 4:if(!a.i){b.F(6);break}return D(b,a.i.destroy(),6);case 6:if(!a.j){b.F(8);break}return D(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),D(b,Rv(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,D(b,a.init(),0)}})};
|
|
1016
|
+
function Rv(){var a=new $e,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Hv("idb",function(){return Dd("CrKey")||Cd()||!window.indexedDB?null:new Qv});function Sv(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Sv.prototype.jb=function(){return this.i};Sv.prototype.Na=function(){return this.h};Sv.prototype.key=function(){return this.l};Sv.prototype.toString=function(){return this.j};
|
|
1016
1017
|
function Tv(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 Sv(b,c,d,Number(a[4])):null};function Uv(a,b){this.h=a;this.g=b}
|
|
1017
|
-
function Vv(a,b){var c=new jj(null,0);c.ab(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Wv(a,d,e,c);e=b.streams.filter(function(l){return l.type==
|
|
1018
|
+
function Vv(a,b){var c=new jj(null,0);c.ab(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Wv(a,d,e,c);e=b.streams.filter(function(l){return l.type==Lb}).map(function(l){return Xv(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Xv(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
1018
1019
|
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}}
|
|
1019
1020
|
function Wv(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
1020
1021
|
b.next())for(e=e.value,g=Xv(a,e,d),h=t(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=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Xv(a,e,d),g=t(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}
|
|
1021
|
-
function Xv(a,b,c){var d=b.segments.map(function(e){return Yv(a,e)});c.
|
|
1022
|
+
function Xv(a,b,c){var d=b.segments.map(function(e){return Yv(a,e)});c.vd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1022
1023
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching}}
|
|
1023
|
-
function Yv(a,b){var c=new Sv("segment",a.h,a.g,b.dataKey);return new
|
|
1024
|
-
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
1024
|
+
function Yv(a,b){var c=new Sv("segment",a.h,a.g,b.dataKey);return new Fh(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Zv(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}function Zv(a,b){var c=new Sv("segment",a.h,a.g,b);return new Dh(function(){return[c.toString()]},0,null)};function $v(){this.g=null}p=$v.prototype;p.configure=function(){};
|
|
1025
|
+
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=Tv(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new zv;ua(m,2);return D(m,e.init(),4);case 4:return D(m,Dv(e,d.jb(),d.Na()),5);case 5:return f=m.h,D(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Uv(d.jb(),d.Na()),l=Vv(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),D(m,e.destroy(),7);case 7:ya(m,0)}})};p.stop=function(){return Promise.resolve()};
|
|
1025
1026
|
p.update=function(){};
|
|
1026
|
-
p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
1027
|
-
p.onInitialVariantChosen=function(){};p.banLocation=function(){};
|
|
1028
|
-
function cw(a,b){var c=new zv;return df(void 0).Ba(function(){return c.init()}).Ba(function(){return Dv(c,b.jb(),b.Na())}).Ba(function(d){return d.getSegments([b.key()])}).Ba(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}M("shaka.offline.OfflineScheme",aw);aw.plugin=bw;nf("offline",bw);function dw(a,b,c){var d,e,f,g,h,k;return
|
|
1029
|
-
function fw(a,b,c){var d,e;return
|
|
1030
|
-
9);case 9:return f.return([]);case 7:return e=[],D(f,Promise.all(c.sessionIds.map(function(g){return
|
|
1027
|
+
p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new zv,ta(m,2,3),D(m,e.init(),5);case 5:return D(m,Dv(e,d.jb(),d.Na()),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.F(3);break}return D(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),D(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.F(3)}})};
|
|
1028
|
+
p.onInitialVariantChosen=function(){};p.banLocation=function(){};yh["application/x-offline-manifest"]=function(){return new $v};function aw(){}function bw(a){var b=Tv(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=df(a)):a=b&&"segment"==b.g?cw(b.key(),b):bf(new P(2,1,9004,a));return a}
|
|
1029
|
+
function cw(a,b){var c=new zv;return df(void 0).Ba(function(){return c.init()}).Ba(function(){return Dv(c,b.jb(),b.Na())}).Ba(function(d){return d.getSegments([b.key()])}).Ba(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}M("shaka.offline.OfflineScheme",aw);aw.plugin=bw;nf("offline",bw);function dw(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),r=n.next();!r.done;r=n.next()){r=r.value;for(var q=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,ew(v.info,r)){v.sessionIds.push(r.sessionId);q=!0;break}q||m.push({info:r,sessionIds:[r.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.F(4);break}g=f.value;h=fw(a,b,g);return D(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.F(2);break;case 4:return l.return(d)}})}
|
|
1030
|
+
function fw(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new Ig({rc:b,onError:function(){},we:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),D(f,Qg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),D(f,d.destroy(),5);case 5:return f.return([]);case 3:return ta(f,6),D(f,ah(d),8);case 8:va(f,7);break;case 6:return wa(f),D(f,d.destroy(),
|
|
1031
|
+
9);case 9:return f.return([]);case 7:return e=[],D(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return ta(h,2),D(h,bh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);E(h)})})),10);case 10:return D(f,d.destroy(),11);case 11:return f.return(e)}})}
|
|
1031
1032
|
function ew(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&yc(a.audioCapabilities,b.audioCapabilities,c)&&yc(a.videoCapabilities,b.videoCapabilities,c)};function gw(a,b,c){var d=b.presentationTimeline.getDuration();b=hw(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function iw(a,b){var c=Vv(new Uv(a.jb(),a.Na()),b),d=b.appMetadata||{};c=hw(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}}
|
|
1032
|
-
function hw(a){var b=[],c=
|
|
1033
|
-
case 4:b.h=null,b.g=null,
|
|
1034
|
-
p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new iv(this.g);this.j.push(f);b=pw(this,a,b||{},function(){var g;return
|
|
1035
|
-
function pw(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
1036
|
-
r,b,c,e,f),v=u.Ei,x=u.lg,D(
|
|
1037
|
-
function xw(a,b,c,d,e,f,g,h,k){var l,m,n,r,q,u,v,x,z,y;return
|
|
1038
|
-
nv(e),2)}if(!B)return Q.F(0);tw(a);zw(h,d,k,f);return D(Q,g.updateManifest(c,d),0)})};r=!1;ta(
|
|
1039
|
-
wa(
|
|
1040
|
-
function Cw(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x;return
|
|
1033
|
+
function hw(a){var b=[],c=qe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(he(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ie(c.value));return b};function jw(){this.g={}}function kw(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 lw(a,b){a.g[b.id]=b.bandwidth||2048}function mw(a,b){a=a.g[b];null==a&&(a=0);return a};function nw(a){var b=this;if(a&&a.constructor!=V)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Tb()):(this.h=Jl(),this.g=new mf);this.i=[];this.j=[];var c=!a;this.l=new yf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return D(k,Promise.all(b.j.map(function(l){return jv(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return D(k,Promise.all(e),3);case 3:if(!c){k.F(4);break}return D(k,b.g.destroy(),4);
|
|
1034
|
+
case 4:b.h=null,b.g=null,E(k)}})})}function ow(){if(yd())a:{var a=t(Av.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}p=nw.prototype;p.destroy=function(){return this.l.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zl(a,b));return Ll(this.h,a)};p.getConfiguration=function(){var a=Jl();Ll(a,this.h,Jl());return a};p.Tb=function(){return this.g};
|
|
1035
|
+
p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new iv(this.g);this.j.push(f);b=pw(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.F(2):D(h,Lk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=xh(a,c||null);return h.return(g())})},e,f);b=new af(b,function(){return jv(f)});b.finally(function(){xc(d.j,f)});return qw(this,b)};
|
|
1036
|
+
function pw(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x,z,y,C;return K(function(A){switch(A.g){case 1:return rw(),h=g=null,k=new zv,n=m=l=null,ta(A,2,3),D(A,d(),5);case 5:return g=A.h,D(A,sw(a,b,g,e),6);case 6:r=A.h;tw(a);q=!r.presentationTimeline.R()&&!r.presentationTimeline.mc();if(!q)throw new P(2,9,9005,b);return D(A,uw(a,r,function(B){n=n||B},e),7);case 7:h=A.h;tw(a);if(n)throw n;return D(A,vw(r,h,e),8);case 8:return D(A,k.init(),9);case 9:return tw(a),D(A,Bv(k),10);case 10:return l=A.h,tw(a),u=ww(h,
|
|
1037
|
+
r,b,c,e,f),v=u.Ei,x=u.lg,D(A,l.Na.addManifests([v]),11);case 11:z=A.h;tw(a);m=z[0];tw(a);if(n)throw n;return D(A,xw(a,x,m,v,f,e,l.Na,r,h),12);case 12:return tw(a),y=new Sv("manifest",l.path.jb,l.path.Na,m),A.return(iw(y,v));case 3:return xa(A),D(A,k.destroy(),13);case 13:if(!g){A.F(14);break}return D(A,g.stop(),14);case 14:if(!h){A.F(16);break}return D(A,h.destroy(),16);case 16:ya(A,0);break;case 2:C=wa(A);if(null==m){A.F(18);break}return D(A,yw(m),18);case 18:throw n||C;}})}
|
|
1038
|
+
function xw(a,b,c,d,e,f,g,h,k){var l,m,n,r,q,u,v,x,z,y;return K(function(C){switch(C.g){case 1:l={};m=0;n=function(A,B){var F,H,G,J,I,L,O;return K(function(Q){if(1==Q.g){F={};H=t(A);for(G=H.next();!G.done;F={cc:F.cc},G=H.next())F.cc=G.value,J=fv(F.cc,f),I=F.cc.i,L=F.cc.h,O=function(T){return function(Z){var aa,la,Na;return K(function(Xa){if(1==Xa.g)return D(Xa,g.addSegments([{data:Z}]),2);aa=Xa.h;tw(a);la=T.cc.g;Na=ev(la);l[Na]=aa[0];m+=Z.byteLength;E(Xa)})}}(F),lv(e,F.cc.groupId,J,I,L,O);return D(Q,
|
|
1039
|
+
nv(e),2)}if(!B)return Q.F(0);tw(a);zw(h,d,k,f);return D(Q,g.updateManifest(c,d),0)})};r=!1;ta(C,2);if(!Aw(h)||!r||Bw(h)){C.F(4);break}return D(C,n(b.filter(function(A){return A.h}),!0),5);case 5:return tw(a),b=b.filter(function(A){return!A.h}),q=l,u=m,l={},m=0,D(C,Cw(g,c,d,q,u,function(){return tw(a)}),6);case 6:tw(a);case 4:if(r){C.F(7);break}return D(C,n(b,!1),8);case 8:return tw(a),v=l,x=m,l={},m=0,D(C,Cw(g,c,d,v,x,function(){return tw(a)}),9);case 9:tw(a);case 7:va(C,0);break;case 2:return z=
|
|
1040
|
+
wa(C),y=Object.values(l),D(C,g.removeSegments(y,function(){}),10);case 10:throw z;}})}function yw(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new zv,D(f,b.init(),2);case 2:return D(f,Bv(b),3);case 3:return c=f.h,d=new Sv("manifest",c.path.jb,c.path.Na,a),D(f,b.destroy(),4);case 4:return e=new nw,D(f,e.remove(d.toString()),0)}})}
|
|
1041
|
+
function Cw(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x;return K(function(z){switch(z.g){case 1:g=!1;ta(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),r=n.next();!r.done;r=n.next())q=r.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
|
|
1041
1042
|
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return D(z,a.updateManifest(b,c),4);case 4:g=!0;f();va(z,0);break;case 2:return v=wa(z),D(z,yw(b),5);case 5:if(g){z.F(6);break}x=Object.values(d);return D(z,a.removeSegments(x,function(){}),6);case 6:throw v;}})}
|
|
1042
|
-
function vw(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,
|
|
1043
|
-
for(v=u.next();!v.done;v=u.next())x=v.value,e.push(
|
|
1044
|
-
|
|
1045
|
-
function ww(a,b,c,d,e,f){var g=gw(c,b,d),h=e.offline.progressCallback;kv(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u
|
|
1046
|
-
r&&n&&(r.initData=[]);return{Ei:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.
|
|
1047
|
-
function Bw(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 zw(a,b,c,d){b.expiration=c.
|
|
1048
|
-
function Hw(a,b){var c,d,e,f,g,h;return
|
|
1049
|
-
function Kw(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:
|
|
1043
|
+
function vw(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A,B,F,H,G,J,I,L,O,Q,T;return K(function(Z){switch(Z.g){case 1:return d={width:Infinity,height:Infinity},Rd(a,c.restrictions,d),D(Z,Ud(b,a,c.offline.usePersistentLicense),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Pd(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(he(m));n=t(a.textStreams);for(r=n.next();!r.done;r=n.next())q=r.value,e.push(ie(q));u=t(a.imageStreams);
|
|
1044
|
+
for(v=u.next();!v.done;v=u.next())x=v.value,e.push(je(x));return D(Z,c.offline.trackSelectionCallback(e),3);case 3:z=Z.h;y=a.presentationTimeline.getDuration();C=0;A=t(z);for(B=A.next();!B.done;B=A.next())F=B.value,H=F.bandwidth*y/8,C+=H;ta(Z,4);return D(Z,c.offline.downloadSizeCallback(C),6);case 6:G=Z.h;if(!G)throw new P(2,9,9014);va(Z,5);break;case 4:J=wa(Z);if(J instanceof P)throw J;throw new P(2,9,9015);case 5:I=new Set;L=new Set;O=new Set;Q=t(z);for(B=Q.next();!B.done;B=Q.next())T=B.value,"variant"==
|
|
1045
|
+
T.type&&I.add(T.id),"text"==T.type&&L.add(T.id),"image"==T.type&&O.add(T.id);a.variants=a.variants.filter(function(aa){return I.has(aa.id)});a.textStreams=a.textStreams.filter(function(aa){return L.has(aa.id)});a.imageStreams=a.imageStreams.filter(function(aa){return O.has(aa.id)});Dw(a);E(Z)}})}
|
|
1046
|
+
function ww(a,b,c,d,e,f){var g=gw(c,b,d),h=e.offline.progressCallback;kv(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Yg(a,"cenc",q)});var k=Aw(b)&&!Bw(b),l=null;k&&(l=Ew.get(a.g.keySystem));for(var m=new jw,n=t(b.textStreams),r=n.next();!r.done;r=n.next())m.g[r.value.id]=52;n=t(b.imageStreams);for(r=n.next();!r.done;r=n.next())lw(m,r.value);r=t(b.variants);for(n=r.next();!n.done;n=r.next())kw(m,n.value);m=Fw(f,m,b,e);f=m.streams;m=m.lg;r=a.g;n=e.offline.usePersistentLicense;
|
|
1047
|
+
r&&n&&(r.initData=[]);return{Ei:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.md(),streams:f,sessionIds:n?hh(a):[],drmInfo:r,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},lg:m}}function Aw(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1048
|
+
function Bw(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 zw(a,b,c,d){b.expiration=c.md();c=hh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Aw(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}p.remove=function(a){return Gw(this,Hw(this,a))};
|
|
1049
|
+
function Hw(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:rw();c=Tv(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new zv;ua(k,2);return D(k,e.init(),4);case 4:return D(k,Dv(e,d.jb(),d.Na()),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([Iw(a,h,e),Jw(f,d,h)]),2);case 2:return xa(k),D(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
1050
|
+
function Kw(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:dd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:dd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Iw(a,b,c){return K(function(d){return D(d,Lw(a.g,a.h.drm,c,b),0)})}
|
|
1050
1051
|
function Jw(a,b,c){function d(){}var e=Mw(c);iw(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Si=function(){return Gw(this,Nw(this))};
|
|
1051
|
-
function Nw(a){var b,c,d,e,f,g,h,k,l,m;return
|
|
1052
|
-
p.list=function(){return Gw(this,Ow())};function Ow(){var a,b,c;return
|
|
1053
|
-
function sw(a,b,c,d){var e,f,g,h,k;return
|
|
1054
|
-
c.configure(d.manifest),tw(a),D(l,c.start(b,g),2);if(3!=l.g)return h=l.h,tw(a),k=Pw(h),D(l,Promise.all(db(k,function(m){return m.createSegmentIndex()})),3);tw(a);if(e)throw e;return l.return(h)})}function uw(a,b,c,d){var e;return
|
|
1052
|
+
function Nw(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return rw(),b=a.g,c=a.h.drm,d=new zv,e=!1,ua(n,2),D(n,d.init(),4);case 4:f=[],Ev(d,function(r){return f.push(r)}),g=t(f),h=g.next();case 5:if(h.done){n.F(2);break}k=h.value;return D(n,k.getAll(),8);case 8:return l=n.h,D(n,dw(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.F(5);break;case 2:return xa(n),D(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
|
|
1053
|
+
p.list=function(){return Gw(this,Ow())};function Ow(){var a,b,c;return K(function(d){switch(d.g){case 1:return rw(),a=[],b=new zv,ua(d,2),D(d,b.init(),4);case 4:return c=Promise.resolve(),Cv(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return D(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=iw(new Sv("manifest",e.jb,e.Na,l),k);a.push(k)});E(h)})})}),D(d,c,2);case 2:return xa(d),D(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
|
|
1054
|
+
function sw(a,b,c,d){var e,f,g,h,k;return K(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}},
|
|
1055
|
+
c.configure(d.manifest),tw(a),D(l,c.start(b,g),2);if(3!=l.g)return h=l.h,tw(a),k=Pw(h),D(l,Promise.all(db(k,function(m){return m.createSegmentIndex()})),3);tw(a);if(e)throw e;return l.return(h)})}function uw(a,b,c,d){var e;return K(function(f){return 1==f.g?(e=new Ig({rc:a.g,onError:c,we:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),D(f,Ng(e,b.variants,d.offline.usePersistentLicense),2)):3!=f.g?D(f,$g(e),3):f.return(e)})}
|
|
1055
1056
|
function Fw(a,b,c,d){var e=new Map,f=Pw(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Qw(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),lg:Array.from(e.values())}}
|
|
1056
1057
|
function Qw(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,
|
|
1057
1058
|
spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;Rw(d,c.presentationTimeline.Gb(),function(l){var m=ev(l),n=void 0;if(!f.has(m)){var r=l.endTime-l.startTime;r=mw(b,d.id)*r;r=hv(a.g,r);f.set(m,new dv(l,r,k,!1))}l.g&&(n=ev(l.g),f.has(n)||(r=.5*mw(b,d.id),r=hv(a.g,r),f.set(n,new dv(l.g,r,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
|
|
1058
|
-
endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Rw(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function tw(a){if(a.l.g)throw new
|
|
1059
|
-
function Gw(a,b){return
|
|
1060
|
-
function Lw(a,b,c,d){var e,f,g;return
|
|
1059
|
+
endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Rw(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function tw(a){if(a.l.g)throw new P(2,9,7001);}function rw(){if(!ow())throw new P(2,9,9E3);}
|
|
1060
|
+
function Gw(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c,2),D(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);xc(a.i,b);return ya(c,0)})}function qw(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){xc(a.i,c)})}function Mw(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
1061
|
+
function Lw(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Fv(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Kw(d,!1),videoCapabilities:Kw(d,!0)}});return D(h,dw(b,a,f),2)}return 3!=h.g?(g=h.h,D(h,e.remove(g),3)):D(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1061
1062
|
function Pw(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
1062
|
-
function Dw(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",nw);nw.deleteAll=function(){var a;return
|
|
1063
|
+
function Dw(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",nw);nw.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new zv,ua(b,2),D(b,Gv(a),2)):5!=b.g?(xa(b),D(b,a.destroy(),5)):ya(b,0)})};
|
|
1063
1064
|
nw.prototype.list=nw.prototype.list;nw.prototype.removeEmeSessions=nw.prototype.Si;nw.prototype.remove=nw.prototype.remove;nw.prototype.store=nw.prototype.store;nw.prototype.getNetworkingEngine=nw.prototype.Tb;nw.prototype.getConfiguration=nw.prototype.getConfiguration;nw.prototype.configure=nw.prototype.configure;nw.prototype.destroy=nw.prototype.destroy;nw.support=ow;
|
|
1064
1065
|
var Ew=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
|
|
1065
1066
|
vn.offline=ow;function Sw(){}function Tw(){for(var a=t(Uw),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Ah()}catch(c){Ua("Error installing polyfill!",c)}}}function Vw(a,b){a={priority:b||0,Ah:a};for(b=0;b<Uw.length;b++)if(Uw[b].priority<a.priority){Uw.splice(b,0,a);return}Uw.push(a)}M("shaka.polyfill",Sw);Sw.register=Vw;Sw.installAll=Tw;var Uw=[];function Ww(){this.g=new Xw}function Yw(){window.AbortController||(window.AbortController=Ww,window.AbortSignal=Xw)}Ww.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new N("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};ea.Object.defineProperties(Ww.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Sw.AbortController=Ww;Ww.install=Yw;
|
|
1066
1067
|
function Xw(){cb.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Xw,cb);ea.Object.defineProperties(Xw.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Vw(Yw);function Zw(){}function $w(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())ax(b.value)}function ax(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Sw.Aria=Zw;Zw.install=$w;Vw($w);function bx(){}function cx(){dx()}Sw.EncryptionScheme=bx;bx.install=cx;Vw(cx,-2);function ex(){}
|
|
1067
1068
|
function fx(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
1068
1069
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",gx);document.addEventListener("webkitfullscreenerror",gx);document.addEventListener("mozfullscreenchange",gx);document.addEventListener("mozfullscreenerror",gx);document.addEventListener("MSFullscreenChange",gx);document.addEventListener("MSFullscreenError",gx)}}
|
|
1069
|
-
function gx(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Sw.Fullscreen=ex;ex.install=fx;Vw(fx);function hx(){}function ix(){var a=!0;if(
|
|
1070
|
-
function kx(a){var b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
1071
|
-
c.transferFunction&&(B+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(B)}else e=fc(c.contentType);else
|
|
1072
|
-
if(!a.keySystemConfiguration)return b.supported=!0,
|
|
1073
|
-
u);y=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ta(
|
|
1070
|
+
function gx(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Sw.Fullscreen=ex;ex.install=fx;Vw(fx);function hx(){}function ix(){var a=!0;if(Id()||Dd("PlayStation 5")||Jd()||Dd("Web0S")||Ed()||Dd("CrKey")||Dd("PC=EOS")||Dd("Hisense")||Dd("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),jx=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=kx)}
|
|
1071
|
+
function kx(a){var b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C;return K(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!yd())return A.return(b);if(c){if(Dd("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var B=c.contentType;c.width&&c.height&&(B+="; width="+c.width+"; height="+c.height);c.framerate&&(B+="; framerate="+c.framerate);"pq"===
|
|
1072
|
+
c.transferFunction&&(B+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(B)}else e=fc(c.contentType);else Ed()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=fc(f)):e=fc(c.contentType);if(!e)return A.return(b)}if(d&&(g=d.contentType,h=fc(g),!h))return A.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=zd(k),!l)||d&&(m=d.contentType,n=zd(m),!n))return A.return(b)}else return A.return(b);
|
|
1073
|
+
if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));r=a.keySystemConfiguration;q=[];u=[];r.audio&&(v={robustness:r.audio.robustness||"",contentType:a.audio.contentType},q.push(v));r.video&&(x={robustness:r.video.robustness||"",contentType:a.video.contentType},u.push(x));z={initDataTypes:[r.initDataType],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes};q.length&&(z.audioCapabilities=q);u.length&&(z.videoCapabilities=
|
|
1074
|
+
u);y=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ta(A,3);if(y in lx){C=lx[y];A.F(5);break}return D(A,navigator.requestMediaKeySystemAccess(r.keySystem,[z]),6);case 6:C=A.h,lx[y]=C;case 5:va(A,4);break;case 3:wa(A);case 4:C&&(b.supported=!0,b.keySystemAccess=C);case 2:return A.return(b)}})}Sw.MediaCapabilities=hx;hx.install=ix;var jx=null;hx.originalMcap=jx;var lx={};hx.memoizedMediaKeySystemAccessRequests_=lx;Vw(ix,-1);function mx(){}function nx(){var a=Kd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?ox():a?10>=a?window.MediaSource=null:12>=a?(px(),qx()):15>=a&&px():Bd()?rx():(Gd()||Fd()||Dd("Tizen 4"))&&sx());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&tx()}
|
|
1074
1075
|
function px(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function qx(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function rx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
|
|
1075
|
-
function sx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=
|
|
1076
|
-
function tx(){var a=MediaSource.isTypeSupported;
|
|
1076
|
+
function sx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=id(b)[0]&&a(b)}}function ox(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
1077
|
+
function tx(){var a=MediaSource.isTypeSupported;Dd("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Sw.MediaSource=mx;mx.install=nx;Vw(nx);function ux(){}function vx(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?wx():void 0!=window.orientation&&xx())}function wx(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1077
1078
|
function xx(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new yx;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new N("change");b.dispatchEvent(c)})}Sw.Orientation=ux;ux.install=vx;function yx(){cb.call(this);this.type="";this.angle=0}pa(yx,cb);
|
|
1078
1079
|
yx.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
1079
1080
|
yx.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Vw(vx);function zx(){}var Ax,Bx,Cx,Dx,Ex,Fx;function Gx(a,b){try{var c=new Hx(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ix(a){var b=this.mediaKeys;b&&b!=a&&Jx(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Jx(a,this):Promise.resolve()}
|
|
@@ -1088,7 +1089,7 @@ function Jx(a,b){a.g.Kb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey"
|
|
|
1088
1089
|
p.generateRequest=function(a,b){var c=this;this.h=new $e;try{var d=this.l.createSession("video/mp4",nc(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.kc()?"license-request":"license-renewal").set("message",oc(e.message));e=new N("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(Ox(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
|
|
1089
1090
|
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:Ox(c,"output-not-allowed");break;default:Ox(c,"internal-error")}});Ox(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1090
1091
|
p.update=function(a){this.g=new $e;try{this.i.update(nc(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Kb()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ox(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new N("keystatuseschange");a.dispatchEvent(b)}
|
|
1091
|
-
function Nx(){this.size=0;this.g=void 0}p=Nx.prototype;p.kc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,
|
|
1092
|
+
function Nx(){this.size=0;this.g=void 0}p=Nx.prototype;p.kc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,vh.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=vh.value();return this.g&&lc(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};function Px(){}function Qx(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Rx,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Sx,window.MediaKeys=Tx,window.MediaKeySystemAccess=Ux,window.shakaMediaKeysPolyfill=!0)}function Rx(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1092
1093
|
function Sx(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Sw.PatchedMediaKeysNop=Px;Px.install=Qx;function Tx(){throw new TypeError("Illegal constructor.");}Tx.prototype.createSession=function(){};Tx.prototype.setServerCertificate=function(){};Tx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Ux(){this.keySystem="";throw new TypeError("Illegal constructor.");}Ux.prototype.getConfiguration=function(){};
|
|
1093
1094
|
Ux.prototype.createMediaKeys=function(){};Vw(Qx,-10);function Vx(){}
|
|
1094
1095
|
function Wx(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Xx="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Yx;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Zx;window.MediaKeys=$x;window.MediaKeySystemAccess=ay;window.shakaMediaKeysPolyfill=!0}}
|
|
@@ -1100,101 +1101,101 @@ function cy(a,b){a.h=b;a.g.Kb();var c=Xx;b&&(a.g.o(b,c+"needkey",function(d){var
|
|
|
1100
1101
|
d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=dy(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?ey(e,"output-restricted"):1==f?ey(e,"expired"):ey(e,"internal-error"))}}))}
|
|
1101
1102
|
$x.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 fy(b,this.l,a);this.i.push(a);return a};$x.prototype.setServerCertificate=function(){return Promise.resolve(!1)};$x.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1102
1103
|
function dy(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 fy(a,b,c){cb.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 $e;this.keyStatuses=new gy}pa(fy,cb);
|
|
1103
|
-
function hy(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=nc(Of("LOAD_SESSION|"+c));else{var e=Of("PERSISTENT|");d=
|
|
1104
|
-
function iy(a,b,c){if(a.g)a.g.then(function(){return iy(a,b,c)}).catch(function(){return iy(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Kf(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=
|
|
1104
|
+
function hy(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=nc(Of("LOAD_SESSION|"+c));else{var e=Of("PERSISTENT|");d=jg(e,b)}else d=nc(b)}catch(g){return Promise.reject(g)}a.h=new $e;var f=by("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new xd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
|
|
1105
|
+
function iy(a,b,c){if(a.g)a.g.then(function(){return iy(a,b,c)}).catch(function(){return iy(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Kf(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=fg(e.keys[0].k);e=fg(e.keys[0].kid)}else d=nc(c),e=null;var f=by("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1105
1106
|
function ey(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new N("keystatuseschange");a.dispatchEvent(b)}p=fy.prototype;p.generateRequest=function(a,b){return hy(this,b,null)};p.load=function(a){return"persistent-license"==this.l?hy(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new $e;iy(this,b,a);return b};
|
|
1106
1107
|
p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=by("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function gy(){this.size=0;this.g=void 0}p=gy.prototype;p.kc=function(){return this.g};
|
|
1107
|
-
p.forEach=function(a){this.g&&a(this.g,
|
|
1108
|
+
p.forEach=function(a){this.g&&a(this.g,vh.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=vh.value();return this.g&&lc(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var Xx="";Vw(Wx);function jy(){}function ky(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ly,Object.defineProperty(a,"disablePictureInPicture",{get:my,set:ny,enumerable:!0,configurable:!0}),document.exitPictureInPicture=oy,document.addEventListener("webkitpresentationmodechanged",py,!0))}}
|
|
1108
1109
|
function py(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)}
|
|
1109
1110
|
function ly(){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 oy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1110
|
-
function my(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function ny(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Sw.PiPWebkit=jy;jy.install=ky;Vw(ky);function qy(){}function ry(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=sy))}function sy(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Sw.RandomUUID=qy;qy.install=ry;Vw(ry);function ty(){}function uy(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=vy)}function vy(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Sw.StorageEstimate=ty;ty.install=uy;Vw(uy);function wy(){}function xy(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:yy})}function yy(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Sw.Symbol=wy;wy.install=xy;Vw(xy);function zy(){}function Ay(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Sw.VideoPlayPromise=zy;zy.install=Ay;Vw(Ay);function By(){}function Cy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||
|
|
1111
|
-
M("shaka.text.LrcTextParser",Iy);Iy.prototype.parseMedia=Iy.prototype.parseMedia;Iy.prototype.setManifestType=Iy.prototype.setManifestType;Iy.prototype.setSequenceMode=Iy.prototype.setSequenceMode;Iy.prototype.parseInit=Iy.prototype.parseInit;var Jy=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Ky=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;
|
|
1112
|
-
Ly.prototype.parseMedia=function(a,b,c){var d=Kf(a);a=[];if(""==d)return a;var e=
|
|
1113
|
-
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{ec:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?
|
|
1114
|
-
null!=z&&(q.width=Number(z[1]),q.height=Number(z[2]),y||(null!=v&&(q.width=100*q.width/v),null!=x&&(q.height=100*q.height/x)),q.widthUnits=y||null!=v?
|
|
1115
|
-
2,2001,"<p> can only be inside <div> in TTML");n=t(
|
|
1116
|
-
function Sy(a,b,c,d,e,f,g,h,k,l,m,n){var r=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var q=document.createElement("span");q.textContent=a.textContent}else q=a;for(var u=null,v=t(Ty),x=v.next();!x.done&&!(u=Uy(q,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;var z=
|
|
1117
|
-
(h?"default":"preserve"));z=Array.from(q.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var y=t(q.childNodes),
|
|
1118
|
-
y.end,r=r.parentNode;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);if(!
|
|
1119
|
-
if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var
|
|
1120
|
-
function Xy(a,b,c,d,e,f,g,h){g=g||h;"rtl"==Yy(b,c,f,"direction",g)&&(a.direction="rtl");h=Yy(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=
|
|
1111
|
+
function my(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function ny(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Sw.PiPWebkit=jy;jy.install=ky;Vw(ky);function qy(){}function ry(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=sy))}function sy(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Sw.RandomUUID=qy;qy.install=ry;Vw(ry);function ty(){}function uy(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=vy)}function vy(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Sw.StorageEstimate=ty;ty.install=uy;Vw(uy);function wy(){}function xy(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:yy})}function yy(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Sw.Symbol=wy;wy.install=xy;Vw(xy);function zy(){}function Ay(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Sw.VideoPlayPromise=zy;zy.install=Ay;Vw(Ay);function By(){}function Cy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Hd())&&(a.getVideoPlaybackQuality=Dy)}}function Dy(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Sw.VideoPlaybackQuality=By;By.install=Cy;Vw(Cy);function Ey(){}function Fy(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Gy;else if(6==b)a=Hy;else{try{var c=!!Gy(1,2,"")}catch(d){c=!1}c&&(a=Gy)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Gy(a,b,c){return new window.TextTrackCue(a,b,c)}function Hy(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Sw.VTTCue=Ey;Ey.install=Fy;Vw(Fy);function Iy(){}Iy.prototype.parseInit=function(){};Iy.prototype.setSequenceMode=function(){};Iy.prototype.setManifestType=function(){};Iy.prototype.parseMedia=function(a,b){var c=null,d=[];a=Kf(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=Jy.exec(e))){var f=Ky.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Ac(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1112
|
+
M("shaka.text.LrcTextParser",Iy);Iy.prototype.parseMedia=Iy.prototype.parseMedia;Iy.prototype.setManifestType=Iy.prototype.setManifestType;Iy.prototype.setSequenceMode=Iy.prototype.setSequenceMode;Iy.prototype.parseInit=Iy.prototype.parseInit;var Jy=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Ky=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;nd["application/x-subtitle-lrc"]=function(){return new Iy};function Ly(){}Ly.prototype.parseInit=function(){};Ly.prototype.setSequenceMode=function(){};Ly.prototype.setManifestType=function(){};
|
|
1113
|
+
Ly.prototype.parseMedia=function(a,b,c){var d=Kf(a);a=[];if(""==d)return a;var e=Fg(d,"tt");if(!e)throw new P(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=sg(e,My,"frameRate"),g=sg(e,My,"subFrameRate"),h=sg(e,My,"frameRateMultiplier"),k=sg(e,My,"tickRate"),l=sg(e,My,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=sg(e,Ny,"extent");if("default"!=m&&"preserve"!=m)throw new P(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Oy(f,
|
|
1114
|
+
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{ec:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?qg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var r=t(e),q=r.next();!q.done;q=r.next()){var u=q.value;q=new Bc;var v=u.getAttribute("xml:id");if(v){q.id=v;var x=null;n&&(x=Py.exec(n)||Qy.exec(n));v=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,y;if(z=Ry(u,h,"extent"))z=(y=Py.exec(z))||Qy.exec(z),
|
|
1115
|
+
null!=z&&(q.width=Number(z[1]),q.height=Number(z[2]),y||(null!=v&&(q.width=100*q.width/v),null!=x&&(q.height=100*q.height/x)),q.widthUnits=y||null!=v?Tc:0,q.heightUnits=y||null!=x?Tc:0);if(u=Ry(u,h,"origin"))z=(y=Py.exec(u))||Qy.exec(u),null!=z&&(q.viewportAnchorX=Number(z[1]),q.viewportAnchorY=Number(z[2]),y||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=v&&(q.viewportAnchorX=100*q.viewportAnchorX/v)),q.viewportAnchorUnits=y||null!=v?Tc:0)}else q=null;q&&k.push(q)}if(ng(d,"p").length)throw new P(2,
|
|
1116
|
+
2,2001,"<p> can only be inside <div> in TTML");n=t(ng(d,"div"));for(r=n.next();!r.done;r=n.next())if(ng(r.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Sy(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1117
|
+
function Sy(a,b,c,d,e,f,g,h,k,l,m,n){var r=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var q=document.createElement("span");q.textContent=a.textContent}else q=a;for(var u=null,v=t(Ty),x=v.next();!x.done&&!(u=Uy(q,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;var z=sg(q,Ty,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new kb(n),z=new kb(z),(x=x.resolve(z).toString())&&(v=x));if("p"==a.nodeName||u||v)m=!0;a=m;x="default"==(q.getAttribute("xml:space")||
|
|
1118
|
+
(h?"default":"preserve"));z=Array.from(q.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var y=t(q.childNodes),C=y.next();!C.done;C=y.next())(C=Sy(C.value,b,c,d,e,f,g,x,k,q,m,n))&&h.push(C);d=null!=l;n=/\S/.test(q.textContent);C=q.hasAttribute("begin")||q.hasAttribute("end")||q.hasAttribute("dur");if(!(C||n||"br"==q.tagName||0!=h.length||d&&!x))return null;y=Vy(q,c);n=y.start;for(y=y.end;r&&r.nodeType==Node.ELEMENT_NODE&&"tt"!=r.tagName;)y=Wy(r,c,n,y),n=y.start,y=
|
|
1119
|
+
y.end,r=r.parentNode;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);if(!C&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==q.tagName)return e=new Ac(n,y,""),e.lineBreak=!0,e;b="";z&&(b=q.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new Ac(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Uy(q,"region",f,"")[0];
|
|
1120
|
+
if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var A=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==A})[0]}g=k;l&&d&&!q.getAttribute("region")&&!q.getAttribute("style")&&(g=Uy(l,"region",f,"")[0]);Xy(b,q,g,u,v,e,a,0==h.length);return b}
|
|
1121
|
+
function Xy(a,b,c,d,e,f,g,h){g=g||h;"rtl"==Yy(b,c,f,"direction",g)&&(a.direction="rtl");h=Yy(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=Ec);(h=Yy(b,c,f,"textAlign",!0))?(a.positionAlign=Zy[h],a.lineAlign=$y[h],a.textAlign=Nc[h.toUpperCase()]):a.textAlign=Dc;if(h=Yy(b,c,f,"displayAlign",!0))a.displayAlign=Oc[h.toUpperCase()];if(h=Yy(b,c,f,"color",g))a.color=h;if(h=Yy(b,c,f,"backgroundColor",
|
|
1121
1122
|
g))a.backgroundColor=h;if(h=Yy(b,c,f,"border",g))a.border=h;if(h=Yy(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=Yy(b,c,f,"fontWeight",g))&&
|
|
1122
|
-
"bold"==h&&(a.fontWeight=700);h=Yy(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=Yy(b,c,f,"lineHeight",g))&&h.match(az)&&(a.lineHeight=h);(h=Yy(b,c,f,"fontSize",g))&&(h.match(az)||h.match(bz))&&(a.fontSize=h);if(h=Yy(b,c,f,"fontStyle",g))a.fontStyle=
|
|
1123
|
+
"bold"==h&&(a.fontWeight=700);h=Yy(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=Yy(b,c,f,"lineHeight",g))&&h.match(az)&&(a.lineHeight=h);(h=Yy(b,c,f,"fontSize",g))&&(h.match(az)||h.match(bz))&&(a.fontSize=h);if(h=Yy(b,c,f,"fontStyle",g))a.fontStyle=Sc[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=Yy(b,
|
|
1123
1124
|
c,f,"textOutline",g))d=d.split(" "),d[0].match(az)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(az)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Yy(b,c,f,"letterSpacing",g))&&d.match(az)&&(a.letterSpacing=d);(d=Yy(b,c,f,"linePadding",g))&&d.match(az)&&(a.linePadding=d);if(d=Yy(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=Ry(c,f,"textDecoration"))&&cz(a,d);(d=dz(b,f,"textDecoration"))&&cz(a,d);if(d=Yy(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(Yy(b,c,f,
|
|
1124
1125
|
"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
1125
1126
|
function cz(a,b){b=t(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")&&xc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&xc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1126
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&xc(a.textDecoration,"overline")}}function Yy(a,b,c,d,e){e=void 0===e?!0:e;return(a=dz(a,c,d))?a:e?Ry(b,c,d):null}function Ry(a,b,c){if(!a)return null;var d=
|
|
1127
|
-
function ez(a,b,c){a=Uy(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=
|
|
1128
|
-
function Uy(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?
|
|
1127
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&xc(a.textDecoration,"overline")}}function Yy(a,b,c,d,e){e=void 0===e?!0:e;return(a=dz(a,c,d))?a:e?Ry(b,c,d):null}function Ry(a,b,c){if(!a)return null;var d=sg(a,Ny,c);return d?d:ez(a,b,c)}function dz(a,b,c){var d=sg(a,Ny,c);return d?d:ez(a,b,c)}
|
|
1128
|
+
function ez(a,b,c){a=Uy(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=rg(a[e],"urn:ebu:tt:style",c);f||(f=sg(a[e],Ny,c));f||(f=dz(a[e],b,c));f&&(d=f)}return d}
|
|
1129
|
+
function Uy(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?rg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Wy(a,b,c,d){a=Vy(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}}
|
|
1129
1130
|
function Vy(a,b){var c=fz(a.getAttribute("begin"),b),d=fz(a.getAttribute("end"),b);a=fz(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1130
|
-
function fz(a,b){var c=null;if(gz.test(a)){a=gz.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(hz.test(a))c=iz(hz,a);else if(jz.test(a))c=iz(jz,a);else if(kz.test(a))a=kz.exec(a),c=Number(a[1])/b.frameRate;else if(lz.test(a))a=lz.exec(a),c=Number(a[1])/b.g;else if(mz.test(a))c=iz(mz,a);else if(a)throw new
|
|
1131
|
+
function fz(a,b){var c=null;if(gz.test(a)){a=gz.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(hz.test(a))c=iz(hz,a);else if(jz.test(a))c=iz(jz,a);else if(kz.test(a))a=kz.exec(a),c=Number(a[1])/b.frameRate;else if(lz.test(a))a=lz.exec(a),c=Number(a[1])/b.g;else if(mz.test(a))c=iz(mz,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1131
1132
|
function iz(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)}M("shaka.text.TtmlTextParser",Ly);Ly.prototype.parseMedia=Ly.prototype.parseMedia;Ly.prototype.setManifestType=Ly.prototype.setManifestType;Ly.prototype.setSequenceMode=Ly.prototype.setSequenceMode;Ly.prototype.parseInit=Ly.prototype.parseInit;
|
|
1132
1133
|
function Oy(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]))}
|
|
1133
|
-
var Py=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,bz=/^(\d{1,2}(?:\.\d+)?|100)%$/,az=/^(\d+px|\d+em|\d*\.?\d+c)$/,Qy=/^(\d+)px (\d+)px$/,gz=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,hz=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,jz=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,kz=/^(\d*(?:\.\d*)?)f$/,lz=/^(\d*(?:\.\d*)?)t$/,mz=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),$y={left:
|
|
1134
|
-
end:"end"},Zy={left:"line-left",center:"center",right:"line-right"},My=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Ny=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ty=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];
|
|
1135
|
-
nz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Tf).box("mdat",
|
|
1136
|
-
|
|
1137
|
-
oz.prototype.parseMedia=function(a,b){a=Kf(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
|
|
1138
|
-
e/9E4-a}}else c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(a=b.segmentStart);b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Es(d);var f=new
|
|
1134
|
+
var Py=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,bz=/^(\d{1,2}(?:\.\d+)?|100)%$/,az=/^(\d+px|\d+em|\d*\.?\d+c)$/,Qy=/^(\d+)px (\d+)px$/,gz=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,hz=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,jz=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,kz=/^(\d*(?:\.\d*)?)f$/,lz=/^(\d*(?:\.\d*)?)t$/,mz=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),$y={left:Hc,center:"center",right:"end",start:Hc,
|
|
1135
|
+
end:"end"},Zy={left:"line-left",center:"center",right:"line-right"},My=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Ny=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ty=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];nd["application/ttml+xml"]=function(){return new Ly};function nz(){this.g=new Ly}nz.prototype.parseInit=function(a){var b=!1;(new Tf).box("moov",Yf).box("trak",Yf).box("mdia",Yf).box("minf",Yf).box("stbl",Yf).V("stsd",$f).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};nz.prototype.setSequenceMode=function(){};nz.prototype.setManifestType=function(){};
|
|
1136
|
+
nz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Tf).box("mdat",bg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new P(2,2,2007);return f};M("shaka.text.Mp4TtmlParser",nz);nz.prototype.parseMedia=nz.prototype.parseMedia;nz.prototype.setManifestType=nz.prototype.setManifestType;nz.prototype.setSequenceMode=nz.prototype.setSequenceMode;nz.prototype.parseInit=nz.prototype.parseInit;nd['application/mp4; codecs="stpp"']=function(){return new nz};
|
|
1137
|
+
nd['application/mp4; codecs="stpp.ttml"']=function(){return new nz};nd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new nz};nd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new nz};function oz(){this.h=!1;this.g="UNKNOWN"}oz.prototype.parseInit=function(){};oz.prototype.setSequenceMode=function(a){this.h=a};oz.prototype.setManifestType=function(a){this.g=a};
|
|
1138
|
+
oz.prototype.parseMedia=function(a,b){a=Kf(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 P(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=pz(new Es(d[1]));if(null==a)throw new P(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
|
|
1139
|
+
e/9E4-a}}else c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(a=b.segmentStart);b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Es(d);var f=new Bc;Hs(d);Fs(d);for(var g=Hs(d);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=
|
|
1139
1140
|
Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Fs(d);g=Hs(d)}b.push(f)}e=new Map;qz(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
|
|
1140
|
-
t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new
|
|
1141
|
-
case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==q)m=!0,l.fontWeight=700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=
|
|
1142
|
-
l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Es(f[0]),k=pz(g),n=Gs(g,/[ \t]+--\x3e[ \t]+/g),l=pz(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();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new
|
|
1143
|
-
m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function qz(a){for(var b=t(Object.entries(
|
|
1141
|
+
t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new Ac(0,0,""));for(var m=!1,n=0;n<k.length;n++){var r=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(r){var q=r[2].trim().replace(";","");switch(r[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=q;break;
|
|
1142
|
+
case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==q)m=!0,l.fontWeight=700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=Kc;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-combine-upright":m=!0;l.textCombineUpright=q;break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&e.set(g,
|
|
1143
|
+
l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Es(f[0]),k=pz(g),n=Gs(g,/[ \t]+--\x3e[ \t]+/g),l=pz(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();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Ac(k,l,"");Fs(g);for(k=Hs(g);k;)rz(m,k,b),Fs(g),k=Hs(g);sz(f,
|
|
1144
|
+
m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function qz(a){for(var b=t(Object.entries(Qc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Ac(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Rc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Ac(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1144
1145
|
function sz(a,b,c){0===c.size&&qz(c);a:{for(var d=[],e=-1,f="",g=0;g<a.length;g++)if("/"===a[g]&&0<g&&"<"===a[g-1]){var h=a.indexOf(">",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0<e&&(d.push(a.substr(e,g-e)),e=-1),f+=a[g];a=f}d=a;a=[];f=-1;for(e=0;e<d.length;e++)"<"===d[e]?f=e+1:">"===d[e]&&0<f&&(f=d.substr(f,
|
|
1145
1146
|
e-f),f.match(tz)&&a.push(f),f=-1);a=t(a);for(e=a.next();!e.done;e=a.next())e=e.value,d=d.replace("<"+e+">",'<div time="'+e+'">'),d+="</div>";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):">"===
|
|
1146
|
-
e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=
|
|
1147
|
+
e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=Fg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=uz(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())vz(d.value,b,c)}else b.payload=uz(a)}
|
|
1147
1148
|
function wz(a,b){return a&&0<a.length?a:b}
|
|
1148
|
-
function vz(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new
|
|
1149
|
-
d.fontFamily),d.fontSize=wz(g.fontSize,d.fontSize),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.textShadow=g.textShadow,d.wrapLine=g.wrapLine);switch(f){case "br":d=
|
|
1150
|
-
if(!f)break;if(f=pz(new Es(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(
|
|
1151
|
-
function rz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=
|
|
1152
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":
|
|
1149
|
+
function vz(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Bc;d.position=null;d.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var e=t(a.nodeName.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=wz(g.backgroundColor,d.backgroundColor),d.color=wz(g.color,d.color),d.fontFamily=wz(g.fontFamily,
|
|
1150
|
+
d.fontFamily),d.fontSize=wz(g.fontSize,d.fontSize),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.textShadow=g.textShadow,d.wrapLine=g.wrapLine);switch(f){case "br":d=Lc(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.getAttribute("color"))d.color=f;break;case "div":f=a.getAttribute("time");
|
|
1151
|
+
if(!f)break;if(f=pz(new Es(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(ug(a)||1==e.length&&ug(e[0]))for(e=!0,c=t(a.textContent.split("\n")),a=c.next();!a.done;a=c.next())a=a.value,e||(e=Lc(d.startTime,d.endTime),b.nestedCues.push(e)),0<a.length&&(e=d.clone(),e.payload=uz(a),b.nestedCues.push(e)),e=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())vz(a.value,d,c)}
|
|
1152
|
+
function rz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Dc:a.textAlign=Nc[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"==
|
|
1153
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Cc);else if(d=/^region:(.*)$/.exec(b)){if(b=xz(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=Pc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Gc,a.line=Number(c[1]),c[2]&&(a.lineAlign=Pc[c[2].toUpperCase()])}
|
|
1153
1154
|
function xz(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function pz(a){a=Gs(a,tz);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)}
|
|
1154
1155
|
function uz(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}M("shaka.text.VttTextParser",oz);oz.prototype.parseMedia=oz.prototype.parseMedia;oz.prototype.setManifestType=oz.prototype.setManifestType;oz.prototype.setSequenceMode=oz.prototype.setSequenceMode;oz.prototype.parseInit=oz.prototype.parseInit;
|
|
1155
|
-
var tz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1156
|
-
yz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new
|
|
1157
|
-
r.value;var q=r.Yf||l,u=r.ze?c+r.ze:a;a=u+(q||0);var v=0;do{var x=m.N();v+=x;var z=m.N(),y=null;"vttc"==
|
|
1158
|
-
function Az(a,b,c,d,e){d=new
|
|
1159
|
-
function Cz(a){a=Gs(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",Bz);Bz.prototype.parseMedia=Bz.prototype.parseMedia;Bz.prototype.setManifestType=Bz.prototype.setManifestType;Bz.prototype.setSequenceMode=Bz.prototype.setSequenceMode;Bz.prototype.parseInit=Bz.prototype.parseInit;
|
|
1156
|
+
var tz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;nd["text/vtt"]=function(){return new oz};nd['text/vtt; codecs="vtt"']=function(){return new oz};nd['text/vtt; codecs="wvtt"']=function(){return new oz};function yz(){this.g=null}yz.prototype.parseInit=function(a){var b=this,c=!1;(new Tf).box("moov",Yf).box("trak",Yf).box("mdia",Yf).V("mdhd",function(d){d=Xh(d.reader,d.version);b.g=d.timescale}).box("minf",Yf).box("stbl",Yf).V("stsd",$f).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};yz.prototype.setSequenceMode=function(){};yz.prototype.setManifestType=function(){};
|
|
1157
|
+
yz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Tf).box("moof",Yf).box("traf",Yf).V("tfdt",function(C){g=!0;c=Wh(C.reader,C.version).baseMediaDecodeTime}).V("tfhd",function(C){l=Uh(C.reader,C.flags).Eg}).V("trun",function(C){h=!0;d=Yh(C.reader,C.version,C.flags).$g}).box("mdat",bg(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new Qf(e,0),n=t(d),r=n.next();!r.done;r=n.next()){r=
|
|
1158
|
+
r.value;var q=r.Yf||l,u=r.ze?c+r.ze:a;a=u+(q||0);var v=0;do{var x=m.N();v+=x;var z=m.N(),y=null;"vttc"==Xf(z)?8<x&&(y=m.Jb(x-8)):m.skip(x-8);q&&y&&(x=zz(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(x))}while(r.sampleSize&&v<r.sampleSize)}return f.filter(vd)};function zz(a,b,c){var d,e,f;(new Tf).box("payl",bg(function(g){d=Kf(g)})).box("iden",bg(function(g){e=Kf(g)})).box("sttg",bg(function(g){f=Kf(g)})).parse(a);return d?Az(d,e,f,b,c):null}
|
|
1159
|
+
function Az(a,b,c,d,e){d=new Ac(d,e,"");sz(a,d,new Map);b&&(d.id=b);if(c)for(a=new Es(c),b=Hs(a);b;)rz(d,b,[]),Fs(a),b=Hs(a);return d}M("shaka.text.Mp4VttParser",yz);yz.prototype.parseMedia=yz.prototype.parseMedia;yz.prototype.setManifestType=yz.prototype.setManifestType;yz.prototype.setSequenceMode=yz.prototype.setSequenceMode;yz.prototype.parseInit=yz.prototype.parseInit;nd['application/mp4; codecs="wvtt"']=function(){return new yz};function Bz(){}Bz.prototype.parseInit=function(){};Bz.prototype.setSequenceMode=function(){};Bz.prototype.setManifestType=function(){};Bz.prototype.parseMedia=function(a){var b=Kf(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Es(c[0]),e=Cz(d),f=Gs(d,/,/g);d=Cz(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Ac(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1160
|
+
function Cz(a){a=Gs(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",Bz);Bz.prototype.parseMedia=Bz.prototype.parseMedia;Bz.prototype.setManifestType=Bz.prototype.setManifestType;Bz.prototype.setSequenceMode=Bz.prototype.setSequenceMode;Bz.prototype.parseInit=Bz.prototype.parseInit;nd["text/x-subviewer"]=function(){return new Bz};function Dz(){this.g=new oz}Dz.prototype.parseInit=function(){};Dz.prototype.setSequenceMode=function(){};Dz.prototype.setManifestType=function(){};Dz.prototype.parseMedia=function(a,b,c){a=Kf(a);a=Ez(a);a=nc(Of(a));return this.g.parseMedia(a,b,c)};
|
|
1160
1161
|
function Ez(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}M("shaka.text.SrtTextParser",Dz);Dz.srt2webvtt=Ez;Dz.prototype.parseMedia=Dz.prototype.parseMedia;
|
|
1161
|
-
Dz.prototype.setManifestType=Dz.prototype.setManifestType;Dz.prototype.setSequenceMode=Dz.prototype.setSequenceMode;Dz.prototype.parseInit=Dz.prototype.parseInit;
|
|
1162
|
+
Dz.prototype.setManifestType=Dz.prototype.setManifestType;Dz.prototype.setSequenceMode=Dz.prototype.setSequenceMode;Dz.prototype.parseInit=Dz.prototype.parseInit;nd["text/srt"]=function(){return new Dz};function Fz(){}Fz.prototype.parseInit=function(){};Fz.prototype.setSequenceMode=function(){};Fz.prototype.setManifestType=function(){};
|
|
1162
1163
|
Fz.prototype.parseMedia=function(a){var b="",c="";a=Kf(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Gz.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Hz.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Iz);else if("Style"==e){e=f.split(Iz);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
1163
|
-
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Me:e.Me},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Hz.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Iz);else if("Dialogue"==f){g=g.split(Iz);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Jz(f.Start);var k=Jz(f.End);g=new
|
|
1164
|
-
function Kz(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Lz(c))a.color=c;if(c=b.BackColour)if(c=Lz(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=
|
|
1165
|
-
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=
|
|
1164
|
+
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Me:e.Me},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Hz.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Iz);else if("Dialogue"==f){g=g.split(Iz);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Jz(f.Start);var k=Jz(f.End);g=new Ac(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Me=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Me}}(e)))&&Kz(g,f);d.push(g)}return d};
|
|
1165
|
+
function Kz(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Lz(c))a.color=c;if(c=b.BackColour)if(c=Lz(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Ic;a.textAlign="start";break;case 2:a.displayAlign=Ic;a.textAlign=Dc;break;case 3:a.displayAlign=Ic;a.textAlign="end";
|
|
1166
|
+
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Dc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Dc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1166
1167
|
function Lz(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Jz(a){a=Mz.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Fz);Fz.prototype.parseMedia=Fz.prototype.parseMedia;Fz.prototype.setManifestType=Fz.prototype.setManifestType;Fz.prototype.setSequenceMode=Fz.prototype.setSequenceMode;Fz.prototype.parseInit=Fz.prototype.parseInit;
|
|
1167
|
-
var Gz=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Hz=/^\s*([^:]+):\s*(.*)/,Iz=/\s*,\s*/,Mz=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
|
|
1168
|
+
var Gz=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Hz=/^\s*([^:]+):\s*(.*)/,Iz=/\s*,\s*/,Mz=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;nd["text/x-ssa"]=function(){return new Fz};function Nz(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{fe:c,X:a}:null}function Oz(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,ra:"mp4a.40."+e}}
|
|
1168
1169
|
function Pz(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1169
1170
|
function Qz(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,
|
|
1170
|
-
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 Rz(a){this.i=a;this.h=0;this.g=new Map}p=Rz.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?fc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(
|
|
1171
|
-
p.transmux=function(a,b,c,d){for(var e=nc(a),f=
|
|
1172
|
-
duration:1024,fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ra,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,cb:[],ma:new Uint8Array([]),za:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,$a:f},stream:b};a=new fu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=nu(a),this.g.set(b.id,d));b=Du(a);this.h++;b=
|
|
1173
|
-
Rz.prototype.transmux=Rz.prototype.transmux;Rz.prototype.getOriginalMimeType=Rz.prototype.getOriginalMimeType;Rz.prototype.convertCodecs=Rz.prototype.convertCodecs;Rz.prototype.isSupported=Rz.prototype.isSupported;Rz.prototype.destroy=Rz.prototype.destroy;
|
|
1171
|
+
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 Rz(a){this.i=a;this.h=0;this.g=new Map}p=Rz.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?fc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(kd(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1172
|
+
p.transmux=function(a,b,c,d){for(var e=nc(a),f=Th(e),g=f.length;g<e.length&&!Pz(e,g);g++);a=1E3*c.endTime;f=Sh(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=Oz(e,g);if(!c)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=Nz(e,g);if(!h)return Promise.reject(new P(2,3,3018));var k=h.fe+h.X;g+k<=e.length&&f.push({data:e.subarray(g+h.fe,g+k),size:h.X,
|
|
1173
|
+
duration:1024,fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ra,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,cb:[],ma:new Uint8Array([]),za:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,$a:f},stream:b};a=new fu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=nu(a),this.g.set(b.id,d));b=Du(a);this.h++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.AacTransmuxer",Rz);
|
|
1174
|
+
Rz.prototype.transmux=Rz.prototype.transmux;Rz.prototype.getOriginalMimeType=Rz.prototype.getOriginalMimeType;Rz.prototype.convertCodecs=Rz.prototype.convertCodecs;Rz.prototype.isSupported=Rz.prototype.isSupported;Rz.prototype.destroy=Rz.prototype.destroy;Wc("audio/aac",function(){return new Rz("audio/aac")},bd);function Sz(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,
|
|
1174
1175
|
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,ma:a,X:e}}
|
|
1175
1176
|
function Tz(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 Uz(a){this.i=a;this.h=0;this.g=new Map}p=Uz.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?fc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1176
|
-
p.transmux=function(a,b,c,d){a=nc(a);for(var e=
|
|
1177
|
-
Ya:0,Xa:0,Va:0,Wa:2,ib:0}});f+=k.X}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,cb:[],ma:e,za:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,$a:h},stream:b};a=new fu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=nu(a),this.g.set(b.id,d));b=Du(a);this.h++;b=
|
|
1178
|
-
Uz.prototype.convertCodecs=Uz.prototype.convertCodecs;Uz.prototype.isSupported=Uz.prototype.isSupported;Uz.prototype.destroy=Uz.prototype.destroy;
|
|
1179
|
-
p.transmux=function(a,b,c,d){a=nc(a);for(var e=
|
|
1180
|
-
fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}});f+=k.X}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,cb:[],ma:e,za:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,$a:h},stream:b};a=new fu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=nu(a),this.g.set(b.id,d));b=Du(a);this.h++;b=
|
|
1181
|
-
Wz.prototype.getOriginalMimeType=Wz.prototype.getOriginalMimeType;Wz.prototype.convertCodecs=Wz.prototype.convertCodecs;Wz.prototype.isSupported=Wz.prototype.isSupported;Wz.prototype.destroy=Wz.prototype.destroy;
|
|
1177
|
+
p.transmux=function(a,b,c,d){a=nc(a);for(var e=Th(a),f=e.length;f<a.length&&!Tz(a,f);f++);var g=1E3*c.endTime;e=Sh(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=Sz(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ma;h.push({data:a.subarray(f,f+k.X),size:k.X,duration:1536,fb:0,flags:{hb:0,
|
|
1178
|
+
Ya:0,Xa:0,Va:0,Wa:2,ib:0}});f+=k.X}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,cb:[],ma:e,za:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,$a:h},stream:b};a=new fu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=nu(a),this.g.set(b.id,d));b=Du(a);this.h++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.Ac3Transmuxer",Uz);Uz.prototype.transmux=Uz.prototype.transmux;Uz.prototype.getOriginalMimeType=Uz.prototype.getOriginalMimeType;
|
|
1179
|
+
Uz.prototype.convertCodecs=Uz.prototype.convertCodecs;Uz.prototype.isSupported=Uz.prototype.isSupported;Uz.prototype.destroy=Uz.prototype.destroy;Wc("audio/ac3",function(){return new Uz("audio/ac3")},bd);function Vz(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new ci(a.subarray(b+2));ei(c,2);ei(c,3);var d=fi(c,11)+1<<1,e=fi(c,2);if(3==e){e=fi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=fi(c,2);var g=fi(c,3),h=fi(c,1);c=fi(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,ma:a,X:d}};function Wz(a){this.i=a;this.h=0;this.g=new Map}p=Wz.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?fc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1180
|
+
p.transmux=function(a,b,c,d){a=nc(a);for(var e=Th(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Sh(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=Vz(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ma;h.push({data:a.subarray(f,f+k.X),size:k.X,duration:1536,
|
|
1181
|
+
fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}});f+=k.X}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,cb:[],ma:e,za:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,$a:h},stream:b};a=new fu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=nu(a),this.g.set(b.id,d));b=Du(a);this.h++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.Ec3Transmuxer",Wz);Wz.prototype.transmux=Wz.prototype.transmux;
|
|
1182
|
+
Wz.prototype.getOriginalMimeType=Wz.prototype.getOriginalMimeType;Wz.prototype.convertCodecs=Wz.prototype.convertCodecs;Wz.prototype.isSupported=Wz.prototype.isSupported;Wz.prototype.destroy=Wz.prototype.destroy;Wc("audio/ec3",function(){return new Wz("audio/ec3")},bd);function Xz(a){if(!a.length)return null;var b=a.find(function(m){return 7==m.type});a=a.find(function(m){return 8==m.type});if(!b||!a)return null;var c=new ci(b.data),d=ji(c);ji(c);ji(c);hi(c);if(Yz.includes(d)&&(d=R(c),3===d&&ei(c,1),hi(c),hi(c),ei(c,1),S(c))){d=3!==d?8:12;for(var e=0;e<d;e++)S(c)&&(6>e?ki(c,16):ki(c,64))}hi(c);d=R(c);if(0===d)R(c);else if(1===d)for(ei(c,1),hi(c),hi(c),d=R(c),e=0;e<d;e++)hi(c);hi(c);ei(c,1);d=R(c);var f=R(c),g=fi(c,1);0===g&&ei(c,1);ei(c,1);var h=e=0,k=0,l=0;S(c)&&
|
|
1182
1183
|
(e=R(c),h=R(c),k=R(c),l=R(c));c=(2-g)*(f+1)*16-2*k-2*l;d=16*(d+1)-2*e-2*h;e=[];b=b.na;e.push(b.byteLength>>>8&255);e.push(b.byteLength&255);e=e.concat.apply(e,w(b));b=[];a=a.na;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,e[3],e[4],e[5],255,225].concat(e,[1],b));return{height:c,width:d,za:a}}
|
|
1183
|
-
function Zz(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=
|
|
1184
|
-
{data:
|
|
1185
|
-
function aA(a){var b=new
|
|
1186
|
-
function bA(a){a=new
|
|
1187
|
-
R(a);R(a);R(a);R(a);R(a);R(a);R(a);if(S(a)&&S(a))for(
|
|
1188
|
-
|
|
1189
|
-
R(a),
|
|
1184
|
+
function Zz(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=li(new ci(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.na.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(jg(h,f.na)))}return c.length?
|
|
1185
|
+
{data:jg.apply(cg,w(c)),sd:b}:null}var Yz=[100,110,122,244,44,83,86,118,128,138,139,134];function $z(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=aA(b.na);a=bA(c.na);var f=cA(d.na);b=dA(b.na,c.na,d.na,{Mf:e.Mf,kg:e.kg,qf:a.qf,rf:a.rf,jf:a.jf,pf:a.pf,kf:a.kf,lf:a.lf,mf:a.mf,nf:a.nf,bf:a.bf,cf:a.cf,df:a.df,ef:a.ef,gf:a.gf,hf:a.hf,Xe:a.Xe,re:a.re,We:a.We,Te:a.Te,Se:a.Se,Qf:f.Qf});return{height:a.height,width:a.width,za:b}}
|
|
1186
|
+
function aA(a){var b=new ci(a,!0);ji(b);ji(b);fi(b,4);fi(b,2);fi(b,6);a=fi(b,3);b=S(b);return{Mf:a+1,kg:b}}
|
|
1187
|
+
function bA(a){a=new ci(a,!0);ji(a);ji(a);var b=0,c=0,d=0,e=0;fi(a,4);var f=fi(a,3);S(a);for(var g=fi(a,2),h=fi(a,1),k=fi(a,5),l=ji(a),m=ji(a),n=ji(a),r=ji(a),q=ji(a),u=ji(a),v=ji(a),x=ji(a),z=ji(a),y=ji(a),C=ji(a),A=[],B=[],F=0;F<f;F++)A.push(S(a)),B.push(S(a));if(0<f)for(F=f;8>F;F++)fi(a,2);for(F=0;F<f;F++)A[F]&&fi(a,88),B[F]&&ji(a);R(a);A=R(a);3==A&&fi(a,1);B=R(a);F=R(a);S(a)&&(b+=R(a),c+=R(a),d+=R(a),e+=R(a));var H=R(a),G=R(a),J=R(a);if(S(a))for(var I=0;I<=f;I++)R(a),R(a),R(a);else R(a),R(a),
|
|
1188
|
+
R(a);R(a);R(a);R(a);R(a);R(a);R(a);if(S(a)&&S(a))for(I=0;4>I;I++)for(var L=0;L<(3===I?2:6);L++)if(S(a)){var O=Math.min(64,1<<4+(I<<1));1<I&&ii(a);for(var Q=0;Q<O;Q++)ii(a)}else R(a);S(a);S(a);S(a)&&(ji(a),R(a),R(a),S(a));I=R(a);for(O=L=0;O<I;O++)if(Q=!1,0!==O&&(Q=S(a)),Q){O===I&&R(a);S(a);R(a);for(var T=Q=0;T<=L;T++){var Z=S(a),aa=!1;Z||(aa=S(a));(Z||aa)&&Q++}L=Q}else{T=R(a);Q=R(a);L=T+Q;for(Z=0;Z<T;Z++)R(a),S(a);for(T=0;T<Q;T++)R(a),S(a)}if(S(a))for(I=R(a),L=0;L<I;L++){for(O=0;O<J+4;O++)fi(a,1);
|
|
1189
|
+
fi(a,1)}J=0;S(a);S(a);if(S(a)){S(a)&&255===ji(a)&&(fi(a,16),fi(a,16));S(a)&&S(a);S(a)&&(fi(a,3),S(a),S(a)&&(ji(a),ji(a),ji(a)));S(a)&&(R(a),R(a));S(a);S(a);S(a);if(I=S(a))R(a),R(a),R(a),R(a);if(S(a)&&(fi(a,32),fi(a,32),S(a)&&R(a),S(a))){O=!1;I=S(a);L=S(a);if(I||L){if(O=S(a))ji(a),fi(a,5),S(a),fi(a,5);fi(a,4);fi(a,4);O&&fi(a,4);fi(a,5);fi(a,5);fi(a,5)}for(Q=0;Q<=f;Q++){Z=!0;T=1;S(a)||(Z=S(a));aa=!1;Z?R(a):aa=S(a);aa||(T=R(a)+1);if(I){for(Z=0;Z<T;Z++)R(a),R(a),O&&(R(a),R(a));S(a)}if(L){for(Z=0;Z<T;Z++)R(a),
|
|
1190
|
+
R(a),O&&(R(a),R(a));S(a)}}}S(a)&&(S(a),S(a),S(a),J=R(a),R(a),R(a),R(a),R(a))}return{jf:C,qf:g,rf:h,pf:k,kf:l,lf:m,mf:n,nf:r,bf:q,cf:u,df:v,ef:x,gf:z,hf:y,re:J,Xe:0,We:A,Te:H,Se:G,width:B-(b+c)*(1===A||2===A?2:1),height:F-(d+e)*(1===A?2:1)}}function cA(a){var b=new ci(a,!0);ji(b);ji(b);R(b);R(b);S(b);S(b);fi(b,3);S(b);S(b);R(b);R(b);ii(b);S(b);S(b);S(b)&&R(b);ii(b);ii(b);S(b);S(b);S(b);S(b);a=S(b);b=S(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Qf:c}}
|
|
1190
1191
|
function dA(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.qf&3)<<6|(d.rf?1:0)<<5|d.pf&31;e[2]=d.kf;e[3]=d.lf;e[4]=d.mf;e[5]=d.nf;e[6]=d.bf;e[7]=d.cf;e[8]=d.df;e[9]=d.ef;e[10]=d.gf;e[11]=d.hf;e[12]=d.jf;e[13]=240|(d.re&3840)>>8;e[14]=d.re&255;e[15]=252|d.Qf&3;e[16]=252|d.We&3;e[17]=248|d.Te&7;e[18]=248|d.Se&7;e[19]=0;e[20]=0;e[21]=(d.Xe&3)<<6|(d.Mf&7)<<3|(d.kg?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1191
1192
|
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 eA(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*fA[14*(3===c?3-d:3===d?3:4)+e-1];f=gA[3*(3===c?0:2===c?1:2)+f];c=hA[c][d];var h=iA[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,X:k,Xi:8*c*h}}return null}
|
|
1192
1193
|
function jA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var fA=[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],gA=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],hA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],iA=[0,1,1,4];function kA(a){this.i=a;this.h=0;this.g=new Map}p=kA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?fc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1193
|
-
p.transmux=function(a,b,c,d){a=nc(a);for(c=
|
|
1194
|
-
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,cb:[],ma:new Uint8Array([]),za:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,$a:e},stream:b};h=new fu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=nu(h),this.g.set(b.id,d));b=Du(h);this.h++;b=
|
|
1195
|
-
kA.prototype.convertCodecs=kA.prototype.convertCodecs;kA.prototype.isSupported=kA.prototype.isSupported;kA.prototype.destroy=kA.prototype.destroy;
|
|
1196
|
-
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new
|
|
1197
|
-
lA.prototype.convertCodecs=lA.prototype.convertCodecs;lA.prototype.isSupported=lA.prototype.isSupported;lA.prototype.destroy=lA.prototype.destroy;
|
|
1194
|
+
p.transmux=function(a,b,c,d){a=nc(a);for(c=Th(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&jA(a,e)){var f=eA(a,e),g=4;f&&f.X&&(g=f.X);e+=g;e=e===a.length||e+1<a.length&&jA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=eA(a,c);if(!f)return Promise.reject(new P(2,3,3018));h||(h=f);c+f.X<=a.length&&e.push({data:a.subarray(c,c+f.X),size:f.X,duration:1152,fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}});c+=f.X}if(!h)return Promise.reject(new P(2,3,3018));a=9E4*h.Xi/h.sampleRate*this.h;d={id:b.id,
|
|
1195
|
+
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,cb:[],ma:new Uint8Array([]),za:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,$a:e},stream:b};h=new fu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=nu(h),this.g.set(b.id,d));b=Du(h);this.h++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.Mp3Transmuxer",kA);kA.prototype.transmux=kA.prototype.transmux;kA.prototype.getOriginalMimeType=kA.prototype.getOriginalMimeType;
|
|
1196
|
+
kA.prototype.convertCodecs=kA.prototype.convertCodecs;kA.prototype.isSupported=kA.prototype.isSupported;kA.prototype.destroy=kA.prototype.destroy;Wc("audio/mpeg",function(){return new kA("audio/mpeg")},bd);function lA(a){this.h=a;this.g=null}p=lA.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=kd(a).split(","),c=Jb("audio",b);b=Jb("video",b);return!c||b||"mp3"!=hd(c)?!1:fc(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
|
|
1197
|
+
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new mi;a=nc(a);a=this.g.parse(a);if("mp3"!=a.kd().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.hc());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=eA(b,c))?(c+d.X<=b.length&&(e=jg(e,b.subarray(c,c+d.X))),c+=d.X):c++;return Promise.resolve(e)};M("shaka.transmuxer.MpegTsTransmuxer",lA);lA.prototype.transmux=lA.prototype.transmux;lA.prototype.getOriginalMimeType=lA.prototype.getOriginalMimeType;
|
|
1198
|
+
lA.prototype.convertCodecs=lA.prototype.convertCodecs;lA.prototype.isSupported=lA.prototype.isSupported;lA.prototype.destroy=lA.prototype.destroy;Wc("video/mp2t",function(){return new lA("video/mp2t")},ad);/*
|
|
1198
1199
|
@license
|
|
1199
1200
|
MSS Transmuxer
|
|
1200
1201
|
Copyright 2015 Dash Industry Forum
|
|
@@ -1205,39 +1206,39 @@ function nA(a){function b(){this._procFullBox();this.flags&1&&(this._procField("
|
|
|
1205
1206
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1206
1207
|
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==oA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=mA.prototype;p.destroy=function(){};
|
|
1207
1208
|
p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return fc(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return fc(b)||fc(a)};p.convertCodecs=function(a,b){return b.replace("mss/","")};p.getOriginalMimeType=function(){return this.h};
|
|
1208
|
-
p.transmux=function(a,b,c){if(!c)return Promise.resolve(nc(a));if(!b.mssPrivateData)return Promise.reject(new
|
|
1209
|
+
p.transmux=function(a,b,c){if(!c)return Promise.resolve(nc(a));if(!b.mssPrivateData)return Promise.reject(new P(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
|
|
1209
1210
|
1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var r=e.fetch("saio");if(null===r){r=this.g.createFullBox("saio",h);r.version=0;r.flags=0;r.entry_count=1;r.offset=[0];var q=this.g.createFullBox("saiz",h);q.version=0;q.flags=0;q.sample_count=n.sample_count;q.default_sample_info_size=0;q.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)q.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else q.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
|
|
1210
|
-
1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=pA(u,"traf")+pA(h,"senc")+16);var x=nc(e.write());return Promise.resolve(x)}catch(z){return z instanceof
|
|
1211
|
-
mA.prototype.convertCodecs=mA.prototype.convertCodecs;mA.prototype.isSupported=mA.prototype.isSupported;mA.prototype.destroy=mA.prototype.destroy;var oA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);
|
|
1212
|
-
p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=
|
|
1213
|
-
p.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new
|
|
1214
|
-
0)),flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:v.
|
|
1215
|
-
switch(
|
|
1216
|
-
0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,fb:Math.round((l.pts||0)-(l.dts||0)),flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:G.
|
|
1217
|
-
[],L,
|
|
1218
|
-
c.startTime;var
|
|
1219
|
-
0<b.drmInfos.length,timescale:
|
|
1220
|
-
fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}}),f+=
|
|
1221
|
-
Oe.length;){var
|
|
1222
|
-
break;case "mp3":L=[];var
|
|
1223
|
-
timescale:iu,duration:d,cb:[],ma:new Uint8Array([]),za:new Uint8Array([]),data:{vb:this.g,baseMediaDecodeTime:f,$a:L},stream:b}}h&&a.push(h)}}catch(hD){return Promise.reject(hD)}if(!a.length)return Promise.reject(new
|
|
1224
|
-
qA.prototype.convertCodecs=qA.prototype.convertCodecs;qA.prototype.isSupported=qA.prototype.isSupported;qA.prototype.destroy=qA.prototype.destroy;var rA=["aac","ac-3","ec-3","mp3"],sA=["avc","hevc"];
|
|
1211
|
+
1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=pA(u,"traf")+pA(h,"senc")+16);var x=nc(e.write());return Promise.resolve(x)}catch(z){return z instanceof P?Promise.reject(z):Promise.reject(new P(2,3,3022))}};function pA(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}M("shaka.transmuxer.MssTransmuxer",mA);mA.prototype.transmux=mA.prototype.transmux;mA.prototype.getOriginalMimeType=mA.prototype.getOriginalMimeType;
|
|
1212
|
+
mA.prototype.convertCodecs=mA.prototype.convertCodecs;mA.prototype.isSupported=mA.prototype.isSupported;mA.prototype.destroy=mA.prototype.destroy;var oA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Wc("mss/audio/mp4",function(){return new mA("mss/audio/mp4")},bd);Wc("mss/video/mp4",function(){return new mA("mss/video/mp4")},bd);function qA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}p=qA.prototype;p.destroy=function(){this.h.clear()};p.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=kd(c).split(",");c=Jb("audio",d);d=Jb("video",d);if(c&&(c=hd(c),!rA.includes(c))||d&&(c=hd(d),!sA.includes(c)))return!1;if(b)return fc(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return fc(b)||fc(a)};
|
|
1213
|
+
p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=kd(b).replace("mp4a.40.34","mp3").split(",").map(this.Qh).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.Qh=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};p.getOriginalMimeType=function(){return this.j};
|
|
1214
|
+
p.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new mi;a=nc(a);var f=this.i.parse(a);a=[];var g=f.kd();try{var h=null;if("video"==e){switch(g.video){case "avc":for(var k=[],l=null,m=[],n=f.Fc(),r=0;r<n.length;r++){var q=n[r],u=q.Zb;m=m.concat(u);var v=Zz(u);if(v){null==l&&(l=q.dts);var x=void 0;x=r+1<n.length?(n[r+1].dts||0)-(q.dts||0):1<n.length?(q.dts||0)-(n[r-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,duration:x,fb:Math.round((q.pts||0)-(q.dts||
|
|
1215
|
+
0)),flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:v.sd?2:1,ib:v.sd?0:1}})}}var z=Xz(m);if(!z||null==l)throw new P(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,cb:[],ma:new Uint8Array([]),za:z.za,data:{vb:this.g,baseMediaDecodeTime:l,$a:k},stream:b};break;case "hvc":n=[];q=null;u=[];k=f.Fc();for(v=0;v<k.length;v++){l=k[v];m=l.Zb;u=u.concat(m);z=!1;var y=[],C=!1;r=t(m);for(x=r.next();!x.done;x=r.next()){var A=x.value;
|
|
1216
|
+
switch(A.type){case 1:case 0:var B=C=!0;break;case 19:case 20:case 21:z=B=C=!0;break;case 32:B=!0;break;case 33:B=!0;break;case 34:B=!0;break;case 35:C=B=!0;break;case 39:case 40:B=!0;break;default:B=!1}if(C&&B){var F=A.na.byteLength,H=new Uint8Array(4);H[0]=F>>24&255;H[1]=F>>16&255;H[2]=F>>8&255;H[3]=F&255;y.push(jg(H,A.na))}}var G=y.length?{data:jg.apply(cg,w(y)),sd:z}:null;G&&(null==q&&null!=l.dts&&(q=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||
|
|
1217
|
+
0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,fb:Math.round((l.pts||0)-(l.dts||0)),flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:G.sd?2:1,ib:G.sd?0:1}}))}var J=$z(u);if(!J||null==q)throw new P(2,3,3018);b.height=J.height;b.width=J.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,cb:[],ma:new Uint8Array([]),za:J.za,data:{vb:this.g,baseMediaDecodeTime:q,$a:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=
|
|
1218
|
+
[],L,O=null,Q=t(f.hc()),T=Q.next();!T.done;T=Q.next()){var Z=T.value,aa=Z.data;if(aa){var la=0;L=Oz(aa,la);if(!L)throw new P(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==O&&null!==Z.pts&&(O=Z.pts);for(;la<aa.length;){var Na=Nz(aa,la);if(Na){var Xa=Na.fe+Na.X;la+Xa<=aa.length&&I.push({data:aa.subarray(la+Na.fe,la+Xa),size:Na.X,duration:1024,fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}});la+=Xa}else la++}}}if(!L||null==O){if(!f.Fc().length)throw new P(2,3,3018);O=9E4*
|
|
1219
|
+
c.startTime;var Fb=Jb("audio",b.codecs.split(","));if(!Fb||!b.channelsCount||!b.audioSamplingRate)throw new P(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ra:Fb};var lb=Qz(Fb,b.channelsCount);if(!lb)throw new P(2,3,3018);var ac=O+9E4*(c.endTime-c.startTime);for(f=O;f<ac;)I.push({data:lb,size:lb.byteLength,duration:1024,fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}}),f+=1024/L.sampleRate*9E4}var Aa=L.sampleRate;f=O/9E4*Aa;h={id:b.id,type:"audio",codecs:L.ra,encrypted:b.encrypted&&
|
|
1220
|
+
0<b.drmInfos.length,timescale:Aa,duration:d,cb:[],ma:new Uint8Array([]),za:new Uint8Array([]),data:{vb:this.g,baseMediaDecodeTime:f,$a:I},stream:b};break;case "ac3":L=[];Aa=0;I=new Uint8Array([]);O=null;la=t(f.hc());for(var mb=la.next();!mb.done;mb=la.next()){var hb=mb.value,Gb=hb.data;null==O&&null!==hb.pts&&(O=hb.pts);for(f=0;f<Gb.length;){var ib=Sz(Gb,f);ib?(b.audioSamplingRate=ib.sampleRate,b.channelsCount=ib.channelCount,Aa=ib.sampleRate,I=ib.ma,L.push({data:Gb.subarray(f,f+ib.X),size:ib.X,duration:1536,
|
|
1221
|
+
fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}}),f+=ib.X):f++}}if(0==Aa||0==I.byteLength||null==O)throw new P(2,3,3018);f=O/9E4*Aa;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aa,duration:d,cb:[],ma:I,za:new Uint8Array([]),data:{vb:this.g,baseMediaDecodeTime:f,$a:L},stream:b};break;case "ec3":L=[];Aa=0;O=new Uint8Array([]);I=null;for(var Vh=t(f.hc()),Nd=Vh.next();!Nd.done;Nd=Vh.next()){var Ne=Nd.value,Oe=Ne.data;null==I&&null!==Ne.pts&&(I=Ne.pts);for(f=0;f<
|
|
1222
|
+
Oe.length;){var rb=Vz(Oe,f);rb?(b.audioSamplingRate=rb.sampleRate,b.channelsCount=rb.channelCount,Aa=rb.sampleRate,O=rb.ma,L.push({data:Oe.subarray(f,f+rb.X),size:rb.X,duration:1536,fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}}),f+=rb.X):f++}}if(0==Aa||0==O.byteLength||null==I)throw new P(2,3,3018);f=I/9E4*Aa;h={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aa,duration:d,cb:[],ma:O,za:new Uint8Array([]),data:{vb:this.g,baseMediaDecodeTime:f,$a:L},stream:b};
|
|
1223
|
+
break;case "mp3":L=[];var Ci;Aa=null;for(var hu=t(f.hc()),em=hu.next();!em.done;em=hu.next()){var fm=em.value,hg=fm.data;if(hg)for(null==Aa&&null!==fm.pts&&(Aa=fm.pts),f=0;f<hg.length;){var Ve=eA(hg,f);Ve?(Ci||(Ci=Ve),f+Ve.X<=hg.length&&L.push({data:hg.subarray(f,f+Ve.X),size:Ve.X,duration:1152,fb:0,flags:{hb:0,Ya:0,Xa:0,Va:0,Wa:2,ib:0}}),f+=Ve.X):f++}}if(!Ci||null==Aa)throw new P(2,3,3018);var iu=Ci.sampleRate;f=Aa/9E4*iu;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,
|
|
1224
|
+
timescale:iu,duration:d,cb:[],ma:new Uint8Array([]),za:new Uint8Array([]),data:{vb:this.g,baseMediaDecodeTime:f,$a:L},stream:b}}h&&a.push(h)}}catch(hD){return Promise.reject(hD)}if(!a.length)return Promise.reject(new P(2,3,3018));a=new fu(a);this.h.has(b.id)?d=this.h.get(b.id):(d=nu(a),this.h.set(b.id,d));b=Du(a);this.g++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.TsTransmuxer",qA);qA.prototype.transmux=qA.prototype.transmux;qA.prototype.getOriginalMimeType=qA.prototype.getOriginalMimeType;
|
|
1225
|
+
qA.prototype.convertCodecs=qA.prototype.convertCodecs;qA.prototype.isSupported=qA.prototype.isSupported;qA.prototype.destroy=qA.prototype.destroy;var rA=["aac","ac-3","ec-3","mp3"],sA=["avc","hevc"];Wc("video/mp2t",function(){return new qA("video/mp2t")},$c);/*
|
|
1225
1226
|
@license
|
|
1226
1227
|
EME Encryption Scheme Polyfill
|
|
1227
1228
|
Copyright 2019 Google LLC
|
|
1228
1229
|
SPDX-License-Identifier: Apache-2.0
|
|
1229
1230
|
*/
|
|
1230
1231
|
function tA(){}var uA;function vA(){uA?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(uA=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=wA):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1231
|
-
function wA(a,b){var c=this,d;return
|
|
1232
|
+
function wA(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),D(e,uA.call(c,a,b),2);d=e.h;if(xA(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=uA,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=yA;return e.return(yA.call(c,
|
|
1232
1233
|
a,b))})}
|
|
1233
|
-
function yA(a,b){var c=this,d,e,f,g,h,k,l,m,n,r;return
|
|
1234
|
+
function yA(a,b){var c=this,d,e,f,g,h,k,l,m,n,r;return K(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=zA(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=AA(h.videoCapabilities,d),l=AA(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1234
1235
|
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return D(q,uA.call(c,a,e),2)}r=q.h;return q.return(new BA(r,d))})}function AA(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",tA);tA.install=vA;function CA(){}var DA;
|
|
1235
1236
|
function EA(){DA?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(DA=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=FA):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1236
|
-
function FA(a){var b=this,c,d,e;return
|
|
1237
|
+
function FA(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),D(f,DA.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&xA(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=DA,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1237
1238
|
navigator.mediaCapabilities.decodingInfo=GA;if(d){f.F(3);break}e=c;return D(f,HA(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(GA.call(b,a))}})}
|
|
1238
|
-
function GA(a){var b=this,c,d,e,f,g,h,k,l;return
|
|
1239
|
+
function GA(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=zA(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):D(m,DA.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1239
1240
|
new BA(k.keySystemAccess,c);m.F(3);break}if(!a.keySystemConfiguration){m.F(3);break}l=k;return D(m,HA(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1240
|
-
function HA(a){var b,c;return
|
|
1241
|
+
function HA(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return D(d,
|
|
1241
1242
|
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}M("McEncryptionSchemePolyfill",CA);CA.install=EA;function BA(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
1242
1243
|
BA.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};BA.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
1243
1244
|
function zA(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function xA(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
@@ -1287,74 +1288,74 @@ sw:{A:"Kiswahili",B:"Swahili"},"sw-KE":{A:"Kiswahili",B:"Swahili (Kenya)"},ta:{A
|
|
|
1287
1288
|
B:"Thai"},"th-TH":{A:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",B:"Thai (Thailand)"},tl:{A:"Filipino",B:"Filipino"},"tl-PH":{A:"Filipino",B:"Filipino"},tlh:{A:"tlhIngan-Hol",B:"Klingon"},tr:{A:"T\u00fcrk\u00e7e",B:"Turkish"},"tr-TR":{A:"T\u00fcrk\u00e7e",B:"Turkish"},"tt-RU":{A:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",B:"Tatar"},uk:{A:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",B:"Ukrainian"},"uk-UA":{A:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
1288
1289
|
B:"Ukrainian"},ur:{A:"\u0627\u0631\u062f\u0648",B:"Urdu"},"ur-PK":{A:"\u0627\u0631\u062f\u0648",B:"Urdu"},uz:{A:"O'zbek",B:"Uzbek"},"uz-UZ":{A:"O'zbek",B:"Uzbek"},vi:{A:"Ti\u1ebfng Vi\u1ec7t",B:"Vietnamese"},"vi-VN":{A:"Ti\u1ebfng Vi\u1ec7t",B:"Vietnamese"},"xh-ZA":{A:"isiXhosa",B:"Xhosa"},yi:{A:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",B:"Yiddish"},"yi-DE":{A:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",B:"Yiddish (German)"},zh:{A:"\u4e2d\u6587",B:"Chinese"},"zh-HANS":{A:"\u4e2d\u6587\u7b80\u4f53",
|
|
1289
1290
|
B:"Chinese Simplified"},"zh-HANT":{A:"\u4e2d\u6587\u7e41\u9ad4",B:"Chinese Traditional"},"zh-CN":{A:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",B:"Chinese Simplified (China)"},"zh-HK":{A:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",B:"Chinese Traditional (Hong Kong)"},"zh-SG":{A:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",B:"Chinese Simplified (Singapore)"},"zh-TW":{A:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",B:"Chinese Traditional (Taiwan)"},"zu-ZA":{A:"isiZulu",B:"Zulu"}},KA=t(Object.keys(JA)),LA=KA.next();!LA.done;LA=
|
|
1290
|
-
KA.next()){var MA=LA.value;JA[MA.toLowerCase()]=JA[MA]};function NA(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Af;this.localization=this.controls.Ha;this.player=this.controls.Dc();this.video=this.controls.Yb();this.adManager=this.player.
|
|
1291
|
-
NA.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};M("shaka.ui.Element",NA);NA.prototype.release=NA.prototype.release;function OA(a){return PA(a,"shaka-back-to-overflow-button")}function PA(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function QA(a){a&&(a=PA(a,"shaka-chosen-item"))&&a.parentElement.focus()}function RA(){var a=
|
|
1292
|
-
function TA(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 UA(a,b){NA.call(this,a,b);var c=this;this.i=
|
|
1293
|
-
""))});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.La();c.g.ua(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.La(),this.g.ua(.5))}pa(UA,NA);UA.prototype.release=function(){this.g.stop();this.g=null;NA.prototype.release.call(this)};M("shaka.ui.AdCounter",UA);function VA(a,b){NA.call(this,a,b);var c=this;this.g=
|
|
1291
|
+
KA.next()){var MA=LA.value;JA[MA.toLowerCase()]=JA[MA]};function NA(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Af;this.localization=this.controls.Ha;this.player=this.controls.Dc();this.video=this.controls.Yb();this.adManager=this.player.Xd();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})}
|
|
1292
|
+
NA.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};M("shaka.ui.Element",NA);NA.prototype.release=NA.prototype.release;function OA(a){return PA(a,"shaka-back-to-overflow-button")}function PA(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function QA(a){a&&(a=PA(a,"shaka-chosen-item"))&&a.parentElement.focus()}function RA(){var a=U("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function SA(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
1293
|
+
function TA(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 UA(a,b){NA.call(this,a,b);var c=this;this.i=U("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=U("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new xd(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=TA(e-d,!1)+" / "+TA(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=
|
|
1294
|
+
""))});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.La();c.g.ua(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.La(),this.g.ua(.5))}pa(UA,NA);UA.prototype.release=function(){this.g.stop();this.g=null;NA.prototype.release.call(this)};M("shaka.ui.AdCounter",UA);function VA(a,b){NA.call(this,a,b);var c=this;this.g=U("div");this.g.classList.add("shaka-ad-position");SA(this.g,!1);this.parent.appendChild(this.g);this.h=U("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&WA(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&WA(c)});this.eventManager.o(this.adManager,"ad-started",function(){WA(c)});this.eventManager.o(this.adManager,
|
|
1294
1295
|
"ad-stopped",function(){c.h.textContent="";SA(c.g,!1)});this.ad&&WA(this)}pa(VA,NA);function WA(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));SA(a.g,!0)}}M("shaka.ui.AdPosition",VA);function XA(a,b){NA.call(this,a,b);var c=this;this.button=Vk();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();
|
|
1295
|
-
c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?YA(c.controls):ZA(c.controls)});this.ad&&(this.g(),this.h())}pa(XA,NA);XA.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.u.paused&&!a.
|
|
1296
|
-
M("shaka.ui.PlayButton",XA);function $A(a,b){XA.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa($A,XA);$A.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};$A.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};M("shaka.ui.BigPlayButton",$A);function aB(a,b){NA.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=
|
|
1296
|
+
c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?YA(c.controls):ZA(c.controls)});this.ad&&(this.g(),this.h())}pa(XA,NA);XA.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.u.paused&&!a.U;return a};XA.prototype.g=function(){};XA.prototype.h=function(){};
|
|
1297
|
+
M("shaka.ui.PlayButton",XA);function $A(a,b){XA.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa($A,XA);$A.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};$A.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};M("shaka.ui.BigPlayButton",$A);function aB(a,b){NA.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=U("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";SA(c.g,!0)}else SA(c.g,
|
|
1297
1298
|
!1)});this.eventManager.o(window,"click",function(){SA(c.g,!1)});bB(this)}pa(aB,NA);aB.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];NA.prototype.release.call(this)};function cB(a,b){dB.set(a,b)}function bB(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=dB.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}M("shaka.ui.ContextMenu",aB);
|
|
1298
|
-
aB.registerElement=cB;var dB=new Map;function eB(a,b,c,d){NA.call(this,a,b);var e=this;this.container=
|
|
1299
|
+
aB.registerElement=cB;var dB=new Map;function eB(a,b,c,d){NA.call(this,a,b);var e=this;this.container=U("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,w(c));this.h=!1;this.bar=document.createElement("input");this.J=new xd(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,w(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);
|
|
1299
1300
|
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.nc()&&(e.h=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.nc()&&(e.h=!0,fB(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(fB(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.h&&(e.h=!1,fB(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
|
|
1300
1301
|
"touchcancel",function(f){e.h&&(e.h=!1,fB(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,"mouseup",function(){e.h&&(e.h=!1,e.onChangeEnd())});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()})}pa(eB,NA);p=eB.prototype;p.release=function(){this.J&&(this.J.stop(),this.J=null);NA.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};
|
|
1301
1302
|
p.onChangeStart=function(){};p.onChange=function(){};p.onChangeEnd=function(){};p.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.J.S(.5)};p.getValue=function(){return parseFloat(this.bar.value)};p.setValue=function(a){this.h||(this.bar.value=a)};
|
|
1302
1303
|
function fB(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}M("shaka.ui.RangeElement",eB);eB.prototype.setValue=eB.prototype.setValue;eB.prototype.getValue=eB.prototype.getValue;eB.prototype.changeTo=eB.prototype.changeTo;eB.prototype.onChangeEnd=eB.prototype.onChangeEnd;eB.prototype.onChange=eB.prototype.onChange;eB.prototype.onChangeStart=eB.prototype.onChangeStart;
|
|
1303
|
-
eB.prototype.setRange=eB.prototype.setRange;function gB(a,b){eB.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.G=
|
|
1304
|
-
this.container.appendChild(this.H);iB(this);this.M=!1;this.i=
|
|
1305
|
-
"locale-changed",function(){return kB(c)});this.eventManager.o(this.adManager,"ad-started",function(){lB(c)||SA(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){lB(c)&&SA(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.D=d.cuepoints;mB(c)});this.eventManager.o(this.player,"unloading",function(){c.D=[];mB(c);c.j&&(c.j.abort(),c.j=null);c.l=null;jB(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.player.
|
|
1304
|
+
eB.prototype.setRange=eB.prototype.setRange;function gB(a,b){eB.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.G=U("div");this.G.classList.add("shaka-ad-markers");this.container.insertBefore(this.G,this.container.childNodes[0]);this.m=this.controls.g;this.u=new xd(function(){var d=c.getValue();c.player.R()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.K=new xd(function(){hB(c)});this.I=new Af;this.H=U("div");this.H.id="shaka-player-ui-chapters-container";
|
|
1305
|
+
this.container.appendChild(this.H);iB(this);this.M=!1;this.i=U("div");this.i.id="shaka-player-ui-thumbnail-container";this.g=U("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.C=U("div");this.C.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.C);this.container.appendChild(this.i);this.j=this.l=null;this.L=!1;this.s=new xd(function(){jB(c)});this.D=[];this.eventManager.o(this.localization,"locale-updated",function(){return kB(c)});this.eventManager.o(this.localization,
|
|
1306
|
+
"locale-changed",function(){return kB(c)});this.eventManager.o(this.adManager,"ad-started",function(){lB(c)||SA(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){lB(c)&&SA(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.D=d.cuepoints;mB(c)});this.eventManager.o(this.player,"unloading",function(){c.D=[];mB(c);c.j&&(c.j.abort(),c.j=null);c.l=null;jB(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.player.Yd().length){var e=
|
|
1306
1307
|
c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;nB(c,d,Math.round(f+(parseFloat(c.bar.max)-f)/e.width*d))}else jB(c)});this.eventManager.o(this.container,"mouseleave",function(){c.s.stop();c.s.S(.25)});this.setValue(this.video.currentTime);this.update();kB(this);this.ad&&SA(this.container,!1)}pa(gB,eB);p=gB.prototype;p.release=function(){this.u&&(this.u.stop(),this.u=null,this.K.stop(),this.K=null);this.I.release();eB.prototype.release.call(this)};
|
|
1307
|
-
p.onChangeStart=function(){this.M=!this.video.paused;this.controls.gg(!0);this.video.pause();this.s.stop();this.L=!0};p.onChange=function(){if(this.video.duration)if(this.update(),this.u.S(.125),this.player.
|
|
1308
|
+
p.onChangeStart=function(){this.M=!this.video.paused;this.controls.gg(!0);this.video.pause();this.s.stop();this.L=!0};p.onChange=function(){if(this.video.duration)if(this.update(),this.u.S(.125),this.player.Yd().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());nB(this,(d-a)/((b-a)/c.width),d)}else jB(this)};
|
|
1308
1309
|
p.onChangeEnd=function(){this.u.La();this.controls.gg(!1);this.M&&this.video.play();this.L&&(this.L=!1,this.s.stop(),this.s.S(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1309
1310
|
p.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.ya(),g=f.end-f.start;this.setRange(f.start,f.end);lB(this)?(SA(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
|
|
1310
1311
|
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()+")")):SA(this.container,!1)};
|
|
1311
1312
|
function hB(a){if(a.D.length){for(var b=a.player.ya(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=t(a.D),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=t(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 "+
|
|
1312
1313
|
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.G.style.background="linear-gradient("+d.join(",")+")"}else a.G.style.background="transparent"}function mB(a){hB(a);var b=a.player.ya();b=b.end-b.start;a.player.R()&&5<b&&a.K.ua(1)}function lB(a){var b=a.player.ya();b=b.end-b.start;return a.player.R()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function kB(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1313
|
-
function nB(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A
|
|
1314
|
+
function nB(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A;K(function(B){switch(B.g){case 1:d=oB(a);if(!d)return jB(a),B.return();0>c&&(c=0);e=a.player.ya();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return D(B,a.player.yf(d.id,f),2);case 2:g=B.h;if(!g||!g.uris.length)return jB(a),B.return();a.player.R()?(h=e.end-c,a.C.textContent=1>h?a.localization.resolve("LIVE"):"-"+pB(h)):a.C.textContent=pB(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1314
1315
|
-(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.Wb()==a.l.segment.Wb()&&g.segment.Sb()==a.l.segment.Sb()){B.F(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!r.startsWith("offline:")){B.F(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(B,5);q=wf;u=fk(g.segment.aa(),g.segment.Wb(),g.segment.Sb(),a.player.getConfiguration().streaming.retryParameters);
|
|
1315
|
-
a.j=a.player.Tb().request(q,u,{type:1});return D(B,a.j.promise,7);case 7:v=B.h;a.j=null;"mjpg"==d.codecs?(x=(new Tf).box("mdat",
|
|
1316
|
-
a.g.onload=function(){r.startsWith("blob:")&&URL.revokeObjectURL(r)};a.i.insertBefore(a.g,a.i.firstChild);case 3:
|
|
1317
|
-
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",
|
|
1318
|
-
function oB(a){var b=a.player.
|
|
1316
|
+
a.j=a.player.Tb().request(q,u,{type:1});return D(B,a.j.promise,7);case 7:v=B.h;a.j=null;"mjpg"==d.codecs?(x=(new Tf).box("mdat",bg(function(F){r=URL.createObjectURL(new Blob([F],{type:"image/jpeg"}))})),x.parse(v.data,!1)):(z=d.mimeType||"image/jpeg",y=new Blob([v.data],{type:z}),r=URL.createObjectURL(y));va(B,4);break;case 5:C=wa(B);if(7001==C.code)return B.return();throw C;case 4:try{a.i.removeChild(a.g)}catch(F){}a.g=U("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=r;
|
|
1317
|
+
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/
|
|
1318
|
+
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",E(B)}})}
|
|
1319
|
+
function oB(a){var b=a.player.Yd();if(!b.length)return null;for(var c={},d=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Ie:c.Ie,Ge:c.Ge},e=d.next())if(c.Ie=e.value,c.Ge=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Ie&&g.bandwidth<.01*f.Ge}}(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&&
|
|
1319
1320
|
"mjpg"==f.codecs})||b[0]}function jB(a){a.i.style.visibility="hidden";a.C.textContent=""}function pB(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}
|
|
1320
1321
|
function iB(a){function b(){for(var f="und",g=[],h=t(Array.from(a.localization.g)),k=h.next();!k.done&&(f=k.value,g=a.player.vf(f),!g.length);k=h.next());g.length||(f="und",g=a.player.vf(f));h=f!==d;k=e.length!==g.length||!e.some(function(l,m){m=g.at(m);return c(l,m)||g.some(function(n){return c(l,n)})});d=f;e=g;g.length?(h||k)&&qB(a,e):rB(a)}function c(f,g){return!f&&!g||f.id===g.id&&f.title===g.title&&f.startTime===g.startTime&&f.endTime===g.endTime}var d="und",e=[];b();a.eventManager.o(a.player,
|
|
1321
1322
|
"unloading",function(){rB(a);d="und";e=[]});a.eventManager.o(a.player,"trackschanged",b);a.eventManager.o(a.localization,"locale-updated",function(){b()});a.eventManager.o(a.localization,"locale-changed",function(){b()})}
|
|
1322
|
-
function qB(a,b){rB(a);var c=a.player.ya(),d=[];b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,!(e.startTime>=c.end)){var f=e.startTime>c.start?e.startTime:c.start,g=e.endTime<c.end?e.endTime:c.end;d.push({start:f,end:g,size:g-f,title:e.title,id:e.id})}if(!(2>d.length)){c=d.reduce(function(k,l){return k+=l.size},0);var h=[];d=t(d);for(e=d.next();!e.done;e=d.next())b=e.value,e=
|
|
1323
|
-
a.m.seekBarColors.chapterMarks,e.appendChild(f),f=
|
|
1324
|
-
{passive:!0});a.I.o(a.bar,"pointerout",function(){for(var k=t(h),l=k.next();!l.done;l=k.next())l=l.value,l.
|
|
1325
|
-
!1)});this.Ma=new
|
|
1326
|
-
p.destroy=function(){var a=this;return
|
|
1327
|
-
null;case 6:a.D=null,a.s=null,a.u=null,a.Ha=null,a.ha.clear(),cb.prototype.release.call(a),
|
|
1328
|
-
p.configure=function(a){this.g=a;this.C.zg(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.yb&&(this.yb=null);this.Ua&&(this.Ua=null);this.h?(Wk(this.h),yB(this)):(BB(this),CB(this));this.j.classList.add("shaka-video-container");this.s.classList.add("shaka-video");DB(this);this.g.addBigPlayButton&&EB(this);this.g.customContextMenu&&(this.Ua=new aB(this.T,this),this.H.push(this.Ua));this.$||FB(this);this.Ab=
|
|
1323
|
+
function qB(a,b){rB(a);var c=a.player.ya(),d=[];b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,!(e.startTime>=c.end)){var f=e.startTime>c.start?e.startTime:c.start,g=e.endTime<c.end?e.endTime:c.end;d.push({start:f,end:g,size:g-f,title:e.title,id:e.id})}if(!(2>d.length)){c=d.reduce(function(k,l){return k+=l.size},0);var h=[];d=t(d);for(e=d.next();!e.done;e=d.next())b=e.value,e=U("div"),e.classList.add("shaka-chapter"),e.style.width=100*b.size/c+"%",a.H.appendChild(e),f=U("div"),f.style.borderColor=
|
|
1324
|
+
a.m.seekBarColors.chapterMarks,e.appendChild(f),f=U("p"),f.classList.add("shaka-chapter-label","shaka-hidden"),f.style.color=a.m.seekBarColors.chapterLabels,f.innerText=b.title,e.appendChild(f),h.push({start:b.start,end:b.end,Wd:f});a.I.o(a.bar,"pointermove",function(k){if(k.target){var l=k.target;k=k.offsetX/l.clientWidth;l=parseInt(l.getAttribute("max"),10);l*=k;k=t(h);for(var m=k.next();!m.done;m=k.next())m=m.value,(m.start<=l&&l<m.end)===m.Wd.classList.contains("shaka-hidden")&&m.Wd.classList.toggle("shaka-hidden")}},
|
|
1325
|
+
{passive:!0});a.I.o(a.bar,"pointerout",function(){for(var k=t(h),l=k.next();!l.done;l=k.next())l=l.value,l.Wd.classList.contains("shaka-hidden")||l.Wd.classList.add("shaka-hidden")},{passive:!0})}}function rB(a){a.I.Kb();Wk(a.H)}M("shaka.ui.SeekBar",gB);function sB(){}sB.prototype.create=function(a,b){return new gB(a,b)};gB.Factory=sB;function Y(a,b,c,d){cb.call(this);var e=this;this.P=!0;this.g=d;this.C=new zo(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.xa=!0;this.u=this.C.Yb();this.s=c;this.D=this.C.Dc();this.oa=a;this.j=b;this.Ta=this.D.Xd();this.l=this.m=null;this.U=!1;this.G=[];this.Qb=[];this.Bb=!1;this.Z=new xd(function(){e.j.style.cursor="none";e.Bb=!1;tB(e)});this.ea=new xd(function(){e.h.removeAttribute("shown");e.I.S(2)});this.I=new xd(function(){for(var f=t(e.G),g=f.next();!g.done;g=f.next())SA(g.value,
|
|
1326
|
+
!1)});this.Ma=new xd(function(){e.nc()&&uB(e)});this.J=null;this.H=[];this.Ha=vB();this.i=new Af;this.configure(this.g);wB(this);this.ha=new Set;xB(this);this.Ma.ua(.125);this.i.o(this.Ha,"locale-changed",function(f){e.Ta.setLocale(f.locales[0])})}pa(Y,cb);p=Y.prototype;
|
|
1327
|
+
p.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.s){b.F(2);break}return D(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.Z&&(a.Z.stop(),a.Z=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.Ma&&(a.Ma.stop(),a.Ma=null);yB(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.C){b.F(4);break}return D(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.oa){b.F(6);break}return D(b,a.oa.destroy(),7);case 7:a.oa=
|
|
1328
|
+
null;case 6:a.D=null,a.s=null,a.u=null,a.Ha=null,a.ha.clear(),cb.prototype.release.call(a),E(b)}})};function yB(a){for(var b=t(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function zB(a,b){AB.set(a,b)}p.yh=function(a){this.xa=a;xB(this)};p.Di=function(){tB(this)};
|
|
1329
|
+
p.configure=function(a){this.g=a;this.C.zg(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.yb&&(this.yb=null);this.Ua&&(this.Ua=null);this.h?(Wk(this.h),yB(this)):(BB(this),CB(this));this.j.classList.add("shaka-video-container");this.s.classList.add("shaka-video");DB(this);this.g.addBigPlayButton&&EB(this);this.g.customContextMenu&&(this.Ua=new aB(this.T,this),this.H.push(this.Ua));this.$||FB(this);this.Ab=U("div");this.Ab.classList.add("shaka-server-side-ad-container");
|
|
1329
1330
|
this.h.appendChild(this.Ab);GB(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,w(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));HB(this);this.Qb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));tB(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.o(b,"click",c);this.i.o(b,"dblclick",
|
|
1330
1331
|
c)}};p.cg=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");tB(this)};p.fh=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.cg(!1)};p.getAd=function(){return this.m};p.Lh=function(){return this.C};p.Xh=function(){return this.Ha};p.mi=function(){return this.j};p.Yb=function(){return this.u};p.Wh=function(){return this.s};p.Dc=function(){return this.D};p.Vh=function(){return this.oa};
|
|
1331
|
-
p.Ph=function(){return this.h};p.di=function(){return this.Ab};p.Mh=function(){return this.M};p.Nh=function(){return this.g};p.Bi=function(){return this.
|
|
1332
|
-
p.
|
|
1333
|
-
function IB(a){var b,c,d;return
|
|
1334
|
-
4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new N("error",(new Map).set("detail",d))),
|
|
1335
|
-
p.
|
|
1336
|
-
p.ng=function(){var a=this,b,c;return
|
|
1337
|
-
function KB(a){var b,c,d,e,f,g;return
|
|
1338
|
-
d.document.head.append(g);d.document.body.append(b);a.i.ka(d,"pagehide",function(){f.replaceWith(b)});
|
|
1332
|
+
p.Ph=function(){return this.h};p.di=function(){return this.Ab};p.Mh=function(){return this.M};p.Nh=function(){return this.g};p.Bi=function(){return this.U};p.gg=function(a){this.U=a};p.si=function(){return this.xa};p.Jg=function(){return this.l?this.l.getValue():this.u.currentTime};p.gh=function(a){this.J=a};p.Qd=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};p.Gc=function(){this.I.La()};
|
|
1333
|
+
p.je=function(){return document.fullscreenEnabled||this.s.webkitSupportsFullscreen?!0:!1};p.Ic=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.s;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1334
|
+
function IB(a){var b,c,d;return K(function(e){switch(e.g){case 1:ta(e,2);if(!document.fullscreenEnabled){b=a.s;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.F(4);break}if(!document.pictureInPictureElement){e.F(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.F(4);break}ta(e,9);return D(e,screen.orientation.lock("landscape"),11);case 11:va(e,
|
|
1335
|
+
4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new N("error",(new Map).set("detail",d))),E(e)}})}function JB(a){var b;return K(function(c){if(!document.fullscreenEnabled)return b=a.s,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.F(0);screen.orientation&&screen.orientation.unlock();return D(c,document.exitFullscreen(),0)})}p.mg=function(){var a=this;return K(function(b){return a.Ic()?D(b,JB(a),0):D(b,IB(a),0)})};
|
|
1336
|
+
p.td=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!0:document.pictureInPictureEnabled?!this.s.disablePictureInPicture:!1};p.Cf=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
|
|
1337
|
+
p.ng=function(){var a=this,b,c;return K(function(d){if(1==d.g)return ta(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?D(d,KB(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 va(d,0);c=wa(d);a.dispatchEvent(new N("error",(new Map).set("detail",c)));E(d)})};
|
|
1338
|
+
function KB(a){var b,c,d,e,f,g;return K(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;LB(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%}");
|
|
1339
|
+
d.document.head.append(g);d.document.body.append(b);a.i.ka(d,"pagehide",function(){f.replaceWith(b)});E(h)})}
|
|
1339
1340
|
function LB(a){var b=[].concat(w(document.styleSheets)).map(function(d){try{return[].concat(w(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)}p.kh=function(){SA(this.K,!0);SA(this.M,!0);this.h.setAttribute("ad-active","true")};
|
|
1340
|
-
p.Lg=function(){SA(this.K,!1);SA(this.M,!1);this.h.removeAttribute("ad-active")};function ZA(a){a.P&&a.u.duration&&(a.D.Ve(),a.u.paused&&!a.
|
|
1341
|
-
function BB(a){a.h=
|
|
1342
|
-
function EB(a){var b=
|
|
1343
|
-
function FB(a){a.$=
|
|
1341
|
+
p.Lg=function(){SA(this.K,!1);SA(this.M,!1);this.h.removeAttribute("ad-active")};function ZA(a){a.P&&a.u.duration&&(a.D.Ve(),a.u.paused&&!a.U?a.u.play():a.u.pause())}function YA(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
1342
|
+
function BB(a){a.h=U("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.u.duration&&(a.nc()?a.J=Date.now():(MB(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){NB(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.je()&&a.mg()})}
|
|
1343
|
+
function EB(a){var b=U("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.yb=new $A(b,a);a.H.push(a.yb)}function DB(a){var b=U("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function OB(a){a.K=U("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();SA(a.K,b);a.L.appendChild(a.K);b=new VA(a.K,a);a.H.push(b);b=new UA(a.K,a);a.H.push(b)}
|
|
1344
|
+
function FB(a){a.$=U("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=U("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",
|
|
1344
1345
|
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
|
|
1345
|
-
function GB(a){a.L=
|
|
1346
|
-
(c=AB.get(c).create(a.T,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function HB(a){if(a.g.addSeekBar)a.l=PB.create(a.L,a),a.H.push(a.l);else{a=t(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function CB(a){a.M=
|
|
1347
|
-
function wB(a){a.i.o(a.D,"buffering",function(){a.P&&SA(a.$,a.D.
|
|
1346
|
+
function GB(a){a.L=U("div");a.L.classList.add("shaka-bottom-controls");a.L.classList.add("shaka-no-propagation");a.h.appendChild(a.L);a.i.o(a.L,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Gc()});OB(a);a.T=U("div");a.T.classList.add("shaka-controls-button-panel");a.T.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.T.classList.add("shaka-tooltips-on");a.L.appendChild(a.T);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,AB.get(c)?
|
|
1347
|
+
(c=AB.get(c).create(a.T,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function HB(a){if(a.g.addSeekBar)a.l=PB.create(a.L,a),a.H.push(a.l);else{a=t(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function CB(a){a.M=U("div");a.M.classList.add("shaka-client-side-ad-container");SA(a.M,!1);a.i.o(a.M,"click",function(){NB(a)});a.j.appendChild(a.M)}
|
|
1348
|
+
function wB(a){a.i.o(a.D,"buffering",function(){a.P&&SA(a.$,a.D.rd())});a.P&&SA(a.$,a.D.rd());a.i.o(window,"keydown",function(b){QB(a,b)});a.i.o(window,"click",function(){return a.Gc()});a.i.o(a,"submenuopen",function(){a.Gc()});a.i.o(a.u,"play",function(){tB(a)});a.i.o(a.u,"pause",function(){tB(a)});a.i.o(a.j,"mousemove",function(b){MB(a,b)});a.i.o(a.j,"touchmove",function(b){MB(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){MB(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.J||a.Z.La()});
|
|
1348
1349
|
a.i.o(a.C,"caststatuschanged",function(){xB(a)});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)&&MB(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),RB(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),
|
|
1349
1350
|
RB(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),RB(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),RB(a,a.l.getValue()+f));break;case "Home":a.l&&RB(a,a.D.ya().start);break;case "End":a.l&&RB(a,a.D.ya().end);break;case " ":e&&SB(a)}}});a.i.o(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.o(a.Ta,"ad-started",function(b){a.m=b.ad;a.kh()});a.i.o(a.Ta,"ad-stopped",function(){a.m=null;a.Lg()});screen.orientation&&a.i.o(screen.orientation,"change",
|
|
1350
|
-
function(){return
|
|
1351
|
+
function(){return K(function(b){return D(b,TB(a),0)})})}function TB(a){return K(function(b){return a.u&&0!=a.u.readyState&&!a.C.Da()&&a.g.enableFullscreenOnRotation&&a.je()?screen.orientation.type.includes("landscape")&&!a.Ic()?D(b,IB(a),0):screen.orientation.type.includes("portrait")&&a.Ic()?D(b,JB(a),0):b.F(0):b.return()})}
|
|
1351
1352
|
function MB(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),tB(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.Bb=!0,a.I.stop(),a.nc()||(uB(a),tB(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.S(3))}function UB(a){return window.matchMedia("hover: hover").matches?a.Qb.some(function(b){return b.matches(":hover")}):!1}
|
|
1352
|
-
function tB(a){var b=a.m?a.m.isPaused():!1,c=a.u.paused&&!a.
|
|
1353
|
+
function tB(a){var b=a.m?a.m.isPaused():!1,c=a.u.paused&&!a.U,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Bb||d||UB(a)?(uB(a),a.h.setAttribute("shown","true"),a.ea.stop()):a.ea.S(a.g.fadeDelay)}function NB(a){a.P&&(a.Qd()?a.I.La():a.g.singleClickForPlayAndPause&&SB(a))}function SB(a){a.m&&a.m.isLinear()?YA(a):ZA(a)}
|
|
1353
1354
|
function xB(a){var b=a.C.Da();a.dispatchEvent(new N("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}p.nc=function(){return this.P?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function RB(a,b){a.l.changeTo(b);a.nc()&&uB(a)}
|
|
1354
1355
|
function uB(a){if(a.l)if(a.l.setValue(a.u.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new N("timeandseekrangeupdated"))}
|
|
1355
|
-
function QB(a,b){a.ha.add(b.key);var c=a.
|
|
1356
|
+
function QB(a,b){a.ha.add(b.key);var c=a.Qd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),tB(a),a.i.o(window,"mousedown",function(){a.i.bc(window,"mousedown")}));"Escape"==b.key&&a.I.La();c&&a.ha.has("Tab")&&VB(a,b)}
|
|
1356
1357
|
function VB(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ha.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
1357
|
-
function vB(){var a=new
|
|
1358
|
+
function vB(){var a=new Yb("en");a.sa("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
|
|
1358
1359
|
["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
|
|
1359
1360
|
["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
|
|
1360
1361
|
["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
|
|
@@ -1413,82 +1414,82 @@ a.sa("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1413
1414
|
["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
|
|
1414
1415
|
["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
|
|
1415
1416
|
["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.yg(navigator.languages||[]);return a}M("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.nc;Y.prototype.hideAdUI=Y.prototype.Lg;Y.prototype.showAdUI=Y.prototype.kh;
|
|
1416
|
-
Y.prototype.togglePiP=Y.prototype.ng;Y.prototype.isPiPEnabled=Y.prototype.Cf;Y.prototype.isPiPAllowed=Y.prototype.
|
|
1417
|
+
Y.prototype.togglePiP=Y.prototype.ng;Y.prototype.isPiPEnabled=Y.prototype.Cf;Y.prototype.isPiPAllowed=Y.prototype.td;Y.prototype.toggleFullScreen=Y.prototype.mg;Y.prototype.isFullScreenEnabled=Y.prototype.Ic;Y.prototype.isFullScreenSupported=Y.prototype.je;Y.prototype.hideSettingsMenus=Y.prototype.Gc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Qd;Y.prototype.setLastTouchEventTime=Y.prototype.gh;Y.prototype.getDisplayTime=Y.prototype.Jg;Y.prototype.isCastAllowed=Y.prototype.si;
|
|
1417
1418
|
Y.prototype.setSeeking=Y.prototype.gg;Y.prototype.isSeeking=Y.prototype.Bi;Y.prototype.getConfig=Y.prototype.Nh;Y.prototype.getClientSideAdContainer=Y.prototype.Mh;Y.prototype.getServerSideAdContainer=Y.prototype.di;Y.prototype.getControlsContainer=Y.prototype.Ph;Y.prototype.getLocalPlayer=Y.prototype.Vh;Y.prototype.getPlayer=Y.prototype.Dc;Y.prototype.getLocalVideo=Y.prototype.Wh;Y.prototype.getVideo=Y.prototype.Yb;Y.prototype.getVideoContainer=Y.prototype.mi;Y.prototype.getLocalization=Y.prototype.Xh;
|
|
1418
|
-
Y.prototype.getCastProxy=Y.prototype.Lh;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.fh;Y.prototype.setEnabledShakaControls=Y.prototype.cg;Y.prototype.configure=Y.prototype.configure;Y.prototype.loadComplete=Y.prototype.Di;Y.prototype.allowCast=Y.prototype.yh;Y.registerSeekBar=function(a){PB=a};Y.registerElement=zB;Y.prototype.destroy=Y.prototype.destroy;var AB=new Map,PB=new sB;function WB(a,b){NA.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=Vk();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=
|
|
1419
|
+
Y.prototype.getCastProxy=Y.prototype.Lh;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.fh;Y.prototype.setEnabledShakaControls=Y.prototype.cg;Y.prototype.configure=Y.prototype.configure;Y.prototype.loadComplete=Y.prototype.Di;Y.prototype.allowCast=Y.prototype.yh;Y.registerSeekBar=function(a){PB=a};Y.registerElement=zB;Y.prototype.destroy=Y.prototype.destroy;var AB=new Map,PB=new sB;function WB(a,b){NA.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=Vk();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=U("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");
|
|
1419
1420
|
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);XB(this);this.eventManager.o(this.localization,"locale-updated",function(){YB(c)});this.eventManager.o(this.localization,"locale-changed",function(){YB(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&SA(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){SA(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){SA(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.gh(Date.now());
|
|
1420
1421
|
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){ZB(c)});YB(this);this.ad&&this.ad.isLinear()&&SA(this.g,!1)}pa(WB,NA);WB.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];NA.prototype.release.call(this)};function $B(a,b){aC.set(a,b)}
|
|
1421
|
-
function XB(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,aC.get(c)?(c=aC.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function ZB(a){if(a.controls.
|
|
1422
|
-
M("shaka.ui.OverflowMenu",WB);WB.registerElement=$B;function bC(){}bC.prototype.create=function(a,b){return new WB(a,b)};zB("overflow_menu",new bC);var aC=new Map;function cC(a,b){NA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=
|
|
1423
|
-
this.i=
|
|
1424
|
-
c.player
|
|
1425
|
-
zB("airplay",new fC);function gC(a,b,c){this.i=a;this.j=b;this.h=hC(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Bf()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.ig(b);b.ui=this;c.ui=this}p=gC.prototype;p.destroy=function(){var a=this;return
|
|
1426
|
-
p.Bf=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:
|
|
1422
|
+
function XB(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,aC.get(c)?(c=aC.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function ZB(a){if(a.controls.Qd())a.controls.Gc();else{SA(a.h,!0);tB(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 YB(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1423
|
+
M("shaka.ui.OverflowMenu",WB);WB.registerElement=$B;function bC(){}bC.prototype.create=function(a,b){return new WB(a,b)};zB("overflow_menu",new bC);var aC=new Map;function cC(a,b){NA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=U("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=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");a.appendChild(this.j);
|
|
1424
|
+
this.i=U("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);dC(this);eC(this);this.eventManager.o(this.localization,"locale-updated",function(){dC(c)});this.eventManager.o(this.localization,"locale-changed",function(){dC(c)});this.eventManager.o(this.g,"click",function(){c.controls.Yb().webkitShowPlaybackTargetPicker()});a=this.controls.Yb();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1425
|
+
c.player.$d()==Wm;SA(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){eC(c)})}pa(cC,NA);function eC(a){var b=a.controls.Yb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function dC(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}M("shaka.ui.AirPlayButton",cC);function fC(){}fC.prototype.create=function(a,b){return new cC(a,b)};$B("airplay",new fC);
|
|
1426
|
+
zB("airplay",new fC);function gC(a,b,c){this.i=a;this.j=b;this.h=hC(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Bf()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.ig(b);b.ui=this;c.ui=this}p=gC.prototype;p.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?D(b,a.g.destroy(),2):b.F(2);if(4!=b.g)return a.g=null,a.i?D(b,a.i.destroy(),4):b.F(4);a.i=null;E(b)})};
|
|
1427
|
+
p.Bf=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Id()&&1<navigator.maxTouchPoints};p.getConfiguration=function(){var a=hC(this);yl(a,this.h,hC(this),{},"");return a};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zl(a,b));yl(this.h,a,hC(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new N("uiupdated"))};p.Oh=function(){return this.g};
|
|
1427
1428
|
p.dj=function(a){this.g.cg(a)};
|
|
1428
1429
|
function hC(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
|
|
1429
1430
|
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)",chapterMarks:"rgb(27, 27, 27)",chapterLabels:"rgb(255, 255, 255)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
|
|
1430
1431
|
level:"rgb(255, 255, 255)"},trackLabelFormat:iC,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0};"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");
|
|
1431
1432
|
a.Bf()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1432
|
-
function jC(){var a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A
|
|
1433
|
+
function jC(){var a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,C,A;return K(function(B){switch(B.g){case 1:Tw();if(!cm())return kC("shaka-ui-load-failed",lC),B.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){B.F(2);break}if(b.length&&!a.length){d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
|
|
1433
1434
|
h.replaceChild(g,f);g.appendChild(f);k=null;l=t(c);for(m=l.next();!m.done;m=l.next())if(n=m.value,n.parentElement==g){k=n;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));mC(g,f,k)}B.F(2);break}r=t(a);q=r.next();case 4:if(q.done){B.F(2);break}u=q.value;if(u.ui){B.F(5);break}v=null;x=t(b);for(e=x.next();!e.done;e=x.next())if(z=e.value,z.parentElement==u){v=z;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));
|
|
1434
|
-
y=null;
|
|
1435
|
-
function mC(a,b,c){var d,e,f,g,h,k,l,m,n;return
|
|
1435
|
+
y=null;C=t(c);for(m=C.next();!m.done;m=C.next())if(A=m.value,A.parentElement==u){y=A;break}y||(y=document.createElement("canvas"),y.classList.add("shaka-canvas-container"),u.appendChild(y));ta(B,7);return D(B,mC(u,v,y),9);case 9:va(B,5);break;case 7:return wa(B),kC("shaka-ui-load-failed",nC),B.return();case 5:q=r.next();B.F(4);break;case 2:kC("shaka-ui-loaded"),E(B)}})}function kC(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1436
|
+
function mC(a,b,c){var d,e,f,g,h,k,l,m,n;return K(function(r){switch(r.g){case 1:d=new V;e=new gC(d,a,b);d.vg(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});b.controls&&
|
|
1436
1437
|
e.g.fh(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=t(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){r.F(4);break}n=m.value;ta(r,5);return D(r,e.g.Dc().load(n.getAttribute("src")),7);case 7:r.F(4);break;case 5:wa(r);case 3:m=l.next();r.F(2);break;case 4:return D(r,d.yc(b),0)}})}M("shaka.ui.Overlay",gC);gC.prototype.setEnabled=gC.prototype.dj;gC.prototype.getControls=gC.prototype.Oh;
|
|
1437
|
-
gC.prototype.configure=gC.prototype.configure;gC.prototype.getConfiguration=gC.prototype.getConfiguration;gC.prototype.isMobile=gC.prototype.Bf;gC.prototype.destroy=gC.prototype.destroy;var iC=0;gC.TrackLabelFormat={LANGUAGE:iC,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var lC=0,nC=1;gC.FailReasonCode={NO_BROWSER_SUPPORT:lC,PLAYER_FAILED_TO_LOAD:nC};"complete"==document.readyState?
|
|
1438
|
-
r=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";q={};a=t(a);for(u=a.next();!u.done;q={pb:q.pb},u=a.next()){q.pb=u.value;u=q.pb.language;var v=q.pb.forced,x=f.resolve("SUBTITLE_FORCED"),z=m(q.pb),y=q.pb.label,
|
|
1439
|
-
(
|
|
1440
|
-
"true",e.textContent=
|
|
1441
|
-
function rC(a,b){a.button=Vk();a.button.classList.add("shaka-overflow-button");a.icon=
|
|
1442
|
-
function sC(a){a.menu=
|
|
1443
|
-
|
|
1438
|
+
gC.prototype.configure=gC.prototype.configure;gC.prototype.getConfiguration=gC.prototype.getConfiguration;gC.prototype.isMobile=gC.prototype.Bf;gC.prototype.destroy=gC.prototype.destroy;var iC=0;gC.TrackLabelFormat={LANGUAGE:iC,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var lC=0,nC=1;gC.FailReasonCode={NO_BROWSER_SUPPORT:lC,PLAYER_FAILED_TO_LOAD:nC};"complete"==document.readyState?K(function(a){if(1==a.g)return D(a,Promise.resolve(),2);jC();E(a)}):window.addEventListener("load",jC);function oC(a,b,c,d,e,f,g,h){function k(H){var G="";5<=H&&(G=" "+f.resolve("SURROUND"));return G}function l(H,G,J,I){H=[H,G];h&&null!=I&&H.push(I);J&&3==g&&H.push(J);return H.join(": ")}function m(H){return"variant"==H.type?H.audioRoles?H.audioRoles.join(", "):void 0:H.roles.join(", ")}var n=a.find(function(H){return 1==H.active}),r=OA(b);Wk(b);b.appendChild(r);r=new Map;for(var q=t(a),u=q.next();!u.done;u=q.next())u=u.value,r.has(u.language)||r.set(u.language,new Set),r.get(u.language).add(m(u));
|
|
1439
|
+
r=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";q={};a=t(a);for(u=a.next();!u.done;q={pb:q.pb},u=a.next()){q.pb=u.value;u=q.pb.language;var v=q.pb.forced,x=f.resolve("SUBTITLE_FORCED"),z=m(q.pb),y=q.pb.label,C=q.pb.channelsCount,A=l(u,z,y,C);if(!r.has(A)){r.add(A);var B=Vk();B.addEventListener("click",function(H){return function(){c(H.pb)}}(q));var F=U("span");B.appendChild(F);F.textContent=pC(u,f);switch(g){case iC:h&&(F.textContent+=k(C));v&&(F.textContent+=" ("+x+")");break;case 1:h&&
|
|
1440
|
+
(F.textContent+=k(C));z?F.textContent=z:(Ua("Track #"+q.pb.id+" does not have a role, but the UI is configured to only show role."),F.textContent="?");v&&(F.textContent+=" ("+x+")");break;case 2:h&&(F.textContent+=k(C));z&&(F.textContent+=": "+z);v&&(F.textContent+=" ("+x+")");break;case 3:y?F.textContent=y:(Ua("Track #"+q.pb.id+" does not have a label, but the UI is configured to only show labels."),F.textContent="?")}d&&A==n&&(B.appendChild(RA()),F.classList.add("shaka-chosen-item"),B.ariaSelected=
|
|
1441
|
+
"true",e.textContent=F.textContent);b.appendChild(B)}}}function pC(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=Ub(a);return a in JA?JA[a].A:c in JA?JA[c].A+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function qC(a,b,c){NA.call(this,a,b);var d=this;rC(this,c);sC(this);tC(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new N("submenuopen")),SA(d.menu,!0),QA(d.menu)):SA(d.menu,!1)})}pa(qC,NA);
|
|
1442
|
+
function rC(a,b){a.button=Vk();a.button.classList.add("shaka-overflow-button");a.icon=U("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=U("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=U("span");b.appendChild(a.nameSpan);a.currentSelection=U("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
|
|
1443
|
+
function sC(a){a.menu=U("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=Vk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Gc()});var b=U("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1444
|
+
U("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function tC(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")}SA(a.parent,!0);fb(a.parent.childNodes,b)&&gb(a.parent.childNodes,b)[0].focus();tB(a.controls)}))}M("shaka.ui.SettingsMenu",qC);function uC(a,b){qC.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(){vC(c)});this.eventManager.o(this.localization,"locale-changed",function(){vC(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.gb().length;SA(c.button,d);wC(c)});this.eventManager.o(this.player,"variantchanged",
|
|
1444
1445
|
function(){wC(c)});vC(this);wC(this)}pa(uC,qC);
|
|
1445
1446
|
function wC(a){var b=a.player.gb();oC(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.Ae(c.language,c.roles[0],c.channelsCount):a.player.Ae(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);QA(a.menu);a.controls.dispatchEvent(new N("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
|
|
1446
|
-
function vC(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")}M("shaka.ui.AudioLanguageSelection",uC);function xC(){}xC.prototype.create=function(a,b){return new uC(a,b)};$B("language",new xC);zB("language",new xC);function yC(a,b){NA.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Vk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=
|
|
1447
|
+
function vC(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")}M("shaka.ui.AudioLanguageSelection",uC);function xC(){}xC.prototype.create=function(a,b){return new uC(a,b)};$B("language",new xC);zB("language",new xC);function yC(a,b){NA.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Vk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
|
|
1447
1448
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);zC(this);AC(this);this.eventManager.o(this.localization,"locale-updated",function(){zC(c)});this.eventManager.o(this.localization,"locale-changed",function(){zC(c)});this.eventManager.o(this.g,"click",function(){BC(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){AC(c)})}pa(yC,NA);
|
|
1448
|
-
function BC(a){var b;
|
|
1449
|
+
function BC(a){var b;K(function(c){if(1==c.g){if(a.h.Da())return a.h.lh(),c.F(0);ta(c,3);a.g.disabled=!0;return D(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new N("error",(new Map).set("detail",b)));E(c)})}function AC(a){var b=a.h.Ue()&&a.controls.xa,c=a.h.Da();SA(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");CC(a)}
|
|
1449
1450
|
function CC(a){a.j.textContent=a.h.Da()?a.h.ye():a.localization.resolve("OFF")}function zC(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");CC(a)}M("shaka.ui.CastButton",yC);function DC(){}DC.prototype.create=function(a,b){return new yC(a,b)};$B("cast",new DC);zB("cast",new DC);function EC(a,b){NA.call(this,a,b);var c=this;this.g=Vk();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);FC(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){FC(c)});this.eventManager.o(this.localization,"locale-changed",function(){FC(c)});
|
|
1450
|
-
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ub())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1451
|
-
c.controls.mg(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Ic()?"fullscreen_exit":"fullscreen";JC(c)});this.eventManager.o(this.h,"loadedmetadata",function(){IC(c)});this.eventManager.o(this.h,"loadeddata",function(){IC(c)})}pa(HC,NA);function IC(a){a.controls.
|
|
1452
|
-
M("shaka.ui.FullscreenButton",HC);function KC(){}KC.prototype.create=function(a,b){return new HC(a,b)};zB("fullscreen",new KC);function LC(a,b){NA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=
|
|
1453
|
-
a.appendChild(this.l);this.g.appendChild(a);MC(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){MC(c)});this.eventManager.o(this.localization,"locale-changed",function(){MC(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.La();c.h.ua(1)});this.m=this.video.loop;this.h=new
|
|
1451
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ub())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Gd(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(EC,NA);function FC(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}M("shaka.ui.FastForwardButton",EC);function GC(){}GC.prototype.create=function(a,b){return new EC(a,b)};zB("fast_forward",new GC);function HC(a,b){NA.call(this,a,b);var c=this;this.h=this.controls.s;this.g=Vk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");IC(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);JC(this);this.eventManager.o(this.localization,"locale-updated",function(){JC(c)});this.eventManager.o(this.localization,"locale-changed",function(){JC(c)});this.eventManager.o(this.g,"click",function(){return K(function(d){return D(d,
|
|
1452
|
+
c.controls.mg(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Ic()?"fullscreen_exit":"fullscreen";JC(c)});this.eventManager.o(this.h,"loadedmetadata",function(){IC(c)});this.eventManager.o(this.h,"loadeddata",function(){IC(c)})}pa(HC,NA);function IC(a){a.controls.je()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function JC(a){a.g.ariaLabel=a.localization.resolve(a.controls.Ic()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1453
|
+
M("shaka.ui.FullscreenButton",HC);function KC(){}KC.prototype.create=function(a,b){return new HC(a,b)};zB("fullscreen",new KC);function LC(a,b){NA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=U("span");this.l.classList.add("shaka-current-selection-span");
|
|
1454
|
+
a.appendChild(this.l);this.g.appendChild(a);MC(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){MC(c)});this.eventManager.o(this.localization,"locale-changed",function(){MC(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.La();c.h.ua(1)});this.m=this.video.loop;this.h=new xd(function(){c.m!=c.video.loop&&(MC(c),c.m=c.video.loop)});this.h.ua(1)}pa(LC,NA);
|
|
1454
1455
|
LC.prototype.release=function(){this.h.stop();this.h=null;NA.prototype.release.call(this)};function MC(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")}M("shaka.ui.LoopButton",LC);function NC(){}NC.prototype.create=function(a,b){return new LC(a,b)};$B("loop",new NC);zB("loop",new NC);cB("loop",new NC);function OC(a,b){NA.call(this,a,b);var c=this;this.g=Vk();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);PC(this);QC(this);this.eventManager.o(this.localization,"locale-updated",function(){PC(c)});this.eventManager.o(this.localization,"locale-changed",function(){PC(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});
|
|
1455
1456
|
this.eventManager.o(this.video,"volumechange",function(){PC(c);QC(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){PC(c);QC(c)});this.eventManager.o(this.adManager,"ad-muted",function(){PC(c);QC(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;PC(c);QC(c)})}pa(OC,NA);function PC(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1456
|
-
function QC(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}M("shaka.ui.MuteButton",OC);function RC(){}RC.prototype.create=function(a,b){return new OC(a,b)};zB("mute",new RC);function SC(a,b){NA.call(this,a,b);var c=this;this.l=this.controls.s;this.g=Vk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=
|
|
1457
|
-
|
|
1458
|
-
function(){VC(c)});this.eventManager.o(this.controls,"caststatuschanged",function(d){d.newStatus?c.controls.
|
|
1457
|
+
function QC(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}M("shaka.ui.MuteButton",OC);function RC(){}RC.prototype.create=function(a,b){return new OC(a,b)};zB("mute",new RC);function SC(a,b){NA.call(this,a,b);var c=this;this.l=this.controls.s;this.g=Vk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
|
|
1458
|
+
U("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);TC(this);this.parent.appendChild(this.g);this.controls.td()||SA(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){TC(c)});this.eventManager.o(this.localization,"locale-changed",function(){TC(c)});this.eventManager.o(this.g,"click",function(){c.controls.ng()});this.eventManager.o(this.l,"enterpictureinpicture",function(){UC(c)});this.eventManager.o(this.l,"leavepictureinpicture",
|
|
1459
|
+
function(){VC(c)});this.eventManager.o(this.controls,"caststatuschanged",function(d){d.newStatus?c.controls.td()&&SA(c.g,!1):c.controls.td()&&SA(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){WC(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){UC(c);c.eventManager.ka(d.window,"pagehide",function(){VC(c)})})}pa(SC,NA);
|
|
1459
1460
|
function UC(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function VC(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")}
|
|
1460
|
-
function TC(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Cf();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 WC(a){
|
|
1461
|
+
function TC(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Cf();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 WC(a){K(function(b){if(!a.controls.td())return SA(a.g,!1),b.F(0);if(!a.player||!a.player.Hc())return SA(a.g,!0),b.F(0);SA(a.g,!1);return a.controls.Cf()?D(b,a.controls.ng(),0):b.F(0)})}M("shaka.ui.PipButton",SC);function XC(){}
|
|
1461
1462
|
XC.prototype.create=function(a,b){return new SC(a,b)};$B("picture_in_picture",new XC);zB("picture_in_picture",new XC);cB("picture_in_picture",new XC);function YC(a,b){qC.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(){ZC(c)});this.eventManager.o(this.localization,"locale-changed",function(){ZC(c)});this.eventManager.o(this.player,"ratechange",function(){$C(c,c.player.Ub())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+
|
|
1462
1463
|
"x",d]}));ZC(this);aD(this);$C(this,this.player.Ub())}pa(YC,qC);function ZC(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")}
|
|
1463
1464
|
function $C(a,b){var c=PA(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(RA()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1464
|
-
"x")}function aD(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={
|
|
1465
|
-
!1):(dD(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=TA(e,d),f&&(e+=" / "+TA(f,d)),dD(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.R()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(cD,NA);function dD(a,b){b!=a.g.textContent&&(a.g.textContent=b)}M("shaka.ui.PresentationTimeTracker",cD);function eD(){}eD.prototype.create=function(a,b){return new cD(a,b)};zB("time_and_duration",new eD);function fD(a,b){NA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=
|
|
1465
|
+
"x")}function aD(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={Wc:b.Wc},d=c.next()){b.Wc=d.value;d=Vk();var e=U("span");e.textContent=b.Wc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.Wc);a.video.defaultPlaybackRate=a.g.get(f.Wc)}}(b));a.menu.appendChild(d)}QA(a.menu)}M("shaka.ui.PlaybackRateSelection",YC);function bD(){}bD.prototype.create=function(a,b){return new YC(a,b)};$B("playback_rate",new bD);zB("playback_rate",new bD);function cD(a,b){NA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-current-time");dD(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.R()&&(c.video.currentTime=c.player.ya().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.U,e=c.controls.Jg(),f=c.video.duration,g=c.player.ya(),h=g.end-g.start;c.player.R()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(dD(c,"- "+TA(e,f)),c.g.disabled=
|
|
1466
|
+
!1):(dD(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=TA(e,d),f&&(e+=" / "+TA(f,d)),dD(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.R()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(cD,NA);function dD(a,b){b!=a.g.textContent&&(a.g.textContent=b)}M("shaka.ui.PresentationTimeTracker",cD);function eD(){}eD.prototype.create=function(a,b){return new cD(a,b)};zB("time_and_duration",new eD);function fD(a,b){NA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");a="cast";(b=Kd())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
|
|
1466
1467
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;gD(this);SA(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.o(this.localization,"locale-updated",function(){gD(c)}),this.eventManager.o(this.localization,"locale-changed",function(){gD(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){iD(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,
|
|
1467
1468
|
"connect",function(){iD(c)}),this.eventManager.o(this.video.remote,"connecting",function(){iD(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){iD(c)}),this.eventManager.o(this.player,"loaded",function(){iD(c)}),iD(this))}pa(fD,NA);fD.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});NA.prototype.release.call(this)};
|
|
1468
|
-
function iD(a){var b,c;
|
|
1469
|
-
case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),D(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),
|
|
1469
|
+
function iD(a){var b,c;K(function(d){switch(d.g){case 1:if(a.controls.C.Ue()&&a.controls.xa){SA(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.F(0);break}if("disconnected"==a.video.remote.state){b=function(e){a.player?SA(a.g,a.player.$d()==Wm&&e):SA(a.g,!1)};ta(d,7);if(-1==a.h){d.F(9);break}return D(d,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){d.F(0);break}return D(d,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;d.F(0);break;case 10:a.h=-1;
|
|
1470
|
+
case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),D(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),E(d)}})}function gD(a){var b=a.localization.resolve("CAST"),c=Kd();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}M("shaka.ui.RemoteButton",fD);function jD(){}jD.prototype.create=function(a,b){return new fD(a,b)};$B("remote",new jD);zB("remote",new jD);function kD(a,b){qC.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(){lD(c)});this.eventManager.o(this.localization,"locale-changed",function(){lD(c)});this.eventManager.o(this.player,"variantchanged",function(){mD(c)});this.eventManager.o(this.player,"trackschanged",function(){mD(c)});this.eventManager.o(this.player,
|
|
1470
1471
|
"abrstatuschanged",function(){mD(c)});mD(this)}pa(kD,qC);
|
|
1471
|
-
function mD(a){var b=[];a.player
|
|
1472
|
-
b.sort(function(k,l){return l.height-k.height});var d=OA(a.menu);Wk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={zb:e.zb},g=f.next()){e.zb=g.value;g=Vk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.zb;a.player.configure({abr:{enabled:!1}});a.player.Be(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=
|
|
1473
|
-
1E3)+" kbits/s":e.zb.height&&e.zb.width?nD(e.zb):"Unknown";g.appendChild(h);d||e.zb!=c||(g.ariaSelected="true",g.appendChild(RA()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Vk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});mD(a)});a.g=
|
|
1472
|
+
function mD(a){var b=[];a.player.$d()!=Wm&&(b=a.player.gb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){var m=-1;m=a.player.Hc()?b.findIndex(function(n){return n.bandwidth==k.bandwidth}):b.findIndex(function(n){return n.height==k.height&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.Hc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):
|
|
1473
|
+
b.sort(function(k,l){return l.height-k.height});var d=OA(a.menu);Wk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={zb:e.zb},g=f.next()){e.zb=g.value;g=Vk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.zb;a.player.configure({abr:{enabled:!1}});a.player.Be(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=U("span");h.textContent=a.player.Hc()&&e.zb.bandwidth?Math.round(e.zb.bandwidth/
|
|
1474
|
+
1E3)+" kbits/s":e.zb.height&&e.zb.width?nD(e.zb):"Unknown";g.appendChild(h);d||e.zb!=c||(g.ariaSelected="true",g.appendChild(RA()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Vk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});mD(a)});a.g=U("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected=
|
|
1474
1475
|
"true",e.appendChild(RA()),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);QA(a.menu);a.controls.dispatchEvent(new N("resolutionselectionupdated"));lD(a)}
|
|
1475
1476
|
function nD(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}
|
|
1476
1477
|
function lD(a){var b=a.player.Hc()?"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"))}M("shaka.ui.ResolutionSelection",kD);function oD(){}
|
|
1477
1478
|
oD.prototype.create=function(a,b){return new kD(a,b)};$B("quality",new oD);zB("quality",new oD);function pD(a,b){NA.call(this,a,b);var c=this;this.g=Vk();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);qD(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){qD(c)});this.eventManager.o(this.localization,"locale-changed",function(){qD(c)});
|
|
1478
|
-
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ub())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.
|
|
1479
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ub())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Gd(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(pD,NA);function qD(a){a.g.ariaLabel=a.localization.resolve("REWIND")}M("shaka.ui.RewindButton",pD);function rD(){}rD.prototype.create=function(a,b){return new pD(a,b)};zB("rewind",new rD);function sD(a,b){NA.call(this,a,b);var c=this;this.j=U("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=U("div");this.h.classList.add("shaka-skip-ad-counter");SA(this.h,!1);this.j.appendChild(this.h);this.g=Vk();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;SA(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);tD(this);this.i=new xd(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1479
1480
|
d:(c.i.stop(),SA(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){tD(c)});this.eventManager.o(this.localization,"locale-changed",function(){tD(c)});this.eventManager.o(this.adManager,"ad-started",function(){uD(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),SA(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;SA(c.g,!1);SA(c.h,!1)});this.eventManager.o(this.g,
|
|
1480
1481
|
"click",function(){c.ad.skip()});this.ad&&uD(this)}pa(sD,NA);sD.prototype.release=function(){this.i.stop();this.i=null;NA.prototype.release.call(this)};function tD(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function uD(a){a.ad.isSkippable()&&(SA(a.g,!0),SA(a.h,!0),a.h.textContent="",a.i.La(),a.i.ua(.5))}M("shaka.ui.SkipAdButton",sD);function vD(a,b){XA.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()}pa(vD,XA);vD.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};vD.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
|
|
1481
|
-
M("shaka.ui.SmallPlayButton",vD);function wD(){}wD.prototype.create=function(a,b){return new vD(a,b)};zB("play_pause",new wD);function xD(a,b){NA.call(this,a,b);a=
|
|
1482
|
-
this.s=
|
|
1483
|
-
this.u={};this.C={width:g,height:g,completionPercent:function(k){return h.h[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.h[k]+" (stalls)"},gapsJumped:function(k){return h.h[k]+" (gaps)"}};this.l=new
|
|
1482
|
+
M("shaka.ui.SmallPlayButton",vD);function wD(){}wD.prototype.create=function(a,b){return new vD(a,b)};zB("play_pause",new wD);function xD(a,b){NA.call(this,a,b);a=U("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(xD,NA);M("shaka.ui.Spacer",xD);function yD(){}yD.prototype.create=function(a,b){return new xD(a,b)};zB("spacer",new yD);function zD(a,b){function c(k){return TA(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}NA.call(this,a,b);var h=this;this.i=Vk();this.i.classList.add("shaka-statistics-button");this.j=U("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=U("label");a.classList.add("shaka-overflow-button-label");
|
|
1483
|
+
this.s=U("span");a.appendChild(this.s);this.m=U("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.g=U("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.h.appendChild(this.g);this.D=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
|
|
1484
|
+
this.u={};this.C={width:g,height:g,completionPercent:function(k){return h.h[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.h[k]+" (stalls)"},gapsJumped:function(k){return h.h[k]+" (gaps)"}};this.l=new xd(function(){h.h=h.player.getStats();for(var k=t(h.D),l=k.next();!l.done;l=
|
|
1484
1485
|
k.next())l=l.value,h.u[l].textContent=h.C[l](l)});AD(this);BD(this);this.eventManager.o(this.localization,"locale-updated",function(){AD(h)});this.eventManager.o(this.localization,"locale-changed",function(){AD(h)});this.eventManager.o(this.i,"click",function(){SA(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ua(.1),SA(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),SA(h.g,!1));AD(h)})}pa(zD,NA);
|
|
1485
1486
|
function AD(a){a.s.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
|
|
1486
|
-
function BD(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=
|
|
1487
|
+
function BD(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=U("div"),h=U("label");h.textContent=c+":";g.appendChild(h);h=U("span");h.textContent=f.C[c](c);g.appendChild(h);f.u[c]=h;e.call(d,g);a.D.push(c)}else Ua("Unrecognized statistic element:",c)}zD.prototype.release=function(){this.l.stop();this.l=null;NA.prototype.release.call(this)};M("shaka.ui.StatisticsButton",zD);function CD(){}
|
|
1487
1488
|
CD.prototype.create=function(a,b){return new zD(a,b)};$B("statistics",new CD);cB("statistics",new CD);function DD(a,b){qC.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.pc()?this.button.ariaPressed="true":this.button.ariaPressed="false";ED(this);this.eventManager.o(this.localization,"locale-updated",function(){FD(c);GD(c)});this.eventManager.o(this.localization,"locale-changed",function(){FD(c);GD(c)});this.eventManager.o(this.player,
|
|
1488
|
-
"texttrackvisibility",function(){HD(c);GD(c)});this.eventManager.o(this.player,"textchanged",function(){GD(c)});this.eventManager.o(this.player,"trackschanged",function(){ID(c)});HD(this);FD(this);GD(this);ID(this)}pa(DD,qC);function ED(a){var b=Vk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(RA());a.g=
|
|
1489
|
+
"texttrackvisibility",function(){HD(c);GD(c)});this.eventManager.o(this.player,"textchanged",function(){GD(c)});this.eventManager.o(this.player,"trackschanged",function(){ID(c)});HD(this);FD(this);GD(this);ID(this)}pa(DD,qC);function ED(a){var b=Vk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(RA());a.g=U("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1489
1490
|
function HD(a){a.player.pc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new N("captionselectionupdated"))}
|
|
1490
1491
|
function GD(a){var b=a.player.Xb();oC(b,a.menu,function(c){return JD(a,c)},a.player.pc(),a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=Vk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.hg(!1);GD(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.pc()||(b.ariaSelected="true",b.appendChild(RA()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1491
|
-
a.button.setAttribute("shaka-status",a.currentSelection.textContent);QA(a.menu);a.controls.dispatchEvent(new N("captionselectionupdated"))}function JD(a,b){return
|
|
1492
|
+
a.button.setAttribute("shaka-status",a.currentSelection.textContent);QA(a.menu);a.controls.dispatchEvent(new N("captionselectionupdated"))}function JD(a,b){return K(function(c){a.player.$f(b);return D(c,a.player.hg(!0),0)})}
|
|
1492
1493
|
function FD(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 ID(a){var b=0<a.player.Xb().length;SA(a.button,b);GD(a)}M("shaka.ui.TextSelection",DD);function KD(){}KD.prototype.create=function(a,b){return new DD(a,b)};$B("captions",new KD);zB("captions",new KD);function LD(a,b){eB.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.eventManager.o(this.video,"volumechange",function(){return MD(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return ND(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return ND(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return MD(c)});this.eventManager.o(this.localization,"locale-updated",function(){return OD(c)});
|
|
1493
1494
|
this.eventManager.o(this.localization,"locale-changed",function(){return OD(c)});MD(this);OD(this);if(this.ad)this.onChange()}pa(LD,eB);LD.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function MD(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);PD(a)}function ND(a){var b=a.ad.getVolume();a.setValue(b);PD(a)}
|
|
1494
1495
|
function PD(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function OD(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}M("shaka.ui.VolumeBar",LD);function QD(){}QD.prototype.create=function(a,b){return new LD(a,b)};zB("volume",new QD);}).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})();
|