shaka-player 4.10.19 → 4.10.21
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/README.md +2 -4
- package/dist/deps.js +1 -1
- package/dist/locales.js +37 -37
- package/dist/shaka-player.compiled.debug.js +45 -42
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +945 -942
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +48 -45
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +1130 -1127
- package/dist/shaka-player.ui.map +3 -3
- package/lib/ads/interstitial_ad_manager.js +4 -0
- package/lib/media/preload_manager.js +20 -0
- package/lib/media/streaming_engine.js +43 -12
- package/lib/player.js +11 -11
- package/lib/polyfill/media_capabilities.js +8 -2
- package/lib/util/periods.js +3 -0
- package/package.json +1 -1
- package/ui/locales/zh-HK.json +30 -11
|
@@ -19,14 +19,14 @@ function na(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(ma)ma(
|
|
|
19
19
|
function qa(a,b){a.i={tg:b,Gg:!0};a.g=a.m||a.j}oa.prototype.return=function(a){this.i={return:a};this.g=this.j};function F(a,b,c){a.g=c;return{value:b}}oa.prototype.u=function(a){this.g=a};function H(a){a.g=0}function ra(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a,b){a.m=0;a.j=b||0}function ta(a,b,c){a.g=b;a.m=c||0}function ua(a,b){a.m=b||0;b=a.i.tg;a.i=null;return b}function xa(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function ya(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Gg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Aa(a){this.g=new oa;this.h=a}function Ba(a,b){pa(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.o=!1,e;var f=e.value}catch(g){return a.g.l=null,qa(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.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,qa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Gg)throw b.tg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
|
-
function
|
|
23
|
-
function O(a){return Ga(new
|
|
22
|
+
function Ea(a){this.next=function(b){pa(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Da(a));return b};this.throw=function(b){pa(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.s):(qa(a.g,b),b=Da(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Ga(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 O(a){return Ga(new Ea(new Aa(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
24
|
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
25
25
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(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.C(g):this.m(g)}};
|
|
26
26
|
b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.I(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=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.G();this.A()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
|
|
27
27
|
function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.A=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
28
|
-
b.prototype.H=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.o=!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.H=function(g){var h=this.j();g.Cd(h.resolve,h.reject)};b.prototype.I=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.Cd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Cd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
29
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!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).Cd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){p[u]=v;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).Cd(n(p.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ia(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
31
31
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=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(!Ia(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
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(!Ia(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ia(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ia(k,
|
|
@@ -56,15 +56,15 @@ ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ia(
|
|
|
56
56
|
Copyright 2016 Google LLC
|
|
57
57
|
SPDX-License-Identifier: Apache-2.0
|
|
58
58
|
*/
|
|
59
|
-
function Oa(){}function Qa(){};function Ra(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ra.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 Ta(a){return a.h/(1-Math.pow(a.g,a.i))};function Ua(){this.h=new Ra(2);this.j=new Ra(5);this.g=0;this.i=128E3;this.l=16E3}Ua.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)};Ua.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)}};Ua.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ta(this.h),Ta(this.j))};function Wa(){}function Xa(){}function Ya(){}function $a(a){var b=Ha.apply(1,arguments);ab.has(a)||(ab.add(a),Ya.apply(Wa,x(b)))}function cb(){}function db(){}function eb(){}var ab=new Set;window.console&&(Ya=function(){return console.warn.apply(console,x(Ha.apply(0,arguments)))},Xa=function(){console.error.apply(console,x(Ha.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.g=new fb}q=gb.prototype;q.release=function(){this.Qa();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new hb(a,b,c,d),this.g.push(b,a))};q.ja=function(a,b,c,d){function e(g){f.
|
|
60
|
-
q.Qa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.
|
|
61
|
-
hb.prototype.
|
|
59
|
+
function Oa(){}function Qa(){};function Ra(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ra.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 Ta(a){return a.h/(1-Math.pow(a.g,a.i))};function Ua(){this.h=new Ra(2);this.j=new Ra(5);this.g=0;this.i=128E3;this.l=16E3}Ua.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)};Ua.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)}};Ua.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ta(this.h),Ta(this.j))};function Wa(){}function Xa(){}function Ya(){}function $a(a){var b=Ha.apply(1,arguments);ab.has(a)||(ab.add(a),Ya.apply(Wa,x(b)))}function cb(){}function db(){}function eb(){}var ab=new Set;window.console&&(Ya=function(){return console.warn.apply(console,x(Ha.apply(0,arguments)))},Xa=function(){console.error.apply(console,x(Ha.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.g=new fb}q=gb.prototype;q.release=function(){this.Qa();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new hb(a,b,c,d),this.g.push(b,a))};q.ja=function(a,b,c,d){function e(g){f.kb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.kb=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.kb(),this.g.remove(b,e))}};
|
|
60
|
+
q.Qa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.kb();this.g.g={}}};S("shaka.util.EventManager",gb);gb.prototype.removeAll=gb.prototype.Qa;gb.prototype.unlisten=gb.prototype.kb;gb.prototype.listenOnce=gb.prototype.ja;gb.prototype.listen=gb.prototype.D;gb.prototype.release=gb.prototype.release;function hb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ib(a,d);this.target.addEventListener(b,c,this.g)}
|
|
61
|
+
hb.prototype.kb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ib(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 jb(a)?b:b.capture||!1}
|
|
62
62
|
function jb(a){var b=kb;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}kb=b}return b||!1}var kb=void 0;function lb(a){if(mb.has(a))return mb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);mb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),mb.set(a,b),b):!1}function ob(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var mb=new Map;function pb(a,b){this.g=a;this.h=b}pb.prototype.toString=function(){return"v"+this.g+"."+this.h};function qb(a,b){var c=new pb(5,0),d=rb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function sb(a,b,c,d){Ya([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function tb(a,b,c,d){Xa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var rb=null;function ub(){}ub.prototype.extract=function(){};ub.prototype.decode=function(){return[]};ub.prototype.clear=function(){};ub.prototype.getStreams=function(){return[]};function vb(){}vb.prototype.init=function(){};vb.prototype.parse=function(){return[]};function wb(){}function xb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(yb(a)==yb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=zb(a);b=zb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function yb(a){return a instanceof ArrayBuffer?a:a.buffer}function Ab(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
63
63
|
function zb(a,b,c){c=void 0===c?Infinity:c;return Bb(a,void 0===b?0:b,c,Uint8Array)}function Db(a,b,c){c=void 0===c?Infinity:c;return Bb(a,void 0===b?0:b,c,Uint16Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Bb(a,void 0===b?0:b,c,DataView)}function Bb(a,b,c,d){var e=yb(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)}
|
|
64
64
|
S("shaka.util.BufferUtils",wb);wb.toDataView=Eb;wb.toUint16=Db;wb.toUint8=zb;wb.toArrayBuffer=Ab;wb.equal=xb;function Fb(){}Fb.prototype.init=function(){};Fb.prototype.i=function(){};Fb.prototype.g=function(){};Fb.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Fb);function Gb(a){this.l=new vb;if(a=Hb[a.toLowerCase()])this.l=a();this.h=new ub;if(a=Ib)this.h=a()}Gb.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Gb.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=zb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
65
65
|
Gb.prototype.g=function(){this.h.clear()};Gb.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Gb);Gb.findDecoder=function(){return Ib};Gb.unregisterDecoder=function(){Ib=null};Gb.registerDecoder=function(a){Ib=a};Gb.findParser=function(a){return Hb[a]};Gb.unregisterParser=function(a){delete Hb[a]};Gb.registerParser=function(a,b){Hb[a]=b};var Hb={},Ib=null;function Jb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Kb;this.scroll=Lb}S("shaka.text.CueRegion",Jb);var Kb=1;Jb.units={PX:0,PERCENTAGE:Kb,LINES:2};var Lb="";Jb.scrollMode={NONE:Lb,UP:"up"};function Mb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Nb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Ob(a,b,c){c||(c=Mb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={Hg:void 0},d=a.next()){e.Hg=d.value;d=b.findIndex(function(f){return function(g){return c(f.Hg,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
|
|
66
66
|
function Pb(a,b,c){c||(c=Mb);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 Qb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Jb;this.position=null;this.positionAlign=Rb;this.size=0;this.textAlign=Tb;this.direction=Ub;this.writingMode=Vb;this.lineInterpretation=Wb;this.line=null;this.lineHeight="";this.lineAlign=Xb;this.displayAlign=Yb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Zb;this.fontStyle=$b;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
67
|
-
"";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={hc:32,rows:15}}function
|
|
67
|
+
"";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={hc:32,rows:15}}function ac(a,b){a=new Qb(a,b,"");a.lineBreak=!0;return a}Qb.prototype.clone=function(){var a=new Qb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
68
68
|
function dc(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(!Pb(a.nestedCues,b.nestedCues,dc))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(!Pb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}S("shaka.text.Cue",Qb);Qb.equal=dc;Qb.prototype.clone=Qb.prototype.clone;var Rb="auto";
|
|
69
69
|
Qb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Rb};var Tb="center",ec={LEFT:"left",RIGHT:"right",CENTER:Tb,START:"start",END:"end"};Qb.textAlign=ec;var Yb="after",fc={BEFORE:"before",CENTER:"center",AFTER:Yb};Qb.displayAlign=fc;var Ub="ltr";Qb.direction={HORIZONTAL_LEFT_TO_RIGHT:Ub,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Vb="horizontal-tb";Qb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Vb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Wb=0;
|
|
70
70
|
Qb.lineInterpretation={LINE_NUMBER:Wb,PERCENTAGE:1};var Xb="start",gc={CENTER:"center",START:Xb,END:"end"};Qb.lineAlign=gc;var hc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Qb.defaultTextColor=hc;var ic={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Qb.defaultTextBackgroundColor=ic;var Zb=400;Qb.fontWeight={NORMAL:Zb,BOLD:700};
|
|
@@ -98,11 +98,11 @@ CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:90
|
|
|
98
98
|
CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Kc(a){this.h=a;this.g=void 0}Kc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a,b){return a.length&&b.length&&a!==b?0<Mc(a,b).length:!0}
|
|
99
99
|
function Mc(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(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
100
100
|
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}
|
|
101
|
-
function Nc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Oc=new Kc(function(){return Ab(new Uint8Array([0]))}),Pc=new Map;function Qc(a){this.h=a;this.g=null}Qc.prototype
|
|
102
|
-
Rc.prototype.tickAfter=Rc.prototype
|
|
101
|
+
function Nc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Oc=new Kc(function(){return Ab(new Uint8Array([0]))}),Pc=new Map;function Qc(a){this.h=a;this.g=null}Qc.prototype.$=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};Qc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Rc(a){this.h=a;this.g=null}Rc.prototype.vc=function(){this.stop();this.h();return this};Rc.prototype.$=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.h()})).$(a);return this};Rc.prototype.Ra=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.g.$(a);b.h()})).$(a);return this};Rc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Rc);Rc.prototype.stop=Rc.prototype.stop;Rc.prototype.tickEvery=Rc.prototype.Ra;
|
|
102
|
+
Rc.prototype.tickAfter=Rc.prototype.$;Rc.prototype.tickNow=Rc.prototype.vc;function Sc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Tc(a){return""!=Uc().canPlayType(a)}function Wc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Yc(){return Zc("Xbox One")}function $c(){return Zc("Tizen")}function ad(){return Zc("Tizen 3")}function bd(){return Zc("Tizen 2")}function cd(){return Zc("Web0S")}function dd(){return cd()&&38===ed()}function fd(){return Zc("CrKey")}
|
|
103
103
|
function ed(){if(!Zc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function gd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!$c()&&!Zc("PC=EOS")&&!Zc("PC=APL")&&!Zc("VirginMedia")&&!hd()&&!id()&&!Zc("AFT")&&!Zc("WPE")&&!Zc("DT_STB_BCM")&&!Zc("Sky_STB")}function jd(){return Zc("PlayStation 5")}function id(){return Zc("PlayStation 4")}function kd(){return Zc("Hisense")||Zc("VIDAA")}
|
|
104
104
|
function hd(){return Zc("SOPOpenBrowser")}function ld(){if(!gd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function md(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1}function nd(){return Zc("Android")}
|
|
105
|
-
function od(){return $c()||cd()||Yc()||id()||jd()||Zc("AFT")||Zc("PC=EOS")||Zc("PC=APL")||Zc("VirginMedia")||hd()||Zc("WPE")||fd()||kd()||Zc("DT_STB_BCM")?!0:!1}function Zc(a){return(navigator.userAgent||"").includes(a)}function Uc(){if(pd)return pd;qd||(qd=new Rc(function(){pd=null}));(pd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(pd=document.createElement("video"));qd
|
|
105
|
+
function od(){return $c()||cd()||Yc()||id()||jd()||Zc("AFT")||Zc("PC=EOS")||Zc("PC=APL")||Zc("VirginMedia")||hd()||Zc("WPE")||fd()||kd()||Zc("DT_STB_BCM")?!0:!1}function Zc(a){return(navigator.userAgent||"").includes(a)}function Uc(){if(pd)return pd;qd||(qd=new Rc(function(){pd=null}));(pd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(pd=document.createElement("video"));qd.$(1);return pd}
|
|
106
106
|
function rd(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
|
|
107
107
|
function sd(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){switch(v.g){case 1:a={width:Infinity,height:Infinity};if(fd()){n=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;ra(v,15);if(!(p=n)){v.u(17);break}return F(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if($c()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
108
108
|
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(w){Ya("Tizen: Error detecting screen size, default screen size 1920x1080.")}v.u(3);break}if(Yc()){a.width=1920;a.height=1080;try{c=void 0;c="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows;d=new c.Media.Protection.ProtectionCapabilities;
|
|
@@ -117,8 +117,8 @@ function zd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)r
|
|
|
117
117
|
function Ad(a){if(window.TextEncoder&&!id()){var b=new TextEncoder;return Ab(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 Ab(b)}function Bd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function yd(a){return Cd.value()(a)}
|
|
118
118
|
function Dd(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",td);td.resetFromCharCode=function(){Cd.g=void 0};
|
|
119
119
|
td.toUTF16=Bd;td.toUTF8=Ad;td.fromBytesAutoDetect=zd;td.fromUTF16=xd;td.fromUTF8=vd;var Cd=new Kc(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={cc:65536};0<b.cc;b={cc:b.cc},b.cc/=2)if(a(b.cc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.cc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.cc));return e}}(b);return null});function Ed(){}function Fd(a){a=yd(zb(a));return btoa(a)}function Gd(a,b){b=void 0==b?!0:b;a=Fd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Hd(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 Id(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}
|
|
120
|
-
function Jd(a){var b=zb(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
|
|
121
|
-
function
|
|
120
|
+
function Jd(a){var b=zb(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 Kd(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(zb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Ed);Ed.concat=Kd;Ed.toHex=Jd;Ed.fromHex=Id;Ed.fromBase64=Hd;Ed.toBase64=Gd;Ed.toStandardBase64=Fd;function Md(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new tc(a[0]);b=new tc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new tc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new tc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
121
|
+
function Nd(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
|
|
122
122
|
function Qd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Gd(Id(h),!1));var l=g;22!=l.length&&(l=Gd(Id(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:zb(Ad(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
123
123
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Rd(a,b){if(1==b.length)return b[0];a=Sd(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Sd(a,b){for(var c=t(Td[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==Ud?"":null}
|
|
124
124
|
function Vd(a,b){var c=[];a=t(Td[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Ud="text",Wd={ha:"video",X:"audio",ua:Ud,Ce:"image",ij:"application"},Xd=1/15,Td={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Yd(){}function Zd(a,b){var c=a;b&&!$d.includes(a)&&(c+='; codecs="'+b+'"');return c}function ae(a,b){b&&(a+='; codecs="'+b+'"');return a}function be(a,b,c){var d=Zd(a,b);b=ae(a,b);nc(b)?(a=nc(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}
|
|
@@ -126,12 +126,12 @@ function ce(a,b,c){var d=[b];de.forEach(function(e,f){var g=a[f];"codecs"==f?$d.
|
|
|
126
126
|
function fe(a){var b=ge(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"===
|
|
127
127
|
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 "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a}
|
|
128
128
|
function he(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=ge(c.value),b.push(c[0]);return b.sort().join(",")}function ie(a){return a.split(";")[0]}function je(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function ke(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function ge(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
|
|
129
|
-
S("shaka.util.MimeUtils",Yd);Yd.getFullTypeWithAllCodecs=ae;Yd.getFullType=Zd;var de=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),$d=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function
|
|
130
|
-
function
|
|
131
|
-
|
|
129
|
+
S("shaka.util.MimeUtils",Yd);Yd.getFullTypeWithAllCodecs=ae;Yd.getFullType=Zd;var de=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),$d=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function le(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function oe(a){return pe[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Ib:!1}le.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
130
|
+
function qe(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return F(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(zb(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(zb(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(p)})}
|
|
131
|
+
le.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return F(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));H(d)})};function se(a,b,c){a.l=b;a.m=c}function te(a,b,c){a.C=b;if(b=a.o.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)}
|
|
132
132
|
function ue(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())ue(a,d.value,c)}
|
|
133
133
|
function ve(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,[]);ue(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.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.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
134
|
-
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}S("shaka.text.TextEngine",
|
|
134
|
+
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}S("shaka.text.TextEngine",le);le.prototype.destroy=le.prototype.destroy;le.findParser=function(a){return pe[a]};le.unregisterParser=function(a){delete pe[a]};le.registerParser=function(a,b){pe[a]=b};var pe={};function we(a,b){return a.concat(b)}function xe(){}function ye(a){return null!=a};function ze(){}function Ae(a,b){a=Be(a);b=Be(b);return a.split("-")[0]==b.split("-")[0]}function Ce(a,b){a=Be(a);b=Be(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function De(a,b){a=Be(a);b=Be(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
|
|
135
135
|
function Be(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=Ee.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Fe(a,b){a=Be(a);b=Be(b);return b==a?4:Ce(b,a)?3:De(b,a)?2:Ce(a,b)?1:0}function Ge(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Ee.get(a)||a}
|
|
136
136
|
function He(a){return a.language?Be(a.language):a.audio&&a.audio.language?Be(a.audio.language):a.video&&a.video.language?Be(a.video.language):"und"}
|
|
137
137
|
function Ie(a,b){a=Be(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(Be(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,Ce(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,De(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Ce(a,b))return b;return null}S("shaka.util.LanguageUtils",ze);ze.findClosestLocale=Ie;ze.getLocaleForVariant=He;
|
|
@@ -153,8 +153,8 @@ function Se(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return Yc()&&Ve(b.va
|
|
|
153
153
|
function Ve(a){var b={dvav:"avc3",dva1:"avc1",dvhe:"hev1",dvh1:"hvc1",dvc1:"vvc1",dvi1:"vvi1"},c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(Object.keys(b));for(var e=d.next();!e.done;e=d.next())if(e=e.value,a.codecs.includes(e)){a.codecs=a.codecs.replace(e,b[e]);break}}}
|
|
154
154
|
function Xe(a,b){var c=Yc(),d=Zc("Firefox")&&nd(),e=a.video,f=e&&e.width||0,g=e&&e.height||0;if(c&&e&&(1920<f||1080<g)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return!1;if(e){c=Ze(e.codecs);if(e.codecs.includes(",")){f=e.codecs.split(",");c=Rd("video",f);c=Ze(c);f=Rd("audio",f);f=$e(f,e.mimeType);g=be(e.mimeType,f,"audio");if(!lb(g))return!1;c=[c,f].join()}f=be(e.mimeType,c,"video");if(!lb(f))return!1;e.codecs=c}e=a.audio;if(d&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus"))return!1;
|
|
155
155
|
if(e){d=$e(e.codecs,e.mimeType);c=be(e.mimeType,d,"audio");if(!lb(c))return!1;e.codecs=d}return a.decodingInfos.some(function(h){return!h.supported||b&&(h=h.keySystemAccess)&&h.keySystem!=b?!1:!0})}function af(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=af(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
156
|
-
function bf(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Ke(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,
|
|
157
|
-
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.cache[m.
|
|
156
|
+
function bf(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Ke(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,Bd:void 0},g=f.next())k=g.value,h.Bd=af(k),h.cache=cf,h.cache[h.Bd]?d=c(d,h.cache[h.Bd]):e.push(df(k).then(function(m){return function(n){var p=
|
|
157
|
+
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.cache[m.Bd]=p,d=c(d,p))}}(h)));return F(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
|
|
158
158
|
function df(a){var b=[""];a.video&&(b=je(a.video.contentType).split(","));var c=[""];a.audio&&(c=je(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={zc:void 0},g=f.next())g=g.value,h.zc=Je(a),a.video&&(h.zc.video.contentType=Zd(ie(h.zc.video.contentType),e)),a.audio&&(h.zc.audio.contentType=Zd(ie(h.zc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.zc).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
159
159
|
return null})}
|
|
160
160
|
function We(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C;return O(function(E){switch(E.g){case 1:if(e=a.some(function(G){return G.decodingInfos.length}))return E.return();f=t(d);g=f.next();h={};case 2:if(g.done){E.u(4);break}h.Sg=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){E.u(7);break}n=m.value;p=ef(n,b,c).filter(function(G){return function(L){L=L[0];return(L.keySystemConfiguration&&L.keySystemConfiguration.keySystem)===G.Sg}}(h));r=t(p);u=r.next();case 8:if(u.done){E.u(10);break}v=u.value;
|
|
@@ -187,7 +187,7 @@ q.chooseVariant=function(){var a=Infinity,b=Infinity;if(this.g.restrictToScreenS
|
|
|
187
187
|
this.s.length&&(d=this.s.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));c=Bf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=a||Infinity!=b){c=Cf(c);c=t(c);for(var e=c.next();!e.done;e=c.next())if(e=e.value,e.height>=a&&e.width>=b){a=e.height;b=e.width;break}c=Bf(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&&!c.length&&(c=Bf(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d<c.length;d++){e=c[d];
|
|
188
188
|
for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<c.length;k++)if(e.bandwidth!=c[k].bandwidth){h=c[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;a>=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width<e.video.width||b.video.height<e.video.height))&&(b=e)}this.l=Date.now();return b};q.enable=function(){this.j=!0};q.disable=function(){this.j=!1};
|
|
189
189
|
q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.l&&this.j&&Df(this))};q.trySuggestStreams=function(){null!=this.l&&this.j&&Df(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.m?this.m.getBandwidthEstimate(a):a};q.setVariants=function(a){this.s=a};
|
|
190
|
-
q.playbackRateChanged=function(a){this.B=a};q.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C
|
|
190
|
+
q.playbackRateChanged=function(a){this.B=a};q.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.$(Ef)}),this.h.observe(this.o))};q.setCmsdManager=function(a){this.m=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
191
191
|
function Df(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Bf(a,b,c,d,e){if(a.m){var f=a.m.Ag();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Pe(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
192
192
|
function Cf(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})}S("shaka.abr.SimpleAbrManager",wf);wf.prototype.configure=wf.prototype.configure;wf.prototype.setCmsdManager=wf.prototype.setCmsdManager;wf.prototype.setMediaElement=wf.prototype.setMediaElement;wf.prototype.playbackRateChanged=wf.prototype.playbackRateChanged;wf.prototype.setVariants=wf.prototype.setVariants;
|
|
193
193
|
wf.prototype.getBandwidthEstimate=wf.prototype.getBandwidthEstimate;wf.prototype.trySuggestStreams=wf.prototype.trySuggestStreams;wf.prototype.segmentDownloaded=wf.prototype.segmentDownloaded;wf.prototype.disable=wf.prototype.disable;wf.prototype.enable=wf.prototype.enable;wf.prototype.chooseVariant=wf.prototype.chooseVariant;wf.prototype.init=wf.prototype.init;wf.prototype.release=wf.prototype.release;wf.prototype.stop=wf.prototype.stop;var Ef=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ff(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)}Ff.prototype.add=function(a,b,c){return Gf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
@@ -198,7 +198,7 @@ Kf.prototype.create=function(a){var b=[];b=Lf(a,this.A);var c=a.filter(function(
|
|
|
198
198
|
function Lf(a,b){b=Be(b);var c=Ie(b,a.map(function(d){return He(d)}));return c?a.filter(function(d){return c==He(d)}):[]}function Mf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Qf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Rf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
199
199
|
function Pf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Of(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 Nf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Sf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}
|
|
200
200
|
function Tf(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Uf(){this.g=Vf;this.i=(new Map).set(Vf,2).set(Wf,1);this.h=0}function Xf(a,b,c){a.i.set(Vf,c).set(Wf,b)}var Wf=0,Vf=1;function Yf(a,b){var c=Zf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=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}
|
|
201
|
-
function $f(a){var b,c;return O(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return F(d,new Promise(function(e){(new Rc(e))
|
|
201
|
+
function $f(a){var b,c;return O(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return F(d,new Promise(function(e){(new Rc(e)).$(c/1E3)}),2)}a.h*=a.m;H(d)})}function Zf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function ag(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}ag.prototype.resolve=function(){};ag.prototype.reject=function(){};function bg(a,b){this.promise=a;this.i=b;this.g=!1}function cg(a){return new bg(Promise.reject(a),function(){return Promise.resolve()})}function dg(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new bg(a,function(){return Promise.resolve()})}function eg(a){return new bg(Promise.resolve(a),function(){return Promise.resolve()})}function fg(a){return new bg(a,function(){return a.catch(function(){})})}bg.prototype.abort=function(){this.g=!0;return this.i()};
|
|
202
202
|
function gg(a){return new bg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}bg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
203
203
|
bg.prototype.Aa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=hg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new ag,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new bg(f,function(){return d()})};
|
|
204
204
|
function hg(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()}}}S("shaka.util.AbortableOperation",bg);bg.prototype.chain=bg.prototype.Aa;bg.prototype["finally"]=bg.prototype.finally;bg.all=gg;bg.prototype.abort=bg.prototype.abort;bg.notAbortable=fg;bg.completed=eg;bg.aborted=dg;bg.failed=cg;function U(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}
|
|
@@ -212,19 +212,19 @@ q.request=function(a,b,c){var d=this,e=new tg;if(this.i){var f=Promise.reject(ne
|
|
|
212
212
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Aa(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.ki||!d.l||u.fromCache||"HEAD"==b.method||a!=yg||d.l(u.timeMs,u.data.byteLength,zg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new ug(n.promise,function(){return n.abort()},e);mg(this.m,f);return f};
|
|
213
213
|
function vg(a,b,c,d){function e(h){f=f.Aa(function(){c.body&&(c.body=Ab(c.body));return h(b,c,d)})}var f=eg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Aa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
214
214
|
function wg(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new tc(c.uris[f]),l=k.Bb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),uc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=qg[l])?l.he:null;if(!n)return cg(new T(2,1,1E3,k));var p=l.Fi,r=null,u=null,v=!1,w=!1,A;return fg($f(e)).Aa(function(){if(a.i)return dg();A=Date.now();var z=0;c.requestStartTime=Date.now();
|
|
215
|
-
var D=n(c.uris[f],c,b,function(C,E,G){r&&r.stop();u&&u
|
|
215
|
+
var D=n(c.uris[f],c,b,function(C,E,G){r&&r.stop();u&&u.$(B/1E3);a.l&&b==yg&&(z++,c.packetNumber=z,a.l(C,E,zg(d),c),m=!0,h.g=G)},function(C){a.j&&a.j(C,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return D;var y=c.retryParameters.connectionTimeout;y&&(r=new Rc(function(){v=!0;D.abort()}),r.$(y/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Rc(function(){v=!0;D.abort()}));return D}).Aa(function(z){r&&r.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-A);var D={response:z,
|
|
216
216
|
ki:m};!w&&a.j&&a.j(z.headers,c,b);return D},function(z){r&&r.stop();u&&u.stop();if(a.A){var D=null,y=0;z instanceof T&&(D=z,1001==z.code&&(y=z.data[1]));a.A(c,D,y,v)}if(a.i)return dg();v&&(z=new T(1,1,1003,c.uris[f],b));if(z instanceof T){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity)return D=(new Map).set("error",z),D=new U("retry",D),a.dispatchEvent(D),f=(f+1)%c.uris.length,wg(a,b,c,d,e,f,z,h)}throw z;})}
|
|
217
217
|
function xg(a,b,c,d){var e=eg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Xg:void 0},f=a.next())g.Xg=f.value,e=e.Aa(function(h){return function(){var k=c.response;k.data&&(k.data=Ab(k.data));return(0,h.Xg)(b,k,d)}}(g));return e.Aa(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function zg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.s)return!1}return!0}S("shaka.net.NetworkingEngine",ng);
|
|
218
218
|
ng.prototype.request=ng.prototype.request;ng.prototype.destroy=ng.prototype.destroy;ng.makeRequest=sg;ng.defaultRetryParameters=function(){return Zf()};ng.prototype.clearAllResponseFilters=ng.prototype.ng;ng.prototype.unregisterResponseFilter=ng.prototype.ej;ng.prototype.registerResponseFilter=ng.prototype.Ji;ng.prototype.clearAllRequestFilters=ng.prototype.mg;ng.prototype.unregisterRequestFilter=ng.prototype.dj;ng.prototype.registerRequestFilter=ng.prototype.Ii;ng.unregisterScheme=function(a){delete qg[a]};
|
|
219
219
|
ng.registerScheme=og;ng.prototype.setForceHTTPS=ng.prototype.Qf;ng.prototype.setForceHTTP=ng.prototype.Pf;function tg(){this.g=0}ng.NumBytesRemainingClass=tg;function ug(a,b,c){bg.call(this,a,b);this.h=c}na(ug,bg);ng.PendingRequest=ug;var yg=1;ng.RequestType={MANIFEST:0,SEGMENT:yg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};ng.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6};var pg=3;
|
|
220
|
-
ng.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:pg};var qg={};function Ag(a){this.g=!1;this.h=new ag;this.i=a}Ag.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 Bg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Cg(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 Dg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Eg(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 Hg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Ig(a,b){this.h=Eb(a);this.i=b==Jg;this.g=0}q=Ig.prototype;q.qa=function(){return this.g<this.h.byteLength};q.
|
|
221
|
-
q.Ug=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Kg();}};q.Oc=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 Kg();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.
|
|
220
|
+
ng.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:pg};var qg={};function Ag(a){this.g=!1;this.h=new ag;this.i=a}Ag.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 Bg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Cg(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 Dg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Eg(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 Hg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Ig(a,b){this.h=Eb(a);this.i=b==Jg;this.g=0}q=Ig.prototype;q.qa=function(){return this.g<this.h.byteLength};q.wa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.U=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Kg();}};q.oa=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Kg();}};q.R=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Kg();}};
|
|
221
|
+
q.Ug=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Kg();}};q.Oc=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 Kg();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.rb=function(a){if(this.g+a>this.h.byteLength)throw Kg();var b=zb(this.h,this.g,a);this.g+=a;return b};
|
|
222
222
|
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Kg();this.g+=a};q.Qi=function(a){if(this.g<a)throw Kg();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Kg();this.g=a};q.rc=function(){for(var a=this.g;this.qa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=zb(this.h,a,this.g-a);this.g+=1;return vd(a)};function Kg(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Ig);Ig.prototype.readTerminatedString=Ig.prototype.rc;Ig.prototype.seek=Ig.prototype.seek;Ig.prototype.rewind=Ig.prototype.Qi;
|
|
223
|
-
Ig.prototype.skip=Ig.prototype.skip;Ig.prototype.readBytes=Ig.prototype.
|
|
224
|
-
q.Lc=function(a,b,c,d){var e=b.
|
|
225
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.
|
|
226
|
-
function Wg(a){var b=Rg(a);a.reader.skip(8);var c=a.reader.oa();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.qa()&&!a.parser.g;)a.parser.Lc(a.start+b,a.reader,a.partialOkay)}function Xg(a){return function(b){a(b.reader.
|
|
227
|
-
function Rg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Lg);Lg.headerSize=Rg;Lg.typeToString=Pg;Lg.allData=Xg;Lg.audioSampleEntry=Wg;Lg.visualSampleEntry=Tg;Lg.sampleDescription=Sg;Lg.children=Qg;Lg.prototype.parseNext=Lg.prototype.Lc;Lg.prototype.parse=Lg.prototype.parse;Lg.prototype.stop=Lg.prototype.stop;Lg.prototype.fullBox=Lg.prototype.
|
|
223
|
+
Ig.prototype.skip=Ig.prototype.skip;Ig.prototype.readBytes=Ig.prototype.rb;Ig.prototype.readUint64=Ig.prototype.Oc;Ig.prototype.readInt32=Ig.prototype.Ug;Ig.prototype.readUint32=Ig.prototype.R;Ig.prototype.readUint16=Ig.prototype.oa;Ig.prototype.readUint8=Ig.prototype.U;Ig.prototype.getLength=Ig.prototype.getLength;Ig.prototype.getPosition=Ig.prototype.wa;Ig.prototype.hasMoreData=Ig.prototype.qa;var Jg=1;Ig.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Jg};function Lg(){this.i=[];this.h=[];this.g=!1}q=Lg.prototype;q.box=function(a,b){a=Mg(a);this.i[a]=Ng;this.h[a]=b;return this};q.T=function(a,b){a=Mg(a);this.i[a]=Og;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ig(a,0);for(this.g=!1;a.qa()&&!this.g;)this.Lc(0,a,b,c)};
|
|
224
|
+
q.Lc=function(a,b,c,d){var e=b.wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.R(),g=b.R(),h=Pg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.wa()+8>b.getLength()){this.g=!0;return}f=b.Oc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Og){if(d&&b.wa()+4>b.getLength()){this.g=!0;return}n=b.R();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.wa(),b=0<d?b.rb(d):new Uint8Array(0),b=new Ig(b,0),l({name:h,parser:this,
|
|
225
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function Qg(a){for(var b=Rg(a);a.reader.qa()&&!a.parser.g;)a.parser.Lc(a.start+b,a.reader,a.partialOkay)}function Sg(a){for(var b=Rg(a),c=a.reader.R(),d=0;d<c&&(a.parser.Lc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Tg(a){var b=Rg(a);for(a.reader.skip(78);a.reader.qa()&&!a.parser.g;)a.parser.Lc(a.start+b,a.reader,a.partialOkay)}
|
|
226
|
+
function Wg(a){var b=Rg(a);a.reader.skip(8);var c=a.reader.oa();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.qa()&&!a.parser.g;)a.parser.Lc(a.start+b,a.reader,a.partialOkay)}function Xg(a){return function(b){a(b.reader.rb(b.reader.getLength()-b.reader.wa()))}}function Mg(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 Pg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
227
|
+
function Rg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Lg);Lg.headerSize=Rg;Lg.typeToString=Pg;Lg.allData=Xg;Lg.audioSampleEntry=Wg;Lg.visualSampleEntry=Tg;Lg.sampleDescription=Sg;Lg.children=Qg;Lg.prototype.parseNext=Lg.prototype.Lc;Lg.prototype.parse=Lg.prototype.parse;Lg.prototype.stop=Lg.prototype.stop;Lg.prototype.fullBox=Lg.prototype.T;Lg.prototype.box=Lg.prototype.box;var Ng=0,Og=1;function Yg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Lg).box("moov",Qg).box("moof",Qg).T("pssh",function(c){if(!(1<c.version)){var d=zb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Jd(c.reader.rb(16)));if(0<c.version){d=c.reader.R();for(var e=0;e<d;e++){var f=Jd(c.reader.rb(16));b.h.push(f)}}}}).parse(a)}
|
|
228
228
|
function Zg(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=Eb(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=Id(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
229
229
|
@license
|
|
230
230
|
tXml
|
|
@@ -247,20 +247,20 @@ null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Tb=c.slice(1))}return b}
|
|
|
247
247
|
function Bh(a,b){var c=Ah(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Ch(a,"t",d.t)),null!==d.n&&(c=Ch(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Tb)&&a[c]?Dh(a[c],e,d,jh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
|
|
248
248
|
function Ch(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Dh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
249
249
|
function Eh(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=eh.has(b)?eh.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Eh(d),b.appendChild(c);return b}
|
|
250
|
-
function Fh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ke(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Fh(c),c.parent=b,b.children.push(c));return b}var dh=new Map,eh=new Map;function Gh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.fa=this.da=!1;this.I=0;this.g=null;this.B=new gb;this.i=new Map;this.A=new Map;this.l=new ag;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.Y=new Map;this.ea=new Map;this.M=new Rc(function(){return Hh(b)});this.O=!1;this.N=[];this.
|
|
250
|
+
function Fh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ke(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Fh(c),c.parent=b,b.children.push(c));return b}var dh=new Map,eh=new Map;function Gh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.fa=this.da=!1;this.I=0;this.g=null;this.B=new gb;this.i=new Map;this.A=new Map;this.l=new ag;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.Y=new Map;this.ea=new Map;this.M=new Rc(function(){return Hh(b)});this.O=!1;this.N=[];this.S=!1;this.K=new Rc(function(){Ih(b)});this.l.catch(function(){});this.j=new Ag(function(){return Jh(b)});this.aa=!1;this.F=this.G=null}q=Gh.prototype;q.destroy=function(){return this.j.destroy()};
|
|
251
251
|
function Jh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.M.stop(),a.M=null,F(b,Kh(a),2);case 2:if(!a.m){b.u(3);break}ra(b,4);return F(b,a.m.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:ua(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.aa=!1,a.G=null,H(b)}})}q.configure=function(a){this.h=a;this.K&&this.K.Ra(this.h.updateExpirationTime)};
|
|
252
252
|
function Lh(a,b,c){a.fa=!0;a.A=new Map;a.O=c;return Mh(a,b)}function Nh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.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.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.O=0<a.A.size;return Mh(a,b)}
|
|
253
253
|
function Oh(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 Ph(a,g,[])}
|
|
254
254
|
function Mh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y;return O(function(B){if(1==B.g){if(c=Qh(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(C){return C.video&&C.video.drmInfos.length||C.audio&&C.audio.drmInfos.length?!0:!1});g||(h=Eg(a.h.servers),Rh(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=Sh(n),r=t(p),u=r.next();!u.done;u=r.next())v=u.value,k.add(v);w=t(k);for(A=w.next();!A.done;A=
|
|
255
255
|
w.next())z=A.value,Th(z,Eg(a.h.servers),Eg(a.h.advanced||{}),a.h.keySystemsMapping);return F(B,We(b,a.O,a.aa,a.h.preferredKeySystems),2)}Bg(a.j);D=g||Object.keys(a.h.servers).length;if(!D)return a.da=!0,B.return(Promise.resolve());y=Ph(a,void 0,b);return B.return(g?y:y.catch(function(){}))})}
|
|
256
256
|
function Uh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return F(c,a.G,3);case 3:return Bg(a.j),c.return();case 2:return ra(c,4),a.G=a.m.setMediaKeys(a.s),F(c,a.G,6);case 6:ta(c,5);break;case 4:b=ua(c),a.o(new T(2,6,6003,b.message));case 5:Bg(a.j),H(c)}})}function Vh(a,b){return O(function(c){if(1==c.g)return F(c,Uh(a),2);Wh(a,b.initDataType,zb(b.initData));H(c)})}
|
|
257
|
-
q.Sb=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.ja(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.ja(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Xh(b,e.value);b.
|
|
257
|
+
q.Sb=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.ja(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.ja(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Xh(b,e.value);b.S=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Kh(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
|
|
258
258
|
b.A.size?F(c,Uh(b),2):c.u(2)}Yh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Vh(b,d)});H(c)})};
|
|
259
259
|
function Zh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=sg([a.g.serverCertificateUri],a.h.retryParameters);ra(g,3);c=a.C.Mb.request(5,b);return F(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=zb(d.data);ta(g,4);break;case 3:throw e=ua(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
260
|
-
ra(g,6);return F(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new T(2,6,6004,f.message);}})}function $h(a,b){var c,d,e;return O(function(f){if(1==f.g)return F(f,ai(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.
|
|
260
|
+
ra(g,6);return F(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new T(2,6,6004,f.message);}})}function $h(a,b){var c,d,e;return O(function(f){if(1==f.g)return F(f,ai(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.lb=new ag,d.push(e.lb);d.push(c.remove());return F(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
|
|
261
261
|
function Yh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){ai(a,k,h)});return F(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&bi(a))return g.return(a.l);a.l=new ag;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,Wh(a,f.initDataType,f.initData);ci(a)&&a.l.resolve();return g.return(a.l)})}
|
|
262
262
|
function Wh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(xb(c,e.value.initData))return}0<a.i.size&&ci(a)&&(a.l.resolve(),a.l=new ag,a.l.catch(function(){}));di(a,b,c,a.g.sessionType)}}function ei(a){a=a.i.keys();a=Cg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
263
|
-
q.ef=function(){var a=this,b=this.i.keys();b=Cg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.ad=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.
|
|
263
|
+
q.ef=function(){var a=this,b=this.i.keys();b=Cg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.ad=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Jd=function(){return Hg(this.ea)};
|
|
264
264
|
function Ph(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z;return O(function(D){switch(D.g){case 1:d=new Map;if(c.length){e=fi(a,c,d);D.u(2);break}return F(D,gi(a,b),3);case 3:e=D.h;case 2:f=e;if(!f)throw new T(2,6,6001);Bg(a.j);ra(D,4);a.H.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.H.add(n.contentType.toLowerCase());p=t(k);for(r=p.next();!r.done;r=p.next())u=r.value,a.H.add(u.contentType.toLowerCase());if(c.length){var y=
|
|
265
265
|
f.keySystem;var B=d.get(f.keySystem);var C=[],E=[],G=[],L=[],K=[],I=new Set,J=new Set;hi(B,C,E,L,G,K,I,J);var M=a.O?"persistent-license":"temporary";y={keySystem:y,encryptionScheme:C[0],licenseServerUri:E[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||M,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:L[0],serverCertificateUri:G[0],initData:K,keyIds:I};
|
|
266
266
|
0<J.size&&(y.keySystemUris=J);B=t(B);for(J=B.next();!J.done;J=B.next())J=J.value,J.distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=J.distinctiveIdentifierRequired),J.persistentStateRequired&&(y.persistentStateRequired=J.persistentStateRequired);B=y}else B=f.keySystem,J=b.get(f.keySystem),y=[],C=[],E=[],G=[],L=[],K=new Set,hi(J.drmInfos,y,C,G,E,L,K),B={keySystem:B,encryptionScheme:y[0],licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==J.distinctiveIdentifier,persistentStateRequired:"required"==
|
|
@@ -270,24 +270,24 @@ function fi(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Sh(e.value)
|
|
|
270
270
|
l.Tg}}(d)))return f.keySystemAccess;a=t([!0,!1]);for(d=a.next();!d.done;d=a.next())for(d=d.value,e=t(b),f=e.next();!f.done;f=e.next()){f=t(f.value.decodingInfos);for(var g=f.next();!g.done;g=f.next())if(g=g.value,g.supported&&g.keySystemAccess){var h=c.get(g.keySystemAccess.keySystem);h=t(h);for(var k=h.next();!k.done;k=h.next())if(!!k.value.licenseServerUri==d)return g.keySystemAccess}}return null}
|
|
271
271
|
function gi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new T(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){z.u(4);break}k=h.value;if(!b.has(k)){z.u(3);break}l=b.get(k);ra(z,6);return F(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
272
272
|
z.h,z.return(c);case 6:ua(z);case 7:Bg(a.j);case 3:h=g.next();z.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.u(11);break}p=n.value;r=t(b.keys());u=r.next();case 12:if(u.done){n=m.next();z.u(9);break}v=u.value;w=b.get(v);A=w.drmInfos.some(function(D){return!!D.licenseServerUri});if(A!=p){z.u(13);break}ra(z,15);return F(z,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=z.h,z.return(c);case 15:ua(z);case 16:Bg(a.j);case 13:u=r.next();z.u(12);break;case 11:return z.return(c)}})}
|
|
273
|
-
function Qh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Qd(a)}function ii(a){ci(a)&&a.l.resolve()}function ji(a,b){(new Rc(function(){b.loaded=!0;ii(a)}))
|
|
274
|
-
function ai(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.
|
|
273
|
+
function Qh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Qd(a)}function ii(a){ci(a)&&a.l.resolve()}function ji(a,b){(new Rc(function(){b.loaded=!0;ii(a)})).$(ki)}
|
|
274
|
+
function ai(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.N.push(n):Xh(a,n)});a.B.D(d,"keystatuseschange",function(n){return li(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,zf:Infinity,lb:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return F(m,
|
|
275
275
|
d.load(b),4);case 4:return g=m.h,Bg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),ji(a,f),ii(a),m.return(d);case 2:k=ua(m),Bg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(l,6,6005,k.message)),f.loaded=!0,ii(a);case 3:return m.return(Promise.resolve())}})}
|
|
276
|
-
function di(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.
|
|
276
|
+
function di(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.N.push(f):Xh(a,f)});a.B.D(e,"keystatuseschange",function(f){return li(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,zf:Infinity,lb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Gd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
277
277
|
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.o(new T(2,6,6006,f.message,f,h))}})}
|
|
278
278
|
function Xh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Gd(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=sg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
|
|
279
279
|
f.headers[h];if(Nc(a.g.keySystem)){var A=xd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=ah(A,"PlayReadyKeyMessage");var z=kh(A,"HttpHeader");z=t(z);for(var D=z.next();!D.done;D=z.next()){var y=D.value;D=kh(y,"name")[0];y=kh(y,"value")[0];g.headers[ih(D)]=ih(y)}A=kh(A,"Challenge")[0];g.body=Hd(ih(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();ra(w,2);m=a.C.Mb.request(2,g);return F(w,m.promise,4);case 4:l=w.h;ta(w,3);break;case 2:n=ua(w);if(a.j.g)return w.return();
|
|
280
|
-
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.
|
|
280
|
+
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.lb&&d.lb.reject(p)):(d&&d.lb&&d.lb.reject(p),a.i.delete(c),ci(a)&&(a.l.resolve(),a.M.$(.1)));return w.return();case 3:if(a.j.g)return w.return();a.I+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Gd(l.data);ra(w,5);return F(w,c.update(l.data),7);case 7:ta(w,6);break;case 5:return r=ua(w),u=new T(2,6,6008,r.message),a.o(u),d&&d.lb&&d.lb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.lb&&d.lb.resolve(),
|
|
281
281
|
ji(a,d));H(w)}})}
|
|
282
|
-
function li(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Nc(a.g.keySystem)&&16==g.byteLength&&(Wc()||id())){h=Eb(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=Jd(g).slice(0,32);a.Y.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.
|
|
283
|
-
(a.l.resolve(),a.M
|
|
282
|
+
function li(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Nc(a.g.keySystem)&&16==g.byteLength&&(Wc()||id())){h=Eb(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=Jd(g).slice(0,32);a.Y.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.lb&&(a.i.delete(b),b.close().catch(function(){}));ci(a)&&
|
|
283
|
+
(a.l.resolve(),a.M.$(mi))}function Hh(a){var b=a.Y,c=a.ea;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.o(new T(2,6,6014));a.C.de(Hg(c))}
|
|
284
284
|
function ni(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I;return O(function(J){if(1==J.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=
|
|
285
|
-
[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(M,N){var P,R,Q,W,Y,va,
|
|
286
|
-
(P=N.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,ad()&&(R=!1),Q=N.getConfiguration().videoCapabilities,W=N.getConfiguration().audioCapabilities,Y={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(M)&&k.get(M)?Y=k.get(M):k.set(M,Y),(va=Q[0].encryptionScheme)&&!Y.encryptionSchemes.includes(va)&&Y.encryptionSchemes.push(va),(
|
|
287
|
-
!Y.audioRobustnessLevels.includes(wa)&&Y.audioRobustnessLevels.push(wa),H(Pa)}})};m=function(M,N,P,R){var Q,W,Y,va,
|
|
285
|
+
[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(M,N){var P,R,Q,W,Y,va,Fa,wa;return O(function(Pa){switch(Pa.g){case 1:return ra(Pa,2),F(Pa,N.createMediaKeys(),4);case 4:ta(Pa,3);break;case 2:return ua(Pa),Pa.return();case 3:R=
|
|
286
|
+
(P=N.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,ad()&&(R=!1),Q=N.getConfiguration().videoCapabilities,W=N.getConfiguration().audioCapabilities,Y={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(M)&&k.get(M)?Y=k.get(M):k.set(M,Y),(va=Q[0].encryptionScheme)&&!Y.encryptionSchemes.includes(va)&&Y.encryptionSchemes.push(va),(Fa=Q[0].robustness)&&!Y.videoRobustnessLevels.includes(Fa)&&Y.videoRobustnessLevels.push(Fa),(wa=W[0].robustness)&&
|
|
287
|
+
!Y.audioRobustnessLevels.includes(wa)&&Y.audioRobustnessLevels.push(wa),H(Pa)}})};m=function(M,N,P,R){var Q,W,Y,va,Fa,wa,Pa,Za,Va,za;return O(function(bb){switch(bb.g){case 1:ra(bb,2);Q=Je(g);W=t(Q.videoCapabilities);for(Y=W.next();!Y.done;Y=W.next())va=Y.value,va.encryptionScheme=N,va.robustness=P;Fa=t(Q.audioCapabilities);for(wa=Fa.next();!wa.done;wa=Fa.next())Pa=wa.value,Pa.encryptionScheme=N,Pa.robustness=R;Za=Je(Q);Za.persistentState="required";Za.sessionTypes=["persistent-license"];Va=[Za,Q];
|
|
288
288
|
return F(bb,navigator.requestMediaKeySystemAccess(M,Va),4);case 4:return za=bb.h,F(bb,l(M,za),5);case 5:ta(bb,0);break;case 2:ua(bb),H(bb)}})};n=function(M,N,P,R){var Q,W,Y;return O(function(va){switch(va.g){case 1:return ra(va,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:M,video:{encryptionScheme:N,robustness:P},audio:{encryptionScheme:N,
|
|
289
289
|
robustness:R}}},F(va,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return W=va.h,Y=W.keySystemAccess,F(va,l(M,Y),5);case 5:ta(va,0);break;case 2:ua(va),H(va)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(z=A.value,D=t(a),y=D.next();!y.done;y=D.next())B=y.value,"org.w3.clearkey"===B&&ld()||(v.push(m(B,z,"","")),v.push(n(B,z,"","")));C=t(a);for(E=C.next();!E.done;E=C.next())for(G=E.value,L=t(d[G]||[]),K=L.next();!K.done;K=
|
|
290
|
-
L.next())I=K.value,v.push(m(G,null,I,"")),v.push(m(G,null,"",I)),v.push(n(G,null,I,"")),v.push(n(G,null,"",I));return F(J,Promise.all(v),2)}return J.return(Hg(k))})}function oi(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Rc(e))
|
|
290
|
+
L.next())I=K.value,v.push(m(G,null,I,"")),v.push(m(G,null,"",I)),v.push(n(G,null,I,"")),v.push(n(G,null,"",I));return F(J,Promise.all(v),2)}return J.return(Hg(k))})}function oi(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Rc(e)).$(pi)}),ra(c,2),F(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);ua(c);H(c)})}
|
|
291
291
|
function Kh(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return F(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return ra(g,2),a.fa||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?F(g,oi(e),5):F(g,e.remove(),5);if(2!=g.g)return ta(g,0);ua(g);H(g)})})),0)})}function Sh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
292
292
|
function Ih(a){a.i.forEach(function(b,c){var d=b.zf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.zf=e)})}function ci(a){a=a.i.values();return Dg(a,function(b){return b.loaded})}function bi(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Y.get(c.value))return!1;return!0}
|
|
293
293
|
function Rh(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)}
|
|
@@ -303,17 +303,17 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
303
303
|
*/
|
|
304
304
|
function qi(a,b,c){this.h=a;this.i=b;this.g=c}function ri(a,b){return O(function(c){if(1==c.g)return F(c,Re(a.g,b,a.h.drm.preferredKeySystems),2);a.h.streaming.dontChooseCodecs||Me(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(sf))throw new T(2,4,4032);return c.return(si(a,b))})}
|
|
305
305
|
function si(a,b){var c=Qe(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,ti(a,d.keySystem,f.video),ti(a,d.keySystem,f.audio);ui(a,b)}return c}function ti(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,Wh(a.g,e.initDataType,e.initData)}}}
|
|
306
|
-
function ui(a,b){a=a.g?a.g.
|
|
307
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var vi=["output-restricted","internal-error"];function wi(){}function xi(a,b){if(b){var c=yi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",wi);wi.unregisterParserByMime=function(a){delete yi[a]};wi.registerParserByMime=function(a,b){yi[a]=b};wi.registerParserByExtension=function(){qb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};wi.AccessibilityPurpose={ck:"visually impaired",xj:"hard of hearing"};var yi={};function zi(a,b){function c(){f=!0}function d(m){h.push(m);Qg(m)}var e=a=zb(a),f=!1,g,h=[],k=[];(new Lg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).
|
|
308
|
-
function(m){k.push({box:m,Oa:1701733238})}).
|
|
306
|
+
function ui(a,b){a=a.g?a.g.Jd():{};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?vi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
307
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var vi=["output-restricted","internal-error"];function wi(){}function xi(a,b){if(b){var c=yi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",wi);wi.unregisterParserByMime=function(a){delete yi[a]};wi.registerParserByMime=function(a,b){yi[a]=b};wi.registerParserByExtension=function(){qb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};wi.AccessibilityPurpose={ck:"visually impaired",xj:"hard of hearing"};var yi={};function zi(a,b){function c(){f=!0}function d(m){h.push(m);Qg(m)}var e=a=zb(a),f=!1,g,h=[],k=[];(new Lg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).T("stsd",function(m){g=m;h.push(m);Sg(m)}).T("encv",c).T("enca",c).T("dvav",function(m){k.push({box:m,Oa:1701733238})}).T("dva1",function(m){k.push({box:m,Oa:1701733238})}).T("dvh1",function(m){k.push({box:m,Oa:1701733238})}).T("dvhe",function(m){k.push({box:m,Oa:1701733238})}).T("dvc1",function(m){k.push({box:m,Oa:1701733238})}).T("dvi1",
|
|
308
|
+
function(m){k.push({box:m,Oa:1701733238})}).T("hev1",function(m){k.push({box:m,Oa:1701733238})}).T("hvc1",function(m){k.push({box:m,Oa:1701733238})}).T("avc1",function(m){k.push({box:m,Oa:1701733238})}).T("avc3",function(m){k.push({box:m,Oa:1701733238})}).T("ac-3",function(m){k.push({box:m,Oa:1701733217})}).T("ec-3",function(m){k.push({box:m,Oa:1701733217})}).T("ac-4",function(m){k.push({box:m,Oa:1701733217})}).T("mp4a",function(m){k.push({box:m,Oa:1701733217})}).parse(a);if(f)return a;if(0==k.length||
|
|
309
309
|
!g)throw eb(Jd(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,e=Ai(e,g,l.box,h,l.Oa);return Wc()&&md()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
310
310
|
function Ai(a,b,c,d,e){var f=Bi.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ci(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Yc()||Wc()?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,Ci(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Rg(b);
|
|
311
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ci(a,b,c){a=Eb(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 Bi=new Kc(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 Di(a,b,c,d,e,f,g){this.L=a;this.Ha=b;this.ta=c;this.Jc=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Di.prototype.Yb=function(){return this.Ha};Di.prototype.Wb=function(){return this.ta};Di.prototype.
|
|
311
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ci(a,b,c){a=Eb(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 Bi=new Kc(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 Di(a,b,c,d,e,f,g){this.L=a;this.Ha=b;this.ta=c;this.Jc=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Di.prototype.Yb=function(){return this.Ha};Di.prototype.Wb=function(){return this.ta};Di.prototype.dd=function(){return this.g};function Ei(a,b){return a===b?!0:a&&b?a.Yb()==b.Yb()&&a.Wb()==b.Wb()&&Pb(a.L().sort(),b.L().sort())&&xb(a.dd(),b.dd()):a==b}S("shaka.media.InitSegmentReference",Di);
|
|
312
312
|
Di.prototype.getEndByte=Di.prototype.Wb;Di.prototype.getStartByte=Di.prototype.Yb;
|
|
313
|
-
function Fi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Gi:r;this.startTime=a;this.j=this.endTime=b;this.F=c;this.Ha=d;this.ta=e;this
|
|
313
|
+
function Fi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Gi:r;this.startTime=a;this.j=this.endTime=b;this.F=c;this.Ha=d;this.ta=e;this.Z=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=0;this.o=void 0===v?!1:v;this.G=this.s=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Lg();
|
|
314
314
|
this.o&&this.g.length&&this.g[this.g.length-1].Kg();this.C=this.mimeType=this.codecs=null}q=Fi.prototype;q.L=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Oh=function(){return this.endTime};q.Yb=function(){return this.Ha};q.Wb=function(){return this.ta};q.fi=function(){return this.tilesLayout};q.ei=function(){return this.B};q.Zb=function(){return this.status};q.zi=function(){this.status=Hi};q.wf=function(){this.preload=!0};q.ti=function(){return this.preload};
|
|
315
315
|
q.Vd=function(){this.l=!1};q.pi=function(){return this.l};q.Lg=function(){this.s=!0};q.si=function(){return this.s};q.Kg=function(){this.G=!0};q.ri=function(){return this.G};q.Jg=function(){this.m=!0};q.li=function(){return this.m};q.hh=function(a){this.A=a};q.di=function(){return this.A};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
316
|
-
q.Vf=function(a){null==this.h?Xa("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.aj=function(a){this.C=a};q.
|
|
316
|
+
q.Vf=function(a){null==this.h?Xa("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.aj=function(a){this.C=a};q.dd=function(){return this.C};function Ii(a,b){a.Z=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ii(c.value,b)}S("shaka.media.SegmentReference",Fi);Fi.prototype.getSegmentData=Fi.prototype.dd;Fi.prototype.setSegmentData=Fi.prototype.aj;Fi.prototype.syncAgainst=Fi.prototype.Vf;Fi.prototype.offset=Fi.prototype.offset;
|
|
317
317
|
Fi.prototype.getThumbnailSprite=Fi.prototype.di;Fi.prototype.setThumbnailSprite=Fi.prototype.hh;Fi.prototype.hasByterangeOptimization=Fi.prototype.li;Fi.prototype.markAsByterangeOptimization=Fi.prototype.Jg;Fi.prototype.isLastPartial=Fi.prototype.ri;Fi.prototype.markAsLastPartial=Fi.prototype.Kg;Fi.prototype.isPartial=Fi.prototype.si;Fi.prototype.markAsPartial=Fi.prototype.Lg;Fi.prototype.isIndependent=Fi.prototype.pi;Fi.prototype.markAsNonIndependent=Fi.prototype.Vd;Fi.prototype.isPreload=Fi.prototype.ti;
|
|
318
318
|
Fi.prototype.markAsPreload=Fi.prototype.wf;Fi.prototype.markAsUnavailable=Fi.prototype.zi;Fi.prototype.getStatus=Fi.prototype.Zb;Fi.prototype.getTileDuration=Fi.prototype.ei;Fi.prototype.getTilesLayout=Fi.prototype.fi;Fi.prototype.getEndByte=Fi.prototype.Wb;Fi.prototype.getStartByte=Fi.prototype.Yb;Fi.prototype.getEndTime=Fi.prototype.Oh;Fi.prototype.getStartTime=Fi.prototype.getStartTime;Fi.prototype.getUris=Fi.prototype.L;var Gi=0,Hi=1;Fi.Status={jj:Gi,ak:Hi,Dj:2};function Ji(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ki(a){return!a||Ji(a)?null:a.length?a.end(a.length-1):null}function Li(a,b){return!a||!a.length||Ji(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Mi(a,b){if(!a||!a.length||Ji(a))return 0;var c=0;a=t(Pi(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}
|
|
319
319
|
function Qi(a,b,c){if(!a||!a.length||Ji(a))return null;a=Pi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Pi(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};/*
|
|
@@ -327,9 +327,9 @@ function Vi(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
327
327
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=vd(zb(a.data,1,d));a=vd(zb(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=vd(zb(a.data,1,d));a=vd(zb(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=vd(zb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
328
328
|
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=Ab(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=vd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=vd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ab(a.data),b):null}
|
|
329
329
|
function Wi(a){for(var b=0,c=[];Si(a,b);){var d=Ui(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=Ui(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Vi(e))&&c.push(f);b+=e.size+10}Ti(a,b)&&(b+=10)}return c}function Xi(a,b){for(var c=b=void 0===b?0:b,d=0;Si(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ui(a,b+6),Ti(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Ri);Ri.getID3Data=Xi;
|
|
330
|
-
Ri.getID3Frames=Wi;function Yi(a,b){var c=null,d=null,e=null,f=a.R();b&1&&(e=a.Oc());b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:f,Zc:c,
|
|
330
|
+
Ri.getID3Frames=Wi;function Yi(a,b){var c=null,d=null,e=null,f=a.R();b&1&&(e=a.Oc());b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:f,Zc:c,Gd:d,ek:e}}function Zi(a,b){return 1==b?(b=a.R(),a=a.R(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.R()}}function $i(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.R();a.skip(4);a=a.oa();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
331
331
|
function aj(a,b,c){var d=a.R(),e=[],f=null;c&1&&(f=a.R());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Jf:null,sampleSize:null,me:null};c&256&&(h.Jf=a.R());c&512&&(h.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(h.me=0==b?a.R():a.Ug());e.push(h)}return{ik:d,Yg:e,Hh:f}}function bj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.oa();a.skip(2);a.skip(2);a.skip(2);a=a.oa()+a.oa()/65536;return{channelCount:b,sampleRate:a}}function cj(a){a=a.R();return{codec:Pg(a)}}
|
|
332
|
-
function dj(a){var b=null,c=null,d=a.
|
|
332
|
+
function dj(a){var b=null,c=null,d=a.rb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.oa()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.oa();a.oa();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,wd:c}}
|
|
333
333
|
function ej(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function fj(a){return(10>a?"0":"")+a};/*
|
|
334
334
|
|
|
335
335
|
Copyright Brightcove, Inc.
|
|
@@ -356,10 +356,10 @@ break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-
|
|
|
356
356
|
break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
357
357
|
function tj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=uj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=uj(d,
|
|
358
358
|
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.Ei=function(a){qb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Cf(a)};
|
|
359
|
-
q.Cf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=
|
|
360
|
-
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=
|
|
361
|
-
q.Vb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=
|
|
362
|
-
q.Hc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=
|
|
359
|
+
q.Cf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Kd(b.data,p),b.fullData=Kd(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Kd(b.data,k),b.fullData=Kd(b.fullData,k)));if(n>=e-f)return h;
|
|
360
|
+
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Kd(b.data,a),b.fullData=Kd(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Kd.apply(Ed,x(c.value)),(c=tj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Wi(c.data),dts:c.dts,pts:c.pts});return a};
|
|
361
|
+
q.Vb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Kd.apply(Ed,x(c.value)),e=tj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Kd(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
362
|
+
q.Hc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Kd.apply(Ed,x(d.value)),f=tj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Kd(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.Cf(e,
|
|
363
363
|
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.Vb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Hc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.$c=function(){return{audio:this.A,video:this.m}};
|
|
364
364
|
q.Md=function(){for(var a=[],b=t(this.Hc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.ii=function(){qb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.jf();return{height:a.height,width:a.width}};q.jf=function(){return"hvc"==this.m?Cj(this):Dj(this)};
|
|
365
365
|
function Dj(a){var b={height:null,width:null,codec:null};a=a.Md();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new gj(a.data);var c=oj(a),d=oj(a),e=oj(a);lj(a);if(Ej.includes(c)){var f=V(a);3===f&&ij(a,1);lj(a);lj(a);ij(a,1);if(nj(a)){f=3!==f?8:12;for(var g=0;g<f;g++)nj(a)&&(6>g?pj(a,16):pj(a,64))}}lj(a);f=V(a);if(0===f)V(a);else if(1===f)for(ij(a,1),lj(a),lj(a),f=V(a),g=0;g<f;g++)lj(a);lj(a);ij(a,1);f=V(a);g=V(a);var h=jj(a,1);0===h&&ij(a,1);ij(a,1);var k=0,l=0,
|
|
@@ -369,8 +369,8 @@ function Cj(a){var b={height:null,width:null,codec:null};a=a.Md();if(!a.length)r
|
|
|
369
369
|
a&&(e+="."+a.toString(16).toUpperCase());b.codec=e;return b}function uj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Fj(a){return 0>sj(a)?!1:!0}function sj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",rj);rj.syncOffset=sj;rj.probe=Fj;rj.prototype.getVideoInfo=rj.prototype.jf;rj.prototype.getVideoResolution=rj.prototype.ii;rj.prototype.getVideoNalus=rj.prototype.Md;
|
|
370
370
|
rj.prototype.getCodecs=rj.prototype.$c;rj.prototype.getStartTime=rj.prototype.getStartTime;rj.prototype.getVideoData=rj.prototype.Hc;rj.prototype.getAudioData=rj.prototype.Vb;rj.prototype.getMetadata=rj.prototype.getMetadata;rj.prototype.parseNalus=rj.prototype.Cf;rj.prototype.parseAvcNalus=rj.prototype.Ei;rj.prototype.parse=rj.prototype.parse;rj.prototype.clearData=rj.prototype.clearData;rj.Timescale=9E4;var Ej=[100,110,122,244,44,83,86,118,128,138,139,134];function Gj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ya("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,qb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ya("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ya("Could not find LCEVC Library on this page"),
|
|
371
371
|
a=!1):(this.h.SupportObject.SupportStatus||Ya(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 Hj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
372
|
-
Gj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ij(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Gj);Gj.prototype.release=Gj.prototype.release;function Jj(a,b,c,d){var e=this;this.i=a;this.da=c;this.A=null;this.F=b;this.h={};this.G={};this.Da={};this.g=null;this.fa=!1;this.Y=d||null;this.l={};this.s=new gb;this.j={};this.H=null;this.M=new ag;this.N="";this.ra=!1;this.m=Kj(this,this.M);this.C=!1;this.I=new Ag(function(){return Lj(e)});this.B=!1;this.aa="UNKNOWN";this.Ea=this.Fa=!1;this.za=new ag;this.o=!1;this.
|
|
373
|
-
function Kj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.
|
|
372
|
+
Gj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ij(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Gj);Gj.prototype.release=Gj.prototype.release;function Jj(a,b,c,d){var e=this;this.i=a;this.da=c;this.A=null;this.F=b;this.h={};this.G={};this.Da={};this.g=null;this.fa=!1;this.Y=d||null;this.l={};this.s=new gb;this.j={};this.H=null;this.M=new ag;this.N="";this.ra=!1;this.m=Kj(this,this.M);this.C=!1;this.I=new Ag(function(){return Lj(e)});this.B=!1;this.aa="UNKNOWN";this.Ea=this.Fa=!1;this.za=new ag;this.o=!1;this.va=!0;this.na=this.O=this.ya=this.S=this.K=this.ea=null;this.ma=new ag}
|
|
373
|
+
function Kj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.va=!0});a.s.D(c,"endstreaming",function(){a.va=!1});a.s.ja(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.ja(a.i,"playing",function(){a.ra=!0});a.N=Mj(c);a.i.src=a.N;return c}c=new MediaSource;a.s.ja(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.ja(a.i,"playing",function(){a.ra=!0});a.N=Mj(c);a.i.src=a.N;return c}
|
|
374
374
|
function Nj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g)return a.createSegmentIndex?F(r,a.createSegmentIndex(),2):r.u(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Wd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ua){if(m=Zd(h,k),!oe(m))return r.return(!1)}else if(b==c.ha?k=Ze(k):b==c.X&&(k=$e(k,h)),n=
|
|
375
375
|
ce(a,h,k),p=ae(h,k),!lb(n)&&!nc(p))return r.return(!1);return r.return(!0)})}q=Jj.prototype;q.destroy=function(){return this.I.destroy()};
|
|
376
376
|
function Lj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(xe)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.j)b.push(a.j[k].destroy());return F(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.m=null;a.g=null;a.F=null;a.h={};a.j={};a.H=null;
|
|
@@ -378,13 +378,13 @@ a.l={};a.Y=null;a.K=null;a.da=null;H(l)})}q.init=function(a,b,c,d){b=void 0===b?
|
|
|
378
378
|
function Oj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:return e=Wd,f=Oa,g=Qa,F(w,Nj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Zd(c.mimeType,d);if(b==e.ua){Pj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!lb(h)||!a.B&&$d.includes(h))k=!0;l=ae(c.mimeType,d);if(!k){w.u(4);break}m=Sd(e.X,(d||"").split(","));n=Sd(e.ha,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return F(w,Oj(a,e.X,c,m),6);case 6:return F(w,
|
|
379
379
|
Oj(a,e.ha,c,n),7);case 7:return w.return();case 5:if(p=nc(l))r=p(),a.j[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Bg(a.I);try{v=a.m.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.m.readyState+" expected 'open'",null);}a.B&&(v.mode=Qj);a.s.D(v,"error",function(){var A=a.l[b][0];A.p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.s.D(v,"updateend",function(){return Rj(a,b)});a.h[b]=v;a.G[b]=h;a.Da[b]=!!c.drmInfos.length;
|
|
380
380
|
H(w)}})}q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
381
|
-
function Pj(a,b,c,d){a.g||(a.g=new
|
|
381
|
+
function Pj(a,b,c,d){a.g||(a.g=new le(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.fa;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,pe[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):qb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):qb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
382
382
|
function Sj(a){return a.C?!1:a.m?"ended"==a.m.readyState:!0}function Tj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Ud?a=a.g.g:(a=Uj(a,b),a=!a||Ji(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Vj(a,b){return a.C?null:b==Ud?a.g.h:Ki(Uj(a,b))}function Wj(a,b,c){if(a.C)return 0;if(b==Ud)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Uj(a,b);return Mi(a,c)}
|
|
383
383
|
q.wb=function(){var a={total:this.C?[]:Pi(this.i.buffered),audio:this.C?[]:Pi(Uj(this,"audio")),video:this.C?[]:Pi(Uj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Uj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
384
|
-
function Xj(a,b,c,d,e,f){var g=null,h=zb(c);if($d.includes(e))f=Wi(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.da.onMetadata([{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
|
|
384
|
+
function Xj(a,b,c,d,e,f){var g=null,h=zb(c);if($d.includes(e))f=Wi(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.da.onMetadata([{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.Z&&d.Z.timescale){var k=d.Z.timescale;if(!isNaN(k)){var l=0,m=!1;(new Lg).box("moof",Qg).box("traf",Qg).T("tfdt",function(n){l=Zi(n.reader,
|
|
385
385
|
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else if(!e.includes("/mp4")&&!e.includes("/webm")&&Fj(h)&&(a.K?a.K.clearData():a.K=new rj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length))a.da.onMetadata(h,f,d?d.endTime:null);return g}
|
|
386
|
-
function Yj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,A,z,D,y,B,C,E;return O(function(G){switch(G.g){case 1:m=Wd;if(b!=m.ua){G.u(2);break}if(!a.B){G.u(3);break}return F(G,a.za,4);case 4:n=G.h,a.g.s=n;case 3:return F(G,
|
|
387
|
-
case 6:if(!a.h[b])return G.return();p=a.h[b].timestampOffset;r=a.G[b];a.j[b]&&(r=a.j[b].getOriginalMimeType());d&&(u=Xj(a,b,c,d,r,p),null!=u&&(null==a.
|
|
386
|
+
function Yj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,A,z,D,y,B,C,E;return O(function(G){switch(G.g){case 1:m=Wd;if(b!=m.ua){G.u(2);break}if(!a.B){G.u(3);break}return F(G,a.za,4);case 4:n=G.h,a.g.s=n;case 3:return F(G,qe(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.L()[0]:null),5);case 5:return G.return();case 2:if(l||!a.o){G.u(6);break}return F(G,Yj(a,m.X,c,d,e,f,g,h,k,!0),7);case 7:return F(G,Yj(a,m.ha,c,d,e,f,g,h,k,!0),8);case 8:return G.return();
|
|
387
|
+
case 6:if(!a.h[b])return G.return();p=a.h[b].timestampOffset;r=a.G[b];a.j[b]&&(r=a.j[b].getOriginalMimeType());d&&(u=Xj(a,b,c,d,r,p),null!=u&&(null==a.S&&b==m.ha&&(a.S=u,a.ya=d.startTime,null!=a.O&&(v=0,a.ya==a.na&&(v=a.S-a.O),a.ma.resolve(v))),null==a.O&&b==m.X&&(a.O=u,a.na=d.startTime,null!=a.S&&(w=0,a.ya==a.na&&(w=a.S-a.O),a.ma.resolve(w))),A=d.startTime-u,z=Math.abs(p-A),(.001<=z||g||h)&&(!k||0<A||!p)&&(p=A,a.Ea&&(Zj(a,b,function(){return ak(a,b)},null),Zj(a,b,function(){return bk(a,b,p)},null))),
|
|
388
388
|
D=b==m.ha||!(m.ha in a.h),a.B&&D&&a.za.resolve(p)));f&&b==m.ha&&(a.g||Pj(a,"application/cea-608",a.B,!1),a.H||(y=r.split(";",1)[0],a.H=new Gb(y)),d?(B=a.H.i(c),B.length&&ve(a.g,B,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.j[b]){G.u(9);break}return F(G,a.j[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=G.h;case 9:c=ck(a,c,d?d.startTime:null,b,d?d.L()[0]:null);if(!d||!a.B||b==m.ua){G.u(11);break}if(!g&&!h){G.u(11);break}C=d.startTime;if("HLS"!=a.aa||a.o||b!=m.X||!a.h[m.ha]){G.u(13);break}return F(G,
|
|
389
389
|
a.ma,14);case 14:E=G.h,.1<Math.abs(E)&&(C-=E);case 13:Zj(a,b,function(){return ak(a,b)},null),Zj(a,b,function(){return bk(a,b,C)},null);case 11:return F(G,Zj(a,b,function(){var L=c;if("video"==b&&a.Y){var K=a.Y;K.g&&K.g.appendBuffer(L,"video",K.o,-p)}a.h[b].appendBuffer(L)},d?d.L()[0]:null),15);case 15:H(G)}})}function dk(a,b){var c=Vj(a,"video")||0;te(a.g,b,c)}function ek(a){a.g&&te(a.g,"",0)}
|
|
390
390
|
q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Wd,a==e.ua?F(f,d.g.remove(b,c),0):F(f,Zj(d,a,function(){return fk(d,a,b,c)},null),4)):d.o?F(f,Zj(d,e.X,function(){return fk(d,e.X,b,c)},null),0):f.u(0)})};function gk(a,b){var c;return O(function(d){return 1==d.g?(c=Wd,b==c.ua?a.g?F(d,a.g.remove(0,Infinity),0):d.return():F(d,Zj(a,b,function(){return fk(a,b,0,a.m.duration)},null),4)):a.o?F(d,Zj(a,c.X,function(){return fk(a,c.X,0,a.m.duration)},null),0):d.u(0)})}
|
|
@@ -398,106 +398,108 @@ function kk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.
|
|
|
398
398
|
null);}})}function lk(a,b){a.l[b].shift();mk(a,b)}function mk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),lk(a,b)}}function ck(a,b,c,d,e){var f=null==c,g=a.Da[d];c=a.da.Sh();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Nc(c),f=$c()||Yc()||hd()||Wc()&&md()&&c;f&&"mp4"==ee(a.G[d])&&(b=zi(b,e));return b}
|
|
399
399
|
function nk(a,b,c,d){return Zj(a,b,function(){b!==Ud&&(ob()&&(a.j[b]&&(a.j[b].destroy(),delete a.j[b]),d&&(a.j[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Rj(a,b))},null)}
|
|
400
400
|
function ok(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L;return O(function(K){switch(K.g){case 1:c=Wd;a.C=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.ra&&(a.i.autoplay=!1);sa(K,2);a.s.Qa();g=[];for(h in a.j)g.push(a.j[h].destroy());for(k in a.l)for(l=a.l[k],m=l[0],a.l[k]=l.slice(0,1),m&&g.push(m.p.catch(xe)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(I){}}return F(K,
|
|
401
|
-
Promise.all(g),4);case 4:return a.j={},a.h={},w=a.m.duration,a.M=new ag,a.m=Kj(a,a.M),F(K,a.M,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.ea)&&a.ea&&(a.m.duration=a.ea),A=new ag,z=a.m.sourceBuffers,D=b.size,y=0,B=function(){y++;y===D&&(A.resolve(),a.s.
|
|
401
|
+
Promise.all(g),4);case 4:return a.j={},a.h={},w=a.m.duration,a.M=new ag,a.m=Kj(a,a.M),F(K,a.M,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.ea)&&a.ea&&(a.m.duration=a.ea),A=new ag,z=a.m.sourceBuffers,D=b.size,y=0,B=function(){y++;y===D&&(A.resolve(),a.s.kb(z,"addsourcebuffer",B))},a.s.D(z,"addsourcebuffer",B),C=t(b.keys()),E=C.next();case 6:if(E.done)return a.i.currentTime=d,F(K,A,2);G=E.value;L=b.get(G);return F(K,Oj(a,G,L,L.codecs),9);case 9:a.o?(a.l[c.X]=[],a.l[c.ha]=[]):a.l[G]=[];E=C.next();
|
|
402
402
|
K.u(6);break;case 2:xa(K),a.C=!1,Bg(a.I),a.s.ja(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),ya(K,0)}})}function pk(a,b){return kk(a,function(){return ok(a,b)})}
|
|
403
403
|
function ik(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){if(1==y.g){f=Wd;if(b==f.ua)return y.return(!1);g=fe(je(a.G[b]));h=ie(a.G[b]);l=!1;m=Zd(c,d);n=a.A.forceTransmux;if(!lb(m)||!a.B&&$d.includes(m))n=!0;n&&(p=ae(c,d),r=nc(p))&&(k=r(),u=Sd(f.X,(d||"").split(",")),v=Sd(f.ha,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.X&&(w=u),m=k.convertCodecs(b,ae(c,w))):m=k.convertCodecs(b,p));A=fe(je(m));z=ie(m);if(g===A&&h===z)return a.j[b]&&!k?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&k?a.j[b]=
|
|
404
404
|
k:k&&(a.j[b]&&a.j[b].transmux!=k.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=k):k.destroy()),y.return(!1);D=!0;if(a.o||l&&k&&!a.j[b])D=!1;if(D&&"smooth"===a.A.codecSwitchingStrategy&&ob())return F(y,nk(a,b,m,k),3);k&&k.destroy();return F(y,pk(a,e),3)}return y.return(!0)})}
|
|
405
405
|
function qk(a,b,c,d){if(b==Ud)var e=!1;else{e=fe(je(a.G[b]));var f=ie(a.G[b]),g=Zd(c,d),h=a.A.forceTransmux;if(!lb(g)||!a.B&&$d.includes(g))h=!0;c=ae(c,d);h&&(h=nc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=fe(je(g));g=ie(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.o:!1}var Mj=window.URL.createObjectURL,Qj="sequence";function rk(a,b,c){this.i=a;this.A=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.I=!1;this.H=0;this.F=void 0===c?!0:c;this.G=0;this.s=!1;this.m=a}q=rk.prototype;q.getDuration=function(){return this.l};q.Uh=function(){return this.h};q.fh=function(a){this.i=a};q.Za=function(a){this.l=a};q.Zh=function(){return this.i};q.dh=function(a){this.B=a};q.uc=function(a){a&&!this.C&&(this.I=!0);this.C=a};q.oe=function(a){this.o=a};q.Ld=function(){return this.o};
|
|
406
406
|
q.Of=function(a){this.A=a};q.Nh=function(){return this.A};q.Pg=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.ae(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.F&&!this.s&&(this.i=c-this.g-this.h)}}};
|
|
407
|
-
q.
|
|
408
|
-
q.ui=function(){return this.s};q.eh=function(a){this.m=a};q.Rh=function(){return this.m};q.ae=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};q.xf=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.V=function(){return Infinity==this.l&&!this.C};q.nc=function(){return Infinity!=this.l&&!this.C};q.
|
|
409
|
-
q.Xb=function(){return this.V()||this.nc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};q.
|
|
410
|
-
q.bh=function(a){this.G=a};q.Lh=function(){return this.G};S("shaka.media.PresentationTimeline",rk);rk.prototype.getAvailabilityTimeOffset=rk.prototype.Lh;rk.prototype.setAvailabilityTimeOffset=rk.prototype.bh;rk.prototype.usingPresentationStartTime=rk.prototype.ph;rk.prototype.getSeekRangeEnd=rk.prototype.yb;rk.prototype.getSeekRangeStart=rk.prototype.Jb;rk.prototype.getSafeSeekRangeStart=rk.prototype.
|
|
411
|
-
rk.prototype.getSegmentAvailabilityStart=rk.prototype.
|
|
412
|
-
rk.prototype.getMaxSegmentEndTime=rk.prototype.Vh;rk.prototype.notifyPeriodDuration=rk.prototype.Og;rk.prototype.notifySegments=rk.prototype.
|
|
407
|
+
q.rd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.ae(b);this.g=Math.max(this.g,c);null!=this.i&&this.F&&!this.s&&(this.i=d-this.g-this.h)}};q.Og=function(a,b){this.ae(a);Infinity==b||this.V()||(this.g=Math.max(this.g,b))};q.Vh=function(){return this.g};q.Ud=function(){this.s=!0};
|
|
408
|
+
q.ui=function(){return this.s};q.eh=function(a){this.m=a};q.Rh=function(){return this.m};q.ae=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};q.xf=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.V=function(){return Infinity==this.l&&!this.C};q.nc=function(){return Infinity!=this.l&&!this.C};q.nb=function(){return Math.max(this.H,this.Xb()-this.o)};q.jh=function(a){this.H=a};
|
|
409
|
+
q.Xb=function(){return this.V()||this.nc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};q.cd=function(a){var b=Math.max(this.j,this.H);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Xb()-this.o+a,this.yb()))};q.Jb=function(){return this.cd(0)};q.yb=function(){return Math.max(0,this.Xb()-(this.V()||this.nc()?this.A:0))};q.ph=function(){return null==this.i||null!=this.g&&this.F?!1:!0};
|
|
410
|
+
q.bh=function(a){this.G=a};q.Lh=function(){return this.G};S("shaka.media.PresentationTimeline",rk);rk.prototype.getAvailabilityTimeOffset=rk.prototype.Lh;rk.prototype.setAvailabilityTimeOffset=rk.prototype.bh;rk.prototype.usingPresentationStartTime=rk.prototype.ph;rk.prototype.getSeekRangeEnd=rk.prototype.yb;rk.prototype.getSeekRangeStart=rk.prototype.Jb;rk.prototype.getSafeSeekRangeStart=rk.prototype.cd;rk.prototype.getSegmentAvailabilityEnd=rk.prototype.Xb;rk.prototype.setUserSeekStart=rk.prototype.jh;
|
|
411
|
+
rk.prototype.getSegmentAvailabilityStart=rk.prototype.nb;rk.prototype.isInProgress=rk.prototype.nc;rk.prototype.isLive=rk.prototype.V;rk.prototype.offset=rk.prototype.offset;rk.prototype.notifyMaxSegmentDuration=rk.prototype.xf;rk.prototype.notifyMinSegmentStartTime=rk.prototype.ae;rk.prototype.getInitialProgramDateTime=rk.prototype.Rh;rk.prototype.setInitialProgramDateTime=rk.prototype.eh;rk.prototype.isStartTimeLocked=rk.prototype.ui;rk.prototype.lockStartTime=rk.prototype.Ud;
|
|
412
|
+
rk.prototype.getMaxSegmentEndTime=rk.prototype.Vh;rk.prototype.notifyPeriodDuration=rk.prototype.Og;rk.prototype.notifySegments=rk.prototype.rd;rk.prototype.notifyTimeRange=rk.prototype.Pg;rk.prototype.getDelay=rk.prototype.Nh;rk.prototype.setDelay=rk.prototype.Of;rk.prototype.getSegmentAvailabilityDuration=rk.prototype.Ld;rk.prototype.setSegmentAvailabilityDuration=rk.prototype.oe;rk.prototype.setStatic=rk.prototype.uc;rk.prototype.setClockOffset=rk.prototype.dh;
|
|
413
413
|
rk.prototype.getPresentationStartTime=rk.prototype.Zh;rk.prototype.setDuration=rk.prototype.Za;rk.prototype.setPresentationStartTime=rk.prototype.fh;rk.prototype.getMaxSegmentDuration=rk.prototype.Uh;rk.prototype.getDuration=rk.prototype.getDuration;function sk(a,b,c){this.j=c;this.l=a;this.s=tk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}sk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function uk(a,b){a.i=b}function vk(a){this.g=a}function tk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Pi(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 wk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.m=c;this.l=new gb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.s=!1;this.l.D(a,"waiting",function(){return xk(f)});this.o=(new Rc(function(){xk(f)})).Ra(this.m.gapJumpTimerTime)}wk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.o&&(this.o.stop(),this.o=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};wk.prototype.Af=function(){this.s=!0;xk(this)};
|
|
414
414
|
function xk(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.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=tk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Qi(c,b,a.m.gapDetectionThreshold),
|
|
415
415
|
null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Yc()||$c())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.yb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function yk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=zk.value().get(b),c.ja(a,b,d))}var zk=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ak(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new gb;this.i=new Bk(a);yk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ck(e,e.j())})}Ak.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 Dk(a){return a.o?a.g.currentTime:a.j()}
|
|
416
416
|
function Ek(a,b){0<a.g.readyState?Fk(a.i,b):yk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ck(a,a.j())})}function Ck(a,b){.001>Math.abs(a.g.currentTime-b)?Gk(a):(a.h.ja(a.g,"seeking",function(){Gk(a)}),Fk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Gk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
417
417
|
function Bk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Rc(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Bk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Fk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ra(.1)};function Hk(a){this.h=a;this.j=!1;this.g=null;this.i=new gb}q=Hk.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.ja(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;yk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.De=function(a){this.g=this.j?this.g:a};
|
|
418
|
-
q.
|
|
418
|
+
q.xd=function(){return(this.j?this.h.currentTime:this.g)||0};q.gg=function(){return 0};q.fg=function(){return 0};q.Ng=function(){};
|
|
419
419
|
function Ik(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Jk(a,c,f);this.j=new wk(a,b.presentationTimeline,c,this.o,f);this.h=new Ak(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Dk(g.h);h=Kk(g,k);if(.001<Math.abs(h-k)){k=!1;if(!fd()||fd()&&nd())k=!0;else{var l=Date.now()/1E3;if(!g.s||g.s<l-1)g.s=l,k=!0}if(k){Ek(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},
|
|
420
420
|
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Jb():g.g.yb():0>h&&(h=g.g.yb()+h);return Lk(g,Mk(g,h))});this.m=new Rc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Dk(g.h),k=g.g.Jb(),l=g.g.yb();3>l-k&&(k=l-3);h<k&&(h=Kk(g,h),g.i.currentTime=h)}})}q=Ik.prototype;q.ready=function(){this.m.Ra(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};
|
|
421
|
-
q.De=function(a){Ek(this.h,a)};q.
|
|
422
|
-
function Kk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Jb(),f=a.g.yb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.
|
|
421
|
+
q.De=function(a){Ek(this.h,a)};q.xd=function(){var a=Dk(this.h);return 0<this.i.readyState&&!this.i.paused?Mk(this,a):a};q.gg=function(){return this.o?this.o.o:0};q.fg=function(){return this.j.C};q.Ng=function(){this.j.Af()};function Lk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
422
|
+
function Kk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Jb(),f=a.g.yb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.cd(c),k=a.g.cd(d);c=a.g.cd(c+d);return b>=g?Lk(a,b):b>f?f:b<e?Li(a.i.buffered,k)?k:c:b>=h||Li(a.i.buffered,b)?b:c}function Mk(a,b){var c=a.g.Jb();if(b<c)return c;a=a.g.yb();return b>a?a:b}
|
|
423
423
|
function Jk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new sk(new vk(a),b.stallThreshold,c);uk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Nk(a){this.P=a;this.l=null;this.h=0;this.m=!1}q=Nk.prototype;q.getNumReferences=function(){return this.P.length};q.getNumEvicted=function(){return this.h};q.release=function(){this.m||(this.P=[],this.l&&this.l.stop(),this.l=null)};q.Ai=function(){this.m=!0};q.Hb=function(a){for(var b=t(this.P),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
424
424
|
q.find=function(a){for(var b=this.P.length-1,c=b;0<=c;--c){var d=this.P[c],e=c<b?this.P[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.P.length&&a<this.P[0].startTime?this.h:null};q.get=function(a){if(0==this.P.length)return null;a-=this.h;return 0>a||a>=this.P.length?null:this.P[a]};q.offset=function(a){if(!this.m)for(var b=t(this.P),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
425
|
-
q.Xd=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.P=this.P.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.P.push.apply(this.P,x(a))}};q.
|
|
426
|
-
q.Dc=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],b=new Fi(a.startTime,b,a.F,a.Ha,a.ta,a
|
|
425
|
+
q.Xd=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.P=this.P.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.P.push.apply(this.P,x(a))}};q.qd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.P.length||d.endTime>c.P[0].startTime)});this.Xd(a);this.Ga(b)};q.Ga=function(a){if(!this.m){var b=this.P.length;this.P=this.P.filter(function(c){return c.endTime>a});this.h+=b-this.P.length}};
|
|
426
|
+
q.Dc=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],b=new Fi(a.startTime,b,a.F,a.Ha,a.ta,a.Z,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.P[this.P.length-1]=b)}};
|
|
427
427
|
q.te=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Rc(function(){var d=b();d?c.P.push.apply(c.P,x(d)):(c.l.stop(),c.l=null)}),this.l.Ra(a))};Nk.prototype[Symbol.iterator]=function(){return this.Ib(0)};
|
|
428
428
|
Nk.prototype.Ib=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Xa("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Ok(this,d,f,c)};function Pk(a,b,c){a=new Fi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Nk([a])}
|
|
429
|
-
S("shaka.media.SegmentIndex",Nk);Nk.forSingleSegment=Pk;Nk.prototype.getIteratorForTime=Nk.prototype.Ib;Nk.prototype.updateEvery=Nk.prototype.te;Nk.prototype.fit=Nk.prototype.Dc;Nk.prototype.evict=Nk.prototype.Ga;Nk.prototype.mergeAndEvict=Nk.prototype.
|
|
429
|
+
S("shaka.media.SegmentIndex",Nk);Nk.forSingleSegment=Pk;Nk.prototype.getIteratorForTime=Nk.prototype.Ib;Nk.prototype.updateEvery=Nk.prototype.te;Nk.prototype.fit=Nk.prototype.Dc;Nk.prototype.evict=Nk.prototype.Ga;Nk.prototype.mergeAndEvict=Nk.prototype.qd;Nk.prototype.offset=Nk.prototype.offset;Nk.prototype.get=Nk.prototype.get;Nk.prototype.find=Nk.prototype.find;Nk.prototype.markImmutable=Nk.prototype.Ai;Nk.prototype.release=Nk.prototype.release;Nk.prototype.getNumEvicted=Nk.prototype.getNumEvicted;
|
|
430
430
|
Nk.prototype.getNumReferences=Nk.prototype.getNumReferences;function Ok(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Ok.prototype.Tc=function(a){this.reverse=a};Ok.prototype.Gh=function(){return this.h};Ok.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
431
431
|
Ok.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Ok);Ok.prototype.next=Ok.prototype.next;Ok.prototype.current=Ok.prototype.current;Ok.prototype.currentPosition=Ok.prototype.Gh;
|
|
432
432
|
Ok.prototype.setReverse=Ok.prototype.Tc;function Qk(){Nk.call(this,[]);this.g=[]}na(Qk,Nk);q=Qk.prototype;q.clone=function(){var a=new Qk;a.g=this.g.slice();a.h=this.h;return a};q.release=function(){for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};q.Hb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.Hb(a)};
|
|
433
433
|
q.find=function(a){for(var b=this.h,c=t(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.h,c=t(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Xd=function(){};
|
|
434
|
-
q.Ga=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.Ga(a);for(;1<this.g.length&&0==this.g[0].getNumReferences();)a=this.g.shift(),this.h+=a.getNumEvicted(),a.release()};q.
|
|
435
|
-
Qk.prototype.get=Qk.prototype.get;Qk.prototype.find=Qk.prototype.find;Qk.prototype.forEachTopLevelReference=Qk.prototype.Hb;Qk.prototype.release=Qk.prototype.release;function Rk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Kd();this.h=new Rc(function(){b.g.Mg(.25*b.i)})}Rk.prototype.release=function(){this.set(this.kc());this.h&&(this.h.stop(),this.h=null);this.g=null};Rk.prototype.set=function(a){this.i=a;Sk(this)};Rk.prototype.kc=function(){return this.g.kc()};function Sk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Kd()!=b&&a.g.Rf(b);return}catch(c){}a.h.Ra(.25);0!=a.g.Kd()&&a.g.Rf(0)};function Tk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Rc(function(){Uk(b,!1)})).Ra(.25)}Tk.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 Uk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Vk(){this.g=null;this.h=[]}function Wk(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 Xk(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 Yk(){this.i=this.h=null;this.g=[]}function Zk(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 $k(){this.fc=this.Ig=this.A=this.B=this.I=this.C=this.s=this.j=this.H=this.m=this.i=this.
|
|
434
|
+
q.Ga=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.Ga(a);for(;1<this.g.length&&0==this.g[0].getNumReferences();)a=this.g.shift(),this.h+=a.getNumEvicted(),a.release()};q.qd=function(){};q.Dc=function(){};q.te=function(){};S("shaka.media.MetaSegmentIndex",Qk);Qk.prototype.updateEvery=Qk.prototype.te;Qk.prototype.fit=Qk.prototype.Dc;Qk.prototype.mergeAndEvict=Qk.prototype.qd;Qk.prototype.evict=Qk.prototype.Ga;Qk.prototype.merge=Qk.prototype.Xd;Qk.prototype.offset=Qk.prototype.offset;
|
|
435
|
+
Qk.prototype.get=Qk.prototype.get;Qk.prototype.find=Qk.prototype.find;Qk.prototype.forEachTopLevelReference=Qk.prototype.Hb;Qk.prototype.release=Qk.prototype.release;function Rk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Kd();this.h=new Rc(function(){b.g.Mg(.25*b.i)})}Rk.prototype.release=function(){this.set(this.kc());this.h&&(this.h.stop(),this.h=null);this.g=null};Rk.prototype.set=function(a){this.i=a;Sk(this)};Rk.prototype.kc=function(){return this.g.kc()};function Sk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Kd()!=b&&a.g.Rf(b);return}catch(c){}a.h.Ra(.25);0!=a.g.Kd()&&a.g.Rf(0)};function Tk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Rc(function(){Uk(b,!1)})).Ra(.25)}Tk.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 Uk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Vk(){this.g=null;this.h=[]}function Wk(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 Xk(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 Yk(){this.i=this.h=null;this.g=[]}function Zk(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 $k(){this.fc=this.Ig=this.A=this.B=this.I=this.C=this.s=this.j=this.H=this.m=this.i=this.S=this.Y=this.M=this.N=this.O=this.l=this.o=NaN;this.K=0;this.F=this.G=NaN;this.g=new Vk;this.h=new Yk};function al(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function bl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}function cl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ib(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.ta&&(c=!1);2==b.Zb()&&(c=!1);c&&b.Z&&dl(a,b.Z);c&&!a.h.has(b)&&(c=new el(a.l),fl(c,b,a.i),a.h.set(b,c))}gl(a)}}
|
|
436
436
|
function dl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Ei(d,b)})){var c=new el(a.l);fl(c,b,a.i);a.j.set(b,c)}}function hl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&il(a,c)}function jl(a){hl(a,a.h);hl(a,a.j);a.g=null}al.prototype.Ga=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&il(this,d);b&&gl(this)};al.prototype.Tc=function(a){this.o=a;this.g&&this.g.Tc(a)};
|
|
437
|
-
function gl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={mf:void 0},d=c.next())e.mf=d.value,b.some(function(f){return function(g){return Ei(g
|
|
438
|
-
function fl(a,b,c){var d=new Uint8Array(0);a.ee=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=
|
|
439
|
-
nl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Oe;a:{var e=c.
|
|
437
|
+
function gl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={mf:void 0},d=c.next())e.mf=d.value,b.some(function(f){return function(g){return Ei(g.Z,f.mf)}}(e))||il(a,e.mf)}function kl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&il(a,d)}gl(a)}function ll(a,b){b&&b!==a.i&&(jl(a),a.i=b)}function il(a,b){var c=a.h;b instanceof Di&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function el(a){this.g=a;this.ee=this.Uf=null}
|
|
438
|
+
function fl(a,b,c){var d=new Uint8Array(0);a.ee=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Kd(d,e):d=e,a.Uf?F(f,a.Uf(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}el.prototype.abort=function(){this.ee&&this.ee.abort()};function ml(a){kg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Rc(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 U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ra(2)}na(ml,kg);ml.prototype.release=function(){this.g.clear();this.h.stop();kg.prototype.release.call(this)};function nl(a){kg.call(this);this.g=new Map;this.h=a}na(nl,kg);nl.prototype.release=function(){this.g.clear();kg.prototype.release.call(this)};function ol(a,b){var c=a.g.get(b);c||(c={td:[],Oe:null,contentType:b},a.g.set(b,c));return c}function pl(a,b,c){var d=ol(a,b.contentType);ql(a,d);a={Jc:b,position:c};d=d.td;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
439
|
+
nl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Oe;a:{var e=c.td;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.Jc;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
|
|
440
440
|
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Pb(d.roles,e.roles);(g||h||d)&&rl(this,a,e.contentType)&&(c.Oe=e,d=new U("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&rl(this,a,e.contentType)&&(c.Oe=e,JSON.stringify(e),c=new U("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
|
|
441
|
-
function rl(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function ql(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.
|
|
441
|
+
function rl(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function ql(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.td;b.td=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.td=[]}
|
|
442
442
|
function sl(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
|
|
443
|
-
a.language);return b};function tl(a){var b=ie(a),c=b.split("/")[0];a=je(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,
|
|
443
|
+
a.language);return b};function tl(a){var b=ie(a),c=b.split("/")[0];a=je(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,wd:null,colorGamut:null}}
|
|
444
444
|
function ul(a,b){function c(y){w=y.name;var B=y.reader;B.skip(24);var C=B.oa(),E=B.oa();B.skip(50);n=String(C);m=String(E);y.reader.qa()&&Qg(y)}function d(y){var B=bj(y.reader);p=B.channelCount;r=B.sampleRate;e(y.name)}function e(y){y=y.toLowerCase();switch(y){case "avc1":case "avc3":g.push(y+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(y+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(y+".05.04");k=!0;break;case "vp09":g.push(y+".00.10.08");k=!0;break;case "av01":g.push(y+".0.01M.08");
|
|
445
|
-
k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(y),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,v=null,w;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).
|
|
445
|
+
k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(y),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,v=null,w;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).T("mdhd",function(y){l=$i(y.reader,y.version).language}).box("minf",Qg).box("stbl",Qg).T("stsd",Sg).box("mp4a",function(y){var B=bj(y.reader);p=B.channelCount;r=B.sampleRate;y.reader.qa()?Qg(y):e(y.name)}).box("esds",function(y){y=y.reader;for(var B=
|
|
446
446
|
"mp4a",C,E;y.qa();){C=y.U();for(var G=y.U();G&128;)G=y.U();if(3==C)y.oa(),G=y.U(),G&128&&y.oa(),G&64&&y.skip(y.U()),G&32&&y.oa();else if(4==C)E=y.U(),y.skip(12);else if(5==C)break}E&&(B+="."+ej(E),5==C&&y.qa()&&(C=y.U(),E=(C&248)>>3,31===E&&y.qa()&&(E=32+((C&7)<<3)+((y.U()&224)>>5)),B+="."+E));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
|
|
447
447
|
c).box("av01",c).box("avcC",function(y){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}y=y.reader;y.skip(1);y=B+"."+ej(y.U())+ej(y.U())+ej(y.U());g.push(y);k=!0}).box("hvcC",function(y){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var C=y.reader;C.skip(1);y=C.U();var E=["","A","B","C"][y>>6],G=y&31,L=C.R(),K=(y&32)>>5?"H":"L";y=[C.U(),C.U(),C.U(),C.U(),C.U(),C.U()];C=C.U();for(var I=0,J=0;32>J;J++){I|=L&1;if(31==J)break;I<<=1;L>>=1}B=B+("."+E+G)+("."+
|
|
448
448
|
ej(I,!0));B+="."+K+C;E="";for(G=y.length;G--;)if((K=y[G])||E)E="."+K.toString(16).toUpperCase()+E;B+=E;g.push(B);k=!0}).box("dvcC",function(y){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=y.reader;C.skip(2);y=C.U();C=C.U();g.push(B+"."+fj(y>>1&127)+"."+fj(y<<5&32|C>>3&31));k=!0}).box("dvvC",function(y){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B=
|
|
449
|
-
"dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=y.reader;C.skip(2);y=C.U();C=C.U();g.push(B+"."+fj(y>>1&127)+"."+fj(y<<5&32|C>>3&31));k=!0}).
|
|
450
|
-
((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+fj(1)+"."+fj(1)+"."+fj(1)+".0");k=!0}).box("enca",Wg).box("encv",Tg).box("sinf",Qg).box("frma",function(y){y=cj(y.reader).codec;e(y)}).box("colr",function(y){g=g.map(function(E){if(E.startsWith("av01.")){var G=y.reader,L=G.
|
|
451
|
-
N[7]=fj(I),N[8]=fj(J),N[9]=String(M),E=N.join("."))}G.seek(L)}return E});var B=dj(y.reader),C=B.colorGamut;u=B.
|
|
449
|
+
"dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=y.reader;C.skip(2);y=C.U();C=C.U();g.push(B+"."+fj(y>>1&127)+"."+fj(y<<5&32|C>>3&31));k=!0}).T("vpcC",function(y){var B=w||"",C=y.reader;y=C.U();var E=C.U();C=C.U()>>4&15;g.push(B+"."+fj(y)+"."+fj(E)+"."+fj(C));k=!0}).box("av1C",function(y){var B=w||"";switch(w){case "dav1":B="av01"}var C=y.reader;C.skip(1);y=C.U();C=C.U();var E=y>>>5,G=(C&64)>>6;g.push(B+"."+E+"."+fj(y&31)+(C>>>7?"H":"M")+"."+fj(2===E&&G?(C&32)>>5?12:10:G?10:8)+"."+
|
|
450
|
+
((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+fj(1)+"."+fj(1)+"."+fj(1)+".0");k=!0}).box("enca",Wg).box("encv",Tg).box("sinf",Qg).box("frma",function(y){y=cj(y.reader).codec;e(y)}).box("colr",function(y){g=g.map(function(E){if(E.startsWith("av01.")){var G=y.reader,L=G.wa(),K=G.rb(4);var I=String.fromCharCode(K[0]);I+=String.fromCharCode(K[1]);I+=String.fromCharCode(K[2]);I+=String.fromCharCode(K[3]);if("nclx"===I){K=G.oa();I=G.oa();var J=G.oa(),M=G.U()>>7,N=E.split(".");10==N.length&&(N[6]=fj(K),
|
|
451
|
+
N[7]=fj(I),N[8]=fj(J),N[9]=String(M),E=N.join("."))}G.seek(L)}return E});var B=dj(y.reader),C=B.colorGamut;u=B.wd;v=C}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,z=new Map;if(k){var D=new Gb("video/mp4");a&&D.init(a);D.i(b);a=t(D.j());for(b=a.next();!b.done;b=a.next())b=b.value,z.set(b,b);D.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:vl(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:z,wd:u,colorGamut:v}}
|
|
452
452
|
function vl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=he(d);b.has(e)||(c.push(d),b.add(e))}b=Vd("audio",c);d=Vd("video",c);a=Vd(Ud,c);d=wl(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
453
453
|
function wl(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?lb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
454
|
-
function xl(a){var b=null;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).
|
|
455
|
-
function yl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=zb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function zl(a,b,c,d,e){a=sg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Al(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.
|
|
454
|
+
function xl(a){var b=null;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).T("stsd",Sg).box("encv",Tg).box("enca",Wg).box("sinf",Qg).box("schi",Qg).T("tenc",function(c){c=c.reader;c.U();c.U();c.U();c.U();b=Jd(c.rb(16))}).parse(a,!0);return b}
|
|
455
|
+
function yl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=zb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function zl(a,b,c,d,e){a=sg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Al(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.G=new Map;this.B=1;this.s=this.j=null;this.K=0;this.H=!1;this.i=new Map;this.F=!1;this.M=null;this.A=!1;this.m=new Ag(function(){return Bl(c)});this.N=Date.now()/1E3;this.o=new Map;this.I={projection:null,hfov:null};this.S=0;this.O=Infinity;this.C=null}q=Al.prototype;q.destroy=function(){return this.m.destroy()};
|
|
456
456
|
function Bl(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Cl(e),b.push(Dl(e)),e.W&&(jl(e.W),e.W=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,jl(h);return F(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;H(k)})}
|
|
457
|
-
q.configure=function(a){this.h=a;this.
|
|
458
|
-
b.W&&(jl(b.W),b.W=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.W&&(jl(b.W),b.W=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.W?(kl(c.W,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(jl(c.W),c.W=null)):0<a.segmentPrefetchLimit&&(c.W=El(this,c.stream));a.disableAudioPrefetch||Fl(this)};function Gl(a,b,c){a.l.presentationTimeline.V()||(a.
|
|
459
|
-
q.start=function(a){var b=this;return O(function(c){if(1==c.g)return F(c,Hl(b,a||new Map),2);Bg(b.m);b.
|
|
460
|
-
function Ll(a){var b=a.i.get(Ud);b&&(Cl(b),Dl(b).catch(function(){}),a.i.delete(Ud));a.s=null}function Ml(a,b){for(var c=0>a.g.
|
|
461
|
-
function Ol(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.
|
|
462
|
-
function Nl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ud?g&&(g.ac&&(b.trickModeVideo?(g.ac=b,b=b.trickModeVideo):g.ac=null),g.stream!=b||e)&&(a.o.has(b)?g.W=a.o.get(b):g.W&&ll(g.W,b),b.type==Ud&&(e=Zd(b.mimeType,b.codecs),Pj(a.g.ba,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ka?(e="("+g.type+":"+g.stream.id+")",a.
|
|
463
|
-
d,g.Ae=!0):(Cl(g),Rl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ka||g.
|
|
464
|
-
function Sl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.
|
|
465
|
-
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.
|
|
466
|
-
q.Rc=function(){if(this.g)for(var a=this.g.
|
|
467
|
-
function Tl(a,b){b.Wc||b.ec||(b.Ka?(b.ec=!0,b.
|
|
457
|
+
q.configure=function(a){this.h=a;this.M=new Yf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.W&&(jl(b.W),b.W=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,jl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Ud))&&
|
|
458
|
+
b.W&&(jl(b.W),b.W=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.W&&(jl(b.W),b.W=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.W?(kl(c.W,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(jl(c.W),c.W=null)):0<a.segmentPrefetchLimit&&(c.W=El(this,c.stream));a.disableAudioPrefetch||Fl(this)};function Gl(a,b,c){a.l.presentationTimeline.V()||(a.S=b,a.O=c)}
|
|
459
|
+
q.start=function(a){var b=this;return O(function(c){if(1==c.g)return F(c,Hl(b,a||new Map),2);Bg(b.m);b.F=!0;H(c)})};function Il(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Wd,a.K++,d=a.K,ra(l,2),F(l,gk(a.g.ba,c.ua),4);case 4:ta(l,3);break;case 2:if(e=ua(l),a.g)a.g.onError(e);case 3:f=Zd(b.mimeType,b.codecs),Pj(a.g.ba,f,a.l.sequenceMode,b.external),g=a.g.ba.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.K==d&&(k=Jl(a,b),a.i.set(c.ua,k),Kl(a,k,0)),H(l)}})}
|
|
460
|
+
function Ll(a){var b=a.i.get(Ud);b&&(Cl(b),Dl(b).catch(function(){}),a.C=a.i.get(Ud),a.i.delete(Ud));a.s=null}function Ml(a,b){for(var c=0>a.g.fb(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ka&&e.ka.Tc(c),e.W&&e.W.Tc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Tc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.ac&&(Nl(a,b,!1,0,!1),c.ac=d);else if(b=c.ac)c.ac=null,Nl(a,b,!0,0,!1)}
|
|
461
|
+
function Ol(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.F&&(b.video&&Nl(a,b.video,c,d,e,f),b.audio&&Nl(a,b.audio,c,d,e,f))}function Pl(a,b){O(function(c){if(1==c.g)return a.C=null,a.s=b,a.F?b.segmentIndex?c.u(2):F(c,b.createSegmentIndex(),2):c.return();Nl(a,b,!0,0,!1);H(c)})}function Ql(a,b){for(var c=t(a.G.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.G.delete(d))}}
|
|
462
|
+
function Nl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ud?g&&(g.ac&&(b.trickModeVideo?(g.ac=b,b=b.trickModeVideo):g.ac=null),g.stream!=b||e)&&(a.o.has(b)?g.W=a.o.get(b):g.W&&ll(g.W,b),b.type==Ud&&(e=Zd(b.mimeType,b.codecs),Pj(a.g.ba,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ka?(e="("+g.type+":"+g.stream.id+")",a.G.has(e)||a.G.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.ka=null,g.hg=!!f,c?g.Wc?g.Ae=!0:g.Ka?(g.ec=!0,g.Fd=
|
|
463
|
+
d,g.Ae=!0):(Cl(g),Rl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ka||g.ub||Kl(a,g,0),Sl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Il(a,b)}
|
|
464
|
+
function Sl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.jb)return e.return();c=b.stream;d=b.jb;return c.segmentIndex?e.u(2):F(e,c.createSegmentIndex(),2)}if(b.jb!=d||b.stream!=c)return e.return();var f=a.g.bd();var g=Vj(a.g.ba,b.type),h=b.stream.segmentIndex.find(b.Na?b.Na.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ta?k.ta-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.Z)&&(h+=(k.ta?k.ta-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
|
|
465
|
+
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.jb.h.g>h?!0:!1):f=!1;f&&b.jb.abort();H(e)})}
|
|
466
|
+
q.Rc=function(){if(this.g)for(var a=this.g.bd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ba;e.C?e=!1:d==Ud?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Uj(e,d),e=Li(e,a));if(!e){c.W&&(c.W.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.ka=null;(null!=Vj(this.g.ba,d)||c.Ka)&&Tl(this,c);c.jb&&(c.jb.abort(),c.jb=null);d===Ud&&(d=this.g.ba,d.H&&d.H.g());c.Rc=!0}}};
|
|
467
|
+
function Tl(a,b){b.Wc||b.ec||(b.Ka?(b.ec=!0,b.Fd=0):null==Tj(a.g.ba,b.type)?null==b.ub&&Kl(a,b,0):(Cl(b),Rl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
468
468
|
function Hl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Wd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.X,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ha,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ua,a.s),e.add(a.s));f=a.g.ba;return F(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Bg(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Jl(a,l),b.has(l.id)&&(n=
|
|
469
|
-
b.get(l.id),bl(n,function(r,u,v){return Ul(r,u,v||null,a.h.retryParameters,a.g.Mb)}),m.W=n),a.i.set(k,m),Kl(a,m,0));H(p)})}function Jl(a,b){return{stream:b,type:b.type,ka:null,W:El(a,b),Na:null,oc:null,Td:null,Sd:null,Rd:null,ac:null,endOfStream:!1,Ka:!1,
|
|
470
|
-
function El(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ud&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ud&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.W)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new al(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ul(d,e,f||null,a.h.retryParameters,a.g.Mb)},0>a.g.
|
|
471
|
-
function Fl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={
|
|
472
|
-
(f.
|
|
473
|
-
function Vl(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Bg(a.m);if(b.Ka||null==b.
|
|
474
|
-
Kl(a,b,0),k.return();case 4:ra(k,9);e=Xl(a,b);null!=e&&(Kl(a,b,e),b.
|
|
475
|
-
function Xl(a,b){if(Yl(b))return dk(a.g.ba,b.stream.originalId||""),null;b.type==Ud&&ek(a.g.ba);if(!a.g.ba.
|
|
469
|
+
b.get(l.id),bl(n,function(r,u,v){return Ul(r,u,v||null,a.h.retryParameters,a.g.Mb)}),m.W=n),a.i.set(k,m),Kl(a,m,0));H(p)})}function Jl(a,b){return{stream:b,type:b.type,ka:null,W:El(a,b),Na:null,oc:null,Td:null,Sd:null,Rd:null,ac:null,endOfStream:!1,Ka:!1,ub:null,ec:!1,Fd:0,Ae:!1,Wc:!1,Rc:!0,Gf:!1,gd:!1,jb:null}}
|
|
470
|
+
function El(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ud&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ud&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.W)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new al(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ul(d,e,f||null,a.h.retryParameters,a.g.Mb)},0>a.g.fb()):null}
|
|
471
|
+
function Fl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={mb:void 0},e=d.next())if(f.mb=e.value,f.mb.audio)if(a.o.has(f.mb.audio)){if(e=a.o.get(f.mb.audio),kl(e,b),!(0<b&&c.some(function(h){return function(k){return Ae(h.mb.audio.language,k)}}(f)))){var g=a.i.get(f.mb.audio.type);e!==(g&&g.W)&&jl(e);a.o.delete(f.mb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Ae(h.mb.audio.language,k)}}(f))||!(e=El(a,f.mb.audio))||
|
|
472
|
+
(f.mb.audio.segmentIndex||f.mb.audio.createSegmentIndex(),a.o.set(f.mb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.ba.Za(a):this.g.ba.Za(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
473
|
+
function Vl(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Bg(a.m);if(b.Ka||null==b.ub||b.Wc)return k.return();b.ub=null;if(!b.ec){k.u(2);break}return F(k,Rl(a,b,b.Ae,b.Fd),3);case 3:return k.return();case 2:Ql(a,b);if(b.stream.segmentIndex){k.u(4);break}c=b.stream;ra(k,5);return F(k,b.stream.createSegmentIndex(),7);case 7:ta(k,6);break;case 5:return d=ua(k),F(k,Wl(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ka||b.ub||
|
|
474
|
+
Kl(a,b,0),k.return();case 4:ra(k,9);e=Xl(a,b);null!=e&&(Kl(a,b,e),b.gd=!1);ta(k,10);break;case 9:return f=ua(k),F(k,Wl(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.F||!g.every(function(l){return l.endOfStream})){k.u(0);break}return F(k,a.g.ba.endOfStream(),13);case 13:Bg(a.m),h=a.g.ba.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Za(h),H(k)}})}
|
|
475
|
+
function Xl(a,b){if(Yl(b))return dk(a.g.ba,b.stream.originalId||""),null;b.type==Ud&&ek(a.g.ba);if(!a.g.ba.va&&b.type!=Ud)return a.h.updateIntervalSeconds/2;var c=a.g.bd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ga(c,!0),cl(e,c);d=b.Na?b.Na.endTime:c;var f=Wj(a.g.ba,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),h=a.l.presentationTimeline.getDuration()-d;e=Vj(a.g.ba,b.type);if(1E-6>h&&e)return b.endOfStream=
|
|
476
476
|
!0,"video"==b.type&&(a=a.i.get(Ud))&&Yl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.ka;e=Zl(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.hg&&(f=!0,b.hg=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,Yl(k)||k.ka&&!k.ka.current()||(g=Math.min(g,k.Na?k.Na.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.W&&b.ka&&!a.o.has(b.stream)&&(b.W.Ga(e.startTime),cl(b.W,
|
|
477
477
|
e.startTime));$l(a,b,c,e,f).catch(function(){});return null}
|
|
478
|
-
function Zl(a,b,c,d){if(b.ka)return b.ka.current();if(b.Na||d)return c=b.Na?b.Na.endTime:d,a=0>a.g.
|
|
478
|
+
function Zl(a,b,c,d){if(b.ka)return b.ka.current();if(b.Na||d)return c=b.Na?b.Na.endTime:d,a=0>a.g.fb(),b.stream.segmentIndex&&(b.ka=b.stream.segmentIndex.Ib(c,!1,a)),b.ka&&b.ka.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.fb();var f=null;d&&(b.stream.segmentIndex&&(b.ka=b.stream.segmentIndex.Ib(e,!1,a)),f=b.ka&&b.ka.next().value);f||(b.stream.segmentIndex&&(b.ka=b.stream.segmentIndex.Ib(c,!1,a)),f=b.ka&&b.ka.next().value);return f}
|
|
479
479
|
function $l(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B;return O(function(C){switch(C.g){case 1:f=Wd;g=b.stream;h=b.ka;b.Ka=!0;ra(C,2);if(2==d.Zb())throw new T(1,1,1011);return F(C,am(a,b,d,e),4);case 4:Bg(a.m);if(a.A)return C.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.l.isLowLatency)&&l&&k&&("HLS"!=a.l.type||d.m))return r=new Uint8Array(0),v=u=!1,A=function(E){var G,L,K,I;return O(function(J){switch(J.g){case 1:if(u)return J.return();
|
|
480
480
|
v=!0;Bg(a.m);if(a.A)return J.return();ra(J,2);r=bm(r,E);G=!1;L=0;(new Lg).box("mdat",function(M){L=M.size+M.start;G=!0}).parse(r,!1,!0);if(!G){J.u(4);break}K=r.subarray(0,L);r=r.subarray(L);return F(J,cm(a,b,c,g,d,K,!0,e),5);case 5:b.W&&b.ka&&cl(b.W,d.startTime,!0);case 4:ta(J,0);break;case 2:w=I=ua(J),H(J)}})},F(C,dm(a,b,d,A),9);n=dm(a,b,d);return F(C,n,7);case 7:p=C.h;Bg(a.m);if(a.A)return C.return();Bg(a.m);return b.ec?(b.Ka=!1,Kl(a,b,0),C.return()):F(C,cm(a,b,c,g,d,p,!1,e),6);case 9:z=C.h;if(w)throw w;
|
|
481
481
|
if(v){C.u(10);break}u=!0;Bg(a.m);return a.A?C.return():b.ec?(b.Ka=!1,Kl(a,b,0),C.return()):F(C,cm(a,b,c,g,d,z,!1,e),10);case 10:b.W&&b.ka&&cl(b.W,d.startTime,!0);case 6:Bg(a.m);if(a.A)return C.return();b.Na=d;h.next();b.Ka=!1;b.Gf=!1;D=a.g.ba.wb();y=D[b.type];db(JSON.stringify(y));b.ec||a.g.Af(d,b.stream);Kl(a,b,0);ta(C,0);break;case 2:B=ua(C);Bg(a.m,B);if(a.A)return C.return();b.Ka=!1;if(7001==B.code)b.Ka=!1,Cl(b),Kl(a,b,0),C.u(0);else if(b.type==f.ua&&a.h.ignoreTextStreamFailures)a.i.delete(f.ua),
|
|
482
|
-
C.u(0);else
|
|
483
|
-
function
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
function
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
function
|
|
482
|
+
C.u(0);else{if(3017==B.code)return F(C,em(a,b,B),0);b.gd=!0;1==B.category&&b.W&&il(b.W,d);B.severity=2;return F(C,Wl(a,b,B),0)}}})}function bm(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
483
|
+
function em(a,b,c){var d,e,f,g,h,k;return O(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Gf}))return l.u(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.B);if(20<h)a.B-=.2;else if(4<h)a.B-=.04;else return b.gd=!0,a.A=!0,a.g.onError(c),l.return();b.Gf=!0;k=a.g.bd();return F(l,fm(a,b,k),2)}Kl(a,b,4);H(l)})}
|
|
484
|
+
function am(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:e=Wd;f=null==b.Na&&null==b.oc;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.S)-.1);k=Math.min(c.appendWindowEnd,a.O)+.01;l=c.codecs||b.stream.codecs;m=he(l);n=ie(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.Td&&h==b.Sd&&k==b.Rd&&m==b.tf&&n==b.uf){y.u(2);break}r=b.tf&&b.uf&&qk(a.g.ba,b.type,n,l);if(!r){y.u(3);break}u=null;b.type===e.ha?u=a.i.get(e.X):b.type===e.X&&(u=a.i.get(e.ha));if(!u){y.u(3);
|
|
485
|
+
break}return F(y,Dl(u).catch(function(){}),5);case 5:u.oc=null,Tl(a,u);case 3:return F(y,gm(a,b,p,h,k,c,m,n),2);case 2:return Ei(c.Z,b.oc)||(b.oc=c.Z,c.l&&c.Z&&(v=dm(a,b,c.Z),w=function(){var B,C,E,G,L,K,I;return O(function(J){switch(J.g){case 1:return ra(J,2),F(J,v,4);case 4:return B=J.h,Bg(a.m),C=null,E=new Map,G={projection:null,hfov:null},L=new Lg,L.box("moov",Qg).box("trak",Qg).box("mdia",Qg).T("mdhd",function(M){C=$i(M.reader,M.version).timescale}).box("hdlr",function(M){M=M.reader;M.skip(8);
|
|
486
|
+
switch(M.rc()){case "soun":E.set(e.X,C);break;case "vide":E.set(e.ha,C)}C=null}).box("minf",Qg).box("stbl",Qg).T("stsd",Sg).box("encv",Tg).box("avc1",Tg).box("avc3",Tg).box("hev1",Tg).box("hvc1",Tg).box("dvav",Tg).box("dva1",Tg).box("dvh1",Tg).box("dvhe",Tg).box("dvc1",Tg).box("dvi1",Tg).box("vexu",Qg).box("proj",Qg).T("prji",function(M){M=M.reader.rc();G.projection=M}).box("hfov",function(M){M=M.reader.R()/1E3;G.hfov=M}).parse(B),hm(a,G),E.has(b.type)?c.Z.timescale=E.get(b.type):null!=C&&(c.Z.timescale=
|
|
487
|
+
C),K=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,F(J,a.g.kg(b.type,B),5);case 5:return F(J,Yj(a.g.ba,b.type,B,null,b.stream,K,b.Rc,d),6);case 6:ta(J,0);break;case 2:throw I=ua(J),b.oc=null,I;}})},A=c.startTime,f&&(z=Vj(a.g.ba,b.type),null!=z&&(A=z)),a.g.Ci(A,c.Z),g.push(w()))),a.l.sequenceMode&&(D=b.Na?b.Na.i:null,c.i!=D&&g.push(jk(a.g.ba,b.type,c.startTime))),F(y,Promise.all(g),0)}})}
|
|
488
|
+
function gm(a,b,c,d,e,f,g,h){var k,l,m,n;return O(function(p){if(1==p.g)return k=Wd,l=new Map,a.j.audio&&l.set(k.X,a.j.audio),a.j.video&&l.set(k.ha,a.j.video),ra(p,2),b.Sd=d,b.Rd=e,g&&(b.tf=g),h&&(b.uf=h),b.Td=c,m=a.l.sequenceMode||"HLS"==a.l.type,F(p,hk(a.g.ba,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return ta(p,0);n=ua(p);b.Sd=null;b.Rd=null;b.tf=null;b.uf=null;b.Td=null;throw n;})}
|
|
489
|
+
function cm(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.H;p="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;r=null;e.Z&&(r=e.Z.timescale);u=p&&r&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(m||n||u)l=new Lg;m&&l.T("emsg",function(A){var z=d.emsgSchemeIdUris;
|
|
490
|
+
if(0===A.version){var D=A.reader.rc();var y=A.reader.rc();var B=A.reader.R();var C=A.reader.R();var E=A.reader.R();var G=A.reader.R();var L=e.startTime+C/B}else B=A.reader.R(),L=A.reader.Oc()/B+e.timestampOffset,C=L-e.startTime,E=A.reader.R(),G=A.reader.R(),D=A.reader.rc(),y=A.reader.rc();A=A.reader.rb(A.reader.getLength()-A.reader.wa());if(z&&z.includes(D)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==D)a.g.Di();else if(z=L+E/B,B=(new Map).set("detail",{startTime:L,endTime:z,schemeIdUri:D,
|
|
491
|
+
value:y,timescale:B,presentationTimeDelta:C,eventDuration:E,id:G,messageData:A}),B=new U("emsg",B),B.cancelable=!0,a.g.onEvent(B),!B.defaultPrevented&&("https://aomedia.org/emsg/ID3"==D||"https://developer.apple.com/streaming/emsg-id3"==D)&&(D=Wi(A),D.length))a.g.onMetadata([{cueTime:L,data:A,frames:D,dts:L,pts:L}],0,z)});n&&l.T("prft",function(A){if(!a.H&&e.Z.timescale){var z=A.reader,D=A.version;z.R();A=z.R();var y=z.R();A=1E3*A+y/Math.pow(2,32)*1E3;0===D?z=z.R():(D=z.R(),z=z.R(),z=D*Math.pow(2,
|
|
492
|
+
32)+z);A=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+A)).getTime();z=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-z/e.Z.timescale*1E3)});z=new U("prft",z);a.g.onEvent(z);a.H=!0}});u&&l.box("moof",Qg).box("traf",Qg).T("tfdt",function(A){var z,D,y,B,C,E;return O(function(G){z=Zi(A.reader,A.version);D=z.baseMediaDecodeTime;if(!D)return G.return();y=-D/r;B=Number(b.Td)||0;if(!(B<y))return G.u(0);C=b.Sd;E=b.Rd;return F(G,gm(a,b,y,C,E,e),0)})});(m||n||u)&&l.parse(f,!1,
|
|
493
|
+
g);return F(w,fm(a,b,c),2);case 2:return Bg(a.m),v=b.Rc,b.Rc=!1,F(w,a.g.kg(b.type,f),3);case 3:return F(w,Yj(a.g.ba,b.type,f,e,d,k,v,h,g),4);case 4:Bg(a.m),H(w)}})}
|
|
494
|
+
function fm(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof Qk&&d.Ga(a.l.presentationTimeline.Jb());e=Math.max(a.h.bufferBehind*a.B,a.l.presentationTimeline.h);f=Tj(a.g.ba,b.type);if(null==f)return a.C==b&&(a.C=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():F(k,a.g.ba.remove(b.type,f,f+h),2)}if(4!=k.g)return Bg(a.m),a.C?F(k,fm(a,a.C,c),4):k.u(0);Bg(a.m);H(k)})}
|
|
495
|
+
function Yl(a){return a&&a.type==Ud&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
496
|
+
function dm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.dd())return l.return(e);f=null;if(b.W){var m=b.W,n=m.h;c instanceof Di&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Uf=d),f=m.ee):f=null}f||(f=Ul(c,b.stream,d||null,a.h.retryParameters,a.g.Mb));g=0;b.ka&&(g=b.ka.h);b.jb=f;return F(l,f.promise,2);case 2:h=l.h;b.jb=null;k=h.data;if(!c.aesKey){l.u(3);break}return F(l,yl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
495
497
|
function Ul(a,b,c,d,e){var f=a instanceof Fi?a:void 0,g=f?1:0;a=zl(a.L(),a.Ha,a.ta,d,c);a.contentType=b.type;return e.request(yg,a,{type:g,stream:b,segment:f})}
|
|
496
|
-
function Rl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.ec=!1,b.Ae=!1,b.
|
|
497
|
-
function Kl(a,b,c){var d=b.type;if(d!=Ud||a.i.has(d))b.
|
|
498
|
-
function Wl(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,$f(a.
|
|
499
|
-
function im(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.
|
|
500
|
-
function
|
|
498
|
+
function Rl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.ec=!1,b.Ae=!1,b.Fd=0,b.Wc=!0,b.Na=null,b.ka=null,b.W&&!a.o.has(b.stream)&&jl(b.W),d?(e=a.g.bd(),f=a.g.ba.getDuration(),F(g,a.g.ba.remove(b.type,e+d,f),3)):F(g,gk(a.g.ba,b.type),4);if(3!=g.g)return Bg(a.m),c?F(g,a.g.ba.flush(b.type),3):g.u(3);Bg(a.m);b.Wc=!1;b.endOfStream=!1;b.Ka||b.ub||Kl(a,b,0);H(g)})}
|
|
499
|
+
function Kl(a,b,c){var d=b.type;if(d!=Ud||a.i.has(d))b.ub=(new Qc(function(){var e;return O(function(f){if(1==f.g)return ra(f,2),F(f,Vl(a,b),4);if(2!=f.g)return ta(f,0);e=ua(f);if(a.g)a.g.onError(e);H(f)})})).$(c)}function Cl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function Dl(a){return O(function(b){return a.jb?F(b,a.jb.abort(),0):b.u(0)})}
|
|
500
|
+
function Wl(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,$f(a.M),2);Bg(a.m);if(1===c.category&&1003!=c.code){if(b.ac)return Ml(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
|
|
501
|
+
function im(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.N<c)return h.return(!1);a.N=b;d=Wd;if(e=a.i.get(d.X))e.oc=null,Tl(a,e),Dl(e).catch(function(){});if(f=a.i.get(d.ha))f.oc=null,Tl(a,f),Dl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.X,a.j.audio);a.j.video&&g.set(d.ha,a.j.video);return F(h,pk(a.g.ba,g),2)}return h.return(!0)})}
|
|
502
|
+
function hm(a,b){if(a.I.projection!=b.projection||a.I.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.I=b}};function jm(){}
|
|
501
503
|
function km(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Je(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Je(n)),m=km(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Xa("Invalid config, wrong type for "+m),
|
|
502
504
|
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&Ya("Unexpected number of arguments for "+m),a[l]=b[l]):(Xa("Invalid config, unrecognized key "+m),k=!1)}return k}function lm(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 mm(a,b){return a&&b}
|
|
503
505
|
function nm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]=
|
|
@@ -521,128 +523,128 @@ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth
|
|
|
521
523
|
drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(xm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
522
524
|
function ym(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return km(a,b,c||um(),d,"")}
|
|
523
525
|
function xm(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=Ie(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Be(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-
|
|
524
|
-
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!=Ud&&"image"!=c.type||b.push(c);return b}function vm(a){return mm([a],a)}function wm(a){return mm([a],a)}S("shaka.util.PlayerConfiguration",tm);tm.mergeConfigObjects=ym;tm.createDefault=um;function zm(a,b,c,d){kg.call(this);this.M=a;this.
|
|
525
|
-
function Bm(a){if(a.H)for(var b=t(a.H),c=b.next();!c.done;c=b.next())c=c.value,c();a.H=null}function Cm(a,b){a.N=b;a.O=!0;if(a.I){b=t(a.I);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.I=null}q=zm.prototype;q.getStartTime=function(){return this.A};q.Fc=function(){return this.M};q.ff=function(){return this.h};function Dm(a){a.aa=!0;return a.i}function Em(a){a.
|
|
526
|
-
function
|
|
527
|
-
q.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return ra(c,3),F(c,
|
|
528
|
-
a.g.abrFactory;a.B=d;a.i=d();a.i.configure(a.g.abr)}if(a.
|
|
529
|
-
q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function
|
|
530
|
-
function
|
|
531
|
-
function
|
|
526
|
+
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!=Ud&&"image"!=c.type||b.push(c);return b}function vm(a){return mm([a],a)}function wm(a){return mm([a],a)}S("shaka.util.PlayerConfiguration",tm);tm.mergeConfigObjects=ym;tm.createDefault=um;function zm(a,b,c,d){kg.call(this);this.M=a;this.S=b;this.za=d.networkingEngine;this.A=c;this.o=null;this.va=0;this.ab=d.Ac;this.C=d.xi;this.bb=d.yi;this.g=d.config;this.j=this.F=this.h=null;this.fa=!1;this.G=d.Hi;this.na=!1;this.l=null;this.da=!1;this.i=this.B=null;this.aa=!1;this.K=new Map;this.ra=!1;this.Ea=d.Gi;this.Y=new $k;this.ea=new ag;this.m=new ag;this.N=null;this.s=!1;this.Fa=d.Ah;this.ma=null;this.Da=d.zh;this.O=!1;this.I=[];this.H=[]}na(zm,kg);
|
|
527
|
+
function Am(a,b,c){(a=b?a.H:a.I)?a.push(c):c()}function Bm(a){if(a.H)for(var b=t(a.H),c=b.next();!c.done;c=b.next())c=c.value,c();a.H=null}function Cm(a,b){a.N=b;a.O=!0;if(a.I){b=t(a.I);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.I=null}q=zm.prototype;q.getStartTime=function(){return this.A};q.Fc=function(){return this.M};q.ff=function(){return this.h};function Dm(a){a.aa=!0;return a.i}function Em(a){a.na=!0;return a.G}q.getStats=function(){return this.Y};
|
|
528
|
+
function Fm(a){a.da=!0;return a.l}function Gm(a){a.ra=!0;return a.K}
|
|
529
|
+
q.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return ra(c,3),F(c,Hm(a),5);case 5:return Im(a),F(c,Jm(a),6);case 6:Im(a);a.o||(a.o=new Kf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
|
|
530
|
+
if(a.Da){var d=a.g.abrFactory;a.B=d;a.i=d();a.i.configure(a.g.abr)}if(a.Fa){d=a.h.presentationTimeline.V();var e=tf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant())a.ma=e,e.video&&Km(a,e.video,d),e.audio&&Km(a,e.audio,d)}return F(c,void 0,7);case 7:Im(a);a.m.resolve();ta(c,0);break;case 3:b=ua(c),a.m.reject(b),H(c)}})})()};q.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):kg.prototype.dispatchEvent.call(this,a)};
|
|
531
|
+
q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Im(a){if(a.s)throw new T(2,7,7003);}function Lm(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
|
|
532
|
+
function Hm(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:Lm(a,"manifest-parser");a.j||(a.F=xi(a.M,a.S),a.j=a.F(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Lm(a,"manifest");if(a.h){f.u(2);break}return F(f,a.j.start(a.M,a.bb),3);case 3:a.h=f.h;case 2:return a.ea.resolve(),c=new U("manifestparsed",void 0),F(f,Promise.resolve(),4);case 4:a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);Mm(a.h);d=Date.now()/1E3;e=d-b;a.Y.H=e;H(f)}})}
|
|
533
|
+
function Jm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Lm(a,"drm-engine");a.va=Date.now()/1E3;a.l=a.ab();a.C.g=a.l;a.l.configure(a.g.drm);var h=a.C;b=Qe(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return F(g,Promise.resolve(),3);case 3:Im(a),a.dispatchEvent(c);case 2:return d=tf(a.h.variants),F(g,Nh(a.l,d,a.h.offlineSessionIds),4);case 4:return Im(a),F(g,ri(a.C,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return F(g,
|
|
532
534
|
Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}q.configure=function(a,b){a=lm(a,b);ym(this.g,a)};q.getConfiguration=function(){return Je(this.g)};
|
|
533
|
-
function
|
|
534
|
-
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.
|
|
535
|
-
function
|
|
536
|
-
"regionremove",function(d){c.g.delete(d.region)})}na(
|
|
537
|
-
function
|
|
535
|
+
function Km(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new al(d,b,function(l,m,n){return Ul(l,m,n||null,a.g.streaming.retryParameters,a.za)},!1),a.K.set(b.id,e),F(k,b.createSegmentIndex(),2);f=a.A||0;(h=(g=b.segmentIndex.Ib(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.Z&&dl(e,h.Z):cl(e,h.startTime));H(k)})}q.hj=function(){return this.m};
|
|
536
|
+
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.fa){e.u(2);break}return F(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return F(e,a.i.stop(),4);case 4:a.G&&!a.na&&a.G.release();if(!a.l||a.da){e.u(6);break}return F(e,a.l.destroy(),6);case 6:if(0<a.K.size&&!a.ra)for(b=t(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,jl(d);H(e)}})};
|
|
537
|
+
function Mm(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))}S("shaka.media.PreloadManager",zm);zm.prototype.destroy=zm.prototype.destroy;zm.prototype.waitForFinish=zm.prototype.hj;function Nm(a,b){kg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{yc:null,xc:Om,mc:function(d,e){return Pm(c,"enter",d,e)}},{yc:Qm,xc:Om,mc:function(d,e){return Pm(c,"enter",d,e)}},{yc:Rm,xc:Om,mc:function(d,e){return Pm(c,"enter",d,e)}},{yc:Om,xc:Qm,mc:function(d,e){return Pm(c,"exit",d,e)}},{yc:Om,xc:Rm,mc:function(d,e){return Pm(c,"exit",d,e)}},{yc:Qm,xc:Rm,mc:function(d,e){return Pm(c,"skip",d,e)}},{yc:Rm,xc:Qm,mc:function(d,e){return Pm(c,"skip",d,e)}}];this.h=new gb;this.h.D(this.i,
|
|
538
|
+
"regionremove",function(d){c.g.delete(d.region)})}na(Nm,kg);Nm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;kg.prototype.release.call(this)};Nm.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?Qm:a>d.endTime?Rm:Om;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.yc==e&&h.xc==f&&h.mc(d,b)}}};
|
|
539
|
+
function Pm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Qm=1,Om=2,Rm=3;function Sm(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new tc(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Tm[d])return m.return(e);f=0;g=sg([a],c);ra(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=ua(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return F(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
538
540
|
e.toLowerCase().split(";").shift():"")}})}
|
|
539
|
-
var
|
|
540
|
-
jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function
|
|
541
|
+
var Tm={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",
|
|
542
|
+
jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function Um(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Um(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Vm(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Vm(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);
|
|
541
543
|
h=k.next().value;k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
542
|
-
function
|
|
543
|
-
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function
|
|
544
|
-
function
|
|
545
|
-
function
|
|
546
|
-
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function
|
|
547
|
-
q.append=function(a){var b=
|
|
548
|
-
c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(
|
|
549
|
-
function
|
|
550
|
-
|
|
551
|
-
q.append=function(a){var b=[].concat(x(this.h));a=t(
|
|
552
|
-
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});
|
|
553
|
-
function
|
|
554
|
-
r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.tc?(d.tc.contains(c)&&d.tc.removeChild(c),c.appendChild(d.tc),d.tc.appendChild(d.Ne)):c.appendChild(d.Ne)}}function
|
|
555
|
-
function
|
|
544
|
+
function Vm(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
545
|
+
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function ln(a,b){var c=[];a=t(mn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(ln(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Um(d,b);c.push(e)}return c}
|
|
546
|
+
function mn(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Le:void 0},c=a.next())d.Le=c.value,b.some(function(e){return function(f){return dc(e.Le,f)}}(d))||b.push(d.Le);return b}
|
|
547
|
+
function nn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
|
|
548
|
+
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function on(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}q=on.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;pn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
549
|
+
q.append=function(a){var b=ln(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={Ic:void 0},d=b.next())e.Ic=d.value,!a.some(function(f){return function(g){return g.startTime==f.Ic.startTime&&g.endTime==f.Ic.endTime&&g.text==f.Ic.payload?!0:!1}}(e))&&e.Ic.payload&&(d=nn(e.Ic))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):
|
|
550
|
+
c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(pn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
551
|
+
function pn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",on);on.prototype.setTextVisibility=on.prototype.setTextVisibility;on.prototype.isTextVisible=on.prototype.isTextVisible;on.prototype.destroy=on.prototype.destroy;on.prototype.append=on.prototype.append;on.prototype.remove=on.prototype.remove;on.prototype.configure=on.prototype.configure;function qn(){}q=qn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",qn);qn.prototype.setTextVisibility=qn.prototype.setTextVisibility;qn.prototype.isTextVisible=qn.prototype.isTextVisible;qn.prototype.destroy=qn.prototype.destroy;qn.prototype.append=qn.prototype.append;qn.prototype.remove=qn.prototype.remove;qn.prototype.configure=qn.prototype.configure;function rn(){}function sn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",rn);rn.removeAllChildren=sn;function tn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("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.s.appendChild(this.g);c&&c.captionsUpdatePeriod||qb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Rc(function(){d.A.paused||
|
|
552
|
+
un(d)})).Ra(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new gb;this.j.D(document,"fullscreenchange",function(){un(d,!0)});this.j.D(this.A,"seeking",function(){un(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){un(d,!0)}),this.o.observe(this.g));this.B=new Map}q=tn.prototype;q.configure=function(a){this.C&&this.C.Ra(a.captionsUpdatePeriod)};
|
|
553
|
+
q.append=function(a){var b=[].concat(x(this.h));a=t(mn(a));for(var c=a.next(),d={};!c.done;d={Me:void 0},c=a.next())d.Me=c.value,b.some(function(e){return function(f){return dc(f,e.Me)}}(d))||this.h.push(d.Me);un(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
554
|
+
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});un(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function vn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
555
|
+
function wn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.sh:null;l&&(g.push(l.Ne),l.tc&&g.push(l.tc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?vn(a,n)||(f=!0):(xn(a,k,e),l=a.i.get(k),n=l.sh,f=!0));0<k.nestedCues.length&&n&&wn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
|
|
556
|
+
r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.tc?(d.tc.contains(c)&&d.tc.removeChild(c),c.appendChild(d.tc),d.tc.appendChild(d.Ne)):c.appendChild(d.Ne)}}function un(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())sn(d.value);sn(a.g);a.i.clear();a.B.clear()}a.m&&wn(a,a.h,a.g,c,[])}}
|
|
557
|
+
function xn(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=document.createElement(e);"br"!=e&&yn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Kb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Kb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Kb?"%":"px",l=g.widthUnits==
|
|
556
558
|
Kb?"%":"px",m=g.viewportAnchorUnits==Kb?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.l===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
|
|
557
559
|
g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*p/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
|
|
558
560
|
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Ne:f,sh:e,tc:c})}
|
|
559
|
-
function
|
|
560
|
-
function
|
|
561
|
-
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=
|
|
561
|
+
function zn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Rb?c:"left"===a||"start"===a&&b===Ub||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ub?"line-right":"center"}
|
|
562
|
+
function yn(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=An(c.linePadding,c,a.s);f.paddingRight=An(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
563
|
+
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Bn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-
|
|
562
564
|
1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;
|
|
563
|
-
f.fontSize=
|
|
564
|
-
a=
|
|
565
|
+
f.fontSize=An(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Wb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Vb?(f.width="100%",c.lineAlign==Xb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;
|
|
566
|
+
a=zn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=
|
|
565
567
|
c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Vb?f.width=c.size+"%":f.height=c.size+"%")}
|
|
566
|
-
function
|
|
567
|
-
|
|
568
|
-
break;case "right":g.push("align:right");break;case Tb: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}S("shaka.text.WebVttGenerator",function(){});function
|
|
569
|
-
function
|
|
570
|
-
!0;var f=
|
|
571
|
-
function
|
|
572
|
-
function
|
|
573
|
-
function
|
|
574
|
-
function
|
|
575
|
-
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function
|
|
576
|
-
function
|
|
577
|
-
q.getBandwidthEstimate=function(a){var b=this.yg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function
|
|
578
|
-
|
|
579
|
-
this.$d=new qi(this.g,this.fa,null);this.je=[];this.s=null;this.za=new Kf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Db=this.g.preferredTextLanguage;this.
|
|
580
|
-
b(this);this.N=
|
|
581
|
-
f.g){c.dg.stop();if(c.aa)return f.u(0);c.Gb=c.h;c.Be=c.h.ended;e=d.saveLivePosition||!1;return F(f,c.rg(!0,e),3)}c.aa=f.h;H(f)})}),this.
|
|
582
|
-
h=g.next();!h.done;h=g.next())h=h.value,0<h.disabledUntilTime&&h.disabledUntilTime<=d&&(h.disabledUntilTime=0,e=!0),0<h.disabledUntilTime&&(f=!1);f&&c.ie.stop();e&&
|
|
583
|
-
function
|
|
584
|
-
q.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.l==
|
|
585
|
-
kg.prototype.release.call(a),H(c)}})};function
|
|
586
|
-
q.Sb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==
|
|
587
|
-
}})};q.Bh=function(a){this.eg=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==
|
|
588
|
-
q.dc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:return c.l!=
|
|
568
|
+
function An(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 Bn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",tn);tn.prototype.setTextVisibility=tn.prototype.setTextVisibility;
|
|
569
|
+
tn.prototype.isTextVisible=tn.prototype.isTextVisible;tn.prototype.remove=tn.prototype.remove;tn.prototype.destroy=tn.prototype.destroy;tn.prototype.append=tn.prototype.append;tn.prototype.configure=tn.prototype.configure;function Cn(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=ln(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");
|
|
570
|
+
break;case "right":g.push("align:right");break;case Tb: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}S("shaka.text.WebVttGenerator",function(){});function Dn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}Dn.prototype.configure=function(a){this.g=a};function En(a){a.i=!1;a.l=!0;a.j=!1}
|
|
571
|
+
function Fn(a,b,c){try{if(!a.g.enabled)return b;var d=Gn(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=Hn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=In;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=Jn;break a}e=void 0}d.ot=e;d.su=
|
|
572
|
+
!0;var f=Kn(d);return Ln(b,f)}catch(g){return $a("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Gn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
573
|
+
function Mn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Gn(a));c.pr=a.h.fb();var e=c.ot===Nn||c.ot===In;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=On(a,c);if(d)d=Pn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=Kn(a);f&&(b.uris=b.uris.map(function(g){return Ln(g,f)}))}}}function On(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
|
|
574
|
+
function Qn(a){if(0===a.type)return Rn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?In:Nn;if("audio"==b)return Hn;if("text"==b)return"application/mp4"===a.mimeType?Sn:Tn}}function Un(a,b){b=a.h.wb()[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}
|
|
575
|
+
function Vn(a,b){b=a.h.wb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Wn(a,b){var c=a.h.lc();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 Nn:return a.videoBandwidth||NaN;case Hn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
576
|
+
function Kn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=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"===
|
|
577
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Pn(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=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=Kn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
578
|
+
function Ln(a,b){if(!b||a.includes("offline:"))return a;a=new tc(a);a.g.set("CMCD",b);return a.toString()}var Jn="m",Hn="a",Nn="v",In="av",Rn="i",Tn="c",Sn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Mj:"s",OTHER:"o"});function Xn(a){this.h=a;this.g=null}q=Xn.prototype;q.configure=function(a){this.h=a};q.Ag=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Yn)?1E3*this.g.get(Yn):null};q.yg=function(){return this.h.enabled&&this.g&&this.g.has(Zn)?1E3*this.g.get(Zn):null};q.$h=function(){return this.h.enabled&&this.g&&this.g.has($n)?this.g.get($n):null};q.ai=function(){return this.h.enabled&&this.g&&this.g.has(ao)?this.g.get(ao):null};
|
|
579
|
+
q.getBandwidthEstimate=function(a){var b=this.yg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function bo(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Xn);Xn.prototype.getBandwidthEstimate=Xn.prototype.getBandwidthEstimate;Xn.prototype.getRoundTripTime=Xn.prototype.ai;Xn.prototype.getResponseDelay=Xn.prototype.$h;Xn.prototype.getEstimatedThroughput=Xn.prototype.yg;
|
|
580
|
+
Xn.prototype.getMaxBitrate=Xn.prototype.Ag;var Zn="etp",Yn="mb",$n="rd",ao="rtt";function co(){this.g=null;this.h=[]}function eo(a,b){return O(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}co.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){kg.call(this);var c=this;this.l=fo;this.ce=this.h=null;this.ma=!1;this.pe=new gb;this.hd=new gb;this.m=new gb;this.Fa=new gb;this.bb=new gb;this.C=this.G=this.B=this.H=null;this.se=0;this.Y=new co;this.na=this.ag=this.da=this.i=this.ab=this.F=this.j=this.Ub=this.K=this.eg=this.ea=this.N=this.ed=this.M=this.ge=this.I=this.Fb=null;this.Ea=!1;this.va=this.o=null;this.cg=1E9;this.pd=[];this.S=NaN;this.g=go(this);this.O=null;this.ye=-1;this.Da=null;this.fa={width:Infinity,height:Infinity};
|
|
581
|
+
this.$d=new qi(this.g,this.fa,null);this.je=[];this.s=null;this.za=new Kf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Db=this.g.preferredTextLanguage;this.od=this.g.preferredTextRole;this.nd=this.g.preferForcedSubs;this.ld=[];b&&
|
|
582
|
+
b(this);this.N=ho(this);this.ea=new Xn(this.g.cmsd);this.H=io(this);this.H.Pf(this.g.streaming.forceHTTP);this.H.Qf(this.g.streaming.forceHTTPS);this.Gb=this.aa=this.A=null;this.Be=!1;this.dg=new Rc(function(){return O(function(d){if(1==d.g)return c.aa?F(d,c.Sb(c.Gb,!0),3):d.u(0);if(4!=d.g)return F(d,c.load(c.aa),4);c.Be?c.Gb.pause():c.Gb.play();c.aa=null;c.Be=!1;H(d)})});jo&&(this.A=jo(),this.A.configure(this.g.ads),this.bb.D(this.A,"ad-content-pause-requested",function(d){var e;return O(function(f){if(1==
|
|
583
|
+
f.g){c.dg.stop();if(c.aa)return f.u(0);c.Gb=c.h;c.Be=c.h.ended;e=d.saveLivePosition||!1;return F(f,c.rg(!0,e),3)}c.aa=f.h;H(f)})}),this.bb.D(this.A,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.aa){var e=c.aa;e.A&&d&&(e.A+=d)}c.dg.$(.1)}),this.bb.D(this.A,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Gb?d.u(0):F(d,c.Sb(c.Gb,!0),0)})}));this.pe.D(window,"online",function(){ko(c);c.If()});this.ie=new Rc(function(){for(var d=Date.now()/1E3,e=!1,f=!0,g=t(c.i.variants),
|
|
584
|
+
h=g.next();!h.done;h=g.next())h=h.value,0<h.disabledUntilTime&&h.disabledUntilTime<=d&&(h.disabledUntilTime=0,e=!0),0<h.disabledUntilTime&&(f=!1);f&&c.ie.stop();e&&lo(c,!1,void 0,!1,!1)});this.ra=null;a&&(qb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Sb(a,!0))}na(X,kg);function mo(a){null!=a.K&&(Hj(a.K),a.K.release(),a.K=null)}
|
|
585
|
+
function no(a,b){b.lcevc.enabled?(mo(a),null==a.K&&(a.K=new Gj(a.h,a.eg,b.lcevc),a.G&&(a.G.Y=a.K))):mo(a)}function oo(a,b){return new U(a,b)}q=X.prototype;
|
|
586
|
+
q.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.l==po)return c.return();mo(a);b=a.detach();a.l=po;return F(c,b,2);case 2:return F(c,a.Pe(),3);case 3:a.pe&&(a.pe.release(),a.pe=null);a.hd&&(a.hd.release(),a.hd=null);a.m&&(a.m.release(),a.m=null);a.Fa&&(a.Fa.release(),a.Fa=null);a.bb&&(a.bb.release(),a.bb=null);a.va=null;a.g=null;a.s=null;a.ce=null;a.N=null;a.ea=null;if(!a.H){c.u(4);break}return F(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.o&&(a.o.release(),a.o=null),
|
|
587
|
+
kg.prototype.release.call(a),H(c)}})};function qo(a,b){a.dispatchEvent(oo("onstatechange",(new Map).set("state",b)))}
|
|
588
|
+
q.Sb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==po)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return F(g,c.detach(),2);case 2:return F(g,ro(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(qo(c,"attach"),e=function(){var h=so(c,!1);h&&to(c,h)},c.hd.D(a,"error",e),c.h=a);if(!b||!Sc()||c.G){g.u(6);break}return F(g,uo(c),6);case 6:xa(g);c.Y.release();ya(g,0);break;case 5:return f=ua(g),F(g,c.detach(),10);case 10:throw f;
|
|
589
|
+
}})};q.Bh=function(a){this.eg=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==po)throw new T(2,7,7E3);return F(c,b.dc(!1,a),2)}if(3!=c.g)return F(c,ro(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.hd.Qa(),b.h=null),qo(b,"detach"),b.A&&!a&&b.A.release()}finally{b.Y.release()}H(c)})};function ro(a,b){var c;return O(function(d){return 1==d.g?(c=++a.se,F(d,eo(a.Y,b),2)):c!=a.se?(a.Y.release(),d.return(!0)):d.return(!1)})}
|
|
590
|
+
q.dc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:return c.l!=po&&(c.l=fo),F(r,ro(c,"unload"),2);case 2:if(r.h)return r.return();sa(r,3);c.Ea=!1;qo(c,"unload");a&&!Sc()&&(a=!1);mo(c);d=c.ld.map(function(u){return u()});c.ld=[];return F(r,Promise.all(d),5);case 5:c.dispatchEvent(oo("unloading"));c.ed&&(c.ed.release(),c.ed=null);c.h&&(c.m.Qa(),c.Fa.Qa());c.ie.stop();c.Fb&&(c.Fb.release(),c.Fb=null);c.ge&&(c.ge.stop(),c.ge=null);
|
|
589
591
|
if(!c.F){r.u(6);break}return F(r,c.F.stop(),7);case 7:c.F=null,c.ab=null;case 6:if(!c.o){r.u(8);break}return F(r,c.o.stop(),8);case 8:if(!c.j){r.u(10);break}return F(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.C&&(c.C.release(),c.C=null);if(!rd("webkit")||!c.B){r.u(12);break}return F(r,c.B.destroy(),13);case 13:c.B=null;case 12:if(!c.G){r.u(14);break}return F(r,c.G.destroy(),15);case 15:c.G=null;case 14:if(c.A&&!b)c.A.onAssetUnload();c.aa&&!b&&(c.aa.destroy(),c.aa=
|
|
590
|
-
null);b||c.dg.stop();c.N&&
|
|
591
|
-
|
|
592
|
-
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==
|
|
593
|
-
2),F(y,
|
|
594
|
-
A.h)?(Cm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new $k;case 11:m=!e
|
|
595
|
-
|
|
596
|
-
d.o
|
|
597
|
-
|
|
598
|
-
function
|
|
599
|
-
q.rg=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?F(e,
|
|
600
|
-
function
|
|
601
|
-
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return F(f,
|
|
602
|
-
function
|
|
603
|
-
function
|
|
604
|
-
filter:function(E){var G,L;return O(function(K){if(1==K.g)return F(K,ri(r,E),2);if(4!=K.g){G=K.h;if(!G)return K.u(0);L=
|
|
592
|
+
null);b||c.dg.stop();c.N&&En(c.N);c.ea&&(c.ea.g=null);c.h&&sn(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.B){r.u(16);break}return F(r,c.B.destroy(),17);case 17:c.B=null;case 16:c.ra&&c.da!=c.ra.Fc()&&(c.ra.s||c.ra.destroy(),c.ra=null);c.da=null;c.ag=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(n=m.next();!n.done;n=
|
|
593
|
+
m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(cf={},Pc.clear());c.i=null;c.s=new $k;c.bg=null;c.Da=null;c.O=null;c.ye=-1;c.pd=[];c.S=NaN;vo(c);case 3:xa(r);c.Y.release();ya(r,4);break;case 4:if(a&&Sc()&&!c.G&&c.h)return F(r,uo(c),0);r.u(0)}})};q.gj=function(a){this.na=a};
|
|
594
|
+
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==po)throw new T(2,7,7E3);e=null;f="";a instanceof zm?(e=a,f=e.Fc()||""):f=a||"";return F(A,eo(d.Y,"load"),2);case 2:d.Y.release();if(!d.h)throw new T(2,7,7002);if(!d.da){A.u(3);break}d.da=f;return F(A,d.dc(!1),3);case 3:g=++d.se;h=function(){return O(function(z){if(1==z.g)return d.se==g?z.u(0):e?F(z,e.destroy(),3):z.u(3);throw new T(2,7,7E3);})};k=function(z,D){return O(function(y){switch(y.g){case 1:return sa(y,
|
|
595
|
+
2),F(y,eo(d.Y,D),4);case 4:return F(y,h(),5);case 5:return F(y,z(),6);case 6:return F(y,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:xa(y),d.Y.release(),ya(y,0)}})};ra(A,5,6);null==b&&e&&(b=e.getStartTime());d.na=b;d.Ea=!1;d.dispatchEvent(oo("loading"));if(e){c=e.S;A.u(8);break}if(c){A.u(8);break}return F(A,k(function(){return O(function(z){if(1==z.g)return F(z,wo(d,f),2);c=z.h;H(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Cm(e,d);d.s=e.getStats();A.u(11);break}return F(A,xo(d,f,b,c,!0),12);case 12:(e=
|
|
596
|
+
A.h)?(Cm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new $k;case 11:return m=!e,n=Date.now()/1E3,d.s=e?e.getStats():new $k,d.da=f,d.ag=c||null,m?F(A,k(function(){return O(function(z){return F(z,yo(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):F(A,k(function(){return O(function(z){if(1==z.g)return F(z,Promise.race([e.ea,e.m]),2);d.ab=e.F;var D=e;D.fa=!0;d.F=D.j;d.i=e.ff();H(z)})},"waitForFinish"),15);case 15:if(d.G){A.u(16);break}return F(A,k(function(){return O(function(z){return F(z,
|
|
597
|
+
uo(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return F(A,k(function(){return O(function(z){return F(z,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.$d=e.C;d.F&&d.F.setMediaElement&&d.h&&d.F.setMediaElement(d.h);d.ed=Em(e);d.Ub=e.Ea;if(p=e.o)d.za=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(zo(d),d.configure("manifest.disableVideo",!0));d.B=Fm(e);return F(A,k(function(){return O(function(z){return F(z,d.B.Sb(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.B)||d.va&&
|
|
598
|
+
d.va==r||(d.o=Dm(e),d.va=e.B,"function"!=typeof d.o.setMediaElement&&(qb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(qb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(qb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),
|
|
599
|
+
d.o.trySuggestStreams=function(){})),u=Gm(e),v=e.ma,F(A,k(function(){return O(function(z){return F(z,Ao(d,n,v,u),0)})},"loadInner_"),20);case 20:Bm(e);A.u(14);break;case 21:return F(A,k(function(){return O(function(z){return F(z,Bo(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(oo("loaded"));case 6:xa(A);if(!e){A.u(23);break}return F(A,e.destroy(),23);case 23:d.ra=null;ya(A,0);break;case 5:w=ua(A);if(!w||7E3==w.code){A.u(25);break}return F(A,d.dc(!1),25);case 25:throw w;}})};
|
|
600
|
+
function zo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.cj=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?F(e,Co(c),2):3!=e.g?(d=e.h,F(e,c.dc(a,b),3)):e.return(d)})};
|
|
601
|
+
q.rg=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?F(e,Co(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})};
|
|
602
|
+
function Co(a,b){b=void 0===b?!1:b;var c,d;return O(function(e){if(1==e.g){c=null;if(!(a.i&&a.F&&a.ab&&a.da))return e.u(2);d=a.h.currentTime;a.V()&&!b&&(d=null);return F(e,Do(a,a.da,d,a.ag,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.je.push(c);a.F&&a.F.setMediaElement&&a.F.setMediaElement(null);var f=c,g=a.F,h=a.ab;f.h=a.i;f.j=g;f.F=h;f=c;g=a.va;f.i=a.o;f.B=g;c.o=a.za;c.start();a.i=null;a.F=null;a.ab=null;a.o=null;a.va=null}return e.return(c)})}
|
|
603
|
+
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return F(f,xo(d,a,b,c),2);(e=f.h)?e.start():to(d,new T(2,7,7005));return f.return(e)})};q.Pe=function(){var a=this,b,c,d,e;return O(function(f){b=[];c=t(a.je);for(d=c.next();!d.done;d=c.next())e=d.value,e.s||b.push(e.destroy());a.je=[];return F(f,Promise.all(b),0)})};
|
|
604
|
+
function xo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return d?l.u(2):F(l,wo(a,b),3);2!=l.g&&(d=l.h);if(f=Eo(a,d))return l.return(null);g=!1;h=!0;e&&(a.o&&a.va==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=Do(a,b,c,d||null,!e,g,h);e||(k=k.then(function(m){a.je.push(m);return m}));return l.return(k)})}
|
|
605
|
+
function Do(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,v,w,A,z,D,y,B;return O(function(C){if(1==C.g)return h=null,k=Je(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.O&&h.s?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(E,G){l()?h.configure(E,G):a.configure(E,G)},Infinity!=a.fa.width||Infinity!=a.fa.height?C.u(2):F(C,sd(),3);2!=C.g&&(p=C.h,a.fa.width=p.width,a.fa.height=p.height);r=new qi(k,a.fa,null);u={networkingEngine:a.H,
|
|
606
|
+
filter:function(E){var G,L;return O(function(K){if(1==K.g)return F(K,ri(r,E),2);if(4!=K.g){G=K.h;if(!G)return K.u(0);L=oo("trackschanged");return F(K,Promise.resolve(),4)}h.dispatchEvent(L);H(K)})},makeTextStreamsForClosedCaptions:function(E){return Fo(a,E)},onTimelineRegionAdded:function(E){var G=h.G;a:{var L=t(G.g);for(var K=L.next();!K.done;K=L.next())if(K=K.value,K.schemeIdUri==E.schemeIdUri&&K.id==E.id&&K.startTime==E.startTime&&K.endTime==E.endTime){L=K;break a}L=null}null==L&&(G.g.add(E),E=
|
|
605
607
|
new U("regionadd",new Map([["region",E]])),G.dispatchEvent(E))},onEvent:function(E){return h.dispatchEvent(E)},onError:function(E){return h.onError(E)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.O&&a.j.updateDuration()},newDrmInfo:function(E){var G=h.l,L=G?G.g:null;L&&G.s&&ti(r,L.keySystem,E)},onManifestUpdated:function(){var E=
|
|
606
|
-
(new Map).set("isLive",a.V());h.dispatchEvent(
|
|
607
|
-
disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)}};v=new ml(function(){return a.Pb()});v.addEventListener("regionadd",function(E){var G=E.region;
|
|
608
|
-
A=!0;z={Mb:a.H,onError:function(E){return h.onError(E)},de:function(E){Am(h,!0,function(){a:{var G=E,L=
|
|
609
|
-
!0;P=t(P.keyIds);for(var R=P.next();!R.done;R=P.next())if(R=R.value,(R=G[L?"00":R])||a.B.F)J.allowedByKeySystem=J.allowedByKeySystem&&!!R&&!vi.includes(R)}N!=J.allowedByKeySystem&&(I=!0)}}}if(I&&(
|
|
610
|
-
(a.s||h.getStats()).j=E,a.K&&Hj(a.K))}};D=
|
|
611
|
-
function
|
|
612
|
-
function
|
|
613
|
-
function
|
|
614
|
-
|
|
608
|
+
(new Map).set("isLive",a.V());h.dispatchEvent(oo("manifestupdated",E));Am(h,!1,function(){if(a.A)a.A.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(E,G,L,K){var I=E;if("com.apple.hls.interstitial"==E&&(I="com.apple.quicktime.HLS",E={startTime:G,endTime:L,values:K},a.A))a.A.onInterstitialMetadata(a,a.h,E);K=t(K);E=K.next();for(var J={};!E.done;J={Rg:void 0},E=K.next())J.Rg=E.value,Am(h,!1,function(M){return function(){Go(a,G,L,I,M.Rg)}}(J))},
|
|
609
|
+
disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)}};v=new ml(function(){return a.Pb()});v.addEventListener("regionadd",function(E){var G=E.region;Ho(a,"timelineregionadded",G,h);Am(h,!1,function(){if(a.A)a.A.onDashTimedMetadata(G)})});w=null;k.streaming.observeQualityChanges&&(w=new nl(function(){return a.wb()}),w.addEventListener("qualitychange",function(E){Io(a,E.quality,E.position)}),w.addEventListener("audiotrackchange",function(E){Io(a,E.quality,E.position,!0)}));
|
|
610
|
+
A=!0;z={Mb:a.H,onError:function(E){return h.onError(E)},de:function(E){Am(h,!0,function(){a:{var G=E,L=oo("keystatuschanged");a.dispatchEvent(L);var K=Object.keys(G);1==K.length&&""==K[0]&&(K=["00"],G={"00":G[""]});L=1==K.length&&"00"==K[0];var I=!1;if(K.length){K=t(a.i.variants);for(var J=K.next();!J.done;J=K.next()){J=J.value;var M=[];J.audio&&M.push(J.audio);J.video&&M.push(J.video);M=t(M);for(var N=M.next();!N.done;N=M.next()){var P=N.value;N=J.allowedByKeySystem;if(P.keyIds.size){J.allowedByKeySystem=
|
|
611
|
+
!0;P=t(P.keyIds);for(var R=P.next();!R.done;R=P.next())if(R=R.value,(R=G[L?"00":R])||a.B.F)J.allowedByKeySystem=J.allowedByKeySystem&&!!R&&!vi.includes(R)}N!=J.allowedByKeySystem&&(I=!0)}}}if(I&&(Jo(a),!Ko(a)))break a;(G=a.j.j)&&!G.allowedByKeySystem&&lo(a)}})},onExpirationUpdated:function(E,G){var L=oo("expirationupdated");h.dispatchEvent(L);if((L=h.j)&&L.onExpirationUpdated)L.onExpirationUpdated(E,G)},onEvent:function(E){h.dispatchEvent(E);"drmsessionupdate"==E.type&&A&&(A=!1,E=Date.now()/1E3-h.va,
|
|
612
|
+
(a.s||h.getStats()).j=E,a.K&&Hj(a.K))}};D=io(a,l);rg(a.H,D);y=function(){return a.Ac(z)};B={config:k,yi:u,Hi:v,Gi:w,Ac:y,xi:r,networkingEngine:D,Ah:e,zh:g};h=new zm(b,d,c,B);return C.return(h)})}function wo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,F(e,Sm(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&gd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
613
|
+
function Eo(a,b){if(!Sc())return!0;if(b){if(""==(a.h||Uc()).canPlayType(b))return!1;if(!(Sc()&&b in yi))return!0;if(ke(b))return gd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls}return!1}
|
|
614
|
+
function uo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return qo(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.bg=b,d=Lo(a.h,c,{Sh:function(){return a.keySystem()},onMetadata:function(h,k,l){Mo(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.fa=f,F(g,d.M,2);a.G=d;H(g)})}
|
|
615
|
+
function Ao(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L;return O(function(K){switch(K.g){case 1:qo(a,"load"),e=a.h,a.I=new Rk({Kd:function(){return e.playbackRate},kc:function(){return e.defaultPlaybackRate},Rf:function(I){e.playbackRate=I},Mg:function(I){e.currentTime+=I}}),f=function(){return No(a)},g=function(){return Oo(a)},a.m.D(e,"playing",f),a.m.D(e,"pause",f),a.m.D(e,"ended",f),a.m.D(e,"ratechange",g),no(a,a.g),a.Db=a.g.preferredTextLanguage,a.od=a.g.preferredTextRole,a.nd=a.g.preferForcedSubs,
|
|
616
|
+
Po(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.o.init(function(I,J,M){a.i&&a.j&&I!=a.j.j&&Qo(a,I,!0,void 0===J?!1:J,void 0===M?0:M)}),a.o.setMediaElement(e),a.o.setCmsdManager(a.ea),a.j=Ro(a),a.j.configure(a.g.streaming),a.l=So,e.textTracks&&a.m.D(e.textTracks,"addtrack",function(I){if(I.track)switch(I=I.track,I.kind){case "chapters":To(a,I)}}),a.dispatchEvent(oo("streaming")),h=c;case 2:(l=a.j.j)||h||(h=Ko(a)?a.o.chooseVariant():null);m=[];k=l||h;n=t([k.video,k.audio]);for(p=
|
|
615
617
|
n.next();!p.done;p=n.next())(r=p.value)&&!r.segmentIndex&&m.push(r.createSegmentIndex());if(!(0<m.length)){K.u(4);break}return F(K,Promise.all(m),4);case 4:if(!k||0!=k.disabledUntilTime){K.u(2);break}if(a.F&&a.F.onInitialVariantChosen)a.F.onInitialVariantChosen(k);a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&Ya("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
616
|
-
|
|
617
|
-
y=a.Gc().find(function(I){return I.active}),y||((B=uf(a.i.textStreams,a.Db,a.
|
|
618
|
-
a.g.streaming.vodDynamicPlaybackRate)E=function(){return
|
|
618
|
+
Po(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Gl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(I){a.C=Uo(a,I);a.Fb=Vo(a,I);Wo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.na);if(l){K.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){K.u(8);break}v=a.i.presentationTimeline;w=a.na||a.h.currentTime;A=v.Jb();z=v.yb();w<A?w=A:w>z&&(w=z);return F(K,Xo(h,w),9);case 9:D=K.h,u(D);case 8:Qo(a,h,!0,!1,0);case 7:return a.C.ready(),
|
|
619
|
+
y=a.Gc().find(function(I){return I.active}),y||((B=uf(a.i.textStreams,a.Db,a.od,a.nd)[0]||null)&&Zk(a.s.h,B,!0),h&&(B?(Yo(a,h.audio,B)&&(a.ma=!0),a.ma&&a.G.F.setTextVisibility(!0),Zo(a)):a.ma=!1),B&&(a.g.streaming.alwaysStreamText||a.qf())&&Pl(a.j,B)),F(K,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),$o(a));Jo(a);Ko(a);a.i.variants.some(function(I){return I.primary});if((C=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||
|
|
620
|
+
a.g.streaming.vodDynamicPlaybackRate)E=function(){return ap(a)},a.m.D(e,"timeupdate",E);C||(G=function(){return bp(a)},a.m.D(e,"timeupdate",G),bp(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(L=function(){var I;return O(function(J){if(1==J.g){I=a.h.duration-a.h.currentTime;if(isNaN(I)||!(I<=a.g.streaming.preloadNextUrlWindow))return J.u(0);a.m.kb(e,"timeupdate",L);return F(J,a.preload(a.i.nextUrl),4)}a.ra=J.h;H(J)})},a.m.D(e,"timeupdate",L)),a.m.D(e,"ended",function(){a.load(a.ra||a.i.nextUrl)})));
|
|
619
621
|
if(a.A)a.A.onManifestUpdated(C);a.Ea=!0;a.m.ja(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(K)}})}
|
|
620
|
-
function
|
|
622
|
+
function yo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Wd,d=Date.now()/1E3,e=!0,a.B=a.Ac({Mb:a.H,onError:function(k){to(a,k)},de:function(){},onExpirationUpdated:function(){var k=oo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
621
623
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?ie(b):"",codecs:b?je(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ha,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Zd(g.mimeType,
|
|
622
624
|
g.codecs)),b.startsWith("audio/")?(g.type=c.X,f.audio=g):f.video=g,a.B.aa=!0,F(h,Nh(a.B,[f],[]),2)):F(h,a.B.Sb(a.h),0)})}
|
|
623
|
-
function
|
|
624
|
-
"ratechange",h),"none"!=d.preload&&a.m.ja(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return
|
|
625
|
-
a.m.D(d.textTracks,"change",function(){return
|
|
626
|
-
a.m,function(){var w;return O(function(A){if(1==A.g)return
|
|
627
|
-
l.resolve()),a.m.ja(d,"error",function(){l.reject(
|
|
628
|
-
u!=w&&(a.A.onManifestUpdated(a.V()),u=w)})));a.Ea=!0;H(v)})}function
|
|
629
|
-
function
|
|
630
|
-
values:[]},d.push(f)),f.values.push(g.Ta.value))}d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.A&&(e.values.push({key:"CUE",description:"",data:"ONCE",mimeType:null,pictureType:null}),a.A.onInterstitialMetadata(a,a.h,e))}});var c=(new Rc(function(){var d=
|
|
631
|
-
function
|
|
632
|
-
function
|
|
633
|
-
function
|
|
634
|
-
|
|
635
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}
|
|
636
|
-
if(r.segmentIndex&&m){var w=r.segmentIndex.Ib(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Pb(m.L(),A.L())){var z=A.L()[0],D=f.uris[0],y=new URL(z),B=new URL(D);if(y.origin!==B.origin)var C=z;else{for(var E=y.pathname.split("/").slice(1),G=B.pathname.split("/").slice(1,-1);E[0]===G[0];)E.shift(),G.shift();for(;G.length;)G.shift(),E.unshift("..");C=E.join("/")}n.nor=C}if((A.Ha||A.ta)&&(m.Ha!=A.Ha||m.ta!=A.ta)){var L=A.Ha+"-";A.ta&&(L+=A.ta);n.nrr=L}}}var K=h.h.
|
|
637
|
-
500,J=r.bandwidth;var M=J?J*(m.endTime-m.startTime)/1E3/(I/K/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==
|
|
638
|
-
function
|
|
639
|
-
function
|
|
640
|
-
function
|
|
641
|
-
function
|
|
642
|
-
function
|
|
643
|
-
function
|
|
644
|
-
(new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(
|
|
645
|
-
d.l}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){
|
|
625
|
+
function Bo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g)return qo(a,"src-equals"),d=a.h,a.C=new Hk(d),e=!1,a.ld.push(function(){e=!0}),null!=a.na&&a.C.De(a.na),a.I=new Rk({Kd:function(){return d.playbackRate},kc:function(){return d.defaultPlaybackRate},Rf:function(w){d.playbackRate=w},Mg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,Wo(a,d,f),g=function(){return No(a)},h=function(){return Oo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
626
|
+
"ratechange",h),"none"!=d.preload&&a.m.ja(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return Jo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return Jo(a)}),a.m.D(d.audioTracks,"change",function(){return Jo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":cp(a,w);break;case "chapters":To(a,w);break;default:Jo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return Jo(a)}),
|
|
627
|
+
a.m.D(d.textTracks,"change",function(){return Jo(a)})),k=Fn(a.N,a.da,c),!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd)),d.src=k,($c()||cd())&&d.load(),"none"!=d.preload&&!d.autoplay&&ke(c)&&ld()&&d.load(),a.l=dp,a.dispatchEvent(oo("streaming")),l=new ag,yk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.ready();l.resolve()}),yk(d,HTMLMediaElement.HAVE_CURRENT_DATA,
|
|
628
|
+
a.m,function(){var w;return O(function(A){if(1==A.g)return ep(a),w=fp(a),w.find(function(z){return"disabled"!=z.mode})?(0<w.length&&(a.ma=!0),A.u(2)):F(A,new Promise(function(z){a.m.ja(d.textTracks,"change",z);(new Rc(z)).$(1)}),2);if(e)return A.return();gp(a);H(A)})}),d.error?l.reject(so(a)):"none"==d.preload&&(Ya('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.'),
|
|
629
|
+
l.resolve()),a.m.ja(d,"error",function(){l.reject(so(a))}),m=new Promise(function(w,A){(new Rc(A)).$(a.g.streaming.loadTimeout)}),F(v,Promise.race([l,m]),2);if((n=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return ap(a)},a.m.D(d,"timeupdate",p);n||(r=function(){return bp(a)},a.m.D(d,"timeupdate",r),bp(a));a.A&&(a.A.onManifestUpdated(n),n&&(u=a.Pb().end,a.m.D(d,"progress",function(){var w=a.Pb().end;
|
|
630
|
+
u!=w&&(a.A.onManifestUpdated(a.V()),u=w)})));a.Ea=!0;H(v)})}function ep(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Zg(b,a.g.preferredVariantRole)}function gp(a){var b=a.g.preferredTextLanguage;""!=b&&a.Lf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
631
|
+
function cp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues){for(var d=[],e=t(b.activeCues),f=e.next(),g={};!f.done;g={Ta:void 0},f=e.next()){g.Ta=f.value;Go(a,g.Ta.startTime,g.Ta.endTime,g.Ta.type,g.Ta.value);if(a.A)a.A.onCueMetadataChange(g.Ta.value);"com.apple.quicktime.HLS"==g.Ta.type&&null!=g.Ta.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.Ta.startTime&&k.endTime==h.Ta.endTime}}(g)),f||(f={startTime:g.Ta.startTime,endTime:g.Ta.endTime,
|
|
632
|
+
values:[]},d.push(f)),f.values.push(g.Ta.value))}d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.A&&(e.values.push({key:"CUE",description:"",data:"ONCE",mimeType:null,pictureType:null}),a.A.onInterstitialMetadata(a,a.h,e))}});var c=(new Rc(function(){var d=hp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).vc().$(.5);a.ld.push(function(){c.stop()})}}
|
|
633
|
+
function Mo(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Go(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Go(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(oo("metadata",b))}
|
|
634
|
+
function To(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Rc(function(){b.mode="hidden"})).vc().$(.5);a.ld.push(function(){c.stop()})}}q.Li=function(){for(var a=this.Y;a.g;)a.release()};q.Ac=function(a){return new Gh(a)};
|
|
635
|
+
function io(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Am(b(),!0,e):e()}b||(b=function(){return null});return new ng(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(oo("downloadheadersreceived",f));d(function(){if(a.ea){var h=a.ea;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
636
|
+
bo(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],bo(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(oo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Mn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
637
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Mn(h,f,{ot:Jn,su:!h.i})}}catch(N){$a("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case yg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.V()?"l":"v"};n.ot=Qn(k);var p=n.ot===Nn||n.ot===Hn||n.ot===In||n.ot===Sn,r=k.stream;if(r){var u=h.h.fb();if(p&&(n.bl=Un(h,r.type),n.ot!==Sn)){var v=Vn(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);
|
|
638
|
+
if(r.segmentIndex&&m){var w=r.segmentIndex.Ib(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Pb(m.L(),A.L())){var z=A.L()[0],D=f.uris[0],y=new URL(z),B=new URL(D);if(y.origin!==B.origin)var C=z;else{for(var E=y.pathname.split("/").slice(1),G=B.pathname.split("/").slice(1,-1);E[0]===G[0];)E.shift(),G.shift();for(;G.length;)G.shift(),E.unshift("..");C=E.join("/")}n.nor=C}if((A.Ha||A.ta)&&(m.Ha!=A.Ha||m.ta!=A.ta)){var L=A.Ha+"-";A.ta&&(L+=A.ta);n.nrr=L}}}var K=h.h.fb()||1,I=Vn(h,r.type)||
|
|
639
|
+
500,J=r.bandwidth;var M=J?J*(m.endTime-m.startTime)/1E3/(I/K/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==Sn&&(n.tb=Wn(h,n.ot)/1E3);Mn(h,f,n)}}catch(N){$a("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:Mn(h,f,{ot:"k"});break;case 4:Mn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.F)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.s;g&&(g.fc=isNaN(g.fc)?f:g.fc+f,0===e&&(g.Ig=f))}})}
|
|
640
|
+
function Uo(a,b){return new Ik(a.h,a.i,a.g.streaming,b,function(){a.Fb&&Uk(a.Fb,!0);a.j&&a.j.Rc();a.M&&ip(a)},function(c){return a.dispatchEvent(c)})}
|
|
641
|
+
function Vo(a,b){b=new Nm(a.ed,a.V()||0<b);b.addEventListener("enter",function(d){Ho(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ho(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ho(a,"timelineregionenter",e),Ho(a,"timelineregionexit",e))});var c=new Tk(a.h);c.g.add(b);a.Ub&&c.g.add(a.Ub);return c}
|
|
642
|
+
function Wo(a,b,c){a.M=new Uf;a.M.g=Wf;Xf(a.M,c,Math.min(.5,c/2));vo(a);a.ge=(new Rc(function(){ip(a)})).Ra(.25);a.m.D(b,"waiting",function(){return ip(a)});a.m.D(b,"stalled",function(){return ip(a)});a.m.D(b,"canplaythrough",function(){return ip(a)});a.m.D(b,"progress",function(){return ip(a)})}
|
|
643
|
+
function ip(a){switch(a.l){case dp:if(a.h.ended)var b=!0;else{var c=Ki(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case So:a:if(a.h.ended||Sj(a.G))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.Xb();var d=Ki(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Mi(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Vf:Wf;c.g=d;(b=b!=d)&&d===Vf&&(c.h=Date.now());b&&vo(a)}function Lo(a,b,c,d){return new Jj(a,b,c,d)}
|
|
644
|
+
function ho(a){return new Dn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},wb:function(){return a.wb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},fb:function(){return a.fb()},xb:function(){return a.xb()},lc:function(){return a.lc()},V:function(){return a.V()}},a.g.cmcd)}
|
|
645
|
+
function Ro(a){return new Al(a.i,{bd:function(){return a.C?a.C.xd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},fb:function(){return a.fb()},ba:a.G,Mb:a.H,onError:function(b){return to(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Di:function(){a.F&&a.F.update&&a.F.update()},Af:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Ud){if(a.C){a.C.Ng();var f=Tj(a.G,e);!a.V()&&a.h.paused&&null!=f&&0<f&&a.C.xd()<f&&a.C.De(f)}ip(a)}d=
|
|
646
|
+
(new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(oo("segmentappended",d))},Ci:function(b,c){(c=c.Jc)&&a.Ub&&pl(a.Ub,c,b)},kg:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Yg(zb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;Wh(d,"cenc",c);d=
|
|
647
|
+
d.l}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){Mo(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
|
|
646
648
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=lm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(qb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(qb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
647
649
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(qb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&gd(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){qb("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled=
|
|
648
650
|
c}if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){c=a.streaming.liveSyncMinLatency||0;var d=Math.abs((a.streaming.liveSyncMaxLatency||1)-c)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=c+d;a.streaming.liveSync.targetLatencyTolerance=d}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(qb("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),
|
|
@@ -653,824 +655,825 @@ a.streaming&&"liveSyncPanicMode"in a.streaming&&(qb("streaming.liveSyncPanicMode
|
|
|
653
655
|
a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){qb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var e=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return e};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&
|
|
654
656
|
(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=
|
|
655
657
|
100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));c=ym(this.g,a,
|
|
656
|
-
|
|
657
|
-
function
|
|
658
|
-
a.bg!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.G,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.bg=b;a.j&&(b=a.j,(c=b.i.get(Ud))&&Nl(b,c.stream,!0,0,!0))}else b=a.G.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable()
|
|
659
|
-
Xf(a.M,b,Math.min(.5,b/2)));a.i&&
|
|
660
|
-
q.wg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Pi=function(){for(var a in this.g)delete this.g[a];ym(this.g,
|
|
658
|
+
go(this));jp(this);return c};
|
|
659
|
+
function jp(a){a.$d=new qi(a.g,a.fa,a.B);if(a.F){var b=Je(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.F.configure(b)}a.B&&a.B.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=po&&si(a.$d,a.i)&&Jo(a)}catch(f){to(a,f)}a.o&&Ko(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||lo(a)}a.H&&(a.H.Pf(a.g.streaming.forceHTTP),a.H.Qf(a.g.streaming.forceHTTPS));if(a.G)if(a.G.configure(a.g.mediaSource),a.G.fa=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
660
|
+
a.bg!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.G,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.bg=b;a.j&&(b=a.j,(c=b.i.get(Ud))&&Nl(b,c.stream,!0,0,!0))}else b=a.G.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),$o(a));a.M&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
661
|
+
Xf(a.M,b,Math.min(.5,b/2)));a.i&&Po(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.ea&&a.ea.configure(a.g.cmsd)}q.getConfiguration=function(){var a=go(this);ym(a,this.g,go(this));return a};q.Bg=function(){var a=go(this);ym(a,this.g,go(this));return nm(this.g,go(this))};
|
|
662
|
+
q.wg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Pi=function(){for(var a in this.g)delete this.g[a];ym(this.g,go(this),go(this));jp(this)};q.zg=function(){return this.l};q.gf=function(){return this.i?this.i.type:null};q.Wh=function(){return this.h};
|
|
661
663
|
q.xb=function(){return this.H};q.Fc=function(){return this.da};q.vg=function(){return this.A?this.A:null};q.V=function(){return this.i?this.i.presentationTimeline.V():this.h&&this.h.src?Infinity==this.h.duration:!1};q.nc=function(){return this.i?this.i.presentationTimeline.nc():!1};q.mi=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
|
|
662
664
|
q.Pb=function(){if(this.i){if(!this.Ea&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Jb(),end:a.yb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.ji=function(){this.V()&&(this.h.currentTime=this.Pb().end)};q.ni=function(){return this.Ea};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.B?this.B.g:null};
|
|
663
|
-
q.ad=function(){return this.B?this.B.ad():Infinity};q.ef=function(){return this.B?this.B.ef():[]};q.
|
|
664
|
-
q.
|
|
665
|
-
q.Uc=function(){var a=this.I.kc();this.l==
|
|
665
|
+
q.ad=function(){return this.B?this.B.ad():Infinity};q.ef=function(){return this.B?this.B.ef():[]};q.Jd=function(){return this.B?this.B.Jd():{}};q.nf=function(){return this.M?this.M.g==Wf:!1};q.fb=function(){return this.h?this.I?this.I.i:1:0};
|
|
666
|
+
q.vd=function(a,b){var c=this;b=void 0===b?!0:b;0==a?Ya("A trick play rate of 0 is unsupported!"):(this.Fa.Qa(),this.h.paused&&this.h.play(),this.I.set(a),this.l==So&&(this.o.playbackRateChanged(a),Ml(this.j,b&&1<Math.abs(a))),this.V()&&this.Fa.D(this.h,"timeupdate",function(){var d=c.h.currentTime,e=c.Pb(),f=c.g.streaming.safeSeekOffset;0<a?Math.floor(d)>=Math.floor(e.end)&&c.Uc():Math.floor(d)<=Math.floor(e.start+f)&&c.Uc()}))};
|
|
667
|
+
q.Uc=function(){var a=this.I.kc();this.l==dp&&this.I.set(a);this.l==So&&(this.I.set(a),this.o.playbackRateChanged(a),Ml(this.j,!1));this.Fa.Qa()};
|
|
666
668
|
q.lc=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,sf(e)){var f=jf(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return rf(g)}):[]};
|
|
667
|
-
q.Gc=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=kf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?
|
|
668
|
-
q.Ih=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=
|
|
669
|
-
function
|
|
670
|
-
q.Dg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y;return O(function(B){if(1==B.g){if(c.l!=
|
|
669
|
+
q.Gc=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=kf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?fp(this).map(function(f){return of(f)}):[]};q.Qh=function(){var a=this.pd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return lf(b)})};
|
|
670
|
+
q.Ih=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=So&&b.l!=dp)return g.return(null);c=b.pd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):F(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Hb(function(h){var k=kp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.hc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.Dg(a,h.startTime+l*m/k))}}),F(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
671
|
+
function kp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{hc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
672
|
+
q.Dg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y;return O(function(B){if(1==B.g){if(c.l!=So&&c.l!=dp)return B.return(null);d=c.pd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(C){return C.id==a}))?e.segmentIndex?B.u(2):F(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=kp(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.hc;n=l/h.rows;p=h.hc*h.rows;r=g.j-g.startTime;
|
|
671
673
|
u=g.B||r/p;v=g.startTime;A=w=0;1<p&&(z=Math.floor((b-g.startTime)/u),v=g.startTime+z*u,w=z%h.hc*m,A=Math.floor(z/h.hc)*n);D=!1;if(y=g.A)D=!0,n=y.height,w=y.positionX,A=y.positionY,m=y.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.L(),width:m,sprite:D})})};
|
|
672
|
-
q.$g=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&&(Zk(this.s.h,b,!1),Pl(this.j,b),
|
|
673
|
-
q.Mf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&sf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Ya("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");
|
|
674
|
-
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);
|
|
674
|
+
q.$g=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&&(Zk(this.s.h,b,!1),Pl(this.j,b),lp(this),this.Db=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=fp(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,mf(c)==a.id?c.mode=this.ma?"showing":"hidden":c.mode="disabled";lp(this)}};
|
|
675
|
+
q.Mf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&sf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Ya("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Qo(this,d,!1,b,c);this.za=new Jf(d,
|
|
676
|
+
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);Ko(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,mf(c)==a.id){mp(this,c);break}};q.Kh=function(){return np(this.lc())};q.ci=function(){return np(this.Gc())};q.Jh=function(){return Array.from(op(this.lc()))};q.bi=function(){return Array.from(op(this.Gc()))};
|
|
675
677
|
q.Zg=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.C){this.za=new Kf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;e=this.za.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=f.value,
|
|
676
|
-
sf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=jf(c),this.Mf(a,!0,d)):
|
|
677
|
-
q.Vi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){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.za=new Kf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),
|
|
678
|
-
q.qf=function(){var a=this.ma;return this.G&&this.l==
|
|
679
|
-
q.Mh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Be(a),c=
|
|
680
|
-
function
|
|
681
|
-
q.gh=function(a){a=!!a;if(this.ma!=a){this.ma=a;if(this.l==
|
|
682
|
-
q.Yh=function(){if(this.C)var a=this.C.
|
|
683
|
-
q.Ld=function(){return this.V()?this.i?this.i.presentationTimeline.Ld():null:null};q.wb=function(){if(this.l==
|
|
684
|
-
q.getStats=function(){if(this.l!=
|
|
685
|
-
stateHistory:[]};
|
|
686
|
-
var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.Cg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&(this.s.G=this.i.periodCount,this.s.F=this.i.gapCount,this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.h));c=this.o.getBandwidthEstimate();this.s.A=c}this.l==
|
|
687
|
-
b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.N;e=f.O;var g=f.M,h=f.Y,k=f.
|
|
678
|
+
sf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=jf(c),this.Mf(a,!0,d)):lo(this))}else this.h&&this.h.audioTracks&&(d=uf(this.lc(),a,b||"",!1)[0])&&this.Mf(d)};q.Lf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Db=a,this.od=b||"",this.nd=c,(a=uf(this.i.textStreams,this.Db,this.od,this.nd)[0]||null)&&a!=this.j.s&&(Zk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.qf()))Pl(this.j,a),lp(this)}else(a=uf(this.Gc(),a,b||"",c)[0])&&this.$g(a)};
|
|
679
|
+
q.Vi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){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.za=new Kf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),lo(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&mp(this,b)}};
|
|
680
|
+
q.qf=function(){var a=this.ma;return this.G&&this.l==So?this.G.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?fp(this).some(function(b){return"showing"==b.mode}):a};q.xg=function(){return this.h&&this.h.src&&this.h.textTracks?pp(this).map(function(a){return of(a)}):[]};
|
|
681
|
+
q.Mh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Be(a),c=pp(this).filter(function(h){return Be(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};
|
|
682
|
+
function fp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function hp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function pp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
683
|
+
q.gh=function(a){a=!!a;if(this.ma!=a){this.ma=a;if(this.l==So)this.G.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=uf(this.i.textStreams,this.Db,this.od,this.nd),0<a.length&&(Pl(this.j,a[0]),lp(this))):Ll(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=fp(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")}Zo(this)}};
|
|
684
|
+
q.Yh=function(){if(this.C)var a=this.C.xd();else{if(null==this.na)return new Date;a=this.na}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.Cg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
685
|
+
q.Ld=function(){return this.V()?this.i?this.i.presentationTimeline.Ld():null:null};q.wb=function(){if(this.l==So)return this.G.wb();var a={total:[],audio:[],video:[],text:[]};this.l==dp&&(a.total=Pi(this.h.buffered));return a};
|
|
686
|
+
q.getStats=function(){if(this.l!=So&&this.l!=dp)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],
|
|
687
|
+
stateHistory:[]};No(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.V()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.S=this.C.fg(),this.s.Y=this.C.gg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.O=Number(c.droppedVideoFrames);b.N=d;this.s.M=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.l==So){c=this.j.j;b=this.j.s;if(c){d=this.I?this.I.i:1;
|
|
688
|
+
var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.Cg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&(this.s.G=this.i.periodCount,this.s.F=this.i.gapCount,this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.h));c=this.o.getBandwidthEstimate();this.s.A=c}this.l==dp&&(c=this.s,c.fc=isNaN(c.fc)?NaN:c.fc+NaN,c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=
|
|
689
|
+
b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.N;e=f.O;var g=f.M,h=f.Y,k=f.S,l=f.A,m=f.i,n=f.m,p=f.H,r=f.j,u=Wk(f.g,"playing"),v=Wk(f.g,"paused"),w=Wk(f.g,"buffering"),A=f.s,z=f.C,D=f.I,y=f.Ig,B=f.fc,C=f.K,E=f.G,G=f.F,L=Xk(f.g),K=[];f=t(f.h.g);for(var I=f.next();!I.done;I=f.next())I=I.value,K.push({timestamp:I.timestamp,id:I.id,type:I.type,fromAdaptation:I.fromAdaptation,bandwidth:I.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,
|
|
688
690
|
estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:z,maxSegmentDuration:D,manifestSizeBytes:y,bytesDownloaded:B,nonFatalErrorCount:C,manifestPeriodCount:E,manifestGapCount:G,stateHistory:L,switchHistory:K}};
|
|
689
|
-
q.wh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:if(h.l!=
|
|
690
|
-
l&&B.label==(f||"")&&B.kind==c}))return
|
|
691
|
-
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.ua,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Zd(d||"",e||"")])};z=Zd(A.mimeType,A.codecs);D=oe(z);if(!D)throw new T(2,2,2014,d);h.i.textStreams.push(A);
|
|
692
|
-
q.xh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:if(c.l!=
|
|
691
|
+
q.wh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:if(h.l!=So&&h.l!=dp)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ya("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){y.u(2);break}return F(y,qp(h,a),3);case 3:d=y.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=dp){y.u(4);break}g&&(c="forced");return F(y,rp(h,a,b,c,d,f||"",k),5);case 5:l=Be(b);m=h.Gc();if(n=m.find(function(B){return Be(B.language)==
|
|
692
|
+
l&&B.label==(f||"")&&B.kind==c}))return Jo(h),y.return(n);throw new T(1,2,2012);case 4:p=Wd;r=h.h.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new T(1,4,4033);if(!k.length){y.u(6);break}return F(y,sp(h,a,h.H,h.g.streaming.retryParameters),7);case 7:u=y.h,v=tp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Mj(w),d="text/vtt";case 6:A={id:h.cg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pk(0,r,[a]),mimeType:d||"",
|
|
693
|
+
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.ua,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Zd(d||"",e||"")])};z=Zd(A.mimeType,A.codecs);D=oe(z);if(!D)throw new T(2,2,2014,d);h.i.textStreams.push(A);Jo(h);return y.return(kf(A))}})};
|
|
694
|
+
q.xh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:if(c.l!=So&&c.l!=dp)throw new T(1,7,7004);if(b){y.u(2);break}return F(y,qp(c,a),3);case 3:b=y.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Wd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return F(y,sp(c,a,c.H,c.g.streaming.retryParameters),4);case 4:f=y.h;g=pe[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
693
695
|
vttOffset:0};l=zb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);r=p.next();for(u={};!r.done;u={xe:void 0,Bc:void 0},r=p.next())u.Bc=r.value,u.xe=null,v=function(B){return function(){null==B.xe&&(B.xe=Md([a],[B.Bc.payload]));return B.xe||[]}}(u),w=new Fi(u.Bc.startTime,u.Bc.endTime,v,0,null,null,0,0,Infinity),u.Bc.payload.includes("#xywh")&&(A=u.Bc.payload.split("#xywh=")[1].split(","),4===A.length&&w.hh({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
694
|
-
n.push(w);z=b;if(!n.length){y.u(5);break}return F(y,
|
|
695
|
-
closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Zd(z||"","")])},c.l==
|
|
696
|
-
q.vh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=
|
|
697
|
-
2,2012);}})};function
|
|
698
|
-
function
|
|
699
|
-
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function
|
|
700
|
-
function
|
|
696
|
+
n.push(w);z=b;if(!n.length){y.u(5);break}return F(y,Sm(n[0].L()[0],c.H,c.g.manifest.retryParameters),6);case 6:z=y.h;case 5:return D={id:c.cg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Nk(n),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Ce,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
|
|
697
|
+
closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Zd(z||"","")])},c.l==dp?c.pd.push(D):c.i.imageStreams.push(D),Jo(c),y.return(lf(D))}})};
|
|
698
|
+
q.vh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=So&&d.l!=dp)throw new T(1,7,7004);if(c){k.u(2);break}return F(k,qp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),F(k,rp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.xg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return F(k,new Promise(function(l,m){d.m.ja(f,"load",l);d.m.ja(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return Jo(d),k.return(h);case 5:throw new T(1,
|
|
699
|
+
2,2012);}})};function qp(a,b){var c;return O(function(d){switch(d.g){case 1:return ra(d,2),F(d,Sm(b,a.H,a.g.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:ua(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
700
|
+
function rp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?F(n,sp(a,b,a.H,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=tp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Mj(l),e="text/vtt");m=document.createElement("track");var p=a.N,r=b;try{if(p.g.enabled){var u=Gn(p);u.ot=Tn;u.su=!0;var v=Kn(u);var w=Ln(r,v)}else w=r}catch(A){$a("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=r}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
701
|
+
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function sp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=yg;f=sg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Mn(k,f,{ot:Tn,su:!0})}catch(l){$a("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return F(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
702
|
+
function tp(a,b,c,d){var e=pe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=zb(b),b=c.parseMedia(b,a,null),Cn(b,d);throw new T(2,2,2014,c);}q.$i=function(a,b){this.fa.width=a;this.fa.height=b};q.If=function(a){if(this.l==So){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.gd||d.Ka||d.ub||(d.gd=!1,Kl(b,d,a));b=!0}}else b=!1;return b};
|
|
701
703
|
q.ff=function(){Ya("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Th=function(){return this.ab};
|
|
702
|
-
function
|
|
703
|
-
function
|
|
704
|
+
function go(a){var b=um();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.If(d))}};b.textDisplayFactory=function(){if(a.ce){var c=a.getConfiguration();return new tn(a.h,a.ce,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new on(a.h,"Shaka Player TextTrack"):new qn};return b}q.kh=function(a){this.ce=a};
|
|
705
|
+
function Fo(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 Qk,l=e.closedCaptions.get(g);h={id:a.cg++,originalId:g,groupId:null,
|
|
704
706
|
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:Ud,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Zd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
705
|
-
function
|
|
706
|
-
function
|
|
707
|
-
b))}function
|
|
708
|
-
function
|
|
709
|
-
function
|
|
707
|
+
function Xo(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(r){if(1==r.g)return k?F(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.Ib(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},F(h,e(c,b),2);if(3!=h.g)return f=h.h,F(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)})}
|
|
708
|
+
function vo(a){var b=a.nf();if(a.s&&a.M&&a.C){var c=a.I;c.j=b;Sk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);No(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.ye<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.O&&(a.O=Math.min(a.O+ ++a.ye*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(oo("buffering",
|
|
709
|
+
b))}function Oo(a){var b=a.h.playbackRate;0!=b&&(a.I&&a.I.set(b),b=oo("ratechange"),a.dispatchEvent(b))}
|
|
710
|
+
function No(a){if(a.s&&a.M){var b=a.s.g,c="playing";a.M.g==Wf?c="buffering":a.h.ended?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(oo("statechanged",c)))}}
|
|
711
|
+
function ap(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.wg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.vd(d,!1):1==e&&b!==a.I.kc()&&a.Uc()}if(c&&(c=a.Pb(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(a.g.streaming.liveSync&&
|
|
710
712
|
a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?k=Math.max(0,a.i.serviceDescription.targetLatency-
|
|
711
713
|
d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.O||"number"!==typeof g||(a.O=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Da&&null!==a.O&&"number"===typeof g&&a.ye<n&&Date.now()-a.Da>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,a.O=Math.max(a.O-(g-f)/2,f+d),
|
|
712
|
-
a.Da=Date.now());e&&null!==a.O&&(h=a.O+d,k=a.O-d);g=c.end-a.h.currentTime;d=0;a.l==
|
|
713
|
-
function
|
|
714
|
-
function
|
|
715
|
-
function
|
|
716
|
-
function
|
|
717
|
-
function
|
|
718
|
-
function
|
|
719
|
-
q.disableStream=function(a,b){if(!this.g.abr.enabled||this.l===
|
|
720
|
-
k){return h+k.end-k.start},0);
|
|
721
|
-
function
|
|
722
|
-
function
|
|
723
|
-
function
|
|
724
|
-
function
|
|
725
|
-
function
|
|
726
|
-
function
|
|
714
|
+
a.Da=Date.now());e&&null!==a.O&&(h=a.O+d,k=a.O-d);g=c.end-a.h.currentTime;d=0;a.l==dp&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.M.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.vd(m,!1):h&&l&&g-d>h?(b!=l&&a.vd(l,!1),a.Da=null):k&&m&&g-d<k?(b!=m&&a.vd(m,!1),a.Da=null):b!==a.I.kc()&&(a.Uc(),a.Da=Date.now())}}
|
|
715
|
+
function bp(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.S)?(a.S=c,b=!0):(c=Math.max(a.S,c),a.S!=c&&(a.S=c,b=!0)));if(b){var d;0==a.S?d=oo("started"):25==a.S?d=oo("firstquartile"):50==a.S?d=oo("midpoint"):75==a.S?d=oo("thirdquartile"):100==a.S&&(d=oo("complete"));d&&a.dispatchEvent(d)}}}function Ko(a){try{ui(a.$d,a.i)}catch(c){return to(a,c),!1}var b=tf(a.i.variants);b=a.za.create(b);a.o.setVariants(Array.from(b.values()));return!0}
|
|
716
|
+
function lo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=Ko(a)?a.o.chooseVariant():null)&&Qo(a,f,e,b,c,d)}
|
|
717
|
+
function Qo(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Ol(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Ol(a.j,b,d,e,f,c);d=null;g&&(d=jf(g));b=jf(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Ij(a.K,b,a.gf()),c=oo("adaptation",c),up(a,c)):vp(a,d,b)}}
|
|
718
|
+
function mp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=rf(c),b=rf(b),vp(a,c,b))}function Yo(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Be(a.g.preferredTextLanguage);c=Be(c.language);if(2==a.g.autoShowText)return Ae(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Be(b.language);return Ae(c,d)&&!Ae(a,c)}Ya("Invalid autoShowText setting!");return!1}
|
|
719
|
+
function Jo(a){var b=oo("trackschanged");up(a,b)}function vp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Ij(a.K,c,a.gf());c=oo("variantchanged",b);up(a,c)}function lp(a){var b=oo("textchanged");up(a,b)}function Zo(a){var b=oo("texttrackvisibility");up(a,b)}function $o(a){a.g.abr.enabled||ko(a);var b=(new Map).set("newStatus",a.g.abr.enabled);up(a,oo("abrstatuschanged",b))}
|
|
720
|
+
function ko(a,b){b=void 0===b?!0:b;if(a.l==So){a.ie.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Ko(a)}}
|
|
721
|
+
q.disableStream=function(a,b){if(!this.g.abr.enabled||this.l===po||!navigator.onLine||0==b)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.ie.Ra(1);b=this.wb().video.reduce(function(h,
|
|
722
|
+
k){return h+k.end-k.start},0);lo(this,!1,b,!0,!1);return!0}return!1};
|
|
723
|
+
function to(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==po)return f.return();1===b.severity&&a.s.K++;c=!0;if(!(a.Ea&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ra(f,3);return F(f,im(a.j),5);case 5:d=f.h;c=!d;ta(f,2);break;case 3:ua(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&ko(a,!1);e=oo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);H(f)}})}
|
|
724
|
+
function Ho(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(oo(b,a))}
|
|
725
|
+
function Io(a,b,c,d){d=void 0===d?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(oo(d?"audiotrackchanged":"mediaqualitychanged",b))}
|
|
726
|
+
function so(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}function Po(a,b,c){0<b&&(a.V()||a.jh(b));b=a.getDuration();c<b&&(a.V()||a.Za(c))}function up(a,b){O(function(c){if(1==c.g)return F(c,Promise.resolve(),2);a.l!=po&&a.dispatchEvent(b);H(c)})}
|
|
727
|
+
function op(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(Be(c.language)):b.add("und");return b}
|
|
728
|
+
function np(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=Be(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));
|
|
727
729
|
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.kh;X.prototype.getManifestParserFactory=X.prototype.Th;X.prototype.getManifest=X.prototype.ff;X.prototype.retryStreaming=X.prototype.If;X.prototype.setMaxHardwareResolution=X.prototype.$i;X.prototype.addChaptersTrack=X.prototype.vh;X.prototype.addThumbnailsTrack=X.prototype.xh;X.prototype.addTextTrackAsync=X.prototype.wh;X.prototype.getStats=X.prototype.getStats;
|
|
728
730
|
X.prototype.getBufferedInfo=X.prototype.wb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Ld;X.prototype.getPresentationStartTimeAsDate=X.prototype.Cg;X.prototype.getPlayheadTimeAsDate=X.prototype.Yh;X.prototype.setTextTrackVisibility=X.prototype.gh;X.prototype.getChapters=X.prototype.Mh;X.prototype.getChaptersTracks=X.prototype.xg;X.prototype.isTextTrackVisible=X.prototype.qf;X.prototype.selectVariantsByLabel=X.prototype.Vi;X.prototype.selectTextLanguage=X.prototype.Lf;
|
|
729
731
|
X.prototype.selectAudioLanguage=X.prototype.Zg;X.prototype.getTextLanguages=X.prototype.bi;X.prototype.getAudioLanguages=X.prototype.Jh;X.prototype.getTextLanguagesAndRoles=X.prototype.ci;X.prototype.getAudioLanguagesAndRoles=X.prototype.Kh;X.prototype.selectVariantTrack=X.prototype.Mf;X.prototype.selectTextTrack=X.prototype.$g;X.prototype.getThumbnails=X.prototype.Dg;X.prototype.getAllThumbnails=X.prototype.Ih;X.prototype.getImageTracks=X.prototype.Qh;X.prototype.getTextTracks=X.prototype.Gc;
|
|
730
|
-
X.prototype.getVariantTracks=X.prototype.lc;X.prototype.cancelTrickPlay=X.prototype.Uc;X.prototype.trickPlay=X.prototype.
|
|
732
|
+
X.prototype.getVariantTracks=X.prototype.lc;X.prototype.cancelTrickPlay=X.prototype.Uc;X.prototype.trickPlay=X.prototype.vd;X.prototype.getPlaybackRate=X.prototype.fb;X.prototype.isBuffering=X.prototype.nf;X.prototype.getKeyStatuses=X.prototype.Jd;X.prototype.getActiveSessionsMetadata=X.prototype.ef;X.prototype.getExpiration=X.prototype.ad;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.ni;X.prototype.goToLive=X.prototype.ji;
|
|
731
733
|
X.prototype.seekRange=X.prototype.Pb;X.prototype.isAudioOnly=X.prototype.mi;X.prototype.isInProgress=X.prototype.nc;X.prototype.isLive=X.prototype.V;X.prototype.getAdManager=X.prototype.vg;X.prototype.getAssetUri=X.prototype.Fc;X.prototype.getNetworkingEngine=X.prototype.xb;X.prototype.getMediaElement=X.prototype.Wh;X.prototype.getManifestType=X.prototype.gf;X.prototype.getLoadMode=X.prototype.zg;X.prototype.resetConfiguration=X.prototype.Pi;X.prototype.getBufferFullness=X.prototype.wg;
|
|
732
734
|
X.prototype.getNonDefaultConfiguration=X.prototype.Bg;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.Li;X.prototype.destroyAllPreloads=X.prototype.Pe;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.rg;X.prototype.unloadAndSavePreload=X.prototype.cj;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.gj;X.prototype.unload=X.prototype.dc;
|
|
733
735
|
X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Bh;X.prototype.attach=X.prototype.Sb;
|
|
734
736
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return F(k,ni(),3);case 3:b=k.h;case 2:var l={};if(Sc())for(var m in yi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Sc()?!!yi[n]:Tc(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x($d));
|
|
735
|
-
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=oe(n)?!0:Sc()?lb(n)||(nc(n)?!0:!1):Tc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return F(k,sd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=
|
|
736
|
-
X.isBrowserSupported=function(){window.Promise||Ya("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Sc()?!0:Tc("application/x-mpegurl")};X.setAdManagerFactory=function(a){
|
|
737
|
-
X.registerSupportPlugin=function(a,b){
|
|
737
|
+
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=oe(n)?!0:Sc()?lb(n)||(nc(n)?!0:!1):Tc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return F(k,sd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=wp;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
738
|
+
X.isBrowserSupported=function(){window.Promise||Ya("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Sc()?!0:Tc("application/x-mpegurl")};X.setAdManagerFactory=function(a){jo=a};
|
|
739
|
+
X.registerSupportPlugin=function(a,b){wp[a]=b};X.prototype.destroy=X.prototype.destroy;var po=0,fo=1,So=2,dp=3;X.LoadMode={DESTROYED:po,NOT_LOADED:fo,MEDIA_SOURCE:So,SRC_EQUALS:dp};X.version="v4.10.21";var xp=["4","10"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(xp[0]),Number(xp[1])));var wp={},jo=null;function yp(){this.g=[];this.i=this.l=this.j=this.h=0}function zp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Ap(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new gb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Ap.prototype;q.needsSkipUI=function(){return!1};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
738
740
|
q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
739
741
|
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
740
742
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
741
|
-
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){
|
|
749
|
-
|
|
750
|
-
function
|
|
751
|
-
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
|
|
752
|
-
a.i.offsetHeight,
|
|
753
|
-
function
|
|
754
|
-
function
|
|
755
|
-
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
743
|
+
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",Ap);Ap.prototype.release=Ap.prototype.release;
|
|
744
|
+
Ap.prototype.getPodIndex=Ap.prototype.getPodIndex;Ap.prototype.getTimeOffset=Ap.prototype.getTimeOffset;Ap.prototype.getMediaUrl=Ap.prototype.getMediaUrl;Ap.prototype.getAdvertiserName=Ap.prototype.getAdvertiserName;Ap.prototype.getCreativeAdId=Ap.prototype.getCreativeAdId;Ap.prototype.getAdId=Ap.prototype.getAdId;Ap.prototype.getVastMediaWidth=Ap.prototype.getVastMediaWidth;Ap.prototype.getVastMediaHeight=Ap.prototype.getVastMediaHeight;Ap.prototype.getVastMediaBitrate=Ap.prototype.getVastMediaBitrate;
|
|
745
|
+
Ap.prototype.getDescription=Ap.prototype.getDescription;Ap.prototype.getTitle=Ap.prototype.getTitle;Ap.prototype.getPositionInSequence=Ap.prototype.getPositionInSequence;Ap.prototype.getSequenceLength=Ap.prototype.getSequenceLength;Ap.prototype.setMuted=Ap.prototype.setMuted;Ap.prototype.resize=Ap.prototype.resize;Ap.prototype.isLinear=Ap.prototype.isLinear;Ap.prototype.isMuted=Ap.prototype.isMuted;Ap.prototype.setVolume=Ap.prototype.setVolume;Ap.prototype.getVolume=Ap.prototype.getVolume;
|
|
746
|
+
Ap.prototype.play=Ap.prototype.play;Ap.prototype.pause=Ap.prototype.pause;Ap.prototype.skip=Ap.prototype.skip;Ap.prototype.canSkipNow=Ap.prototype.canSkipNow;Ap.prototype.getTimeUntilSkippable=Ap.prototype.getTimeUntilSkippable;Ap.prototype.isSkippable=Ap.prototype.isSkippable;Ap.prototype.isPaused=Ap.prototype.isPaused;Ap.prototype.getRemainingTime=Ap.prototype.getRemainingTime;Ap.prototype.getMinSuggestedDuration=Ap.prototype.getMinSuggestedDuration;Ap.prototype.getDuration=Ap.prototype.getDuration;
|
|
747
|
+
Ap.prototype.needsSkipUI=Ap.prototype.needsSkipUI;function Bp(){}S("shaka.ads.Utils",Bp);Bp.ADS_LOADED="ads-loaded";Bp.AD_STARTED="ad-started";Bp.AD_FIRST_QUARTILE="ad-first-quartile";Bp.AD_MIDPOINT="ad-midpoint";Bp.AD_THIRD_QUARTILE="ad-third-quartile";Bp.AD_COMPLETE="ad-complete";Bp.AD_STOPPED="ad-stopped";Bp.AD_SKIPPED="ad-skipped";Bp.AD_VOLUME_CHANGED="ad-volume-changed";Bp.AD_MUTED="ad-muted";Bp.AD_PAUSED="ad-paused";Bp.AD_RESUMED="ad-resumed";Bp.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Bp.CUEPOINTS_CHANGED="ad-cue-points-changed";
|
|
748
|
+
Bp.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Bp.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Bp.AD_CLICKED="ad-clicked";Bp.AD_PROGRESS="ad-progress";Bp.AD_BUFFERING="ad-buffering";Bp.AD_IMPRESSION="ad-impression";Bp.AD_DURATION_CHANGED="ad-duration-changed";Bp.AD_CLOSED="ad-closed";Bp.AD_LOADED="ad-loaded";Bp.ALL_ADS_COMPLETED="all-ads-completed";Bp.AD_LINEAR_CHANGED="ad-linear-changed";Bp.AD_METADATA="ad-metadata";Bp.AD_RECOVERABLE_ERROR="ad-recoverable-error";Bp.AD_ERROR="ad-error";
|
|
749
|
+
Bp.AD_BREAK_READY="ad-break-ready";Bp.AD_INTERACTION="ad-interaction";Bp.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Bp.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Bp.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Cp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.21");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
|
|
750
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Dp(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Ep(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.ja(this.i,"play",function(){f.F=!0})}Cp.prototype.configure=function(a){this.o=a};Cp.prototype.stop=function(){this.g&&this.g.stop();this.s&&sn(this.s)};
|
|
751
|
+
Cp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function Ep(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new U("ad-error",b));Fp(a,null);a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
752
|
+
function Dp(a,b){a.l(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.l(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
753
|
+
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Gp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
754
|
+
a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Hp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.ja(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){Fp(a,null)}}
|
|
755
|
+
function Hp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
756
|
+
function Gp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new U(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Ep(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Ip(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){Ip(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
757
|
+
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Fp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Fp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
756
758
|
a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
757
759
|
a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
|
|
758
760
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
759
|
-
function
|
|
760
|
-
function
|
|
761
|
+
function Ip(a,b){var c=b.getAd();c?(a.j=new Ap(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new U("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new U("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.o.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Ya("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
762
|
+
function Fp(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new U("ad-content-resume-requested"));a.l(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function Jp(a,b,c,d,e){this.g=a;this.h=b;this.j=c;this.l=d;this.i=e}q=Jp.prototype;q.needsSkipUI=function(){return!0};q.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h};
|
|
761
763
|
q.getTimeUntilSkippable=function(){return this.h?0:Math.max(this.getRemainingTime(),0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.j()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
762
764
|
q.getSequenceLength=function(){return this.l};q.getPositionInSequence=function(){return this.i};q.getTitle=function(){return""};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return""};q.getCreativeAdId=function(){return""};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};
|
|
763
|
-
q.release=function(){this.g=null};S("shaka.ads.InterstitialAd",
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
h=e.B.Pb();k=t(g);l=k.next();case 3:if(l.done){v.u(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.l;0<p&&10>=p&&(e.o.has(m)||e.o.set(m,e.h.preload(m.uri)));v.u(4);break}if(!e.o.has(m)){v.u(7);break}return F(v,e.o.get(m),8);case 8:(r=v.h)&&r.destroy(),e.o.delete(m);case 7:u=JSON.stringify(m),e.G.has(u)&&e.G.delete(u),e.A.delete(m),f=!0;case 4:l=k.next();v.u(3);break;case 5:f&&
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
function
|
|
771
|
-
b);c&&
|
|
772
|
-
function
|
|
773
|
-
C.g)return"detach"!=B.state?C.u(0):od()?F(C,new Promise(function(E){return(new Rc(E))
|
|
774
|
-
E.g)return n(),m&&m.stop(),(B=
|
|
775
|
-
B)));return F(C,p(),0)})},u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return F(B,p(),2)}a.g(new U("ad-complete"));H(B)})},v=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new U("ad-skipped"));return F(B,p(),0)})},w=new
|
|
776
|
-
a.g(new U("ad-first-quartile"))}),a.j.ja(a.h,"midpoint",function(){n();a.g(new U("ad-midpoint"))}),a.j.ja(a.h,"thirdquartile",function(){n();a.g(new U("ad-third-quartile"))}),a.j.ja(a.h,"complete",u),a.j.D(a.s,"play",function(){a.g(new U("ad-resumed"))}),a.j.D(a.s,"pause",function(){a.g(new U("ad-paused"))}),a.j.D(a.s,"volumechange",function(){a.s.muted?a.g(new U("ad-muted")):a.g(new U("ad-volume-changed"))}),ra(y,4),b.Ef&&(m=(new Rc(function(){w.skip()}))
|
|
765
|
+
q.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Jp);Jp.prototype.release=Jp.prototype.release;Jp.prototype.getPodIndex=Jp.prototype.getPodIndex;Jp.prototype.getTimeOffset=Jp.prototype.getTimeOffset;Jp.prototype.getMediaUrl=Jp.prototype.getMediaUrl;Jp.prototype.getAdvertiserName=Jp.prototype.getAdvertiserName;Jp.prototype.getCreativeAdId=Jp.prototype.getCreativeAdId;Jp.prototype.getAdId=Jp.prototype.getAdId;Jp.prototype.getVastMediaWidth=Jp.prototype.getVastMediaWidth;
|
|
766
|
+
Jp.prototype.getVastMediaHeight=Jp.prototype.getVastMediaHeight;Jp.prototype.getVastMediaBitrate=Jp.prototype.getVastMediaBitrate;Jp.prototype.getDescription=Jp.prototype.getDescription;Jp.prototype.getTitle=Jp.prototype.getTitle;Jp.prototype.getPositionInSequence=Jp.prototype.getPositionInSequence;Jp.prototype.getSequenceLength=Jp.prototype.getSequenceLength;Jp.prototype.setMuted=Jp.prototype.setMuted;Jp.prototype.resize=Jp.prototype.resize;Jp.prototype.isLinear=Jp.prototype.isLinear;
|
|
767
|
+
Jp.prototype.isMuted=Jp.prototype.isMuted;Jp.prototype.setVolume=Jp.prototype.setVolume;Jp.prototype.getVolume=Jp.prototype.getVolume;Jp.prototype.play=Jp.prototype.play;Jp.prototype.pause=Jp.prototype.pause;Jp.prototype.skip=Jp.prototype.skip;Jp.prototype.canSkipNow=Jp.prototype.canSkipNow;Jp.prototype.getTimeUntilSkippable=Jp.prototype.getTimeUntilSkippable;Jp.prototype.isSkippable=Jp.prototype.isSkippable;Jp.prototype.isPaused=Jp.prototype.isPaused;Jp.prototype.getRemainingTime=Jp.prototype.getRemainingTime;
|
|
768
|
+
Jp.prototype.getMinSuggestedDuration=Jp.prototype.getMinSuggestedDuration;Jp.prototype.getDuration=Jp.prototype.getDuration;Jp.prototype.needsSkipUI=Jp.prototype.needsSkipUI;function Kp(a,b,c,d){var e=this;this.F=a;this.B=b;this.i=c;this.C=null;this.m=!0;this.s=this.i;this.g=d;this.G=new Set;this.A=new Set;this.o=new Map;this.h=new X;Lp(this);this.I=new gb;this.j=new gb;this.H=!1;this.l=null;this.I.D(this.i,"timeupdate",function(){if(!e.H){var f=null==e.l||0==e.l;e.l=e.i.currentTime;(f=Mp(e,f))&&Np(e,f,1,1,Date.now())}});this.K=(new Rc(function(){var f,g,h,k,l,m,n,p,r,u;return O(function(v){switch(v.g){case 1:if(!e.A.size||e.H||null==e.l){v.u(0);break}f=!1;g=Array.from(e.A);
|
|
769
|
+
h=e.B.Pb();k=t(g);l=k.next();case 3:if(l.done){v.u(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.l;0<p&&10>=p&&(e.o.has(m)||e.o.set(m,e.h.preload(m.uri)));v.u(4);break}if(!e.o.has(m)){v.u(7);break}return F(v,e.o.get(m),8);case 8:(r=v.h)&&r.destroy(),e.o.delete(m);case 7:u=JSON.stringify(m),e.G.has(u)&&e.G.delete(u),e.A.delete(m),f=!0;case 4:l=k.next();v.u(3);break;case 5:f&&Op(e),H(v)}})})).Ra(1)}
|
|
770
|
+
Kp.prototype.configure=function(a){this.F&&this.m==a.supportsMultipleMediaElements&&((this.m=!a.supportsMultipleMediaElements)?(this.s=this.i,this.C&&(this.C.parentElement&&this.F.removeChild(this.C),this.C=null)):(this.C||(a=document.createElement(this.i.tagName),a.autoplay=!0,a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.backgroundColor="rgb(0, 0, 0)",a.setAttribute("playsinline",""),this.C=a),this.s=this.C))};
|
|
771
|
+
Kp.prototype.stop=function(){this.j&&this.j.Qa();this.G.clear();this.A.clear();this.h.Pe();this.o.clear();this.h.detach();this.H=!1;this.l=null};Kp.prototype.release=function(){this.stop();this.I&&this.I.release();this.j&&this.j.release();this.F&&sn(this.F);this.K&&(this.K.stop(),this.K=null);this.h.destroy()};
|
|
772
|
+
function Pp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.B.zg()==dp&&a.m)return Ya("Unsupported interstitial when using single media element",b),m.return();Lp(a);c=!1;return F(m,Qp(a,b),2)}d=m.h;if(d.length)for(e=t(d),f=e.next();!f.done;f=e.next())(g=f.value,h=JSON.stringify(g),a.G.has(h))||(c=!0,a.G.add(h),a.A.add(g),k=!1,b.Ab&&null==a.l?k=!0:0!=g.startTime||g.He?null!=a.l&&(l=b.startTime-a.l,0<l&&10>=l&&(k=!0)):k=!0,k&&(a.o.has(g)||a.o.set(g,a.h.preload(g.uri))));else Ya("Unsupported interstitial",
|
|
773
|
+
b);c&&Op(a);H(m)})}function Mp(a,b,c){c=void 0===c?0:c;var d=0,e=null;if(a.A.size&&null!=a.l){var f=a.i.ended,g=Array.from(a.A).sort(function(l,m){return m.startTime-l.startTime});g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;b?k=h.Ab:f?k=h.qc:h.Ab||h.qc||(k=a.l-Math.round(1E3*h.startTime)/1E3,k=0<k&&(1>=k||!h.He));if(k){if(d==c){e=h;break}d++}}}return e}
|
|
774
|
+
function Np(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,v,w,A,z,D;O(function(y){switch(y.g){case 1:g=Date.now();!a.s.parentElement&&a.F&&a.F.appendChild(a.s);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.Ab?B.Ab==b.Ab:b.qc?B.qc==b.qc:.001>Math.abs(B.startTime-b.startTime)}).length);if(b.once||b.Ab)f++,a.A.delete(b),Op(a);a.H=!0;if(!a.m||1!=d){y.u(2);break}a.g(new U("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new ag;k=function(B){return O(function(C){if(1==
|
|
775
|
+
C.g)return"detach"!=B.state?C.u(0):od()?F(C,new Promise(function(E){return(new Rc(E)).$(.1)}),3):C.u(3);h.resolve();a.j.kb(a.B,"onstatechange",k);H(C)})};a.j.D(a.B,"onstatechange",k);return F(y,h,2);case 2:return a.m||(a.i.pause(),null!=b.Pc&&0!=b.Pc&&(a.i.currentTime+=b.Pc)),l=!1,m=null,n=function(){if(!a.m&&null==b.Pc)if(b.re&&b.endTime&&Infinity!=b.endTime)a.i.currentTime!=b.endTime&&(a.i.currentTime=b.endTime);else{var B=Date.now();a.i.currentTime+=(B-e)/1E3;e=B}},p=function(){var B,C;return O(function(E){if(1==
|
|
776
|
+
E.g)return n(),m&&m.stop(),(B=Mp(a,b.Ab,d-f))?(a.g(new U("ad-stopped")),a.j.Qa(),Np(a,B,c,++d,e,f),E.u(0)):a.m?F(E,a.h.detach(),4):F(E,a.h.dc(),4);a.m&&(C=b.Pc,null==C&&(C=b.re&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.l||0):(Date.now()-e)/1E3),a.g(new U("ad-content-resume-requested",(new Map).set("offset",C))));a.g(new U("ad-stopped"));a.j.Qa();a.H=!1;a.m||(n(),a.i.ended||a.i.play());H(E)})},r=function(B){return O(function(C){if(l)return C.return();l=!0;a.g(new U("ad-error",(new Map).set("originalEvent",
|
|
777
|
+
B)));return F(C,p(),0)})},u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return F(B,p(),2)}a.g(new U("ad-complete"));H(B)})},v=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new U("ad-skipped"));return F(B,p(),0)})},w=new Jp(a.s,b.isSkippable,v,c,d),a.m||(w.setMuted(a.i.muted),w.setVolume(a.i.volume)),a.g(new U("ad-started",(new Map).set("ad",w))),w.canSkipNow()&&a.g(new U("ad-skip-state-changed")),a.j.ja(a.h,"error",r),a.j.ja(a.h,"firstquartile",function(){n();
|
|
778
|
+
a.g(new U("ad-first-quartile"))}),a.j.ja(a.h,"midpoint",function(){n();a.g(new U("ad-midpoint"))}),a.j.ja(a.h,"thirdquartile",function(){n();a.g(new U("ad-third-quartile"))}),a.j.ja(a.h,"complete",u),a.j.D(a.s,"play",function(){a.g(new U("ad-resumed"))}),a.j.D(a.s,"pause",function(){a.g(new U("ad-paused"))}),a.j.D(a.s,"volumechange",function(){a.s.muted?a.g(new U("ad-muted")):a.g(new U("ad-volume-changed"))}),ra(y,4),b.Ef&&(m=(new Rc(function(){w.skip()})).$(b.Ef)),Lp(a),F(y,a.h.Sb(a.s),6);case 6:return a.o.has(b)?
|
|
777
779
|
F(y,a.o.get(b),10):F(y,a.h.load(b.uri),8);case 10:return A=y.h,a.o.delete(b),A?F(y,a.h.load(A),8):F(y,a.h.load(b.uri),8);case 8:z=(Date.now()-g)/1E3;a.g(new U("ads-loaded",(new Map).set("loadTime",z)));a.m&&a.i.play();ta(y,0);break;case 4:D=ua(y),r(D),H(y)}})}
|
|
778
|
-
function
|
|
780
|
+
function Qp(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R;return O(function(Q){switch(Q.g){case 1:c=[];if(!b)return Q.return(c);d=b.values.find(function(W){return"X-ASSET-URI"==W.key});e=b.values.find(function(W){return"X-ASSET-LIST"==W.key});if(!d&&!e)return Q.return(c);f=b.values.find(function(W){return"X-RESTRICT"==W.key});h=g=!0;f&&f.data&&(k=f.data,g=!k.includes("SKIP"),h=!k.includes("JUMP"));l=null;if(m=b.values.find(function(W){return"X-RESUME-OFFSET"==W.key}))n=m.data,
|
|
779
781
|
l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(r=b.values.find(function(W){return"X-PLAYOUT-LIMIT"==W.key}))u=r.data,p=parseFloat(u),isNaN(p)&&(p=null);A=w=v=!1;if(z=b.values.find(function(W){return"CUE"==W.key}))D=z.data,v=D.includes("ONCE"),w=D.includes("PRE"),A=D.includes("POST");y=!1;(B=b.values.find(function(W){return"X-TIMELINE-OCCUPIES"==W.key}))?(C=B.data,y=C.includes("RANGE")):!m&&a.B.V()&&(y=!w&&!A);if(d){E=d.data;if(!E)return Q.return(c);c.push({startTime:b.startTime,endTime:b.endTime,uri:E,
|
|
780
782
|
isSkippable:g,He:h,Pc:l,Ef:p,once:v,Ab:w,qc:A,re:y});Q.u(2);break}if(!e){Q.u(2);break}G=e.data;if(!G)return Q.return(c);L=sg([G],Zf());K=a.B.xb().request(7,L);ra(Q,4);return F(Q,K.promise,6);case 6:I=Q.h;J=vd(I.data);M=JSON.parse(J);N=t(M.ASSETS);for(P=N.next();!P.done;P=N.next())R=P.value,R.URI&&c.push({startTime:b.startTime,endTime:b.endTime,uri:R.URI,isSkippable:g,He:h,Pc:l,Ef:p,once:v,Ab:w,qc:A,re:y});ta(Q,2);break;case 4:ua(Q);case 2:return Q.return(c)}})}
|
|
781
|
-
function
|
|
783
|
+
function Op(a){for(var b=[],c=t(a.A),d=c.next(),e={};!d.done;e={Rb:void 0},d=c.next())d=d.value,e.Rb={start:d.startTime,end:null},d.Ab?(e.Rb.start=0,e.Rb.end=null):d.qc?(e.Rb.start=-1,e.Rb.end=null):d.re&&(e.Rb.end=d.endTime),b.find(function(f){return function(g){return f.Rb.start==g.start&&f.Rb.end==g.end}}(e))||b.push(e.Rb);a.g(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}function Lp(a){a.h.configure(a.B.Bg());var b=a.h.xb();b.mg();b.ng();rg(a.B.xb(),b)};function Rp(a){this.h=a||"";this.g=0}function Sp(a){Tp(a,/[ \t]+/gm)}function Tp(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 Up(a){return a.g==a.h.length?null:(a=Tp(a,/[^ \t\n]*/gm))?a[0]:null};function Vp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Tp(new Rp(a),Wp),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}q=Vp.prototype;q.needsSkipUI=function(){return!0};q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
782
784
|
q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};
|
|
783
785
|
q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return this.o};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};
|
|
784
|
-
q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
function
|
|
786
|
+
q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Vp);Vp.prototype.release=Vp.prototype.release;
|
|
787
|
+
Vp.prototype.getPodIndex=Vp.prototype.getPodIndex;Vp.prototype.getTimeOffset=Vp.prototype.getTimeOffset;Vp.prototype.getMediaUrl=Vp.prototype.getMediaUrl;Vp.prototype.getAdvertiserName=Vp.prototype.getAdvertiserName;Vp.prototype.getCreativeAdId=Vp.prototype.getCreativeAdId;Vp.prototype.getAdId=Vp.prototype.getAdId;Vp.prototype.getVastMediaWidth=Vp.prototype.getVastMediaWidth;Vp.prototype.getVastMediaHeight=Vp.prototype.getVastMediaHeight;Vp.prototype.getVastMediaBitrate=Vp.prototype.getVastMediaBitrate;
|
|
788
|
+
Vp.prototype.getDescription=Vp.prototype.getDescription;Vp.prototype.getTitle=Vp.prototype.getTitle;Vp.prototype.getPositionInSequence=Vp.prototype.getPositionInSequence;Vp.prototype.getSequenceLength=Vp.prototype.getSequenceLength;Vp.prototype.setMuted=Vp.prototype.setMuted;Vp.prototype.resize=Vp.prototype.resize;Vp.prototype.isLinear=Vp.prototype.isLinear;Vp.prototype.isMuted=Vp.prototype.isMuted;Vp.prototype.setVolume=Vp.prototype.setVolume;Vp.prototype.getVolume=Vp.prototype.getVolume;
|
|
789
|
+
Vp.prototype.play=Vp.prototype.play;Vp.prototype.pause=Vp.prototype.pause;Vp.prototype.skip=Vp.prototype.skip;Vp.prototype.canSkipNow=Vp.prototype.canSkipNow;Vp.prototype.getTimeUntilSkippable=Vp.prototype.getTimeUntilSkippable;Vp.prototype.isSkippable=Vp.prototype.isSkippable;Vp.prototype.isPaused=Vp.prototype.isPaused;Vp.prototype.getRemainingTime=Vp.prototype.getRemainingTime;Vp.prototype.getMinSuggestedDuration=Vp.prototype.getMinSuggestedDuration;Vp.prototype.getDuration=Vp.prototype.getDuration;
|
|
790
|
+
Vp.prototype.needsSkipUI=Vp.prototype.needsSkipUI;var Wp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Xp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.S=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.M=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.O=!0;this.H="";this.o=new gb}Xp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.kb(b.target,b.type,b.listener);Yp(this);this.m=[];this.s=[];this.G="";this.O=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
791
|
+
Xp.prototype.release=function(){this.stop();this.o&&this.o.release()};Xp.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(Zp(this,this.G,this.O),this.O=!1)};Xp.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};
|
|
792
|
+
function $p(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=sg([b],Zf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Ad(e)),f=a.K.request(7,d),ra(u,2),F(u,f.promise,4);if(2!=u.g){g=u.h;h=vd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new tc(b),m=new tc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.S,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),r=new tc(k.manifestUrl),a.l.resolve(l.resolve(r).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
791
793
|
return ta(u,0)}ua(u);if(!a.H.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.H);a.l=null;H(u)})}
|
|
792
|
-
function
|
|
793
|
-
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),
|
|
794
|
-
function
|
|
795
|
-
function
|
|
796
|
-
function
|
|
797
|
-
function
|
|
798
|
-
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&
|
|
799
|
-
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(
|
|
800
|
-
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.M=e;a.g=new
|
|
801
|
-
function
|
|
802
|
-
function
|
|
794
|
+
function Zp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;O(function(z){if(1==z.g)return d=sg([b],Zf()),e=a.K.request(7,d),ra(z,2),F(z,e.promise,4);if(2!=z.g){f=z.h;g=[];h=vd(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,p=t(n.nonLinearAdsList),r=p.next();!r.done;r=p.next())for(u=r.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,aq(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
|
|
795
|
+
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Yp(a),a.j=[];c&&(a.I||0<g.length)&&bq(a);return ta(z,0)}ua(z);H(z)})}
|
|
796
|
+
function aq(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=cq(b);if(d=a.F.get(c))return m.return();e=sg([b.staticResource],Zf());f=a.K.request(7,e);ra(m,2);a.F.set(c,[]);return F(m,f.promise,4)}if(2!=m.g)return g=m.h,h=vd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ta(m,0);ua(m);a.F.delete(c);H(m)})}
|
|
797
|
+
function cq(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function bq(a){dq(a);a.I||(eq(a),a.o.D(a.h,"seeked",function(){eq(a)}),a.o.D(a.h,"ended",function(){Yp(a)}));a.o.D(a.h,"timeupdate",function(){dq(a)})}
|
|
798
|
+
function eq(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
799
|
+
function dq(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),fq(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),fq(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),fq(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
800
|
+
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&fq(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Yp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Yp(a);a.M=e;a.g=new Vp(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&fq(a,"breakStart");gq(a);break}}}if(!a.g)for(d=
|
|
801
|
+
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(cq(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Yp(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
|
|
802
|
+
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.M=e;a.g=new Vp(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&fq(a,"breakStart");gq(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
803
|
+
function Yp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?fq(a,"skip"):fq(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.kb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&fq(a,"breakEnd");a.g=null;a.C=null;a.M=null}}
|
|
804
|
+
function gq(a){var b=!1;a.h.paused?b=!0:(fq(a,"impression"),fq(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&fq(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||fq(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(fq(a,"impression"),fq(a,"start"),b=!1):fq(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){fq(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
|
|
803
805
|
d.type,d.listener)}
|
|
804
|
-
function
|
|
806
|
+
function fq(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=sg([d],Zf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
|
|
805
807
|
case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
|
|
806
|
-
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function
|
|
808
|
+
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function hq(a,b){this.g=a;this.i=null;this.h=b}q=hq.prototype;q.needsSkipUI=function(){return!0};q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};
|
|
807
809
|
q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};
|
|
808
810
|
q.setMuted=function(a){this.h.muted=a};q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
809
|
-
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new
|
|
811
|
+
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",hq);hq.prototype.release=hq.prototype.release;
|
|
812
|
+
hq.prototype.getPodIndex=hq.prototype.getPodIndex;hq.prototype.getTimeOffset=hq.prototype.getTimeOffset;hq.prototype.getMediaUrl=hq.prototype.getMediaUrl;hq.prototype.getAdvertiserName=hq.prototype.getAdvertiserName;hq.prototype.getCreativeAdId=hq.prototype.getCreativeAdId;hq.prototype.getAdId=hq.prototype.getAdId;hq.prototype.getVastMediaWidth=hq.prototype.getVastMediaWidth;hq.prototype.getVastMediaHeight=hq.prototype.getVastMediaHeight;hq.prototype.getVastMediaBitrate=hq.prototype.getVastMediaBitrate;
|
|
813
|
+
hq.prototype.getDescription=hq.prototype.getDescription;hq.prototype.getTitle=hq.prototype.getTitle;hq.prototype.getPositionInSequence=hq.prototype.getPositionInSequence;hq.prototype.getSequenceLength=hq.prototype.getSequenceLength;hq.prototype.setMuted=hq.prototype.setMuted;hq.prototype.resize=hq.prototype.resize;hq.prototype.isLinear=hq.prototype.isLinear;hq.prototype.isMuted=hq.prototype.isMuted;hq.prototype.setVolume=hq.prototype.setVolume;hq.prototype.getVolume=hq.prototype.getVolume;
|
|
814
|
+
hq.prototype.play=hq.prototype.play;hq.prototype.pause=hq.prototype.pause;hq.prototype.skip=hq.prototype.skip;hq.prototype.canSkipNow=hq.prototype.canSkipNow;hq.prototype.getTimeUntilSkippable=hq.prototype.getTimeUntilSkippable;hq.prototype.isSkippable=hq.prototype.isSkippable;hq.prototype.isPaused=hq.prototype.isPaused;hq.prototype.getRemainingTime=hq.prototype.getRemainingTime;hq.prototype.getMinSuggestedDuration=hq.prototype.getMinSuggestedDuration;hq.prototype.getDuration=hq.prototype.getDuration;
|
|
815
|
+
hq.prototype.needsSkipUI=hq.prototype.needsSkipUI;function iq(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new gb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){jq(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
816
|
+
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new hq(f,e.l);e.A&&(e.m.i=e.A);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
815
817
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
|
|
816
818
|
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.D(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.C=
|
|
817
|
-
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=
|
|
818
|
-
function
|
|
819
|
-
q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new
|
|
820
|
-
q.onAssetUnload=function(){this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new
|
|
821
|
-
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new
|
|
822
|
-
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new
|
|
823
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('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.10.
|
|
824
|
-
(c.G=!0),c.j=new ag,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Ya('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.10.
|
|
825
|
-
q.getServerSideCuePoints=function(){qb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:
|
|
826
|
-
q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};q.onInterstitialMetadata=function(a,b,c){this.j||this.initInterstitial(null,a,b);this.j&&
|
|
827
|
-
function
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
819
|
+
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=iq.prototype;q.configure=function(){};q.stop=function(){this.B="";this.o=null;this.C=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.C};
|
|
820
|
+
function jq(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(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.o=c,a.l.currentTime=d.start)}})};function kq(){kg.call(this);this.g=this.h=this.i=this.j=null;this.m=new yp;this.o=navigator.language;this.l=null}na(kq,kg);q=kq.prototype;q.setLocale=function(a){this.o=a};q.configure=function(a){this.l=a;this.j&&this.j.configure(this.l);this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};q.initInterstitial=function(a,b,c){var d=this;this.j&&this.j.release();this.j=new Kp(a,b,c,function(e){return lq(d,e)});this.j.configure(this.l)};
|
|
821
|
+
q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new Cp(a,b,this.o,c,function(e){return lq(d,e)});this.i.configure(this.l)};q.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);kg.prototype.release.call(this)};
|
|
822
|
+
q.onAssetUnload=function(){this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new yp};q.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
|
|
823
|
+
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Xp(a,b,c,function(e){return lq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new ag,$p(d,a,b),d.H=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
824
|
+
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new iq(a,b,this.o,function(d){return lq(c,d)});this.g.configure(this.l)};
|
|
825
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('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.10.21";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
826
|
+
(c.G=!0),c.j=new ag,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Ya('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.10.21";this.g.g.replaceAdTagParameters(a)};
|
|
827
|
+
q.getServerSideCuePoints=function(){qb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:zp(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
828
|
+
q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};q.onInterstitialMetadata=function(a,b,c){this.j||this.initInterstitial(null,a,b);this.j&&Pp(this.j,c)};
|
|
829
|
+
function lq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",kq);kq.prototype.onInterstitialMetadata=kq.prototype.onInterstitialMetadata;kq.prototype.onCueMetadataChange=kq.prototype.onCueMetadataChange;kq.prototype.onHlsTimedMetadata=kq.prototype.onHlsTimedMetadata;kq.prototype.onDashTimedMetadata=kq.prototype.onDashTimedMetadata;
|
|
830
|
+
kq.prototype.onManifestUpdated=kq.prototype.onManifestUpdated;kq.prototype.getStats=kq.prototype.getStats;kq.prototype.getCuePoints=kq.prototype.getCuePoints;kq.prototype.getServerSideCuePoints=kq.prototype.getServerSideCuePoints;kq.prototype.replaceServerSideAdTagParameters=kq.prototype.replaceServerSideAdTagParameters;kq.prototype.requestServerSideStream=kq.prototype.requestServerSideStream;kq.prototype.initServerSide=kq.prototype.initServerSide;kq.prototype.addMediaTailorTrackingUrl=kq.prototype.addMediaTailorTrackingUrl;
|
|
831
|
+
kq.prototype.requestMediaTailorStream=kq.prototype.requestMediaTailorStream;kq.prototype.initMediaTailor=kq.prototype.initMediaTailor;kq.prototype.updateClientSideAdsRenderingSettings=kq.prototype.updateClientSideAdsRenderingSettings;kq.prototype.requestClientSideAds=kq.prototype.requestClientSideAds;kq.prototype.onAssetUnload=kq.prototype.onAssetUnload;kq.prototype.release=kq.prototype.release;kq.prototype.initClientSide=kq.prototype.initClientSide;kq.prototype.initInterstitial=kq.prototype.initInterstitial;
|
|
832
|
+
kq.prototype.configure=kq.prototype.configure;kq.prototype.setLocale=kq.prototype.setLocale;kq.ADS_LOADED="ads-loaded";kq.AD_STARTED="ad-started";kq.AD_FIRST_QUARTILE="ad-first-quartile";kq.AD_MIDPOINT="ad-midpoint";kq.AD_THIRD_QUARTILE="ad-third-quartile";kq.AD_COMPLETE="ad-complete";kq.AD_STOPPED="ad-stopped";kq.AD_SKIPPED="ad-skipped";kq.AD_VOLUME_CHANGED="ad-volume-changed";kq.AD_MUTED="ad-muted";kq.AD_PAUSED="ad-paused";kq.AD_RESUMED="ad-resumed";kq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";
|
|
833
|
+
kq.CUEPOINTS_CHANGED="ad-cue-points-changed";kq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";kq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";kq.AD_CLICKED="ad-clicked";kq.AD_PROGRESS="ad-progress";kq.AD_BUFFERING="ad-buffering";kq.AD_IMPRESSION="ad-impression";kq.AD_DURATION_CHANGED="ad-duration-changed";kq.AD_CLOSED="ad-closed";kq.AD_LOADED="ad-loaded";kq.ALL_ADS_COMPLETED="all-ads-completed";kq.AD_LINEAR_CHANGED="ad-linear-changed";kq.AD_METADATA="ad-metadata";
|
|
834
|
+
kq.AD_RECOVERABLE_ERROR="ad-recoverable-error";kq.AD_ERROR="ad-error";kq.AD_BREAK_READY="ad-break-ready";kq.AD_INTERACTION="ad-interaction";kq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";kq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";kq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";jo=function(){return new kq};function mq(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
|
|
833
835
|
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Pi(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}})}
|
|
834
|
-
function
|
|
835
|
-
function
|
|
836
|
-
var
|
|
837
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1},
|
|
838
|
-
|
|
839
|
-
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;
|
|
840
|
-
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.vc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(
|
|
841
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new ag,this.s=!0,
|
|
842
|
-
q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!
|
|
843
|
-
q.get=function(a,b){var c=this;if("video"==a){if(
|
|
844
|
-
q.set=function(a,b,c){this.g[a][b]=c;
|
|
845
|
-
q.Wg=function(a,b){
|
|
846
|
-
function
|
|
847
|
-
function
|
|
848
|
-
q.destroy=function(a){a&&this.g.Ec();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.s=this.l=this.i=null;kg.prototype.release.call(this);return Promise.all(a)};q.hi=function(){return this.l};q.Xh=function(){return this.s};q.Ch=function(){return this.g.m&&
|
|
849
|
-
q.cast=function(){var a=this;return O(function(b){return 1==b.g?F(b,a.g.cast(),2):a.h?F(b,a.h.dc(),0):b.return()})};q.Nf=function(a){this.g.Nf(a)};q.bj=function(){
|
|
850
|
-
q.Dh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.Ec();return F(d,c.g.destroy(),2)}c.g=null;c.g=new
|
|
851
|
-
function
|
|
852
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
853
|
-
function
|
|
854
|
-
function
|
|
855
|
-
function
|
|
856
|
-
function
|
|
857
|
-
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(
|
|
858
|
-
function
|
|
859
|
-
function
|
|
860
|
-
if("setVideoContainer"==b)return function(c){return a.h.kh(c)};if(a.g.
|
|
861
|
-
function
|
|
862
|
-
|
|
836
|
+
function nq(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=oq(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})}
|
|
837
|
+
function oq(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
838
|
+
var pq="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),qq="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),rq=["loop","playbackRate"],sq=["pause","play"],tq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
839
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1},uq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},vq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},wq=[["getConfiguration","configure"]],xq=[["isTextTrackVisible","setTextTrackVisibility"]],yq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
840
|
+
zq=["attach","attachCanvas","detach","load","unload"];function Aq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Rc(b);this.M=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Bq(h)};this.C=function(k,l){k=nq(l);switch(k.type){case "event":var m=k.targetName,n=ig(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.s&&(h.M(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
|
|
841
|
+
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Cq.add(this)}q=Aq.prototype;q.destroy=function(){Cq.delete(this);Dq(this);Eq&&Fq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};q.gb=function(){return this.h};q.Ff=function(){return this.I};
|
|
842
|
+
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.vc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Cq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new ag;d.s=!0;Gq(d,e)}},function(b){for(var c=t(Cq),d=c.next();!d.done;d=c.next())d=d.value,Hq="available"==b,d.l.vc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Hq&&this.l.$(Iq);(a=Eq)&&
|
|
843
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new ag,this.s=!0,Gq(this,a)):Eq=null}else window.__onGCastApiAvailable!==Jq&&(Kq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Jq)};q.Nf=function(a){this.o=a;this.h&&Lq(this,{type:"appData",appData:this.o})};
|
|
844
|
+
q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!Hq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new ag;chrome.cast.requestSession(function(c){return Gq(a,c)},function(c){return Mq(a,c)});return F(b,a.j,0)})};function Nq(a){a.h&&chrome.cast.requestSession(function(b){return Gq(a,b)},function(b){return Mq(a,b)})}q.Ec=function(){if(this.h){Dq(this);if(Eq){Fq(this);try{Eq.stop(function(){},function(){})}catch(a){}Eq=null}Bq(this)}};
|
|
845
|
+
q.get=function(a,b){var c=this;if("video"==a){if(sq.includes(b))return function(){return c.Wg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))}}else if("player"==a){if(vq[b]&&!this.get("player","isLive")())return function(){};if(yq.includes(b))return function(){return c.Wg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(zq.includes(b))return function(){return c.Mi.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(tq[b]||uq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
846
|
+
q.set=function(a,b,c){this.g[a][b]=c;Lq(this,{type:"set",targetName:a,property:b,value:c})};function Gq(a,b){var c=a.N();Eq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Bq(a);Lq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Mq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
|
|
847
|
+
q.Wg=function(a,b){Lq(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.Mi=function(a,b){var c=Ha.apply(2,arguments),d=new ag,e=this.H.toString();this.H++;this.i[e]=d;try{Lq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Fq(a){var b=Eq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
848
|
+
function Bq(a){var b=Eq?"connected"==Eq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Dq(a)}a.h=b;a.I=b?Eq.receiver.friendlyName:"";a.l.vc()}function Dq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function Lq(a,b){b=mq(b);var c=Eq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},cb)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.Ec(),b;}}var Iq=.02,Hq=!1,Eq=null,Kq=null,Cq=new Set;
|
|
849
|
+
function Jq(a){Kq?window.__onGCastApiAvailable=Kq:delete window.__onGCastApiAvailable;Kq=null;if(a)for(var b=t(Cq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Oq(a,b,c,d){d=void 0===d?!1:d;kg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Aq(c,function(){return Pq(e)},function(){return Qq(e)},function(f,g){return Rq(e,f,g)},function(){return Sq(e)},function(){return Tq(e)},d);Uq(this)}na(Oq,kg);q=Oq.prototype;
|
|
850
|
+
q.destroy=function(a){a&&this.g.Ec();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.s=this.l=this.i=null;kg.prototype.release.call(this);return Promise.all(a)};q.hi=function(){return this.l};q.Xh=function(){return this.s};q.Ch=function(){return this.g.m&&Hq};q.gb=function(){return this.g.gb()};q.Ff=function(){return this.g.Ff()};
|
|
851
|
+
q.cast=function(){var a=this;return O(function(b){return 1==b.g?F(b,a.g.cast(),2):a.h?F(b,a.h.dc(),0):b.return()})};q.Nf=function(a){this.g.Nf(a)};q.bj=function(){Nq(this.g)};q.Ec=function(){this.g.Ec()};
|
|
852
|
+
q.Dh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.Ec();return F(d,c.g.destroy(),2)}c.g=null;c.g=new Aq(a,function(){return Pq(c)},function(){return Qq(c)},function(e,f){return Rq(c,e,f)},function(){return Sq(c)},function(){return Tq(c)},b);c.g.init();H(d)})};
|
|
853
|
+
function Uq(a){a.g.init();a.m=new gb;for(var b=t(pq),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.gb()||(f=ig(f),a.j.dispatchEvent(f))});for(var d in jg)a.m.D(a.h,jg[d],function(f){a.g.gb()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={md:b.md},b.md=e,Object.defineProperty(a.l,b.md,{configurable:!1,enumerable:!0,get:function(f){return function(){return Vq(a,f.md)}}(b),set:function(f){return function(g){var h=f.md;a.g.gb()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Wq(a,
|
|
854
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Xq(a,f)}})});Yq(a);a.j=new kg;a.j.le=a.l;a.o=new kg;a.o.le=a.s}function Yq(a){var b=new Map;Wq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
855
|
+
function Wq(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)}}
|
|
856
|
+
function Tq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Fc(),startTime:null};a.i.pause();for(var c=t(rq),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(wq);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(xq);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 Pq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
|
|
857
|
+
function Qq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
858
|
+
function Sq(a){for(var b=t(wq),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(rq);for(d=c.next();!d.done;d=c.next())d=
|
|
859
|
+
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(rq),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(xq);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.gh(h);g&&a.h.Lf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new U("error",l);a.h.dispatchEvent(l)})}
|
|
860
|
+
function Vq(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.gb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.gb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
861
|
+
function Xq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.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.xb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.vg()};
|
|
862
|
+
if("setVideoContainer"==b)return function(c){return a.h.kh(c)};if(a.g.gb()){if("getManifest"==b||"drmInfo"==b)return function(){Ya(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ya(b+"() does not work while casting!");return Promise.resolve()}}return a.g.gb()&&0==Object.keys(a.g.g.video).length&&(tq[b]||uq[b])||!a.g.gb()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
863
|
+
function Rq(a,b,c){a.g.gb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",Oq);Oq.prototype.changeReceiverId=Oq.prototype.Dh;Oq.prototype.forceDisconnect=Oq.prototype.Ec;Oq.prototype.suggestDisconnect=Oq.prototype.bj;Oq.prototype.setAppData=Oq.prototype.Nf;Oq.prototype.cast=Oq.prototype.cast;Oq.prototype.receiverName=Oq.prototype.Ff;Oq.prototype.isCasting=Oq.prototype.gb;Oq.prototype.canCast=Oq.prototype.Ch;Oq.prototype.getPlayer=Oq.prototype.Xh;
|
|
864
|
+
Oq.prototype.getVideo=Oq.prototype.hi;Oq.prototype.destroy=Oq.prototype.destroy;function Zq(a,b,c,d){kg.call(this);var e=this;this.g=a;this.h=b;this.j=new gb;this.H={video:a,player:b};this.F=c||function(){};this.I=d||function(f){return f};this.i=null;this.G=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.C=new Rc(function(){$q(e)});ar(this)}na(Zq,kg);q=Zq.prototype;q.isConnected=function(){return this.G};q.oi=function(){return this.o};q.Yi=function(a){this.i=a};q.Fh=function(){this.i=null};
|
|
863
865
|
q.Zi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Xi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Wi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
864
866
|
q.destroy=function(){var a=this,b,c;return O(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.C&&(a.C.stop(),a.C=null),a.g=null,a.H=null,a.F=null,a.G=!1,a.o=!0,a.l=null,a.s=null,kg.prototype.release.call(a),F(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
|
|
865
|
-
function
|
|
866
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
867
|
-
a.j.D(a.g,"ended",function(){(new Rc(function(){a.g&&a.g.ended&&(a.o=!0,
|
|
868
|
-
function
|
|
869
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
870
|
-
function
|
|
871
|
-
1);
|
|
872
|
-
function
|
|
873
|
-
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return
|
|
874
|
-
function
|
|
875
|
-
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||
|
|
876
|
-
function
|
|
877
|
-
S("shaka.cast.CastReceiver"
|
|
878
|
-
r||-1===u)p=
|
|
879
|
-
function
|
|
880
|
-
function
|
|
881
|
-
var
|
|
882
|
-
[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"]]),
|
|
883
|
-
[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"]]),
|
|
884
|
-
function
|
|
885
|
-
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=
|
|
886
|
-
function
|
|
887
|
-
b=null;c=t(
|
|
888
|
-
b.skip(1),d=
|
|
889
|
-
function
|
|
890
|
-
var
|
|
891
|
-
function
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
function
|
|
895
|
-
"white";e=!1;7>f?d=
|
|
896
|
-
1,a);else if(18===(d&246)&&32===(a&224))
|
|
897
|
-
b.h),
|
|
898
|
-
function
|
|
899
|
-
v;r=0;for(u=1;16>u;u++,r++)k.i[r]=k.i[u];for(u=0;1>u;u++,r++)k.i[r]=
|
|
900
|
-
(127===k?
|
|
901
|
-
function
|
|
902
|
-
|
|
903
|
-
function(f){f=$i(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).
|
|
867
|
+
function ar(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return br(a)};b.onSenderDisconnected=function(){return br(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&cr(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);cr(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return dr(a,
|
|
868
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return er(a,e)};b.start();b=t(pq);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return fr(a,"video",e)});for(var d in jg)a.j.D(a.h,jg[d],function(e){return fr(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;gr(a)});a.j.D(a.g,"playing",function(){a.o=!1;gr(a)});a.j.D(a.g,"pause",function(){gr(a)});a.j.D(a.h,"unloading",function(){a.o=!0;gr(a)});
|
|
869
|
+
a.j.D(a.g,"ended",function(){(new Rc(function(){a.g&&a.g.ended&&(a.o=!0,gr(a))})).$(hr)})}function br(a){a.m=0;a.A=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;gr(a)}function gr(a){var b;O(function(c){if(1==c.g)return F(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);ir(a)||jr(a);H(c)})}
|
|
870
|
+
function kr(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.F(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(r,5),F(r,a.h.load(b.manifest,b.startTime),7)):F(r,Promise.resolve(),3);case 7:ta(r,3);break;case 5:return g=ua(r),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
871
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),jr(a));H(r)}})}function fr(a,b,c){a.h&&($q(a),cr(a,{type:"event",targetName:b,event:c},a.l))}
|
|
872
|
+
function $q(a){a.C.$(lr);for(var b={video:{},player:{}},c=t(qq),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in vq)0==a.m%vq[e]&&(b.player[e]=a.h[e]());for(var f in tq)0==a.m%tq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;cr(a,{type:"update",update:b},a.l);for(var g in uq)0==a.m%uq[g]&&(b={player:{}},b.player[g]=a.h[g](),cr(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
873
|
+
1);ir(a)}function ir(a){return a.A&&(a.g.duration||a.h.V())?(mr(a),a.A=!1,!0):!1}function mr(a,b){var c={contentId:a.h.Fc(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);jr(a,void 0===b?0:b,c)}
|
|
874
|
+
function er(a,b){var c=nq(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;kr(a,c.initState,c.appData);$q(a);break;case "appData":a.F(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.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
875
|
+
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return nr(a,g,f,null)},function(h){return nr(a,g,f,h)})}}
|
|
876
|
+
function dr(a,b){var c=nq(b.data);switch(c.type){case "PLAY":a.g.play();jr(a);break;case "PAUSE":a.g.pause();jr(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(),jr(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),jr(a));break;case "STOP":a.h.dc().then(function(){a.h&&jr(a)});break;case "GET_STATUS":mr(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));
|
|
877
|
+
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||jr(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.F(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&mr(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");cr(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:cr(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
878
|
+
function nr(a,b,c,d){a.h&&cr(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function cr(a,b,c,d){a.G&&(a=mq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function jr(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?or:a.h.nf()?pr:a.g.paused?qr:rr,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);cr(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
879
|
+
S("shaka.cast.CastReceiver",Zq);Zq.prototype.destroy=Zq.prototype.destroy;Zq.prototype.setContentArtist=Zq.prototype.Wi;Zq.prototype.setContentImage=Zq.prototype.Xi;Zq.prototype.setContentTitle=Zq.prototype.Zi;Zq.prototype.clearContentMetadata=Zq.prototype.Fh;Zq.prototype.setContentMetadata=Zq.prototype.Yi;Zq.prototype.isIdle=Zq.prototype.oi;Zq.prototype.isConnected=Zq.prototype.isConnected;var lr=.5,hr=5,or="IDLE",rr="PLAYING",pr="BUFFERING",qr="PAUSED";function sr(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(y){return null!=y&&""!=y.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(y){return null!=y&&""!=y.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=tr(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
880
|
+
r||-1===u)p=ur(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,A=v.i,z=v.j,D=v.h;if(w!=h||A!=k||z!=l||D!=m)n.payload&&a.nestedCues.push(n),n=tr(d,e,w,A,z,D),h=w,k=A,l=z,m=D;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=ur(d,e),a.nestedCues.push(n));n=tr(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
881
|
+
function tr(a,b,c,d,e,f){a=new Qb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function ur(a,b){a=new Qb(a,b,"");a.lineBreak=!0;return a}function vr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function wr(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";xr(this)}function yr(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Qb(b,c,"");e.lineInterpretation=1;var f=zr.get(a.g);f&&(e.line=f);(b=sr(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=zr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function xr(a){Ar(a,0,15);a.g=1}
|
|
882
|
+
function Br(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=Cr.has(c)?Cr.get(c):String.fromCharCode(c);break;case 1:d=Dr.get(c);break;case 2:a.i[a.g].pop();d=Er.get(c);break;case 3:a.i[a.g].pop(),d=Fr.get(c)}d&&a.i[a.g].push(new vr(d,a.m,a.j,a.o,a.l))}}function Gr(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 Ar(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
883
|
+
var Cr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Dr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Er=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
|
|
884
|
+
[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"]]),Fr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
|
|
885
|
+
[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"]]),zr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Hr(a,b){this.h=0;this.o=new wr(a,b);this.i=new wr(a,b);this.g=this.j=new wr(a,b);this.l=0;this.m=null}function Ir(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=yr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Ar(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Ar(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Jr(a){a.h=1;a.g=a.j;a.g.h=0}function Kr(a){$a("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var Lr="black green blue cyan red yellow magenta black".split(" "),Mr="white green blue cyan red yellow magenta white_italics".split(" ");function Nr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.M=this.H=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";Or(this)}function Or(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Pr())}function Pr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Qr(a,b){Rr(a)&&(a.i[a.h][a.g]=new vr(b,a.C,a.A,a.s,a.B),a.g++)}function Rr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}Nr.prototype.isVisible=function(){return this.l};
|
|
886
|
+
function Sr(a,b,c){var d=new Qb(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Tb;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.K?Kb:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
|
|
887
|
+
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=sr(d,"svc"+c,a.i,a.j,b))a.j=b;return c};function Tr(){this.i=[];this.h=null;this.g=0}function Ur(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 Vr(a.h)),a.h=null,a.g=0))}function Vr(a){this.g=0;this.h=a}Vr.prototype.qa=function(){return this.g<this.h.length};Vr.prototype.wa=function(){return this.g};function Wr(a){if(!a.qa())throw new T(2,2,3E3);return a.h[a.g++]}Vr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function Xr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
888
|
+
function Yr(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=Wr(b).value;b=null;c=t(Zr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Sr(e,d,a.i)),Or(e);return b}if(137===c)for(b=Wr(b).value,b=t(Zr(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=Wr(b).value;b=null;c=t(Zr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Sr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Wr(b).value;
|
|
889
|
+
b=null;c=t(Zr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Sr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Wr(b).value,$r(a,b,d);if(143===c)return d=$r(a,255,d),as(a),d;if(144===c)b.skip(1),d=Wr(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Wr(b).value,c=Wr(b).value,b.skip(1),a.g&&(b=bs((c&48)>>4,(c&12)>>2,c&3),a.g.B=bs((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Wr(b).value,b=Wr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
890
|
+
b.skip(1),d=Wr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Nr(c,a.i);f.j=d;a.h[c]=f}d=Wr(b).value;f=Wr(b).value;var g=Wr(b).value,h=Wr(b).value,k=Wr(b).value;b=Wr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.M=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
891
|
+
function Zr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function $r(a,b,c){var d=null;b=t(Zr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Sr(f,c,a.i));a.h[e]=null}return d}function as(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function bs(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return cs[a<<2|b<<1|c]}
|
|
892
|
+
var ds=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),cs="black blue green cyan red magenta yellow white".split(" ");function es(){this.h=[];this.g=[];this.i=new Tr;this.l=0;this.m=new Map([["CC1",new Hr(0,0)],["CC2",new Hr(0,1)],["CC3",new Hr(1,0)],["CC4",new Hr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;fs(this)}es.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;fs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())as(b.value)};
|
|
893
|
+
function fs(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,xr(c.i),xr(c.j),xr(c.o);a.B=!0}
|
|
894
|
+
es.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Ig(a,0);if(!(8>a.getLength())&&181===a.U()&&49===a.oa()&&1195456820===a.R()&&3===a.U()&&(c=a.U(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.U(),f=(e&4)>>2,g=a.U(),h=a.U();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,cb:g,Cb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
895
|
+
es.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=gs(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Ur(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=hs(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
896
|
+
function gs(a,b){var c=b.type;if(16===(b.cb&112)){var d=b.cb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.cb&&255===b.Cb||!b.cb&&!b.Cb||!is(b.cb)||!is(b.Cb))return 45<=++a.l&&fs(a),null;a.l=0;b.cb&=127;b.Cb&=127;var e=b.cb;if(1<=e&&15>=e||!b.cb&&!b.Cb)return null;e=null;if(16===(b.cb&112))a:{a.A.add(d),d=b.cb;a=b.Cb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
897
|
+
"white";e=!1;7>f?d=Mr[f]:7===f&&(e=!0);a=1===(a&1);4!==c.h&&(f=c.g,3===c.h&&b!==f.g&&(c=1+b-f.h,Gr(f,c,1+f.g-f.h,f.h),Ar(f,0,c-1),Ar(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Br(c.g,0,32),d=!1,b=Mr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Lr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Br(c.g,
|
|
898
|
+
1,a);else if(18===(d&246)&&32===(a&224))Br(c.g,d&1?3:2,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Cb){case 32:Jr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Ir(c,2,a);break;case 38:d=Ir(c,3,a);break;case 39:d=Ir(c,4,a);break;case 40:Br(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:xr(c.o);Kr(c);break;case 43:Kr(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=yr(b,c.l,a));Ar(b,0,15);break;case 45:b=c.g;3!==c.h?d=null:(d=yr(b,c.l,a),e=b.g-b.h+1,Gr(b,e-1,e,
|
|
899
|
+
b.h),Ar(b,0,e-1),Ar(b,b.g,15-b.g),c.l=a);break;case 46:Ar(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=yr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Jr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.Cb,Br(c.g,0,b.cb),Br(c.g,0,a);return e}
|
|
900
|
+
function hs(a,b){var c=[];try{for(;b.qa();){var d=Wr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Wr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Xr(e));for(var g=a.j.get(e),h=b.wa();b.wa()-h<f;){e=g;var k=b,l=Wr(k),m=l.value,n=l.pts;if(16===m){var p=Wr(k);m=m<<16|p.value}if(0<=m&&31>=m){k=e;var r=m,u=n;if(k.g){var v=k.g;e=null;switch(r){case 8:!Rr(v)||0>=v.g&&0>=v.h||(0>=v.g?(v.g=v.m-1,v.h--):v.g--,v.i[v.h][v.g]=null);break;case 13:v.isVisible()&&(e=Sr(v,u,k.i));if(v.h+1>=v.o){k=
|
|
901
|
+
v;r=0;for(u=1;16>u;u++,r++)k.i[r]=k.i[u];for(u=0;1>u;u++,r++)k.i[r]=Pr()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=Sr(v,u,k.i));v.i[v.h]=Pr();v.g=0;break;case 12:v.isVisible()&&(e=Sr(v,u,k.i)),Or(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=Yr(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&
|
|
902
|
+
(127===k?Qr(e.g,"\u266a"):Qr(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&Qr(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(ds.has(k)){var A=ds.get(k);Qr(e.g,A)}else Qr(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?Qr(e.g,"_"):Qr(e.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(z){if(z instanceof T&&3E3===z.code)$a("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw z;}return c}
|
|
903
|
+
function is(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}es.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",es);Ib=function(){return new es};function js(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function ks(){this.j=new Map;this.i=this.h=0;this.g=ls}
|
|
904
|
+
ks.prototype.init=function(a){function b(f){f=f.name;f in ms&&(c.g=ms[f])}var c=this,d=[],e=[];(new Lg).box("moov",Qg).box("mvex",Qg).T("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.R();g=g.R();c.h=f;c.i=g}).box("trak",Qg).T("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.R();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.oa();g.oa();g.oa();g.oa();d.push(h)}).box("mdia",Qg).T("mdhd",
|
|
905
|
+
function(f){f=$i(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).T("stsd",Sg).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Tg).box("sinf",Qg).box("frma",function(f){f=cj(f.reader).codec;f in ms&&(c.g=ms[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==ls&&Ya("Unable to determine bitstream format for CEA parsing!");
|
|
904
906
|
d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
905
|
-
|
|
906
|
-
1];f=Zi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.
|
|
907
|
-
function
|
|
908
|
-
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Jf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",
|
|
909
|
-
S("shaka.cea.TsCeaParser",
|
|
910
|
-
l.Qc});f.length&&(a=
|
|
911
|
-
function
|
|
912
|
-
function
|
|
913
|
-
function
|
|
914
|
-
function
|
|
915
|
-
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Zg(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=
|
|
916
|
-
function
|
|
917
|
-
function
|
|
907
|
+
ks.prototype.parse=function(a){var b=this;if(this.g==ls)return[];var c=[],d=0,e=[];(new Lg).box("moof",function(f){d=f.start;e=[];Qg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Zc:b.h,Gd:b.i,Qg:[],timescale:9E4});Qg(f)}).T("trun",function(f){var g=e[e.length-1];f=aj(f.reader,f.version,f.flags);g.Qg.push(f)}).T("tfhd",function(f){var g=e[e.length-1];f=Yi(f.reader,f.flags);g.Zc=f.Zc||b.h;g.Gd=f.Gd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).T("tfdt",function(f){var g=e[e.length-
|
|
908
|
+
1];f=Zi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.wa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Ya("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);ns(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Zc,l.Gd,g,l.Qg,c)}}).parse(a,!1);return c};
|
|
909
|
+
function ns(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Yg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Hh);b.qa();){g=b.R();var p=b.U(),r=null;r=!1;h=1;switch(a.g){case os:r=p&31;r=6==r;break;case ps:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case qs:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].me||0),p=(c+p)/d,h=t(js(b.rb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
|
|
910
|
+
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Jf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",ks);var ls=0,os=1,ps=2,qs=3,ms={avc1:os,avc3:os,dvav:os,dva1:os,hev1:ps,hvc1:ps,dvh1:ps,dvhe:ps,vvc1:qs,vvi1:qs,dvc1:qs,dvi1:qs};Hb["video/mp4"]=function(){return new ks};function rs(){this.g=null}rs.prototype.init=function(){};rs.prototype.parse=function(a){this.g?this.g.clearData():this.g=new rj;var b=[];a=zb(a);if(!Fj(a))return b;a=this.g.parse(a);var c=a.$c(),d=a.Md();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(js(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
911
|
+
S("shaka.cea.TsCeaParser",rs);Hb["video/mp2t"]=function(){return new rs};function ss(a,b,c){var d=ts(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Qc});if(1<f.length)throw new T(2,4,4050);f.length&&(g=us(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Qc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Qc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
912
|
+
l.Qc});f.length&&(a=vs(e,k,f,c,h),0==a.length&&(a=[Nd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Nd(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{pg:h,fk:e,drmInfos:a,Ee:g,ug:!0}}
|
|
913
|
+
function ws(a,b,c,d){var e=ss(a,c,d);if(b.ug){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.ug=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.pg||b.pg}
|
|
914
|
+
function xs(a){var b=0,c=Eb(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=zb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function ys(a){a=t(kh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return ih(c)}return""}
|
|
915
|
+
function zs(a){var b=mh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=ih(b)))return b;a=mh(a.node,"urn:microsoft:playready","pro");if(!a||!ih(a))return"";a=ih(a);a=Hd(a);a=xs(a).filter(function(c){return c.type===As})[0];if(!a)return"";a=xd(a.value,!0);return(a=ah(a,"WRMHEADER"))?ys(a):""}
|
|
916
|
+
function vs(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Qc];if(h){var k;if((k=mh(g.node,"urn:microsoft:playready","pro"))&&ih(k)){k=ih(k);k=Hd(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Zg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Qc){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
|
|
917
|
+
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Zg(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Nd(h,b,g.init||a||k||l);if(h=Bs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function ts(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Cs(c.value))&&b.push(c);return b}
|
|
918
|
+
function Cs(a){var b=a.attributes.schemeIdUri,c=ph(a,"urn:mpeg:cenc:2013","default_KID"),d=nh(a,"urn:mpeg:cenc:2013","pssh").map(jh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Hd(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Qc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
919
|
+
function us(a){if(!window.crypto||!window.crypto.subtle)throw Ya("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=mh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=mh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Dd(b.attributes.keyUriTemplate);
|
|
918
920
|
if(!a||!b)throw new T(2,4,4051);a=Id(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{vi:b,iv:a}}
|
|
919
|
-
var
|
|
920
|
-
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=ih(a))?a:""});function
|
|
921
|
+
var As=1,Bs=(new Map).set("com.widevine.alpha",function(a){var b=mh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ih(b))?b:(a=mh(a.node,"urn:microsoft","laurl"))?Dd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",zs).set("com.microsoft.playready.recommendation",zs).set("com.microsoft.playready.software",zs).set("com.microsoft.playready.hardware",zs).set("org.w3.clearkey",function(a){var b=mh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ih(b))?b:(a=mh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
922
|
+
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=ih(a))?a:""});function Ds(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))&&Ya("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();
|
|
921
923
|
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})}
|
|
922
|
-
function
|
|
923
|
-
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,$f:r,zb:n,Ui:k.length+h}),r=l}}e=k}return{timescale:d,La:c,
|
|
924
|
-
function
|
|
925
|
-
function
|
|
926
|
-
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return
|
|
927
|
-
function
|
|
928
|
-
;function
|
|
929
|
-
function
|
|
930
|
-
function
|
|
931
|
-
d)}function
|
|
932
|
-
function
|
|
933
|
-
function
|
|
934
|
-
function
|
|
935
|
-
function
|
|
936
|
-
3,3009);I=J.g.byteOffset;J=new
|
|
937
|
-
C.next())G=E.value,G.codecs=a.J.codecs,G.mimeType=a.J.mimeType;h.
|
|
938
|
-
function
|
|
939
|
-
a.ga.duration?a.ga.start+a.ga.duration:Infinity,b);g&&(g.segmentIndex=f);return{jc:function(){f&&0!=f.getNumReferences()||f.Xd(h);return Promise.resolve(f)}}}function
|
|
940
|
-
function
|
|
941
|
-
function
|
|
942
|
-
var p=null;d=d=null;a.la.id&&a.J.id&&(d=a.la.id+","+a.J.id,d=c[d])&&(p=d.segmentIndex);var r=a.ga.start,u=a.ga.duration?r+a.ga.duration:Infinity,v=!(a.vb&&a.ga.pf);p?(c=p,
|
|
943
|
-
function
|
|
944
|
-
function
|
|
945
|
-
v})}function l(){var I=null!=p&&e[p]||r;return I?n+I:Infinity}var m=a.presentationTimeline,n=a.ga.start,p=a.la.id,r=a.ga.duration,u=b.La,v=b.
|
|
946
|
-
h(K);M.push(N);K++}return I>l()&&!M.length?null:M})}return Promise.resolve(L)}function
|
|
947
|
-
function
|
|
924
|
+
function Es(a,b){var c=Fs(a,b,"timescale"),d=1;c&&(d=vh(c)||1);c=Fs(a,b,"duration");(c=vh(c||""))&&(c/=d);var e=Fs(a,b,"startNumber"),f=Number(Fs(a,b,"presentationTimeOffset"))||0,g=wh(e||"");if(null==e||null==g)g=1;e=null;if(b=Gs(a,b,"SegmentTimeline")){b=hh(b,"S");e=d;a=a.ga.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],r=oh(n,"t",wh),u=oh(n,"d",wh),v=oh(n,"r",uh);n=oh(n,"k",uh)||0;null!=r&&(r-=f);if(u){r=null!=r?r:l;v=v||0;if(0>v)if(p){p=oh(p,"t",wh);if(null==
|
|
925
|
+
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,$f:r,zb:n,Ui:k.length+h}),r=l}}e=k}return{timescale:d,La:c,ud:g,Ob:f/d||0,Zf:f,timeline:e}}function Hs(a,b){return[b(a.J),b(a.ia),b(a.la)].filter(ye)}function Fs(a,b,c){b=Hs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
926
|
+
function Gs(a,b,c){b=Hs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=lh(d.value,c));d=b.next());return a}
|
|
927
|
+
function Is(a,b,c,d,e,f){for(var g=ph(a,"http://www.w3.org/1999/xlink","href"),h=ph(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=ch("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return cg(new T(2,4,4028));if("onLoad"!=h)return cg(new T(2,4,4027));var p=Md([d],[g]);return e.request(0,sg(p,b)).Aa(function(r){r=$g(r.data,a.tagName);if(!r)return cg(new T(2,4,4001,g));for(a.children=
|
|
928
|
+
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return Js(a,b,c,p[0],e,f+1)})}
|
|
929
|
+
function Js(a,b,c,d,e,f){f=void 0===f?0:f;if(ph(a,"http://www.w3.org/1999/xlink","href")){var g=Is(a,b,c,d,e,f);c&&(g=g.Aa(void 0,function(){return Js(a,b,c,d,e,f)}));return g}g=[];for(var h=t(gh(a)),k=h.next(),l={};!k.done;l={Vc:void 0},k=h.next())l.Vc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==ph(l.Vc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Vc}}(l)):"SegmentTimeline"!=l.Vc.tagName&&g.push(Js(l.Vc,b,c,d,e,f));return gg(g).Aa(function(){return a})}
|
|
930
|
+
;function Ks(a,b,c,d,e,f,g){var h,k=(new Lg).T("sidx",function(l){h=Ls(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
931
|
+
function Ls(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.Oc(),m=g.reader.Oc();g.reader.skip(2);var n=g.reader.oa();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.R(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.R();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Fi(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Ms(a){this.h=Eb(a);this.g=new Ig(this.h,0)}Ms.prototype.qa=function(){return this.g.qa()};
|
|
932
|
+
function Ns(a){var b=Os(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Os(a);a:{d=t(Ps);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new Qs(c,
|
|
933
|
+
d)}function Os(a){var b=a.g.wa(),c=a.g.U();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return zb(a.h,b,c)}var Ps=[[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 Qs(a,b){this.id=a;this.g=b}
|
|
934
|
+
function Rs(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ss(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ms(a.g);for(var n=null,p=null;a.qa();){var r=Ns(a);if(187==r.id){var u=Ts(r);u&&(r=c*u.fj,u=b+u.Ki,null!=n&&m.push(new Fi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Fi(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
935
|
+
function Ts(a){var b=new Ms(a.g);a=Ns(b);if(179!=a.id)throw new T(2,3,3013);a=Rs(a);b=Ns(b);if(183!=b.id)throw new T(2,3,3012);b=new Ms(b.g);for(var c=0;b.qa();){var d=Ns(b);if(241==d.id){c=Rs(d);break}}return{fj:a,Ki:c}};function Us(a,b,c){b=Gs(a,b,"Initialization");if(!b)return null;var d=a.J.Ma(),e=b.attributes.sourceURL;e&&(d=Md(d,[Dd(e)]));e=0;var f=null;if(b=oh(b,"range",th))e=b.start,f=b.end;c=new Di(function(){return d},e,f,Vs(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
|
|
936
|
+
function Ws(a,b,c){var d=Number(Fs(a,Xs,"presentationTimeOffset"))||0,e=Fs(a,Xs,"timescale"),f=1;e&&(f=vh(e)||1);var g=d/f||0,h=Us(a,Xs,c);Ys(a,h);var k=Ke(a);return{jc:function(){var l=Gs(k,Xs,"RepresentationIndex");var m=k.J.Ma();l&&(l=Dd(l.attributes.sourceURL))&&(m=Md(m,[l]));l=Zs(k);return $s(k,b,h,m,l.start,l.end,g)}}}
|
|
937
|
+
function $s(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G;return O(function(L){if(1==L.g)return h=a.presentationTimeline,k=!a.vb||!a.ga.pf,l=a.ga.start,m=a.ga.duration,n=a.J.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.L(),c.Ha,c.ta,!0):null],p=null,F(L,Promise.all(u),2);v=L.h;w=v[0];A=v[1]||null;z=null;D=l-g;y=l;B=m?l+m:Infinity;if("mp4"==n)var K=Ks(w,e,d,c,D,y,B);else{K=w;var I=new Ms(A);if(440786851!=Ns(I).id)throw new T(2,3,3008);var J=Ns(I);if(408125543!=J.id)throw new T(2,
|
|
938
|
+
3,3009);I=J.g.byteOffset;J=new Ms(J.g);for(var M=null;J.qa();){var N=Ns(J);if(357149030==N.id){M=N;break}}if(!M)throw new T(2,3,3010);M=new Ms(M.g);N=1E6;for(J=null;M.qa();){var P=Ns(M);if(2807729==P.id)N=Rs(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new T(2,3,3003);}if(null==J)throw new T(2,3,3011);M=N/1E9;J*=M;K=Ns(new Ms(K));if(475249515!=K.id)throw new T(2,3,3007);K=Ss(K,I,M,J,d,c,D,y,B)}z=K;C=t(z);for(E=C.next();!E.done;E=
|
|
939
|
+
C.next())G=E.value,G.codecs=a.J.codecs,G.mimeType=a.J.mimeType;h.rd(z);r=new Nk(z);k&&r.Dc(y,B,!0);return L.return(r)})}function Xs(a){return a.Sc}function Zs(a){var b=Gs(a,Xs,"RepresentationIndex");a=Fs(a,Xs,"indexRange");a=th(a||"");b&&(a=oh(b,"range",th,a));return a}function Ys(a,b){at(a,b);if(!Zs(a))throw new T(2,4,4002);}function at(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Ud&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
940
|
+
function Vs(a){var b=a.J;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.be,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ia.label||null,roles:a.roles||null,language:a.ia.language||null}};function bt(a,b,c){var d=Us(a,ct,c),e=dt(a);if(!e.La&&!e.timeline&&1<e.Kc.length)throw new T(2,4,4002);if(!e.La&&!a.ga.duration&&!e.timeline&&1==e.Kc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.la.id&&a.J.id&&(g=b[a.la.id+","+a.J.id])&&(f=g.segmentIndex);var h=et(a.ga.start,a.ga.duration,a.J.Ma,e,d,c,a.J.mimeType,a.J.codecs);b=!f;f?f.qd(h,a.presentationTimeline.nb()):f=new Nk(h);a.presentationTimeline.rd(h);a.vb&&a.ga.pf||f.Dc(a.ga.start,
|
|
941
|
+
a.ga.duration?a.ga.start+a.ga.duration:Infinity,b);g&&(g.segmentIndex=f);return{jc:function(){f&&0!=f.getNumReferences()||f.Xd(h);return Promise.resolve(f)}}}function ct(a){return a.Qb}function dt(a){var b=ft(a);a=Es(a,ct);var c=a.ud;0==c&&(c=1);var d=0;a.La?d=a.La*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{La:a.La,startTime:d,ud:c,Ob:a.Ob,timeline:a.timeline,Kc:b}}
|
|
942
|
+
function et(a,b,c,d,e,f,g,h){var k=d.Kc.length;d.timeline&&d.timeline.length!=d.Kc.length&&(k=Math.min(d.timeline.length,d.Kc.length));for(var l=a-d.Ob,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={ue:void 0,ne:void 0},u++){r.ne=d.Kc[u];var v=p;p=void 0;p=null!=d.La?v+d.La:d.timeline?d.timeline[u].end:v+b;r.ue=null;r=new Fi(a+v,a+p,function(w){return function(){null==w.ue&&(w.ue=Md(c(),[w.ne.Bi]));return w.ue}}(r),r.ne.start,r.ne.end,e,l,a,m,[],"",null,null,Gi,f);r.codecs=h;r.mimeType=g;n.push(r)}return n}
|
|
943
|
+
function ft(a){return[a.J.Qb,a.ia.Qb,a.la.Qb].filter(ye).map(function(b){return hh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.kf&&(a.kf=!0);var c=Dd(b.attributes.media);b=oh(b,"mediaRange",th,{start:0,end:null});return{Bi:c,start:b.start,end:b.end}})};function gt(a,b,c,d,e,f,g,h,k){k||a.J.Pd||(a.J.Pd=Fs(a,ht,"initialization"));var l=a.J.Pd?it(a,g):null,m=jt(a);kt(m);var n=Ke(a);if(m.jd)return at(a,l),{jc:function(){var w=Ds(m.jd,n.J.id,null,null,n.bandwidth||null,null);w=Md(n.J.Ma(),[w]);return $s(n,b,l,w,0,null,m.Ob)}};if(m.La)return d||"image"===a.ia.contentType||(c=a.ga.start,d=a.la.id,k=a.ga.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.xf(m.La),a.presentationTimeline.Og(c,d)),{jc:function(){return lt(n,m,e,l,f,g,h)}};
|
|
944
|
+
var p=null;d=d=null;a.la.id&&a.J.id&&(d=a.la.id+","+a.J.id,d=c[d])&&(p=d.segmentIndex);var r=a.ga.start,u=a.ga.duration?r+a.ga.duration:Infinity,v=!(a.vb&&a.ga.pf);p?(c=p,mt(c,m,r,u,v,l),c.Ga(a.presentationTimeline.nb())):p=new nt(m,a.J.id,a.bandwidth,a.J.Ma,r,u,l,v,g,a.J.Kf);m.timeline&&"image"!==a.ia.contentType&&a.presentationTimeline.Pg(m.timeline,r);d&&a.vb&&(d.segmentIndex=p);return{jc:function(){p instanceof nt&&0==p.getNumReferences()&&mt(p,m,r,u,v,l);return Promise.resolve(p)}}}
|
|
945
|
+
function ht(a){return a.bc}function jt(a){var b=Es(a,ht),c=Fs(a,ht,"media"),d=Fs(a,ht,"index");return{La:b.La,timescale:b.timescale,ud:b.ud,Ob:b.Ob,Zf:b.Zf,timeline:b.timeline,$b:c&&Dd(c),jd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function kt(a){var b=a.jd?1:0;b+=a.timeline?1:0;b+=a.La?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.jd&&(a.timeline=null),a.La=null);if(!a.jd&&!a.$b)throw new T(2,4,4002);}
|
|
946
|
+
function lt(a,b,c,d,e,f,g){function h(I){var J=(I-v)*u,M=J+b.Ob,N=J+n;J=N+u;var P=Math.min(J,l());N=new Fi(N,P,function(){var R=M*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(M)*BigInt(w));R=Ds(A,D,I,null,z,R);return Md(y(),[R])},0,null,d,B,n,l(),[],"",null,null,Gi,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.j=J;return N}function k(){var I=[Math.max(m.nb(),n),Math.min(m.Xb(),l())].map(function(J){return J-n});I=[Math.ceil(I[0]/u),Math.ceil(I[1]/u)-1];a.J.Sa&&I[1]++;return I.map(function(J){return J+
|
|
947
|
+
v})}function l(){var I=null!=p&&e[p]||r;return I?n+I:Infinity}var m=a.presentationTimeline,n=a.ga.start,p=a.la.id,r=a.ga.duration,u=b.La,v=b.ud,w=b.timescale,A=b.$b,z=a.bandwidth||null,D=a.J.id,y=a.J.Ma,B=n-b.Ob,C=k();c=a.vb?Math.max(C[0],C[1]-c+1):C[0];g=g||C[1];C=[];for(var E=c;E<=g;++E){var G=h(E);C.push(G)}var L=new Nk(C);C=m.Xb()<l();E=m.V();if(C||E){var K=Math.max(c,g+1);c=u;a.J.Sa&&(c=.1);L.te(c,function(){var I=m.nb();L.Ga(I);var J=t(k());J.next();J=J.next().value;for(var M=[];K<=J;){var N=
|
|
948
|
+
h(K);M.push(N);K++}return I>l()&&!M.length?null:M})}return Promise.resolve(L)}function it(a,b){var c=a.J.Pd;c||(c=Fs(a,ht,"initialization"));if(!c)return null;c=Dd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.Ma;b=new Di(function(){var g=Ds(c,d,null,null,e,null);return Md(f(),[g])},0,null,Vs(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}
|
|
949
|
+
function nt(a,b,c,d,e,f,g,h,k,l){Nk.call(this,[]);this.g=a;this.C=b;this.A=c;this.B=d;this.i=e;this.j=f;this.o=g;this.s=k;this.F=l;h&&ot(this)}na(nt,Nk);q=nt.prototype;q.getNumReferences=function(){return this.g?this.g.timeline.length:0};q.release=function(){Nk.prototype.release.call(this);this.g=null};
|
|
948
950
|
q.Ga=function(a){if(this.g){for(var b=0,c=this.g.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.g.timeline=c.slice(b),this.P.length>=b&&(this.P=this.P.slice(b)),this.h+=b,0===this.getNumReferences()&&this.release())}};
|
|
949
|
-
function
|
|
950
|
-
function
|
|
951
|
+
function mt(a,b,c,d,e,f){pt(a,f);if(a.g){c=a.g.timeline;a.g.$b!==b.$b&&(a.g.$b=b.$b);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.g.timeline.push.apply(a.g.timeline,x(b));a.j!==d&&(a.j=d)}else a.g=b,a.i=c,a.j=d;e&&ot(a)}function pt(a,b){if(a.o!==b){a.o=b;a=t(a.P);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ii(c,b)}}
|
|
952
|
+
function ot(a){if(!a.m){for(var b=a.g.timeline;b.length;)if(b[b.length-1].start>=a.j)b.pop();else break;a.Ga(a.i)}}q.find=function(a){if(this.g&&this.g.timeline&&this.g.timeline.length&&a<this.g.timeline[0].start+this.i)return this.h;if(!this.g)return null;var b=this.g.timeline;if(a<this.i||a>=this.j)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.j?e.end+this.i:this.j;if(a>=f&&a<e)return d+this.h}return null};
|
|
951
953
|
q.get=function(a){var b=this;a-=this.h;if(0>a||a>=this.getNumReferences()||!this.g)return null;var c=this.P[a];if(!c){var d=this.g.timeline[a],e=d.Ui,f=this.g.Zf+d.$f;c=this.i-this.g.Ob;var g=this.i+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.j&&(h=this.j);for(var k=this.g.codecs,l=this.g.mimeType,m=[],n=(d.end-d.start)/d.zb,p={},r=0;r<d.zb;p={ve:void 0,mh:void 0},r++){var u=d.start+n*r,v=u+n;p.mh=r+1;p.ve=null;p=new Fi(this.i+u,this.i+v,function(w){return function(){if(!b.g)return[];
|
|
952
|
-
null==w.ve&&(w.ve=
|
|
953
|
-
function
|
|
954
|
-
function
|
|
955
|
-
function
|
|
956
|
-
function
|
|
957
|
-
function
|
|
958
|
-
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new tc(k.location)).Eb))return!1;return!0});d.length&&(a.B=d[0].Df);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Md(a.i,d)};function
|
|
954
|
+
null==w.ve&&(w.ve=qt(b.g.$b,b.C,e,b.A,f,w.mh,b.B));return w.ve}}(p),0,null,this.o,c,this.i,this.j,[],"",null,null,Gi,this.s);p.codecs=k;p.mimeType=l;0==this.F?0<r&&p.Vd():0!=r%this.F&&p.Vd();m.push(p)}c=new Fi(this.i+d.start,h,function(){return 0<d.zb||!b.g?[]:qt(b.g.$b,b.C,e,b.A,f,null,b.B)},0,null,this.o,c,this.i,this.j,m,"",null,null,Gi,this.s,0<d.zb);c.codecs=k;c.mimeType=l;c.j=g;this.P[a]=c}return c};
|
|
955
|
+
function qt(a,b,c,d,e,f,g){a=Ds(a,b,c,f,d||null,e);return Md(g(),[a]).map(function(h){return h.toString()})};function rt(a){this.o=null;this.A=a;this.G=new lg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}rt.prototype.configure=function(a){this.o=a};rt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};rt.prototype.setManifestType=function(a){this.s=a};
|
|
956
|
+
function st(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Md(a.i,[tt(a,b)]),d=sg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),mg(a.G,e),ra(l,2),F(l,e.promise,4);if(2!=l.g)return f=l.h,g=vd(f.data),h=JSON.parse(g),1==h.VERSION&&ut(a,h,f.uri),ta(l,0);if((k=ua(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Rc(function(){st(a,b)});a.g.$(a.C);H(l)})}
|
|
957
|
+
function tt(a,b){if(!a.m.length)return b;b=new tc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ic(e)&&xc(b,e);return b.toString()}function ut(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Rc(function(){st(a,d)});if(c=b.TTL)a.C=c;a.g.$(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
958
|
+
function vt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}rt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
959
|
+
function wt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Mc:void 0},f=e.next())if(g.Mc=f.value,f=b.get(g.Mc))d.push({Df:g.Mc,location:f});else if(f=a.F.find(function(k){return function(l){return l.yj==k.Mc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].th?(h=new tc(h),vc(h,f["URI-REPLACEMENT"].th),d.push({Df:g.Mc,location:h.toString()})):d.push({Df:g.Mc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
960
|
+
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new tc(k.location)).Eb))return!1;return!0});d.length&&(a.B=d[0].Df);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Md(a.i,d)};function xt(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=xt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};q.gi=function(){return this.l};q.hf=function(){return this.j.slice()};q.Ph=function(){return this.i};
|
|
959
961
|
q.qg=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Ud)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
|
|
960
962
|
d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
|
|
961
|
-
function
|
|
962
|
-
q.Je=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q;return O(function(W){if(1==W.g){e=Wd;if(!b&&1==a.length)return f=
|
|
963
|
-
Promise.all([
|
|
963
|
+
function yt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[zt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[At(n),n]})),l=new Map(h.textStreams.map(function(n){return[Bt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ct(n),n]}));if(b){var m=Dt(Ud);l.set(Bt(m),m);m=Dt("image");h.set(Ct(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{jg:c,rh:d,nh:e,Fg:f}}
|
|
964
|
+
q.Je=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q;return O(function(W){if(1==W.g){e=Wd;if(!b&&1==a.length)return f=yt(a,!1),g=f.jg,h=f.rh,k=f.nh,l=f.Fg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),W.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return W.return();u=yt(a,!0);v=u.jg;w=u.rh;A=u.nh;z=u.Fg;return F(W,
|
|
965
|
+
Promise.all([Et(d,d.h,v,n,Ft,Gt,m),Et(d,d.g,w,n,Ft,Gt,m),Et(d,d.j,A,n,Ft,Gt,m),Et(d,d.i,z,n,Ft,Gt,m)]),2)}D=0;y=[];if(d.g.length&&d.h.length)for(K=t(d.h),I=K.next();!I.done;I=K.next())for(J=I.value,M=t(d.g),N=M.next();!N.done;N=M.next())P=N.value,R=Mc(J.drmInfos,P.drmInfos),J.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=D++,y.push({id:Q,language:J.language,disabledUntilTime:0,primary:J.primary,audio:J,video:P,bandwidth:(J.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
964
966
|
decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,C=t(B),E=C.next();!E.done;E=C.next())G=E.value,L=D++,y.push({id:L,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G.type==e.X?G:null,video:G.type==e.ha?G:null,bandwidth:G.bandwidth||0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=y;H(W)})};
|
|
965
|
-
function
|
|
966
|
-
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Ce}).map(function(Q){return[
|
|
967
|
+
function Ht(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N;return O(function(P){switch(P.g){case 1:b=Wd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.X}).map(function(Q){return[zt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ha}).map(function(Q){return[At(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ua}).map(function(Q){return[Bt(Q),Q]}))});
|
|
968
|
+
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Ce}).map(function(Q){return[Ct(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=It(b.ua),k.set(Bt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=It(b.Ce),p.set(Ct(r),r);u=new xt;return F(P,Et(u,[],c,0,Jt,Kt,0),2);case 2:return v=P.h,F(P,Et(u,[],d,0,Jt,Kt,0),3);case 3:return w=P.h,F(P,Et(u,[],e,0,Jt,Kt,0),4);case 4:return A=P.h,F(P,Et(u,[],f,0,Jt,Kt,0),5);case 5:z=P.h;D=0;if(w.length&&v.length)for(G=
|
|
967
969
|
t(v),L=G.next();!L.done;L=G.next())for(K=L.value,I=t(w),J=I.next();!J.done;J=I.next())M=J.value,N=D++,M.variantIds.push(N),K.variantIds.push(N);else for(y=w.concat(v),B=t(y),C=B.next();!C.done;C=B.next())E=C.value,E.variantIds=[D++];return P.return(w.concat(v).concat(A).concat(z))}})}
|
|
968
|
-
function
|
|
969
|
-
y.next())for(C=B.value,E=t(C),G=E.next(),L={};!G.done;L={Tf:void 0},G=E.next())if(L.Tf=G.value,!
|
|
970
|
-
function
|
|
971
|
-
function
|
|
972
|
-
function
|
|
973
|
-
function
|
|
974
|
-
null;b.trickModeVideo=null;return b}function
|
|
975
|
-
function
|
|
976
|
-
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
977
|
-
for(var g=new Qk,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.g.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),
|
|
978
|
-
function
|
|
979
|
-
function
|
|
980
|
-
function
|
|
981
|
-
function
|
|
982
|
-
function
|
|
983
|
-
b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=
|
|
984
|
-
function
|
|
985
|
-
function
|
|
986
|
-
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
987
|
-
function
|
|
988
|
-
function
|
|
989
|
-
function
|
|
990
|
-
function
|
|
991
|
-
function
|
|
992
|
-
var
|
|
993
|
-
var
|
|
994
|
-
new gb;this.I=null;this.ea=!1;this.Y=[]}q=
|
|
995
|
-
q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.H=b.isLowLatencyMode(),c.A=[a],c.j=b,F(e,
|
|
996
|
-
q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Zd:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,
|
|
997
|
-
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ra(c,2),F(c,
|
|
970
|
+
function Et(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K;return O(function(I){switch(I.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){I.u(4);break}n=m.value;return F(I,Lt(a,n,c,d,f,h,g),5);case 5:p=I.h;if(!p)throw new T(2,4,4037);m=l.next();I.u(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())z=A.value,(D=Mt(a,z,c,e,f,h))&&b.push(D);y=t(h);for(B=y.next();!B.done;B=
|
|
971
|
+
y.next())for(C=B.value,E=t(C),G=E.next(),L={};!G.done;L={Tf:void 0},G=E.next())if(L.Tf=G.value,!Nt(L.Tf)&&(K=b.some(function(J){return function(M){return Ot(a,J.Tf,M)}}(L))))throw new T(2,4,4037);return I.return(b)}})}function Lt(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return Pt(a,c,b,0<g),b.matchedStreams?b.segmentIndex?F(h,Qt(b,d+g),2):h.u(2):h.return(!1);Rt(b,d,e,f,g);return h.return(!0)})}
|
|
972
|
+
function Qt(a,b){var c,d,e,f,g,h;return O(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex());return F(k,Promise.all(c),2)}if(a.segmentIndex instanceof Qk)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.g.push(h.segmentIndex);H(k)})}
|
|
973
|
+
function Mt(a,b,c,d,e,f){if(Nt(b))return null;var g=d(b);Pt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Qk;return F(h,Qt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Rt(g,0,e,f,0);return g}
|
|
974
|
+
function Rt(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==Fe(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
975
|
+
function Ft(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):
|
|
976
|
+
null;b.trickModeVideo=null;return b}function Jt(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set;b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
|
|
977
|
+
function Gt(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Mc(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,
|
|
978
|
+
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Ft(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
|
|
979
|
+
for(var g=new Qk,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.g.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),Gt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Gt(a.trickModeVideo,b))}
|
|
980
|
+
function Kt(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
981
|
+
function Pt(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=St(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
982
|
+
function St(a,b,c){var d={audio:zt,video:At,text:Bt,image:Ct}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return Ot(a,l,m)},video:function(l,m){return Ot(a,l,m)},text:Tt,image:Ut}[c.type];for(var g={audio:Vt,video:Wt,text:Xt,image:Yt}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!Nt(e)&&b.delete(d(e));return e}
|
|
983
|
+
function Zt(a,b){return a.mimeType!=b.mimeType?!1:$t(a.codecs)===$t(b.codecs)}q.ah=function(a){this.o=a};q.ih=function(a){this.s=a};function Ot(a,b,c){return!Zt(b,c)&&!a.o||b.drmInfos&&!Lc(b.drmInfos,c.drmInfos)?!1:!0}function Tt(a,b){return b.language?a.forced!==b.forced||0==Fe(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Ut(){return!0}
|
|
984
|
+
function Vt(a,b,c){var d=Zt(a,b),e=Zt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Fe(a.language,b.language);e=Fe(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length<
|
|
985
|
+
b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=au(a.channelsCount,b.channelsCount,c.channelsCount);if(d==bu)return!0;if(d==cu)return!1;d=au(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==bu?!0:d==cu?!1:a.bandwidth&&du(a.bandwidth,b.bandwidth,c.bandwidth)==bu?!0:!1}
|
|
986
|
+
function Wt(a,b,c){var d=Zt(a,b),e=Zt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=au(a.width*a.height,b.width*b.height,c.width*c.height);if(d==bu)return!0;if(d==cu)return!1;if(a.frameRate){d=au(a.frameRate,b.frameRate,c.frameRate);if(d==bu)return!0;if(d==cu)return!1}return a.bandwidth&&du(a.bandwidth,b.bandwidth,c.bandwidth)==bu?!0:!1}
|
|
987
|
+
function Xt(a,b,c){var d=Fe(a.language,b.language),e=Fe(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
988
|
+
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Yt(a,b,c){return au(a.width*a.height,b.width*b.height,c.width*c.height)==bu?!0:!1}
|
|
989
|
+
function It(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}}
|
|
990
|
+
function Dt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Nk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
|
|
991
|
+
function au(a,b,c){if(b==a&&a!=c)return cu;if(c==a&&a!=b)return bu;if(b>a){if(c<=a||c-a<b-a)return bu;if(c-a>b-a)return cu}else{if(c>a)return cu;if(a-c<a-b)return bu;if(a-c>a-b)return cu}return eu}function du(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?bu:b<a?cu:eu}function Nt(a){switch(a.type){case Ud:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
992
|
+
function At(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,$t(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function zt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,$t(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Bt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
993
|
+
function Ct(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function $t(a){if(!fu.has(a)){var b=fe(a);fu.set(a,b)}return fu.get(a)}S("shaka.util.PeriodCombiner",xt);xt.prototype.setUseStreamOnce=xt.prototype.ih;xt.prototype.setAllowMultiTypeVariants=xt.prototype.ah;xt.prototype.combinePeriods=xt.prototype.Je;xt.prototype.deleteStream=xt.prototype.qg;xt.prototype.getImageStreams=xt.prototype.Ph;xt.prototype.getTextStreams=xt.prototype.hf;xt.prototype.getVariants=xt.prototype.gi;
|
|
994
|
+
var bu=1,eu=0,cu=-1,fu=new Map;function gu(a,b){var c=new DOMParser,d=hu.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 iu(a,b){try{var c=zd(a);return gu(c,b)}catch(d){return null}}
|
|
995
|
+
var hu=new Kc(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 ju(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.na=1;this.F=[];this.l={Zd:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,sd:0};this.s=new Map;this.o={};this.B={};this.fa={};this.m=new xt;this.K=0;this.ma=new Ra(5);this.M=new Rc(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.kb(a.I,"timeupdate"),a.I.paused)){a.G.ja(a.I,"timeupdate",function(){return ku(a)});return}ku(a)});this.S=new lg;this.O=null;this.C=[];this.aa=Infinity;this.H=!1;this.h=null;this.N=0;this.da=!1;this.G=
|
|
996
|
+
new gb;this.I=null;this.ea=!1;this.Y=[]}q=ju.prototype;q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.V()&&this.M.vc();this.h&&this.h.configure(this.g);this.m&&(this.m.ah(this.g.dash.multiTypeVariantsAllowed&&ob()),this.m.ih(this.g.dash.useStreamOnceInPeriodFlattening))};
|
|
997
|
+
q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.H=b.isLowLatencyMode(),c.A=[a],c.j=b,F(e,lu(c),2);d=e.h;c.j&&mu(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
998
|
+
q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Zd:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,sd:0};this.m=null;null!=this.M&&(this.M.stop(),this.M=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.S.destroy()};
|
|
999
|
+
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ra(c,2),F(c,lu(a),4);if(2!=c.g)return ta(c,0);b=ua(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.V()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Xb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,mu(this,0))}}};
|
|
998
1000
|
q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.I=a};
|
|
999
|
-
function
|
|
1000
|
-
function
|
|
1001
|
-
p=a.g.dash.xlinkFailGracefully;r=
|
|
1002
|
-
function
|
|
1003
|
-
"";a.l.
|
|
1004
|
-
J=I.attributes.serviceLocation,M=jh(I),J&&M&&(
|
|
1005
|
-
sh));Pa=a.g.dash.ignoreMaxSegmentDuration;Za=null;Pa||(Za=oh(b,"maxSegmentDuration",sh));Va=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.ea=a.i.presentationTimeline.V()&&"static"==Va);a.l.type=Va;
|
|
1006
|
-
za.V())&&!isNaN(a.g.availabilityWindowOverride)&&(va=a.g.availabilityWindowOverride);null==va&&(va=Infinity);za.oe(va);ud=b.attributes.profiles||"";a.l.profiles=ud.split(",");
|
|
1007
|
-
a.H&&za.bh(a.aa);za.xf(Za||1);return F(
|
|
1008
|
-
gapCount:a.N,isLowLatency:a.da};if(!za.ph()){
|
|
1009
|
-
function
|
|
1010
|
-
N}}else if("type"===n.Tb){a.i.presentationTimeline.uc("static"==p);a.l.type=p;N=t(a.s.values());for(P=N.next();!P.done;P=N.next())P.value.vb="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Tb?a.l.
|
|
1011
|
-
"";for(var Q=t(P),W=Q.next();!W.done;W=Q.next())W=a.s.get(W.value),Dh(W.J.bc,l.tagName,N.Tb,R);N=P}else N=[];u=N;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){N=Ah(l.attributes.sel||"");N=
|
|
1012
|
-
G);L=t(f);for(K=L.next();!K.done;K=L.next())I=K.value,e.push.apply(e,x(
|
|
1013
|
-
function
|
|
1014
|
-
function
|
|
1015
|
-
","+a.J.id);return b}function
|
|
1016
|
-
function
|
|
1017
|
-
return c}function
|
|
1018
|
-
function
|
|
1019
|
-
d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=
|
|
1020
|
-
function
|
|
1021
|
-
function
|
|
1022
|
-
4,4018);}d=c.filter(function(m){return!m.Yf});c=c.filter(function(m){return m.Yf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Yf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next(),l={};!k.done;l={Sf:void 0},k=h.next())l.Sf=k.value,l.Sf.trickModeVideo=e.streams.find(function(m){return function(n){return fe(m.Sf.codecs)==fe(n.codecs)}}(l))}}c=
|
|
1023
|
-
d,Ud);d=
|
|
1024
|
-
function
|
|
1001
|
+
function lu(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return b=4,c="MPD",d=nu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=wt(a.h,"Location",!0),f.length&&(e=f)),g=sg(e,a.g.retryParameters),h=Date.now(),F(n,ou(a,g,0,{type:b}),2);if(3!=n.g){k=n.h;if(!a.j)return n.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);return F(n,pu(a,k.data,k.uri,c),3)}l=Date.now();m=(l-h)/1E3;a.ma.sample(1,m);return n.return(m)})}
|
|
1002
|
+
function pu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=vm;if(f!=g){qb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=iu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ad(h.outerHTML)}k=$g(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=wm;l!=m&&l(k);if("Patch"===d)return v.return(qu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(ru(a,k,c));
|
|
1003
|
+
p=a.g.dash.xlinkFailGracefully;r=Js(k,a.g.retryParameters,p,c,a.j.networkingEngine);mg(a.S,r);return F(v,r.promise,2)}u=v.h;return v.return(ru(a,u,c))})}
|
|
1004
|
+
function ru(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za,Va,za,bb,bc,Sa,nb,Sb,Vc,ud,me,Ld,pf,ne,Ni,Fg,Oi,Gg;return O(function(cc){switch(cc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=hh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=jh(l))p=Md(d,[n])[0],m&&(a.h?vt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=wt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Zd=b.attributes.id||
|
|
1005
|
+
"";a.l.sd=oh(b,"publishTime",rh)||0;a.F=hh(b,"PatchLocation");u=Promise.resolve();if((v=lh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new rt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=jh(v))(z=oh(v,"queryBeforeStart",yh,!1))?u=st(a.h,A):st(a.h,A);D=t(f.keys());for(y=D.next();!y.done;y=D.next())B=y.value,C=f.get(B),vt(a.h,"Location",B,C)}E=hh(b,"BaseURL");G=!1;if(a.h)for(L=t(E),K=L.next();!K.done;K=L.next())I=K.value,
|
|
1006
|
+
J=I.attributes.serviceLocation,M=jh(I),J&&M&&(vt(a.h,"BaseURL",J,M),G=!0);a.Y=null;G&&a.h||(N=E.map(jh),a.Y=Md(d,N));P=function(){return a.h&&G?wt(a.h,"BaseURL"):a.Y?a.Y:[]};a.l.Ma=P;R=0;E&&E.length&&(R=oh(E[0],"availabilityTimeOffset",xh)||0);a.l.Sa=R;Q=a.g.dash.ignoreMinBufferTime;W=0;Q||(W=oh(b,"minBufferTime",sh)||0);a.K=oh(b,"minimumUpdatePeriod",sh,-1);Y=oh(b,"availabilityStartTime",rh);va=oh(b,"timeShiftBufferDepth",sh);Fa=a.g.dash.ignoreSuggestedPresentationDelay;wa=null;Fa||(wa=oh(b,"suggestedPresentationDelay",
|
|
1007
|
+
sh));Pa=a.g.dash.ignoreMaxSegmentDuration;Za=null;Pa||(Za=oh(b,"maxSegmentDuration",sh));Va=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.ea=a.i.presentationTimeline.V()&&"static"==Va);a.l.type=Va;su(a);if(a.i)for(za=a.i.presentationTimeline,bb=t(Object.values(a.o)),bc=bb.next();!bc.done;bc=bb.next())Sa=bc.value,Sa.segmentIndex&&Sa.segmentIndex.Ga(za.nb());else nb=a.g.defaultPresentationDelay||1.5*W,Sb=null!=wa?wa:nb,za=new rk(Y,Sb,a.g.dash.autoCorrectDrift);za.uc("static"==Va);(Vc=
|
|
1008
|
+
za.V())&&!isNaN(a.g.availabilityWindowOverride)&&(va=a.g.availabilityWindowOverride);null==va&&(va=Infinity);za.oe(va);ud=b.attributes.profiles||"";a.l.profiles=ud.split(",");me={vb:"static"!=Va,presentationTimeline:za,la:null,ga:null,ia:null,J:null,bandwidth:0,kf:!1,Sa:R,Lb:null,profiles:ud.split(","),roles:null};a.N=0;Ld=tu(a,me,P,b,!1);pf=Ld.duration;ne=Ld.periods;("static"!=Va||a.ea)&&Ld.sg||za.Za(pf||Infinity);a.da&&!a.H&&(Ni=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.H=a.j.isLowLatencyMode());
|
|
1009
|
+
a.H&&za.bh(a.aa);za.xf(Za||1);return F(cc,u,2);case 2:a.H&&(W=0,Fg=null!=wa?wa:a.g.defaultPresentationDelay,za.Of(Fg));if(!a.i)return F(cc,a.m.Je(ne,me.vb),6);a.i.periodCount=ne.length;a.i.gapCount=a.N;return F(cc,uu(a,ne,!1),4);case 6:a.i={presentationTimeline:za,variants:a.m.l,textStreams:a.m.hf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:W||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:vu(b),nextUrl:wu(b),periodCount:ne.length,
|
|
1010
|
+
gapCount:a.N,isLowLatency:a.da};if(!za.ph()){cc.u(7);break}Oi=hh(b,"UTCTiming");return F(cc,xu(a,P,Oi),8);case 8:Gg=cc.h;if(!a.j)return cc.return();za.dh(Gg);case 7:za.Ud();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(cc)}})}function uu(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,a.m.Je(b,!0,c),2);a.i.variants=a.m.l;d=a.m.hf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
|
|
1011
|
+
function qu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J;return O(function(M){if(1==M.g){c=b.attributes.mpdId;d=oh(b,"originalPublishTime",rh);if(!c||c!==a.l.Zd||d!==a.l.sd)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(gh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Ah(l.attributes.sel||""),n=m[m.length-1],p=jh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Tb){r=jh(l)||"";var N=sh(r);if(null!=N){a.l.Lb=N;for(var P=t(a.s.values()),R=P.next();!R.done;R=P.next())R.value.Lb=
|
|
1012
|
+
N}}else if("type"===n.Tb){a.i.presentationTimeline.uc("static"==p);a.l.type=p;N=t(a.s.values());for(P=N.next();!P.done;P=N.next())P.value.vb="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Tb?a.l.sd=rh(p)||0:null===n.Tb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Bh(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&yu(a,n.id);else if("SegmentTemplate"===n.name){P=Ah(l.attributes.sel||"");N=P[P.length-1];if(N.Tb){P=zu(a,P);R=jh(l)||
|
|
1013
|
+
"";for(var Q=t(P),W=Q.next();!W.done;W=Q.next())W=a.s.get(W.value),Dh(W.J.bc,l.tagName,N.Tb,R);N=P}else N=[];u=N;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){N=Ah(l.attributes.sel||"");N=zu(a,N);P=t(N);for(R=P.next();!R.done;R=P.next())R=a.s.get(R.value),R=Gs(R,ht,"SegmentTimeline"),Q=hh(R,"S"),Bh(Q,l),R.children=Q;z=N;D=t(z);for(y=D.next();!y.done;y=D.next())B=y.value,g.add(B)}C=t(g);for(E=C.next();!E.done;E=C.next())G=E.value,Au(a,
|
|
1014
|
+
G);L=t(f);for(K=L.next();!K.done;K=L.next())I=K.value,e.push.apply(e,x(tu(a,{vb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,la:null,ga:null,ia:null,J:null,bandwidth:0,kf:!1,Sa:a.l.Sa,profiles:a.l.profiles,Lb:a.l.Lb,roles:null},a.l.Ma,I,!0).periods));if(!e.length)return M.u(2);a.i.periodCount+=e.length;a.i.gapCount=a.N;return F(M,uu(a,e,!0),2)}"static"==a.l.type&&(J=a.l.Lb,a.i.presentationTimeline.Za(J||Infinity));H(M)})}
|
|
1015
|
+
function yu(a,b){a.i.periodCount--;for(var c=t(a.s.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.s.get(d);Gs(e,ht,"SegmentTimeline").children=[];Au(a,d);a.s.delete(d)}a.C=a.C.filter(function(f){return f!==b})}
|
|
1016
|
+
function zu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.s.values()),a=e.next();!a.done;a=e.next())a=a.value,a.la.id===c&&a.ia.id===d&&a.J.id&&b.push(c+","+a.J.id);else if(-1<e)for(d=t(a.s.values()),a=d.next();!a.done;a=d.next())a=a.value,a.la.id===c&&a.ia.position===e&&a.J.id&&b.push(c+
|
|
1017
|
+
","+a.J.id);return b}function Au(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ga(a.i.presentationTimeline.nb());try{var e=gt(c,function(f,g,h,k){return Bu(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.fa,c.J.aesKey,null,!0);d.createSegmentIndex=function(){return O(function(f){if(1==f.g)return d.segmentIndex?f.u(0):F(f,e.jc(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.J.contentType,b!=Ud&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
1018
|
+
function vu(a){var b=lh(a,"ServiceDescription");if(!b)return null;a=lh(b,"Latency");b=lh(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
|
|
1019
|
+
return c}function wu(a){a=hh(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
|
|
1020
|
+
function tu(a,b,c,d,e){var f=b.Lb;f||(f=oh(d,"mediaPresentationDuration",sh),a.l.Lb=f);var g=0;a.i&&a.i.presentationTimeline&&a.ea&&(g=a.i.presentationTimeline.Jb());var h=[],k=g;d=hh(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=oh(m,"start",sh,k),r=m.attributes.id,u=oh(m,"duration",sh),v=null;if(n){var w=oh(n,"start",sh);null!=w&&(v=w-p)}else null!=f&&(v=f-p+g);w=Xd;v&&u&&Math.abs(v-u)>w&&v>u&&a.N++;null==v&&(v=u);if(!(null!==a.O&&null!==r&&null!==p&&p<a.O)||a.C.includes(r)||l+1==
|
|
1021
|
+
d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=Cu(a,b,c,{start:p,duration:v,node:m,pf:null==v||!n});h.push(k);b.la.id&&v&&(a.fa[b.la.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(A){return A.id});return null!=f?{periods:h,duration:f+g,sg:!1}:{periods:h,duration:k,sg:!0}}
|
|
1022
|
+
function su(a){var b=Object.keys(a.B).filter(function(f){return!a.C.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.B[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.qg(a.o[e],c),delete a.o[e];delete a.B[c]}}
|
|
1023
|
+
function Cu(a,b,c,d){b.la=Du(a,d.node,null,c);b.ga=d;b.la.Sa=b.Sa;b.la.id||(b.la.id="__shaka_period_"+d.start);var e=hh(d.node,"EventStream");c=b.presentationTimeline.nb();e=t(e);for(var f=e.next();!f.done;f=e.next())Eu(a,d.start,d.duration,f.value,c);c=hh(d.node,"AdaptationSet").map(function(m,n){return Fu(a,b,n,m)}).filter(ye);if(b.vb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Oi);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,
|
|
1024
|
+
4,4018);}d=c.filter(function(m){return!m.Yf});c=c.filter(function(m){return m.Yf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Yf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next(),l={};!k.done;l={Sf:void 0},k=h.next())l.Sf=k.value,l.Sf.trickModeVideo=e.streams.find(function(m){return function(n){return fe(m.Sf.codecs)==fe(n.codecs)}}(l))}}c=Gu(a.g.disableAudio,d,"audio");e=Gu(a.g.disableVideo,d,"video");f=Gu(a.g.disableText,
|
|
1025
|
+
d,Ud);d=Gu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.la.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Gu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
1026
|
+
function Fu(a,b,c,d){function e(I){switch(I){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(I){switch(I){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ia=Du(a,d,b.la,null);b.ia.position=c;var g=!1;c=hh(d,"Role");var h=c.map(function(I){return I.attributes.value}).filter(ye),k=void 0,l=b.ia.contentType==Ud;l&&(k="subtitle");c=t(c);for(var m=c.next();!m.done;m=c.next()){m=m.value;var n=m.attributes.schemeIdUri;
|
|
1025
1027
|
if(null==n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":g=!0;break;case "caption":case "subtitle":k=m}}var p,r;n=hh(d,"EssentialProperty");c=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?c=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?r=e(parseInt(v.attributes.value,10)):
|
|
1026
1028
|
"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=hh(d,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(r=e(parseInt(v.attributes.value,10)));n=hh(d,"Accessibility");
|
|
1027
1029
|
var z=new Map,D;n=t(n);for(v=n.next();!v.done;v=n.next())if(w=v.value,v=w.attributes.schemeIdUri,w=w.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=v||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=v||a.g.disableText)"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?D="visually impaired":"2"==w&&(D="hard of hearing"));else if(v=1,null!=w){w=t(w.split(";"));for(var y=w.next();!y.done;y=w.next()){var B=y.value,
|
|
1028
|
-
C=y=void 0;B.includes("=")?(B=B.split("="),y="svc"+B[0],C=B[1].split(",")[0].split(":").pop()):(y="svc"+v,v++,C=B);z.set(y,Be(C))}}else z.set("svc1","und");else if(v=1,null!=w)for(w=w.split(";"),y=t(w),B=y.next();!B.done;B=y.next()){C=B.value;var E=B=void 0;C.includes("=")?(C=C.split("="),B=C[0].startsWith("CC")?C[0]:"CC"+C[0],E=C[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,E=C);z.set(B,Be(E))}else z.set("CC1","und");if(m)return null;m=hh(d,"ContentProtection");var G=
|
|
1029
|
-
L=Be(b.ia.language||"und"),K=b.ia.label;m=hh(d,"Representation");d=m.map(function(I){if(I=
|
|
1030
|
+
C=y=void 0;B.includes("=")?(B=B.split("="),y="svc"+B[0],C=B[1].split(",")[0].split(":").pop()):(y="svc"+v,v++,C=B);z.set(y,Be(C))}}else z.set("svc1","und");else if(v=1,null!=w)for(w=w.split(";"),y=t(w),B=y.next();!B.done;B=y.next()){C=B.value;var E=B=void 0;C.includes("=")?(C=C.split("="),B=C[0].startsWith("CC")?C[0]:"CC"+C[0],E=C[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,E=C);z.set(B,Be(E))}else z.set("CC1","und");if(m)return null;m=hh(d,"ContentProtection");var G=ss(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),
|
|
1031
|
+
L=Be(b.ia.language||"und"),K=b.ia.label;m=hh(d,"Representation");d=m.map(function(I){if(I=Hu(a,b,G,k,L,K,g,h,z,I,D,A))I.hdr=I.hdr||p,I.colorGamut=I.colorGamut||r,I.fastSwitching=u;return I}).filter(function(I){return!!I});if(0==d.length){c="image"==b.ia.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new T(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=Iu(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=b.ia.contentType;
|
|
1030
1032
|
l=b.ia.id||"__fake__"+a.na++;n=t(d);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(G.drmInfos);for(y=w.next();!y.done;y=w.next())y=y.value,y.keyIds=y.keyIds&&v.keyIds?new Set([].concat(x(y.keyIds),x(v.keyIds))):y.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(I){return I.attributes.id}).filter(ye);return{id:l,contentType:b.ia.contentType,language:L,gk:g,streams:d,drmInfos:G.drmInfos,Yf:c,Oi:m}}
|
|
1031
|
-
function
|
|
1032
|
-
2);if(3!=P.g){J=P.h;if(!J.data||16!=J.data.byteLength)throw new T(2,4,4049);M={name:"AES-CBC"};N=w;return F(P,window.crypto.subtle.importKey("raw",J.data,M,!0,["decrypt"]),3)}N.cryptoKey=P.h;w.fetchKey=void 0;H(P)})}}}b.J.aesKey=w;A=function(J,M,N,P){return
|
|
1033
|
-
J.Hb(function(M){M.mimeType=E;M.codecs=G});return Promise.resolve(J)}}}}catch(J){if((v||u)&&4002==J.code)return null;throw J;}n=hh(l,"ContentProtection");n=
|
|
1034
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(J.attributes.schemeIdUri)}))&&(L=l.attributes.value),!L))return null;var K;v=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(v.includes("hvc1.2.4.L153.B0")||v.includes("hev1.2.4.L153.B0"))&&(K="PQ");l=b.J.id?b.la.id+","+b.J.id:"";a.F.length&&p&&a.s.set(b.la.id+","+p,
|
|
1033
|
+
function Hu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=Du(a,l,b.ia,null);var p=b.J.id;a.aa=Math.min(a.aa,b.J.Sa);a.da=0<a.aa;if(!Ju(b.J))return null;var r=b.ga.start;b.bandwidth=oh(l,"bandwidth",vh)||0;b.roles=h;var u=b.J.contentType,v=u==Ud||"application"==u;u="image"==u;try{var w=void 0;if(c.Ee){var A=b.J.Ma,z=Md(A(),[c.Ee.vi]),D=sg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Ee.iv,firstMediaSequenceNumber:0,fetchKey:function(){var J,M,N;return O(function(P){if(1==P.g)return F(P,ou(a,D,6),
|
|
1034
|
+
2);if(3!=P.g){J=P.h;if(!J.data||16!=J.data.byteLength)throw new T(2,4,4049);M={name:"AES-CBC"};N=w;return F(P,window.crypto.subtle.importKey("raw",J.data,M,!0,["decrypt"]),3)}N.cryptoKey=P.h;w.fetchKey=void 0;H(P)})}}}b.J.aesKey=w;A=function(J,M,N,P){return Bu(a,J,M,N,P)};if(b.J.Sc)var y=Ws(b,A,w);else if(b.J.Qb)y=bt(b,a.o,w);else if(b.J.bc)y=gt(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.fa,w,n,!1);else{var B=b.ga.duration||0,C=b.J.Ma,E=b.J.mimeType,G=b.J.codecs;y={jc:function(){var J=Pk(r,B,C());
|
|
1035
|
+
J.Hb(function(M){M.mimeType=E;M.codecs=G});return Promise.resolve(J)}}}}catch(J){if((v||u)&&4002==J.code)return null;throw J;}n=hh(l,"ContentProtection");n=ws(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;hh(l,"SupplementalProperty").some(function(J){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==J.attributes.schemeIdUri&&"JOC"==J.attributes.value})&&(A=!0);z=!1;v&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var L;if(u&&((l=hh(l,"EssentialProperty").find(function(J){return["http://dashif.org/thumbnail_tile",
|
|
1036
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(J.attributes.schemeIdUri)}))&&(L=l.attributes.value),!L))return null;var K;v=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(v.includes("hvc1.2.4.L153.B0")||v.includes("hev1.2.4.L153.B0"))&&(K="PQ");l=b.J.id?b.la.id+","+b.J.id:"";a.F.length&&p&&a.s.set(b.la.id+","+p,Ku(b));var I=l&&a.o[l]?a.o[l]:{id:a.na++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){I.segmentIndex&&
|
|
1035
1037
|
(I.segmentIndex.release(),I.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:v,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ia.language,label:f,type:b.ia.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.J.be,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:A,
|
|
1036
1038
|
closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:L,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Zd(b.J.mimeType,b.J.codecs)])};I.createSegmentIndex=function(){var J;return O(function(M){if(1==M.g){if(I.segmentIndex)return M.u(0);J=I;return F(M,y.jc(),3)}J.segmentIndex=M.h;H(M)})};l&&b.vb&&!a.o[l]&&(b=b.la.id||"",a.B[b]||(a.B[b]=[]),a.o[l]=I,a.B[b].push(l));return I}
|
|
1037
|
-
function
|
|
1038
|
-
function
|
|
1039
|
-
function
|
|
1040
|
-
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=vl(m).join(",");n=oh(b,"frameRate",zh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=
|
|
1041
|
-
xh)||0:0;z=c.Sa+y+z+D;D=null;(y=lh(b,"SegmentSequenceProperties"))&&(y=lh(y,"SAP"))&&(D=oh(y,"cadence",uh));y=b.attributes.label;var B=hh(b,"Label");B&&B.length&&(B=B[0],ih(B)&&(y=ih(B)));return{Ma:function(){return Md(d(),f.length?a.h&&h?
|
|
1042
|
-
Sa:z,Pd:null,Kf:D||c.Kf,label:y||null}}function
|
|
1043
|
-
function
|
|
1044
|
-
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
|
|
1045
|
-
function
|
|
1046
|
-
function
|
|
1047
|
-
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":Ya("NTP UTCTiming scheme is not supported");break;default:Ya("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return F(n
|
|
1039
|
+
function Ku(a){function b(c){if(!c)return null;c=Ke(c);c.Sc=null;c.Qb=null;c.bc=Fh(c.bc);return c}a=Ke(a);a.la=b(a.la);a.ia=b(a.ia);a.J=b(a.J);a.ga&&(a.ga=Ke(a.ga),a.ga.node=null);return a}
|
|
1040
|
+
function ku(a){var b,c;return O(function(d){switch(d.g){case 1:return b=0,ra(d,2),F(d,lu(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=ua(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();mu(a,b);H(d)}})}function mu(a,b){if(!(0>a.K)){var c=a.K;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.M.$(Math.max(c-b,Ta(a.ma)))}}
|
|
1041
|
+
function Du(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,be:null,audioSamplingRate:null,Sa:0,Kf:0};d=d||c.Ma;var e=b.attributes.id,f=hh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=jh(m);l&&m&&(vt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(jh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=ph(b,
|
|
1042
|
+
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=vl(m).join(",");n=oh(b,"frameRate",zh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=Lu(hh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=hh(b,"AudioChannelConfiguration");u=Mu(u)||c.be;var v=oh(b,"audioSamplingRate",wh)||c.audioSamplingRate;k||(k=Iu(l,m));var w=lh(b,"SegmentBase"),A=lh(b,"SegmentTemplate"),z=w?oh(w,"availabilityTimeOffset",xh)||0:0,D=A?oh(A,"availabilityTimeOffset",xh)||0:0,y=f&&f.length?oh(f[0],"availabilityTimeOffset",
|
|
1043
|
+
xh)||0:0;z=c.Sa+y+z+D;D=null;(y=lh(b,"SegmentSequenceProperties"))&&(y=lh(y,"SAP"))&&(D=oh(y,"cadence",uh));y=b.attributes.label;var B=hh(b,"Label");B&&B.length&&(B=B[0],ih(B)&&(y=ih(B)));return{Ma:function(){return Md(d(),f.length?a.h&&h?wt(a.h,e):g?g:[]:[])},Sc:w||c.Sc,Qb:lh(b,"SegmentList")||c.Qb,bc:A||c.bc,width:oh(b,"width",wh)||c.width,height:oh(b,"height",wh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,be:u,audioSamplingRate:v,
|
|
1044
|
+
Sa:z,Pd:null,Kf:D||c.Kf,label:y||null}}function Lu(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
1045
|
+
function Mu(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
1046
|
+
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 Ju(a){var b=a.Sc?1:0;b+=a.Qb?1:0;b+=a.bc?1:0;if(0==b)return a.contentType==Ud||"application"==a.contentType?!0:!1;1!=b&&(a.Sc&&(a.Qb=null),a.bc=null);return!0}
|
|
1047
|
+
function Nu(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=Md(b(),e),g=sg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),mg(a.S,h),F(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=vd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
1048
|
+
function xu(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ra(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(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.u(8);
|
|
1049
|
+
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":Ya("NTP UTCTiming scheme is not supported");break;default:Ya("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return F(n,Nu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return F(n,Nu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
|
|
1048
1050
|
3);break;case 5:ua(n);case 3:g=f.next();n.u(2);break;case 4:return Ya("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
1049
|
-
function
|
|
1050
|
-
function
|
|
1051
|
-
function
|
|
1052
|
-
function
|
|
1053
|
-
function
|
|
1054
|
-
function
|
|
1055
|
-
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=
|
|
1056
|
-
g.name&&(g.attributes.push(new
|
|
1057
|
-
var
|
|
1058
|
-
function
|
|
1059
|
-
|
|
1060
|
-
q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.I=b.isLowLatencyMode(),F(e,
|
|
1061
|
-
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.da&&(a.push(this.da.destroy()),this.da=null);this.g=this.h=null;this.
|
|
1062
|
-
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g){if(!
|
|
1063
|
-
a.h.updateDuration());h&&
|
|
1064
|
-
function
|
|
1065
|
-
m=
|
|
1066
|
-
G.next())K=L.value,K
|
|
1051
|
+
function Eu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=oh(d,"timescale",wh)||1,k=oh(d,"presentationTimeOffset",wh)||0;d=t(hh(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=oh(l,"presentationTime",wh)||0,n=oh(l,"duration",wh)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Eh(l),eventNode:Fh(l)},a.j.onTimelineRegionAdded(l))}}
|
|
1052
|
+
function Bu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=yg,g=e?0:1,h=zl(b,c,d,a.g.retryParameters),F(l,ou(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Iu(a,b){b=Zd(a,b);return oe(b)?Ud:a.split("/")[0]}function ou(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);mg(a.S,b);return b.promise}
|
|
1053
|
+
function nu(a){var b=a.l.sd;if(!a.l.Zd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=wh(e.attributes.ttl);return!e||b+e>c}).map(jh).filter(ye);return d.length?Md(a.A,d):[]}S("shaka.dash.DashParser",ju);yi["application/dash+xml"]=function(){return new ju};yi["video/vnd.mpeg.dash.mpd"]=function(){return new ju};function $u(){}S("shaka.dependencies",$u);$u.has=function(a){return av.has(a)};$u.add=function(a,b){if(!bv[a])throw Error(a+" is not supported");a==cv?qb("mux.js","mux.js is no longer used in Shaka Player."):av.set(a,function(){return b})};var cv="muxjs",bv={hk:cv,ISOBoxer:"ISOBoxer"};$u.Allowed=bv;var av=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function dv(a,b,c){this.type=a;this.g=b;this.segments=c||null}function ev(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}ev.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
1054
|
+
function fv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function gv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=gv(a,b))?a.value:c||null}function hv(a,b){a=gv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function iv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.zb=c}function jv(a,b){this.name=a;this.value=b};function kv(a,b){return a.filter(function(c){return c.name==b})}function lv(a,b){return a.filter(function(c){return hv(c,"TYPE")==b})}function mv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function nv(a,b,c){c=void 0===c?0:c;return(a=mv(a,b))?Number(a.value):c}function ov(a,b,c){return b?pv(a,[b],c):[]}function pv(a,b,c){if(!b.length)return[];b=Md(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(qv(d.value,c));return a}
|
|
1055
|
+
function qv(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new T(2,4,4039,e);}}return a};function rv(){this.g=0}
|
|
1056
|
+
function sv(a,b){b=vd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=tv(a,f),--a.g,uv.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=tv(a,g);if(vv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
1057
|
+
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=tv(a,k),uv.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"==Z(k,"TYPE")?f.push(k):"MAP"==Z(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 iv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new iv("",d,f)));return new dv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
1058
|
+
g.name&&(g.attributes.push(new jv("URI",h)),d=!0)}}return new dv(b,e)}function tv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Rp(d);var f;(f=Tp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Tp(d,g);)c.push(new jv(f[1],f[2]||f[3])),Sp(d)}return new ev(a,b,c,e)}
|
|
1059
|
+
var uv="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),vv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function wv(){}function xv(a){try{var b=yv(a);return eg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return cg(c)}}
|
|
1060
|
+
function yv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",wv);wv.parse=xv;og("data",xv);function zv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.G=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Ud,new Map);this.N.set("image",new Map);this.bb=new Set;this.i=new Map;this.l=null;this.M="";this.Fa=new rv;this.H=-1;this.fa=Infinity;this.ea=this.Gb=this.Ub=!1;this.A=new Rc(function(){if(a.aa&&!a.g.continueLoadingWhenPaused&&(a.Y.kb(a.aa,"timeupdate"),a.aa.paused)){a.Y.ja(a.aa,"timeupdate",function(){return Av(a)});return}Av(a)});this.va=
|
|
1061
|
+
Bv;this.m=null;this.ab=0;this.o=Infinity;this.Da=this.za=this.S=0;this.da=new lg;this.C=new Map;this.F=new Map;this.ra=new Map;this.ma=new Map;this.K=new Map;this.na=new Map;this.ya=new Map;this.Fb=this.I=!1;this.Db=new Ra(5);this.j=null;this.O=!0;this.Ea=new Set;this.Y=new gb;this.aa=null}q=zv.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};
|
|
1062
|
+
q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.I=b.isLowLatencyMode(),F(e,Cv(c,[a]),2)):3!=e.g?(d=e.h,c.M=d.uri,F(e,Dv(c,d.data,a),3)):e.return(c.m)})};
|
|
1063
|
+
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.da&&(a.push(this.da.destroy()),this.da=null);this.g=this.h=null;this.bb.clear();this.m=null;this.i.clear();this.G.clear();this.F.clear();this.s.clear();this.ra.clear();this.ma.clear();this.K.clear();this.na.clear();this.ya.clear();this.Ea.clear();this.j&&this.j.destroy();this.Y&&(this.Y.release(),this.Y=null);return Promise.all(a)};
|
|
1064
|
+
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g){if(!Ev(a))return r.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Fv(a,g));return F(r,Promise.all(b),2)}Gv(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.fd});d.length&&!h&&(k=Hv,Iv(a,k.uh),l=d.map(function(u){return u.Kb}),a.l.Za(Math.min.apply(Math,x(l))),
|
|
1065
|
+
a.h.updateDuration());h&&Jv(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.segmentIndex&&!p.stream.segmentIndex.P[0]&&a.h.disableStream(p.stream);H(r)})};function Kv(a,b){return Ev(a)?a.N.get(b.type):b.Wd}
|
|
1066
|
+
function Fv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va;return O(function(Fa){switch(Fa.g){case 1:c=[];d=t(b.L());for(e=d.next();!e.done;e=d.next())f=e.value,g=new tc(f),h=g.g,b.Dd&&(0<=b.pb&&h.add("_HLS_msn",String(b.pb)),0<=b.qb&&h.add("_HLS_part",String(b.qb))),b.Ed&&h.add("_HLS_skip","YES"),Ic(h)&&xc(g,h),c.push(g.toString());ra(Fa,2);return F(Fa,Cv(a,c,!0),4);case 4:k=Fa.h;ta(Fa,3);break;case 2:throw l=ua(Fa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Fa.return();
|
|
1067
|
+
m=sv(a.Fa,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.L().includes(n)||b.Vg.push(n);p=kv(m.g,"EXT-X-DEFINE");r=Lv(a,p,n);u=b.stream;v=Kv(a,b);return F(Fa,Mv(a,m,u.mimeType,b.L,r),5);case 5:w=Fa.h;A=w.keyIds;z=w.drmInfos;D=function(wa,Pa){return wa.size===Pa.size&&[].concat(x(wa)).every(function(Za){return Pa.has(Za)})};D(u.keyIds,A)||(u.keyIds=A,u.drmInfos=z,a.h.newDrmInfo(u));y=Nv(a,m,v,r,b.L,b.type);B=y.segments;if(C=y.bandwidth)u.bandwidth=C;E=sl(u);G=t(B);for(L=G.next();!L.done;L=
|
|
1068
|
+
G.next())K=L.value,K.Z&&(K.Z.Jc=E);u.segmentIndex.qd(B,a.l.nb());B.length&&(I=nv(m.g,"EXT-X-MEDIA-SEQUENCE",0),M=(J=mv(m.g,"EXT-X-SKIP"))?Number(Z(J,"SKIPPED-SEGMENTS")):0,N=Ov(I,B),P=N.pb,R=N.qb,b.pb=P+M,b.qb=R,Q=v.get(I),u.segmentIndex.Ga(Q));if(W=u.segmentIndex.P[0]||null)b.pc=W.startTime,Y=B[B.length-1],b.Kb=Y.endTime;if(va=mv(m.g,"EXT-X-ENDLIST"))b.fd=!0;Pv(a,m);Qv(a,m.g,u.type,r,b.L);H(Fa)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
|
|
1067
1069
|
q.banLocation=function(a){this.j&&this.j.banLocation(a)};q.setMediaElement=function(a){this.aa=a};
|
|
1068
|
-
function
|
|
1069
|
-
|
|
1070
|
-
function
|
|
1071
|
-
function
|
|
1072
|
-
function
|
|
1073
|
-
v=
|
|
1074
|
-
C.stream:null,video:"video"==m?C.stream:null,bandwidth:C.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==e.type&&(
|
|
1070
|
+
function Rv(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.H,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=Kv(a,f);if(g=g.P[0]||null){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.H=Math.max(a.H,l));f.Qe=l;break}}}}if(!(0>a.H))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Sv(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.H-d.Qe,0<f&&(e.P.splice(0,f),e=e.P[0]||null))e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
1071
|
+
Tv(a,d,e)}
|
|
1072
|
+
function Uv(a,b){if(Infinity==a.fa){b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.stream.segmentIndex.P[0]||null,null!=c&&null!=c.h&&(a.fa=Math.min(a.fa,c.h))}b=a.fa;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Sv(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=e.P[0]||null;if(f)if(null==f.h)Xa("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.L(),"Expect AV sync issues!");else for(Tv(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Vf(b)}}}}
|
|
1073
|
+
function Tv(a,b,c){b.pc+=c;b.Kb+=c;a=Kv(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.L()}
|
|
1074
|
+
function Dv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W;return O(function(Y){switch(Y.g){case 1:d=Wd;e=sv(a.Fa,b);f=kv(e.g,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new rk(null,0);a.l.uc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.O=!1,D=kv(e.g,"EXT-X-DEFINE"),n=Lv(a,D,a.M),m=d.ha,y="",B=new Map,F(Y,Vv(a,a.B++,n,e,l,"",m,y,!0,"Media Playlist",null,B,null,!1,null,!1),7);Wv(a,f);p=kv(e.g,"EXT-X-MEDIA");r=kv(e.g,"EXT-X-STREAM-INF");u=kv(e.g,"EXT-X-IMAGE-STREAM-INF");
|
|
1075
|
+
v=kv(e.g,"EXT-X-I-FRAME-STREAM-INF");w=kv(e.g,"EXT-X-SESSION-KEY");A=kv(e.g,"EXT-X-SESSION-DATA");z=kv(e.g,"EXT-X-CONTENT-STEERING");Xv(a,A);return F(Y,Yv(a,z),4);case 4:return Zv(a,r),$v(a,p),F(Y,aw(a,r,w,p,l,a.s),5);case 5:return g=Y.h,h=bw(a,p),F(Y,cw(a,u,v),6);case 6:k=Y.h;Y.u(3);break;case 7:C=Y.h,a.i.set(c,C),C.stream&&(E=sl(C.stream),C.stream.segmentIndex.Hb(function(va){va.Z&&(va.Z.Jc=E)})),m=C.stream.type,g.push({id:0,language:Be(y||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==m?
|
|
1076
|
+
C.stream:null,video:"video"==m?C.stream:null,bandwidth:C.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==e.type&&(Ev(a)&&(dw(a,e),G=a.o,a.A.$(G)),L=Array.from(a.i.values()),ew(a,L),Jv(a),Qv(a,e.g,m,n,l));a.m={presentationTimeline:a.l,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
1075
1077
|
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1};if(a.ea||!a.g.hls.disableCodecGuessing){Y.u(8);break}K=[];I=t(a.m.variants);for(J=I.next();!J.done;J=I.next())M=J.value,M.audio&&""===M.audio.codecs&&K.push(M.audio.createSegmentIndex()),M.video&&""===M.video.codecs&&K.push(M.video.createSegmentIndex());return F(Y,Promise.all(K),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];P=g[0];R=t([P.video,P.audio]);for(Q=R.next();!Q.done;Q=R.next())(W=
|
|
1076
1078
|
Q.value)&&!W.segmentIndex&&N.push(W.createSegmentIndex());if(0<N.length)return F(Y,Promise.all(N),0)}Y.u(0)}})}
|
|
1077
|
-
function
|
|
1078
|
-
case 5:p=L.h;case 4:(r=w.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return A=zl(e.L(),e.Yb(),e.Wb(),a.g.retryParameters),F(L,
|
|
1079
|
+
function fw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G;return O(function(L){switch(L.g){case 1:c=tl(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return L.return(c);d=gw(a,b);e=d.segment;f=d.segmentIndex;g=e.L();h=g[0];k=new tc(h);l=k.Pa.split(".").pop();if(m=hw[l])return L.return(tl(m));n=yg;r=p=null;u=e.Z;if(!u){L.u(2);break}v=zl(u.L(),u.Yb(),u.Wb(),a.g.retryParameters);return F(L,iw(a,v,n,{type:0}),3);case 3:w=L.h;p=w.data;if(!u.aesKey){L.u(4);break}return F(L,yl(p,u.aesKey,0),5);
|
|
1080
|
+
case 5:p=L.h;case 4:(r=w.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return A=zl(e.L(),e.Yb(),e.Wb(),a.g.retryParameters),F(L,iw(a,A,n,{type:1}),6);case 6:z=L.h;D=z.data;if(!e.aesKey){L.u(7);break}return F(L,yl(D,e.aesKey,f),8);case 8:D=L.h;case 7:(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());B="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");C=["audio/mp4","video/mp4","video/iso.segment"];if(Fj(zb(D))){var K=D;var I=zb(K);I=(new rj).parse(I);
|
|
1079
1081
|
var J=I.$c();I=I.jf();var M=[],N=!1,P=!1;switch(J.audio){case "aac":case "aac-loas":M.push("mp4a.40.2");N=!0;break;case "mp3":M.push("mp4a.40.34");N=!0;break;case "ac3":M.push("ac-3");N=!0;break;case "ec3":M.push("ec-3");N=!0;break;case "opus":M.push("opus"),N=!0}switch(J.video){case "avc":I.codec?M.push(I.codec):M.push("avc1.42E01E");P=!0;break;case "hvc":I.codec?M.push(I.codec):M.push("hvc1.1.6.L93.90");P=!0;break;case "av1":M.push("av01.0.01M.08"),P=!0}if(M.length){J=N&&!P;N=new Map;if(P){P=new Gb("video/mp2t");
|
|
1080
|
-
P.i(K);K=t(P.j());for(var R=K.next();!R.done;R=K.next())R=R.value,N.set(R,R);P.g()}I={type:J?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:I.height,width:I.width,channelCount:null,sampleRate:null,closedCaptions:N,
|
|
1081
|
-
function
|
|
1082
|
-
c.h&&a.l.eh(c.h);a.l.Ud()}function
|
|
1083
|
-
function
|
|
1084
|
-
function
|
|
1085
|
-
function
|
|
1086
|
-
function
|
|
1087
|
-
function
|
|
1088
|
-
function
|
|
1089
|
-
function
|
|
1090
|
-
p=Z(g,"CHARACTERISTICS"),r=
|
|
1091
|
-
function
|
|
1092
|
-
function
|
|
1093
|
-
z(m,""):null;Va.u(6);break}return F(Va,
|
|
1094
|
-
|
|
1095
|
-
function
|
|
1096
|
-
"URI")});h=d.audio.find(function(v){return v&&v.L().find(function(w){return r.includes(w)})});g=
|
|
1097
|
-
n=Z(c,"NAME"),p=
|
|
1098
|
-
function
|
|
1099
|
-
function
|
|
1100
|
-
function
|
|
1101
|
-
r=r?r.L().sort().join(","):"";var u=f?f.L().sort().join(","):"";r=r+" - "+u;h&&k&&!Lc(n,p)||a.
|
|
1102
|
-
function
|
|
1103
|
-
function
|
|
1104
|
-
m=n.next().value;n=n.next().value;(m=c.get(m))&&
|
|
1105
|
-
function
|
|
1082
|
+
P.i(K);K=t(P.j());for(var R=K.next();!R.done;R=K.next())R=R.value,N.set(R,R);P.g()}I={type:J?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:I.height,width:I.width,channelCount:null,sampleRate:null,closedCaptions:N,wd:null,colorGamut:null}}else I=null;if(E=I)return L.return(E)}else if(B.includes(l)||C.includes(y)||r&&C.includes(r))if(G=ul(p,D))return L.return(G);return y?L.return(tl(y)):r?L.return(tl(r)):L.return(c)}})}
|
|
1083
|
+
function Jv(a){if(Ev(a)){if(a.va==jw){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.Kb),c=Math.min(c,e.pc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.A);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.oe(b)}}else a.l.Za(kw(a));if(!a.l.s)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1084
|
+
c.h&&a.l.eh(c.h);a.l.Ud()}function Wv(a,b){var c=(new tc(a.M)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(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)}}
|
|
1085
|
+
function Lv(a,b,c){c=(new tc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(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}
|
|
1086
|
+
function Zv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=lw(a,d);if(f){var g=Sd(Ud,d);a.F.set(f,g);Nb(d,g)}e&&(f=Sd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.F.set(e,f));c&&(e=Sd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.F.set(c,e))}}
|
|
1087
|
+
function Xv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",ov([a.M],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1088
|
+
function Yv(a,b){var c,d,e,f,g,h;return O(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=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new rt(a.h);a.j.configure(a.g);a.j.i=[a.M];a.j.setManifestType("HLS");a.j.h=g;c=st(a.j,h);break}return F(k,c,0)})}
|
|
1089
|
+
function bw(a,b){var c=lv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return mw(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=hv(d.value,"GROUP-ID");if(d=a.F.get(e))if(e=a.G.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=nw(Ud,d)||ow(Ud),pw(f.stream)}}return b.filter(function(g){return g})}
|
|
1090
|
+
function pw(a){var b=new Set([Zd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Hb(function(c){c.mimeType&&b.add(Zd(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1091
|
+
function cw(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ra(m,2);return F(m,qw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=ua(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=hv(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
|
|
1092
|
+
p=Z(g,"CHARACTERISTICS"),r=rw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;r.stream.width=Number(w)||void 0;r.stream.height=Number(A)||void 0;var z=Z(g,"BANDWIDTH");z&&(r.stream.bandwidth=Number(z));a.i.set(h,r);l=r}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(D){if(a.g.hls.ignoreImageStreamFailures)return null;throw D;}})),F(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1093
|
+
function sw(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=fv(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)mw(a,d[g],c)}
|
|
1094
|
+
function aw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za;return O(function(Va){switch(Va.g){case 1:g=[];h=new Set;if(!(0<c.length)){Va.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Va.u(2);break}m=l.value;n=hv(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){Va.u(4);break}if(tw(n)){u=ov(e(),hv(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=sg(u,a.g.retryParameters),A=iw(a,w,6),a.K.set(v,A));Va.u(4);break}if("identity"!=p){r=(z=uw[p])?
|
|
1095
|
+
z(m,""):null;Va.u(6);break}return F(Va,vw(a,m,"",e,null,f),9);case 9:r=Va.h;case 6:if(r){if(r.keyIds)for(D=t(r.keyIds),y=D.next();!y.done;y=D.next())B=y.value,h.add(B);g.push(r)}case 4:l=k.next();Va.u(3);break;case 2:C={};E=t(b);for(G=E.next();!G.done;G=E.next())L=G.value,K=fv(L,!a.j),C[K]?C[K].push(L):C[K]=[L];I=[];for(J in C)M=C[J],N=M[0],P=Z(N,"FRAME-RATE"),R=Number(Z(N,"AVERAGE-BANDWIDTH"))||Number(hv(N,"BANDWIDTH")),Q=Z(N,"RESOLUTION"),W=t(Q?Q.split("x"):[null,null]),Y=W.next().value,va=W.next().value,
|
|
1096
|
+
Fa=Z(N,"VIDEO-RANGE"),(wa=Z(N,"REQ-VIDEO-LAYOUT"))&&wa.includes(",")&&(Pa=wa.split(",").filter(function(za){return"CH-STEREO"==za||"CH-MONO"==za}),wa=Pa[0]),wa=wa||"CH-MONO",Za=ww(a,M,d),I.push.apply(I,x(xw(a,Za.audio,Za.video,R,Y,va,P,Fa,wa,g,h)));return Va.return(I.filter(function(za){return null!=za}))}})}
|
|
1097
|
+
function ww(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=Z(m,"AUDIO");var n=Z(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Z(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(hv(v,"GROUP-ID"))}),sw(a,k,e));k=(e=f.sort().join(","))&&a.G.has(e)?a.G.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var r=b.map(function(v){return hv(v,
|
|
1098
|
+
"URI")});h=d.audio.find(function(v){return v&&v.L().find(function(w){return r.includes(w)})});g=lw(a,b[0]);n=Sd("video",g);(p=Sd("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(v){var w=Z(v,"URI")||"",A=Z(v,"TYPE");v=hv(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
|
|
1099
|
+
n=Z(c,"NAME"),p=yw(c),zw(c),m=Z(c,"CHARACTERISTICS"),u=Aw(c));a=Bw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
1100
|
+
function lw(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.ea=0<c.length;a.ea||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return vl(a)}function yw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1101
|
+
function Aw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function zw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1102
|
+
function xw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Cw(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;
|
|
1103
|
+
r=r?r.L().sort().join(","):"";var u=f?f.L().sort().join(","):"";r=r+" - "+u;h&&k&&!Lc(n,p)||a.bb.has(r)||(h={id:a.B++,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.bb.add(r))}return e}
|
|
1104
|
+
function $v(a,b){b=lv(b,"CLOSED-CAPTIONS");a.O=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=Be(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=hv(d,"GROUP-ID");d=hv(d,"INSTREAM-ID").replace("SERVICE","svc");a.C.get(e)||a.C.set(e,new Map);a.C.get(e).set(d,c)}}
|
|
1105
|
+
function mw(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=hv(k,"URI");k=hv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=hv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Ud);if(k==Ud)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.F.has(l)){b=a.F.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
1106
|
+
m=n.next().value;n=n.next().value;(m=c.get(m))&&vt(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?yw(h):null;var p="audio"==k?zw(h):!1,r=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?Aw(h):null;d=rw(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.G.has(g)?a.G.get(g).push(d):a.G.set(g,[d]);a.i.set(e,d);return d}
|
|
1107
|
+
function qw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=hv(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=rw(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?F(p,h.stream.createSegmentIndex(),3):p.u(2)}2!=p.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])*
|
|
1106
1108
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1107
|
-
function
|
|
1109
|
+
function Bw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=hv(r,"URI");r=Z(r,"PATHWAY-ID");a.j&&r&&vt(a.j,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.O=!1;b=null;break a}if(b){if("NONE"!=b){b=a.C.get(b);break a}a.O=!1}else if(!b&&a.C.size)for(b=t(a.C.keys()).next();!b.done;){b=a.C.get(b.value);break a}}b=null}c=Rd(d,c);d=rw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,
|
|
1108
1110
|
d);return d}
|
|
1109
|
-
function
|
|
1110
|
-
M,I);P=!1;(!a.ea&&a.g.hls.disableCodecGuessing||a.O&&e==C.ha&&!a.g.hls.disableClosedCaptionsDetection)&&0<J.segments.length&&(a.O=!1,P=!0);R=!a.ea&&a.g.hls.disableCodecGuessing;Q=
|
|
1111
|
-
w.mimeType=Y.mimeType;w.bandwidth=w.bandwidth||Y.bandwidth;w.codecs=w.codecs||Y.codecs;w.closedCaptions=w.closedCaptions||Y.closedCaptions;w.width=w.width||Y.width;w.height=w.height||Y.height;w.hdr=w.hdr||Y.hdr;w.colorGamut=w.colorGamut||Y.colorGamut;"und"==w.language&&"und"!=Y.language&&(w.language=Y.language);w.language=w.language||Y.language;w.channelsCount=w.channelsCount||Y.channelsCount;w.audioSamplingRate=w.audioSamplingRate||Y.audioSamplingRate;
|
|
1112
|
-
!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)va=!0;a.m&&va&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==C.ha||e==C.X)for(
|
|
1113
|
-
|
|
1114
|
-
w.segmentIndex=null);D=null};return z}function
|
|
1115
|
-
function
|
|
1116
|
-
function
|
|
1117
|
-
function
|
|
1118
|
-
|
|
1119
|
-
g&&(E||G||L||K)&&
|
|
1120
|
-
function
|
|
1121
|
-
function
|
|
1111
|
+
function rw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za,Va,za,bb,bc;return O(function(Sa){switch(Sa.g){case 1:return C=Wd,E=z.L(),ra(Sa,2),F(Sa,Cv(a,z.L(),!0),4);case 4:G=Sa.h;ta(Sa,3);break;case 2:L=ua(Sa);w.closeSegmentIndex();if(K=a.h.disableStream(w))return Sa.return();throw L;case 3:if(B.aborted)return Sa.return();I=G.uri;I==G.originalUri||E.includes(I)||A.push(I);J=sv(a.Fa,G.data);if(1!=J.type)throw new T(2,4,4017);M=kv(J.g,"EXT-X-DEFINE");N=Lv(a,
|
|
1112
|
+
M,I);P=!1;(!a.ea&&a.g.hls.disableCodecGuessing||a.O&&e==C.ha&&!a.g.hls.disableClosedCaptionsDetection)&&0<J.segments.length&&(a.O=!1,P=!0);R=!a.ea&&a.g.hls.disableCodecGuessing;Q=Ev(a);return F(Sa,Vv(a,0,N,J,v,d,e,f,g,h,k,l,m,n,p,r,void 0,P,R),5);case 5:W=Sa.h;if(B.aborted)return Sa.return();Y=W.stream;Ev(a)&&!Q&&dw(a,J);z.pc=W.pc;z.Kb=W.Kb;z.Ed=W.Ed;z.Dd=W.Dd;z.fd=W.fd;z.Wd=W.Wd;z.pb=W.pb;z.qb=W.qb;z.vf=!0;w.segmentIndex=Y.segmentIndex;w.encrypted=Y.encrypted;w.drmInfos=Y.drmInfos;w.keyIds=Y.keyIds;
|
|
1113
|
+
w.mimeType=Y.mimeType;w.bandwidth=w.bandwidth||Y.bandwidth;w.codecs=w.codecs||Y.codecs;w.closedCaptions=w.closedCaptions||Y.closedCaptions;w.width=w.width||Y.width;w.height=w.height||Y.height;w.hdr=w.hdr||Y.hdr;w.colorGamut=w.colorGamut||Y.colorGamut;"und"==w.language&&"und"!=Y.language&&(w.language=Y.language);w.language=w.language||Y.language;w.channelsCount=w.channelsCount||Y.channelsCount;w.audioSamplingRate=w.audioSamplingRate||Y.audioSamplingRate;pw(w);w.drmInfos.length&&a.h.newDrmInfo(w);va=
|
|
1114
|
+
!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)va=!0;a.m&&va&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==C.ha||e==C.X)for(Fa=t(a.i.values()),wa=Fa.next();!wa.done;wa=Fa.next())Pa=wa.value,Pa.vf||Pa.type!=e||(Pa.stream.mimeType=Y.mimeType,pw(Pa.stream));e==C.ua&&(Za=Y.segmentIndex.get(0))&&Za.Z&&(w.mimeType="application/mp4",pw(w));Va=sl(w);w.segmentIndex.Hb(function(nb){nb.Z&&(nb.Z.Jc=Va)});Dw(a)&&(a.Gb?ew(a,[z]):(a.Gb=!0,za=Array.from(a.i.values()),bb=za.filter(function(nb){return nb.stream.segmentIndex}),
|
|
1115
|
+
ew(a,bb),Jv(a),bc=a.o,0<bc&&a.A.$(bc)));Qv(a,J.g,w.type,N,v);H(Sa)}})}function v(){return a.j&&1<c.length?wt(a.j,b):A.concat(pv([a.M],c,a.s))}var w=Ew(a,d,e,f,g,h,k,l,m,n,p,r),A=[],z={stream:w,type:e,Vg:A,L:v,pc:0,Kb:0,Wd:new Map,Ed:!1,Dd:!1,fd:!1,Qe:-1,pb:-1,qb:-1,vf:!1},D=null,y=new AbortController;w.createSegmentIndex=function(){if(D)return D;y=new AbortController;return D=new Promise(function(B){B(u(y.signal))})};w.closeSegmentIndex=function(){D&&!w.segmentIndex&&y.abort();w.segmentIndex&&(w.segmentIndex.release(),
|
|
1116
|
+
w.segmentIndex=null);D=null};return z}function kw(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.Kb));return b}function Gv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Hb(function(e){c.push(e)});a.l.rd(c)}
|
|
1117
|
+
function ew(a,b){if(!Ev(a))for(var c=kw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Dc(0,c);Gv(a,b.map(function(f){return f.stream}));c=Ev(a)&&!a.Ub;a.g.hls.ignoreManifestProgramDateTime||c?Rv(a,b,c):(Uv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Rv(a,b))}function Sv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
|
|
1118
|
+
function Dw(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1119
|
+
function Vv(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z){A=void 0===A?!0:A;z=void 0===z?!0:z;var D,y,B,C,E,G,L,K,I,J,M,N,P,R,Q,W,Y,va,Fa,wa,Pa,Za,Va,za,bb,bc;return O(function(Sa){switch(Sa.g){case 1:var nb=mv(d.g,"EXT-X-PLAYLIST-TYPE"),Sb=mv(d.g,"EXT-X-ENDLIST");Sb=nb&&"VOD"==nb.value||Sb;nb=nb&&"EVENT"==nb.value&&!Sb;nb=!Sb&&!nb;Sb?Iv(a,Bv):nb?Iv(a,jw):Iv(a,Fw);Ev(a)&&Pv(a,d);D=Ev(a)?a.N.get(g):new Map;y=Nv(a,d,D,c,e,g);B=y.segments;C=y.bandwidth;K=L=G=E=null;if(!(0<B.length&&A)){Sa.u(2);break}return F(Sa,
|
|
1120
|
+
fw(a,B),3);case 3:I=Sa.h,g=I.type,h=I.language,m=I.channelCount,u=I.sampleRate,a.g.disableText||(n=I.closedCaptions),G=I.height,E=I.width,L=I.wd,K=I.colorGamut,z&&(w=I.mimeType,f=I.codecs);case 2:if(w){Sa.u(4);break}return F(Sa,Gw(a,g,f,B),5);case 5:w=Sa.h;case 4:return F(Sa,Mv(a,d,w,e,c),6);case 6:J=Sa.h;M=J.drmInfos;N=J.keyIds;P=J.encrypted;R=J.yh;if(P&&!M.length&&!R)throw new T(2,4,4026);Q=Ew(a,f,g,h,k,l,m,n,p,r,u,v);Q.encrypted=P;Q.drmInfos=M;Q.keyIds=N;Q.mimeType=w;C&&(Q.bandwidth=C);pw(Q);"video"==
|
|
1121
|
+
g&&(E||G||L||K)&&Cw(Q,E,G,null,L,null,K);Ev(a)&&Pv(a,d);W=B[0].startTime;Y=B[B.length-1];va=Y.endTime;Fa=new Nk(B);Q.segmentIndex=Fa;Pa=(wa=mv(d.g,"EXT-X-SERVER-CONTROL"))?null!=gv(wa,"CAN-SKIP-UNTIL"):!1;Za=wa?null!=gv(wa,"CAN-BLOCK-RELOAD"):!1;Va=nv(d.g,"EXT-X-MEDIA-SEQUENCE",0);za=Ov(Va,B);bb=za.pb;bc=za.qb;return Sa.return({stream:Q,type:g,Vg:[],L:e,pc:W,Kb:va,Ed:Pa,Dd:Za,fd:!1,Qe:-1,pb:bb,qb:bc,Wd:D,vf:!1})}})}
|
|
1122
|
+
function Ov(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{pb:a,qb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{pb:a,qb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{pb:a,qb:c}}
|
|
1123
|
+
function Ew(a,b,c,d,e,f,g,h,k,l,m,n){var p=nw(c,b)||ow(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Ud?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1122
1124
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Ud?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Be(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
1123
|
-
fullMimeTypes:new Set};
|
|
1124
|
-
function
|
|
1125
|
-
!0;I=Z(G,"KEYFORMAT")||"identity";J=null;if(
|
|
1126
|
-
function
|
|
1127
|
-
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u;return O(function(v){if(1==v.g)return l=
|
|
1125
|
+
fullMimeTypes:new Set};pw(a);return a}
|
|
1126
|
+
function Mv(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=kv(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Hw(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())r=p.value,f.set(r,m);v=u=!1;w=[];A=new Set;z=t(f);D=z.next();case 2:if(D.done){Q.u(4);break}y=D.value;B=t(y);C=B.next().value;E=B.next().value;G=C;L=E;K=hv(G,"METHOD");if("NONE"==K){Q.u(3);break}u=
|
|
1127
|
+
!0;I=Z(G,"KEYFORMAT")||"identity";J=null;if(tw(K)){v=!0;Q.u(3);break}if("identity"!=I){J=(M=uw[I])?M(G,c):null;Q.u(6);break}return F(Q,vw(a,G,c,d,L,e),8);case 8:J=Q.h;case 6:if(J){if(J.keyIds)for(N=t(J.keyIds),P=N.next();!P.done;P=N.next())R=P.value,A.add(R);w.push(J)}case 3:D=z.next();Q.u(2);break;case 4:return Q.return({drmInfos:w,keyIds:A,encrypted:u,yh:v})}})}
|
|
1128
|
+
function Iw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ya("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Id(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=nv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ma.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(hv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1129
|
+
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u;return O(function(v){if(1==v.g)return l=ov(d(),hv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=sg(l,a.g.retryParameters),p=iw(a,n,6),a.K.set(m,p)),F(v,a.K.get(m),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return F(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;H(v)})};
|
|
1128
1130
|
a.ma.set(c,k)}return a.ma.get(c)}
|
|
1129
|
-
function
|
|
1130
|
-
|
|
1131
|
-
function
|
|
1132
|
-
function
|
|
1133
|
-
function
|
|
1134
|
-
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=v,E={},G=0;G<d.zb.length;E={we:void 0,fe:void 0},G++){var L=d.zb[G],K=0==G?c:z[z.length-1],I=0==G?e:K.endTime,J=Number(Z(L,"DURATION"))||a.
|
|
1135
|
-
Z(L,"GAP")&&(a.m.gapCount++,K=2,y=!0);E.we=null;var R=function(W){return function(){null==W.we&&(W.we=
|
|
1136
|
-
z[0].Ha?(w=!1,D=null):z=[]);(n=
|
|
1137
|
-
function
|
|
1138
|
-
function
|
|
1139
|
-
n=Z(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Z(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var r=Z(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==r&&(r=
|
|
1131
|
+
function Pv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=mv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=mv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=mv(b.g,"EXT-X-PART-INF"))a.S=Number(hv(e,"PART-TARGET"));b=mv(b.g,"EXT-X-SERVER-CONTROL");a.I&&a.S?(a.o=a.Fb?5*a.S<=c?Math.min(a.S,a.o):Math.min(c,a.o):Math.min(a.S,a.o),a.Da=b?Number(hv(b,"PART-HOLD-BACK")):0):(a.o=Math.min(c,a.o),c=b?
|
|
1132
|
+
gv(b,"HOLD-BACK"):null,a.za=c?Number(c.value):0);a.ab=Math.max(d,a.ab)}function dw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Da)b=a.Da;else if(a.za)b=a.za;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ab*c}a.l.fh(0);a.l.Of(b);a.l.uc(!1)}
|
|
1133
|
+
function Hw(a,b,c,d,e){var f=mv(c,"EXT-X-MAP");if(!f)return null;var g=hv(f,"URI"),h=ov(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ra.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?tw(hv(m,"METHOD"))&&m.id<f.id&&(k=Iw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Jw(h,f,l,k);a.ra.set(g,b)}return a.ra.get(g)}
|
|
1134
|
+
function Jw(a,b,c,d){var e=0,f=null;b=Z(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 Di(function(){return a},e,f,null,null,null,d)}
|
|
1135
|
+
function Kw(a,b,c,d,e,f,g,h,k){function l(W){W=(new tc(W)).Pa.split(".").pop();var Y=Lw[g][W];Y||(Y=hw[W]);return Y}var m=d.g,n=mv(m,"EXTINF"),p=0,r=0,u=null;d.zb.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=mv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=rh(w.value),a.Ub=!0)}var A=Gi;mv(m,"EXT-X-GAP")&&(a.m.gapCount++,A=2);if(!n){if(0==d.zb.length)throw new T(2,4,4024,"EXTINF");if(!a.I)return null}var z=[];w=!1;var D=null,y=!1,B=!1;if(a.I&&d.zb.length){p=
|
|
1136
|
+
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=v,E={},G=0;G<d.zb.length;E={we:void 0,fe:void 0},G++){var L=d.zb[G],K=0==G?c:z[z.length-1],I=0==G?e:K.endTime,J=Number(Z(L,"DURATION"))||a.S;if(J){var M=I+J,N=0,P=null;"EXT-X-PRELOAD-HINT"==L.name?(N=(N=Z(L,"BYTERANGE-START"))?Number(N):0,(K=Z(L,"BYTERANGE-LENGTH"))?P=N+Number(K)-1:N&&(P=Number.MAX_SAFE_INTEGER)):(N=Z(L,"BYTERANGE"),P=t(Mw(K,N)),N=P.next().value,P=P.next().value);E.fe=Z(L,"URI");if(E.fe){K=Gi;"YES"==
|
|
1137
|
+
Z(L,"GAP")&&(a.m.gapCount++,K=2,y=!0);E.we=null;var R=function(W){return function(){null==W.we&&(W.we=ov(h(),W.fe,f));return W.we}}(E);p&&0<=N&&null!=P&&(D=R,w=!0);I=new Fi(I,M,R,N,P,b,0,0,Infinity,[],"",null,C,K,k);"EXT-X-PRELOAD-HINT"==L.name&&(I.wf(),B=!0);"YES"!=Z(L,"INDEPENDENT")&&0<G&&I.Vd();if(E=l(E.fe))I.mimeType=E,Nw.has(E)&&(I.Z=null);z.push(I);C&&(C+=J)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(z.length)p=z[z.length-1].endTime;else return null;w&&(y||0!=
|
|
1138
|
+
z[0].Ha?(w=!1,D=null):z=[]);(n=mv(m,"EXT-X-BYTERANGE"))?(u=t(Mw(c,n.value)),r=u.next().value,u=u.next().value):z.length&&(r=z[0].Ha,u=z[z.length-1].ta);c="";n=null;"image"==g&&(c="1x1",m=mv(m,"EXT-X-TILES"))&&(c=hv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Fi(e,p,function(){if(D)return D();null==Q&&(Q=ov(h(),d.h,f));return Q||[]},r,u,b,0,0,Infinity,z,c,n,v,A,k,0<z.length&&!!d.h);if(e=l(d.h))b.mimeType=e,Nw.has(e)&&(b.Z=null);w&&(a.Fb=!0,b.Jg(),B&&b.wf());return b}
|
|
1139
|
+
function Mw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ta+1,d=c+b-1);return[c,d]}
|
|
1140
|
+
function Qv(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!Sv(a,c))for(b=kv(b,"EXT-X-DATERANGE"),b=b.sort(function(v,w){v=hv(v,"START-DATE");w=hv(w,"START-DATE");return v<w?-1:v>w?1:0}),c=0;c<b.length;c++){var g=b[c],h=hv(g,"ID");if(!a.Ea.has(h)){var k=hv(g,"START-DATE"),l=rh(k);if(!isNaN(l)){k=Math.max(0,l-f);var m=null,n=Z(g,"END-DATE");if(n&&(n=rh(n),!isNaN(n)&&(m=n-f,0>m)))continue;if(null==m&&(n=Z(g,"DURATION")||Z(g,"PLANNED-DURATION"))&&(n=parseFloat(n),isNaN(n)||(m=k+n),0>l-f+n))continue;
|
|
1141
|
+
n=Z(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Z(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var r=Z(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==r&&(r=hv(b[p],"START-DATE"),r=rh(r),!isNaN(r)&&r&&r>l)){m=Math.max(0,r-f);break}}if(null==m)continue}l="ID CLASS START-DATE END-DATE DURATION END-ON-NEXT".split(" ");p=[];g=t(g.attributes);for(r=g.next();!r.done;r=g.next())if(r=r.value,!l.includes(r.name)){var u=qv(r.value,d);if("X-ASSET-URI"==r.name||"X-ASSET-LIST"==r.name)u=ov(e(),
|
|
1140
1142
|
r.value,d)[0];p.push({key:r.name,description:"",data:u,mimeType:null,pictureType:null})}if(p.length)a.h.onMetadata(n,k,m,p);a.Ea.add(h)}}}}}
|
|
1141
|
-
function
|
|
1142
|
-
h=
|
|
1143
|
-
b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={
|
|
1144
|
-
(c.sc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.fa;if(m&&Infinity!=c&&!
|
|
1145
|
-
function
|
|
1146
|
-
function
|
|
1147
|
-
|
|
1148
|
-
function
|
|
1149
|
-
function
|
|
1150
|
-
function
|
|
1151
|
-
3);case 3:r=B.h,l=Jd(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.ya.has(e)){v=a.ya.get(e);B.u(5);break}w=zl(e.L(),e.Yb(),e.Wb(),a.g.retryParameters);A=yg;return F(B,
|
|
1152
|
-
var
|
|
1153
|
-
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"}},
|
|
1154
|
-
keyId:null}],
|
|
1155
|
-
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=
|
|
1156
|
-
function
|
|
1157
|
-
function
|
|
1158
|
-
2)),[0,0]));h=
|
|
1159
|
-
case "audio":g=
|
|
1160
|
-
255]));e=
|
|
1161
|
-
a.byteLength);b.set(
|
|
1162
|
-
function
|
|
1163
|
-
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(x(
|
|
1164
|
-
a.encrypted&&(g=
|
|
1165
|
-
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=
|
|
1166
|
-
a.pa);else{c=
|
|
1167
|
-
a=
|
|
1168
|
-
function
|
|
1169
|
-
0,0,0,0,0,1,8]);f=
|
|
1170
|
-
function
|
|
1171
|
-
0;var p=Math.floor(m%(
|
|
1172
|
-
g,k);e.call(d,b,[f,
|
|
1173
|
-
function
|
|
1174
|
-
var
|
|
1175
|
-
0,0,0,0,0,0,0]),
|
|
1176
|
-
function
|
|
1177
|
-
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ra(c,2),F(c,
|
|
1178
|
-
function
|
|
1143
|
+
function Nv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=nv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=nv(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=mv(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Ev(a)&&c.has(p)&&(r=c.get(p));0===r&&a.va==jw&&0<c.size&&!c.has(p)&&(r=a.l.nb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],z=0==w?r:v.endTime;p=l+n+w;mv(A.g,"EXT-X-DISCONTINUITY")&&k++;var D=t(A.g);for(var y=D.next();!y.done;y=D.next())y=y.value,"EXT-X-KEY"==y.name&&(tw(hv(y,"METHOD"))?
|
|
1144
|
+
h=Iw(a,y,b,e,d):h=void 0);c.set(p,z);D=Hw(a,b,A.g,e,d);!a.I&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.I=a.h.isLowLatencyMode());if(z=Kw(a,D,v,A,z,d,f,e,h))(v=nv(A.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:z.endTime-z.startTime}):m.length&&(v=m.pop(),v.duration+=z.endTime-z.startTime,m.push(v)),v=z,z.i=k,Sv(a,f)&&null!=a.H&&p<a.H||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(B,C){return B+C.duration},0),b=Math.round(m.reduce(function(B,C){return B+C.bitrate*C.duration},0)/
|
|
1145
|
+
b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={Id:void 0,Hd:void 0,zd:void 0,sc:void 0,yd:void 0},d++)if(c.sc=u[d],null==c.sc.h)for(c.Hd=0,c.Id=d,e=function(B){return function(){var C=u[B.Id];if(C){if(null!=C.h)return C.h+B.Hd;B.Hd-=C.endTime-C.startTime;B.Id+=1}return null}}(c),c.yd=0,c.zd=d,g=function(B){return function(){var C=u[B.zd];if(C){C!=B.sc&&(B.yd+=C.endTime-C.startTime);if(null!=C.h)return C.h+B.yd;--B.zd}return null}}(c);null==c.sc.h;)c.sc.h=g(),null==c.sc.h&&
|
|
1146
|
+
(c.sc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.fa;if(m&&Infinity!=c&&!Sv(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Vf(c);return{segments:u,bandwidth:b}}
|
|
1147
|
+
function nw(a,b){if(a==Ud){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function ow(a){return a==Ud?"text/vtt":Lw[a].mp4}function gw(a,b){a=Ev(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.Zb()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
|
|
1148
|
+
function Gw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(z){switch(z.g){case 1:e=yg;f=gw(a,d);g=f.segment;if(2==g.status)return z.return(ow(b));h=g.L();k=new tc(h[0]);l=k.Pa.split(".").pop();m=Lw[b];if((n=m[l])||(n=hw[l])||(n=nw(b,c)))return z.return(n);r=1;u=sg(h,a.g.retryParameters);ra(z,2);u.method="HEAD";return F(z,iw(a,u,e,{type:r}),4);case 4:v=z.h;p=v.headers["content-type"];ta(z,3);break;case 2:w=ua(z);if(!w||1002!=w.code&&1001!=w.code){z.u(3);break}u.method="GET";return F(z,
|
|
1149
|
+
iw(a,u,e,{type:r}),6);case 6:A=z.h,p=A.headers["content-type"];case 3:return p?z.return(p.toLowerCase().split(";")[0]):z.return(ow(b))}})}function Cw(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Cv(a,b,c){return iw(a,sg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1150
|
+
function Av(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ra(h,2);b=Date.now();return F(h,a.update(),4);case 4:c=Date.now();Ev(a)&&(d=(c-b)/1E3,a.Db.sample(1,d),e=a.o,f=Math.max(0,e-Ta(a.Db)),a.A.$(f));ta(h,3);break;case 2:g=ua(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.A.$(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
|
|
1151
|
+
function Ev(a){return a.va!=Bv}function Iv(a,b){a.va=b;a.l&&a.l.uc(!Ev(a));Ev(a)||a.A.stop()}function iw(a,b,c,d){if(!a.da)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);mg(a.da,b);return b.promise}function tw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1152
|
+
function vw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,D,y;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(rd())throw new T(2,4,4041);g=hv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=ov(d(),hv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Jd(Hd(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.na.has(m)||(n=sg(k,a.g.retryParameters),p=iw(a,n,6),a.na.set(m,p));return F(B,a.na.get(m),
|
|
1153
|
+
3);case 3:r=B.h,l=Jd(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.ya.has(e)){v=a.ya.get(e);B.u(5);break}w=zl(e.L(),e.Yb(),e.Wb(),a.g.retryParameters);A=yg;return F(B,iw(a,w,A,{type:0}),6);case 6:z=B.h,v=xl(z.data),a.ya.set(e,v);case 5:v&&(u=v);case 4:return D=new Map,D.set(u,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),B.return(Qd(D,y))}})}S("shaka.hls.HlsParser",zv);
|
|
1154
|
+
var hw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Lw={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",
|
|
1155
|
+
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"}},Nw=new Set(["video/mp2t"].concat(x($d))),uw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(rd())throw new T(2,4,4041);b=hv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Nd("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
1156
|
+
keyId:null}],hv(a,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=hv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=hv(a,"URI");b=yv(b.split("?")[0]);b=zb(b.data);c=Nd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=hv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
1157
|
+
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=hv(a,"URI");a=yv(a.split("?")[0]);a=zb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Zg(a,b,new Set,0);return Nd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},Bv="VOD",Fw="EVENT",jw="LIVE",Hv={uh:Bv,sj:Fw,Aj:jw};yi["application/x-mpegurl"]=function(){return new zv};yi["application/vnd.apple.mpegurl"]=function(){return new zv};function Ow(a){var b=0,c=Eb(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=zb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Pw(a){if(a=Qw(a))a:{a=t(kh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=lh(b.value,"LA_URL")){a=ih(b);break a}a=""}else a="";return a}
|
|
1158
|
+
function Qw(a){a=Hd(ih(a));a=Ow(a).filter(function(b){return b.type===Rw})[0];if(!a)return null;a=xd(a.value,!0);return(a=ah(a,"WRMHEADER"))?a:null}var Rw=1,Sw=(new Map).set("com.microsoft.playready",Pw).set("com.microsoft.playready.recommendation",Pw).set("com.microsoft.playready.software",Pw).set("com.microsoft.playready.hardware",Pw);function Tw(a){if(!Uw){Uw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Vw=Ww("ftyp",b,d,b,c);b=Ww("dref",Xw);Yw=Ww("dinf",b)}this.g=a}
|
|
1159
|
+
function Zw(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Ww;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/($w+1));m=Math.floor(m%($w+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(ax(h,4)),[0,0,0,0],x(ax(n,4)),x(ax(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(ax(k,2)),[0,0],x(ax(l,
|
|
1160
|
+
2)),[0,0]));h=Ww("tkhd",h);k=Ww;n=g.duration*g.timescale;l=Math.floor(n/($w+1));n=Math.floor(n%($w+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(ax(g.timescale,4)),x(ax(l,4)),x(ax(n,4)),x(ax(m,2)),[0,0]));l=Ww("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=bx;break;case "audio":m=cx}n=Ww("hdlr",m);a:{switch(g.type){case "video":g=Ww("minf",Ww("vmhd",dx),Yw,ex(g));break a;
|
|
1161
|
+
case "audio":g=Ww("minf",Ww("smhd",fx),Yw,ex(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Kd.apply(Ed,x(b));f=a.g[0];c=Ww;d=f.duration*f.timescale;e=Math.floor(d/($w+1));d=Math.floor(d%($w+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(ax(f.timescale,4)),x(ax(e,4)),x(ax(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
1162
|
+
255]));e=Ww("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(ax(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Ww("trex",k),h.call(g,k);a=Kd.apply(Ed,x(d));a=Ww("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Kd.apply(Ed,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Vw.byteLength+
|
|
1163
|
+
a.byteLength);b.set(Vw);b.set(a,Vw.byteLength);return b}
|
|
1164
|
+
function ex(a){var b=Ww,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.xa.byteLength)var e=Ww("avcC",a.xa);else{e=Ww;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.$a.length;n++){var p=gx(a.$a[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1165
|
+
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(x(ax(c,2)),x(ax(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=hx(a);g=new Uint8Array([]);
|
|
1166
|
+
a.encrypted&&(g=ix(a),d="encv");c=Ww(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.xa.byteLength&&(c=Ww("hvcC",a.xa)),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(x(ax(d,2)),x(ax(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=hx(a),g=new Uint8Array([]),a.encrypted&&(g=ix(a),e="encv"),c=Ww(e,d,
|
|
1167
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Ww(".mp3",jx(a));else if(a.codecs.includes("ac-3"))c=Ww("dac3",a.pa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=ix(a),d="enca"),a=Ww(d,jx(a),c,e);else if(a.codecs.includes("ec-3"))c=Ww("dec3",a.pa),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=ix(a),d="enca"),a=Ww(d,jx(a),c,e);else if(a.codecs.includes("opus"))c=Ww("dOps",a.pa),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=ix(a),d="enca"),a=Ww(d,jx(a),c,e);else{if(0<a.pa.byteLength)c=Ww("esds",
|
|
1168
|
+
a.pa);else{c=Ww;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Rd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x(ax(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=ix(a),d="enca");
|
|
1169
|
+
a=Ww(d,jx(a),c,e)}c=a}a=Ww("stsd",kx,c);return b("stbl",a,Ww("stts",lx),Ww("stsc",mx),Ww("stsz",nx),Ww("stco",ox))}function hx(a){if(!a.Ba&&!a.Ca)return new Uint8Array([]);var b=a.Ca;a=new Uint8Array([].concat(x(ax(a.Ba,4)),x(ax(b,4))));return Ww("pasp",a)}function jx(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(x(ax(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1170
|
+
function ix(a){var b=Ww;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(ax(d,4))));c=Ww("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Ww("schm",d);e=Ww;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=gx(h.value)}a=new Uint8Array([0,
|
|
1171
|
+
0,0,0,0,0,1,8]);f=Ww("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1172
|
+
function px(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Ww;var g=new Uint8Array([0,0,0,0].concat(x(ax(c.data?c.data.sb:0,4))));g=Ww("mfhd",g);var h;var k=c.data?c.data.Ya:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Va<<4|m.Xa<<2|m.Wa}k=Ww("sdtp",l);var n=k.length+92;l=Ww;h=new Uint8Array([0,0,0,58].concat(x(ax(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Ww("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1173
|
+
0;var p=Math.floor(m%($w+1));m=new Uint8Array([1,0,0,0].concat(x(ax(Math.floor(m/($w+1)),4)),x(ax(p,4))));m=Ww("tfdt",m);var r=n;n=c.data?c.data.Ya:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);r+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(ax(p,4)),x(ax(r,4))),0);for(r=0;r<p;r++){var w=n[r];u=ax(w.duration,4);var A=ax(w.size,4),z=w.flags;w=ax(w.eb,4);v.set([].concat(x(u),x(A),[z.hb<<2|z.Va,z.Xa<<6|z.Wa<<4|z.ib,z.Ua&61440,z.Ua&15],x(w)),12+16*r)}n=Ww("trun",v);k=l("traf",h,m,n,k);f=f("moof",
|
|
1174
|
+
g,k);e.call(d,b,[f,qx(c)])}return Kd.apply(Ed,x(b))}function qx(a){a=(a.data?a.data.Ya:[]).map(function(b){return b.data});a=Kd.apply(Ed,x(a));return Ww("mdat",a)}function ax(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function gx(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}
|
|
1175
|
+
function Ww(a){var b=Ha.apply(1,arguments),c=rx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],rx[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}
|
|
1176
|
+
var Uw=!1,$w=Math.pow(2,32)-1,rx={},bx=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]),cx=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]),lx=new Uint8Array([0,0,0,0,0,0,0,0]),mx=new Uint8Array([0,0,0,0,0,0,0,0]),ox=new Uint8Array([0,0,0,0,0,0,0,0]),nx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),dx=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),fx=new Uint8Array([0,
|
|
1177
|
+
0,0,0,0,0,0,0]),kx=new Uint8Array([0,0,0,0,0,0,0,1]),Vw=new Uint8Array([]),Xw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Yw=new Uint8Array([]);function sx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Ra(5);this.o=new Rc(function(){tx(a)});this.A=new lg;this.m=new Map}q=sx.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,F(d,ux(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
|
|
1178
|
+
function tx(a){var b;O(function(c){switch(c.g){case 1:return ra(c,2),F(c,ux(a),4);case 4:ta(c,3);break;case 2:b=ua(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
|
|
1179
|
+
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ra(c,2),F(c,ux(a),4);if(2!=c.g)return ta(c,0);b=ua(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};
|
|
1180
|
+
function ux(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=sg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),mg(a.A,e),F(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=vm){qb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=iu(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
|
|
1179
1181
|
l);n(m);m=Ad(m.outerHTML)}var p=$g(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=wm&&l(p);a.i||(a.i=new rk(null,0));if(l=oh(p,"IsLive",yh,!1))throw new T(2,4,4047);a.i.uc(!l);n=oh(p,"TimeScale",wh,1E7);m=oh(p,"DVRWindowLength",wh);l&&(0===m||isNaN(m))&&(m=Infinity);var r=oh(p,"CanSeek",yh,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.oe(r);m=oh(p,
|
|
1180
|
-
"Duration",wh,Infinity);l||a.i.Za(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=hh(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(hh(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var z=
|
|
1181
|
-
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Jd(z);break a}z=null}else z=null;D=Hd(ih(v));w=Id(w.replace(/-/g,""));w=[{initData:Zg(D,w,new Set,0),initDataType:"cenc",keyId:z}];w=
|
|
1182
|
-
oh(E,"d",wh);E=oh(E,"r",uh);if(!K)break;L=null!=L?L:B;E=E||0;if(0>E)if(G){G=oh(G,"t",wh);if(null==G)break;else if(L>=G)break;E=Math.ceil((G-L)/K)-1}else{if(Infinity==z)break;else if(L/w>=z)break;E=Math.ceil((z*w-L)/K)-1}for(G=0;G<=E;++G)B=L+K,y.push({start:L/w,end:B/w,$f:L}),L=B}w=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=
|
|
1182
|
+
"Duration",wh,Infinity);l||a.i.Za(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=hh(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(hh(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var z=Qw(v);if(z)a:{z=t(kh(z,"DATA"));for(var D=z.next();!D.done;D=z.next())if(D=lh(D.value,"KID")){z=Hd(ih(D));z=new Uint8Array([z[3],z[2],z[1],z[0],z[5],
|
|
1183
|
+
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Jd(z);break a}z=null}else z=null;D=Hd(ih(v));w=Id(w.replace(/-/g,""));w=[{initData:Zg(D,w,new Set,0),initDataType:"cenc",keyId:z}];w=Nd(A,"cenc",w);z&&w.keyIds.add(z);if(A=Sw.get(A))w.licenseServerUri=A(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=hh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=hh(v,"QualityLevel");w=l.timescale;z=l.duration;D=hh(v,"c");for(var y=[],B=0,C=0;C<D.length;++C){var E=D[C],G=D[C+1],L=oh(E,"t",wh),K=
|
|
1184
|
+
oh(E,"d",wh);E=oh(E,"r",uh);if(!K)break;L=null!=L?L:B;E=E||0;if(0>E)if(G){G=oh(G,"t",wh);if(null==G)break;else if(L>=G)break;E=Math.ceil((G-L)/K)-1}else{if(Infinity==z)break;else if(L/w>=z)break;E=Math.ceil((z*w-L)/K)-1}for(G=0;G<=E;++G)B=L+K,y.push({start:L/w,end:B/w,$f:L}),L=B}w=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=vx(a,v,z.value,w,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=Ud||a.g.disableText||m.push(z):n.push(z):r.push(z))}p=[];r=t(0<r.length?
|
|
1183
1185
|
r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(0<n.length?n:[null]),y=v.next();!y.done;y=v.next())A=p,w=A.push,z=a,D=u,y=y.value,C=0,D&&D.bandwidth&&0<D.bandwidth&&(C+=D.bandwidth),y&&y.bandwidth&&0<y.bandwidth&&(C+=y.bandwidth),z={id:z.s++,language:D?D.language:"und",disabledUntilTime:0,primary:!!D&&D.primary||!!y&&y.primary,audio:D,video:y,bandwidth:C,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,z);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,
|
|
1184
1186
|
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1},a.i.Ud());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);H(k)})}
|
|
1185
|
-
function
|
|
1187
|
+
function vx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Ya("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=oh(c,"Bitrate",vh),m=oh(c,"MaxWidth",vh),n=oh(c,"MaxHeight",vh),p=oh(c,"Channels",vh),r=oh(c,"SamplingRate",vh),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Za(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1186
1188
|
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:Be(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1187
|
-
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=
|
|
1188
|
-
e),null;c=
|
|
1189
|
-
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,$a:A,pa:new Uint8Array([]),
|
|
1189
|
+
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=wx[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Ya('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!xx.includes(e.toUpperCase()))return Ya("Codec not supported:",
|
|
1190
|
+
e),null;c=yx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Ya("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=zx(e,c);break;case "video":if(!c)return Ya("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=Ax(c);break;case "text":if(w.type=Ud,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Zd(w.mimeType,w.codecs));
|
|
1191
|
+
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,$a:A,pa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:null,stream:w},A=Zw(new Tw([A])),a.m.set(w.id,A);A=Bx(a,new Di(function(){return[]},0,null,sl(w),w.mssPrivateData.timescale,
|
|
1190
1192
|
A),w,b,d);w.segmentIndex=new Nk(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1191
|
-
function
|
|
1192
|
-
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function
|
|
1193
|
-
function
|
|
1194
|
-
yi["application/vnd.ms-sstr+xml"]=function(){return new
|
|
1195
|
-
function
|
|
1196
|
-
E.value.byteLength;if(!g){K.u(5);break}return F(K,g(E.value),5);case 5:G=Date.now();if(100<G-r||E.done)L=E.done?0:w-n,e(G-r,n-p,L),p=n,r=G;E.done?B.close():(B.enqueue(E.value),C());H(K)}})}C()};new k({start:A});return F(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:ta(y,3);break;case 2:z=ua(y);if(d.lg)throw new T(1,1,7001,a,b);if(d.oh)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return D=
|
|
1197
|
-
function
|
|
1198
|
-
|
|
1199
|
-
function
|
|
1193
|
+
function yx(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1194
|
+
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function zx(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 Ax(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1195
|
+
function Bx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={qe:void 0},g=e.next())h.qe=g.value,d.push(new Fi(h.qe.start,h.qe.end,function(k){return function(){return Md(a.l,[f.replace("{start time}",String(k.qe.$f))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",sx);var xx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),wx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1196
|
+
yi["application/vnd.ms-sstr+xml"]=function(){return new sx};function Cx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=zd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Dx(){}function Ex(a,b,c,d,e){var f=new Fx;Eg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Gx,h={lg:!1,oh:!1};a=Hx(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 bg(a,function(){h.lg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Rc(function(){h.oh=!0;g.abort()});k.$(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1197
|
+
function Hx(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:return h=Ix,k=Jx,p=n=0,r=Date.now(),ra(y,2),F(y,h(a,c),4);case 4:l=y.h;f(Kx(l.headers));if("HEAD"==c.method){y.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function C(){var E,G,L;return O(function(K){switch(K.g){case 1:return ra(K,2),F(K,u.read(),4);case 4:E=K.h;ta(K,3);break;case 2:return ua(K),K.return();case 3:if(E.done){K.u(5);break}n+=
|
|
1198
|
+
E.value.byteLength;if(!g){K.u(5);break}return F(K,g(E.value),5);case 5:G=Date.now();if(100<G-r||E.done)L=E.done?0:w-n,e(G-r,n-p,L),p=n,r=G;E.done?B.close():(B.enqueue(E.value),C());H(K)}})}C()};new k({start:A});return F(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:ta(y,3);break;case 2:z=ua(y);if(d.lg)throw new T(1,1,7001,a,b);if(d.oh)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return D=Kx(l.headers),y.return(Cx(D,m,l.status,a,l.url,b))}})}
|
|
1199
|
+
function Kx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Lx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",Dx);Dx.isSupported=Lx;Dx.parse=Ex;var Ix=window.fetch,Gx=window.AbortController,Jx=window.ReadableStream,Fx=window.Headers;
|
|
1200
|
+
Lx()&&(og("http",Ex,2,!0),og("https",Ex,2,!0),og("blob",Ex,2,!0));function Mx(){}
|
|
1201
|
+
function Nx(a,b,c,d,e){var f=new Ox,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 T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=Px(f);e(r);n=!0}};f.onload=function(r){var u=Px(f),v=f.response;try{d(Date.now()-g,r.loaded-h,0);var w=Cx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(r){m(new T(1,
|
|
1200
1202
|
1,1002,a,r,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(r){var u=Date.now();if(100<u-g||r.lengthComputable&&r.loaded==r.total)d(u-g,r.loaded-h,4==f.readyState?0:r.total-r.loaded),h=r.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new bg(k,function(){f.abort();return Promise.resolve()})}
|
|
1201
|
-
function
|
|
1202
|
-
function
|
|
1203
|
-
function
|
|
1204
|
-
function
|
|
1205
|
-
q.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
1206
|
-
q.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return F(d,
|
|
1207
|
-
function
|
|
1208
|
-
function
|
|
1209
|
-
function
|
|
1210
|
-
|
|
1211
|
-
function
|
|
1212
|
-
function
|
|
1213
|
-
function
|
|
1214
|
-
|
|
1215
|
-
function
|
|
1216
|
-
function
|
|
1217
|
-
|
|
1218
|
-
function
|
|
1219
|
-
function
|
|
1220
|
-
e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function
|
|
1221
|
-
|
|
1203
|
+
function Px(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}S("shaka.net.HttpXHRPlugin",Mx);Mx.parse=Nx;var Ox=window.XMLHttpRequest;og("http",Nx,1,!0);og("https",Nx,1,!0);og("blob",Nx,1,!0);function Qx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Rx(a){return a.L().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.ta}function Sx(a,b){return zl(a.g.L(),a.g.Ha,a.g.ta,b.streaming.retryParameters)};function Tx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Ux(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Tx.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 Vx(a){var b=this;this.o=a;this.j=new Map;this.i=new Ag(function(){return Wx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Tx}Vx.prototype.destroy=function(){return this.i.destroy()};function Xx(a,b,c){a.m=b;a.l=c}function Wx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1204
|
+
function Yx(a,b,c,d,e,f){Bg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return F(u,Zx(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=zb(h),l=new Yg(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);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 $x(a){return O(function(b){return 1==b.g?F(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1205
|
+
function Zx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=yg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),F(g,d.promise,2);f=g.h;Nb(a.h,e);return g.return(f.data)})};function ay(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new ag;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ay.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ra(b,2);return F(b,a.g,4)}if(2!=b.g)return ta(b,0);ua(b);H(b)})};
|
|
1206
|
+
function by(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return F(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}ay.prototype.store=function(){return this.h};ay.prototype.promise=function(){return this.g};function cy(a){this.h=a;this.g=[]}cy.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function dy(a,b){return ey(a,b,"readwrite")}function ey(a,b,c){c=a.h.transaction([b],c);var d=new ay(c,b);a.g.push(d);d.promise().then(function(){Nb(a.g,d)},function(){Nb(a.g,d)});return d};function fy(a,b,c){this.h=new cy(a);this.i=b;this.g=c}q=fy.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return gy(this.i)};q.removeSegments=function(a,b){return hy(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return F(d,iy(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.og(e)}))})};q.addManifests=function(){return gy(this.g)};
|
|
1207
|
+
q.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function jy(a,b,c){a=dy(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=dy(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return hy(this,this.g,a,b)};
|
|
1208
|
+
q.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return F(d,iy(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Xc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=ey(a.h,a.g,"readonly"),c=new Map,F(d,by(b,function(e,f){var g;return O(function(h){if(1==h.g)return F(h,a.Xc(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};q.og=function(a){return a};q.Xc=function(a){return Promise.resolve(a)};
|
|
1209
|
+
function gy(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=dy(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={Hf:void 0},h=g.next())l=h.value,k.Hf=e.add(l),k.Hf.onsuccess=function(n){return function(){f.push(n.Hf.result)}}(k);return F(m,d.promise(),2)}return m.return(f)})};
|
|
1210
|
+
function hy(a,b,c,d){a=dy(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={rf:void 0},e=c.next())f.rf=e.value,b.delete(f.rf).onsuccess=function(g){return function(){return d(g.rf)}}(f);return a.promise()}
|
|
1211
|
+
function iy(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=ey(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={ke:void 0,Qd:void 0},k=h.next())l.Qd=k.value,l.ke=e.get(l.Qd),l.ke.onsuccess=function(n){return function(){void 0==n.ke.result&&g.push(n.Qd);f[n.Qd]=n.ke.result}}(l);return F(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function ky(a){this.g=new cy(a)}ky.prototype.destroy=function(){return this.g.destroy()};ky.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=ey(a.g,"session-ids","readonly"),c=[],F(d,by(b,function(e,f){c.push(f)}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};ky.prototype.add=function(a){var b=dy(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()};
|
|
1212
|
+
ky.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=dy(b.g,"session-ids"),F(d,by(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function ly(){this.g=new Map}ly.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)};ly.prototype.init=function(){var a=this;my.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)};
|
|
1213
|
+
function ny(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{ob:d,Ia:f},Ia:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function oy(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({ob:d,Ia:f},e)})})}
|
|
1214
|
+
function py(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function qy(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ry(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1215
|
+
function sy(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=my,d.forEach(function(f){(f=f())&&b.push(f)})),F(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):F(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ty(a,b){my.set(a,b)}S("shaka.offline.StorageMuxer",ly);ly.unregister=function(a){my.delete(a)};ly.register=ty;ly.prototype.destroy=ly.prototype.destroy;var my=new Map;function uy(){fy.apply(this,arguments)}na(uy,fy);uy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=dy(c.h,c.g);e=d.store();f=new ag;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return F(g,Promise.all([d.promise(),f]),0)})};
|
|
1216
|
+
uy.prototype.Xc=function(a){var b,c,d,e,f,g;return O(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=vy(a.periods[c],e),b.push(f);return F(h,Ht(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})})};
|
|
1217
|
+
function vy(a,b){wy(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return xy(e,a.startTime,b)})}
|
|
1218
|
+
function xy(a,b,c){var d=a.initSegmentUri?yy(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1219
|
+
yy(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}uy.prototype.og=function(a){return{data:a.data}};
|
|
1220
|
+
function yy(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new T(2,9,9004,"Could not parse uri "+a);}
|
|
1221
|
+
function wy(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
|
|
1222
|
+
e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function zy(){fy.apply(this,arguments)}na(zy,fy);
|
|
1223
|
+
zy.prototype.Xc=function(a){var b,c,d,e,f,g;return O(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(Ay(n,k.startTime,k.startTime+e));f=l;b.push(f)}return F(h,Ht(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1222
1224
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1223
|
-
function
|
|
1224
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function
|
|
1225
|
-
q.init=function(){var a=this,b=new ag,c=!1,d=new Rc(function(){c=!0;b.reject(new T(2,9,9017))});d
|
|
1226
|
-
new
|
|
1225
|
+
function Ay(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1226
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function By(){fy.apply(this,arguments)}na(By,fy);q=By.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return jy(this,a,b)};q.Xc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Cy(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Cy.prototype;
|
|
1227
|
+
q.init=function(){var a=this,b=new ag,c=!1,d=new Rc(function(){c=!0;b.reject(new T(2,9,9017))});d.$(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 uy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new zy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1228
|
+
new zy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new By(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ky(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new T(2,
|
|
1227
1229
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return F(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return F(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})};
|
|
1228
1230
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
1229
|
-
q.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return F(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),F(b,
|
|
1230
|
-
function
|
|
1231
|
-
function
|
|
1232
|
-
function
|
|
1231
|
+
q.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return F(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),F(b,Dy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,F(b,a.init(),0)}})};
|
|
1232
|
+
function Dy(){var a=new ag,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}ty("idb",function(){return fd()||Yc()||!window.indexedDB?null:new Cy});function Ey(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ey.prototype.ob=function(){return this.i};Ey.prototype.Ia=function(){return this.h};Ey.prototype.key=function(){return this.l};Ey.prototype.toString=function(){return this.j};
|
|
1233
|
+
function Fy(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 Ey(b,c,d,Number(a[4])):null};function Gy(a,b){this.h=a;this.g=b}
|
|
1234
|
+
function Hy(a,b){var c=new rk(null,0);c.Za(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Iy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ud}).map(function(l){return Jy(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Jy(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=
|
|
1233
1235
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1}}
|
|
1234
|
-
function
|
|
1235
|
-
b.next())for(g=e.value,e=
|
|
1236
|
-
function
|
|
1236
|
+
function Iy(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
1237
|
+
b.next())for(g=e.value,e=Jy(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Jy(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
|
|
1238
|
+
function Jy(a,b,c){var d=b.segments.map(function(e){return Ky(a,e,b)});c.rd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Nk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1237
1239
|
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,fullMimeTypes:new Set([Zd(b.mimeType,b.codecs)])}}
|
|
1238
|
-
function
|
|
1239
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=
|
|
1240
|
+
function Ky(a,b,c){var d=new Ey("segment",a.h,a.g,b.dataKey);a=new Fi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Ly(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function Ly(a,b){var c=new Ey("segment",a.h,a.g,b);return new Di(function(){return[c.toString()]},0,null)};function My(){this.g=null}q=My.prototype;q.configure=function(){};
|
|
1241
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=Fy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new ly;sa(m,2);return F(m,e.init(),4);case 4:return F(m,py(e,d.ob(),d.Ia()),5);case 5:return f=m.h,F(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Gy(d.ob(),d.Ia()),l=Hy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),F(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
1240
1242
|
q.update=function(){};
|
|
1241
|
-
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
1242
|
-
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};yi["application/x-offline-manifest"]=function(){return new
|
|
1243
|
-
function
|
|
1244
|
-
function
|
|
1245
|
-
h.g)return ra(h,2),F(h,$h(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);ua(h);H(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function
|
|
1246
|
-
function
|
|
1247
|
-
case 4:b.h=null,b.g=null,H(k)}})})}function
|
|
1248
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
1249
|
-
function
|
|
1250
|
-
p,b,c,e,f),v=u.wi,w=u.Xf,F(y,l.Ia.addManifests([v]),11);case 11:A=y.h;
|
|
1251
|
-
|
|
1252
|
-
function
|
|
1253
|
-
|
|
1254
|
-
g.removeSegments(z,function(){}),10);case 10:throw A;}})}function
|
|
1255
|
-
function
|
|
1256
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return F(A,a.updateManifest(b,c),4);case 4:g=!0;f();ta(A,0);break;case 2:return v=ua(A),F(A,
|
|
1257
|
-
function
|
|
1243
|
+
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new ly,ra(m,2,3),F(m,e.init(),5);case 5:return F(m,py(e,d.ob(),d.Ia()),6);case 6:return f=m.h,F(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.u(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),F(m,e.destroy(),10);case 10:ya(m,0);break;case 2:ua(m),m.u(3)}})};
|
|
1244
|
+
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};yi["application/x-offline-manifest"]=function(){return new My};function Ny(){}function Oy(a){var b=Fy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=eg(a)):a=b&&"segment"==b.g?Py(b.key(),b):cg(new T(2,1,9004,a));return a}
|
|
1245
|
+
function Py(a,b){var c=new ly;return eg(void 0).Aa(function(){return c.init()}).Aa(function(){return py(c,b.ob(),b.Ia())}).Aa(function(d){return d.getSegments([b.key()])}).Aa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",Ny);Ny.plugin=Oy;og("offline",Oy);function Qy(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Ry(v.info,p)){v.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Sy(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1246
|
+
function Sy(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Gh({Mb:b,onError:function(){},de:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),F(f,Oh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return ua(f),F(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],F(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1247
|
+
h.g)return ra(h,2),F(h,$h(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);ua(h);H(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function Ry(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Ob(a.audioCapabilities,b.audioCapabilities,c)&&Ob(a.videoCapabilities,b.videoCapabilities,c)};function Ty(a,b,c){var d=b.presentationTimeline.getDuration();b=Uy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Vy(a,b){var c=Hy(new Gy(a.ob(),a.Ia()),b),d=b.appMetadata||{};c=Uy(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}}
|
|
1248
|
+
function Uy(a){var b=[],c=tf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(jf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(kf(c.value));return b};function Wy(){this.g={}}function Xy(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 Yy(a,b){a.g[b.id]=b.bandwidth||2048}function Zy(a,b){a=a.g[b];null==a&&(a=0);return a};function $y(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.xb()):(this.h=um(),this.g=new ng);this.i=[];this.j=[];var c=!a;this.l=new Ag(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return F(k,Promise.all(b.j.map(function(l){return Wx(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 F(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return F(k,b.g.destroy(),4);
|
|
1249
|
+
case 4:b.h=null,b.g=null,H(k)}})})}function az(){if(Sc())a:{var a=t(my.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=$y.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=lm(a,b));return ym(this.h,a)};q.getConfiguration=function(){var a=um();ym(a,this.h,um());return a};q.xb=function(){return this.g};
|
|
1250
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Vx(this.g);this.j.push(f);b=bz(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):F(h,Sm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=xi(a,c||null);return h.return(g())})},e,f);b=new bg(b,function(){return Wx(f)});b.finally(function(){Nb(d.j,f)});return cz(this,b)};
|
|
1251
|
+
function bz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,D;return O(function(y){switch(y.g){case 1:return dz(),h=g=null,k=new ly,n=m=l=null,ra(y,2,3),F(y,d(),5);case 5:return g=y.h,F(y,ez(a,b,g,e),6);case 6:p=y.h;fz(a);r=!p.presentationTimeline.V()&&!p.presentationTimeline.nc();if(!r)throw new T(2,9,9005,b);return F(y,a.Ac(p,function(B){n=n||B},e),7);case 7:h=y.h;fz(a);if(n)throw n;return F(y,gz(p,h,e),8);case 8:return F(y,k.init(),9);case 9:return fz(a),F(y,ny(k),10);case 10:return l=y.h,fz(a),u=hz(h,
|
|
1252
|
+
p,b,c,e,f),v=u.wi,w=u.Xf,F(y,l.Ia.addManifests([v]),11);case 11:A=y.h;fz(a);m=A[0];fz(a);if(n)throw n;return F(y,iz(a,w,m,v,f,e,l.Ia,p,h),12);case 12:return fz(a),jz(p,v,h,e),F(y,l.Ia.updateManifest(m,v),13);case 13:return fz(a),z=new Ey("manifest",l.path.ob,l.path.Ia,m),y.return(Vy(z,v));case 3:return xa(y),F(y,k.destroy(),14);case 14:if(!g){y.u(15);break}return F(y,g.stop(),15);case 15:if(!h){y.u(17);break}return F(y,h.destroy(),17);case 17:ya(y,0);break;case 2:D=ua(y);if(null==m){y.u(19);break}return F(y,
|
|
1253
|
+
kz(m),19);case 19:throw n||D;}})}
|
|
1254
|
+
function iz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,A,z;return O(function(D){switch(D.g){case 1:l={};m=0;n=function(y,B){var C,E,G,L,K,I,J;return O(function(M){if(1==M.g){C=t(y);E=C.next();for(G={};!E.done;G={Cc:void 0},E=C.next())G.Cc=E.value,L=Sx(G.Cc,f),K=G.Cc.i,I=G.Cc.h,J=function(N){return function(P){var R,Q,W;return O(function(Y){if(1==Y.g)return F(Y,g.addSegments([{data:P}]),2);R=Y.h;fz(a);Q=N.Cc.g;W=Rx(Q);l[W]=R[0];m+=P.byteLength;H(Y)})}}(G),Yx(e,G.Cc.groupId,L,K,I,J);return F(M,$x(e),2)}if(!B)return M.u(0);
|
|
1255
|
+
fz(a);jz(h,d,k,f);return F(M,g.updateManifest(c,d),0)})};p=!1;ra(D,2);if(!lz(h)||!p||mz(h)){D.u(4);break}return F(D,n(b.filter(function(y){return y.h}),!0),5);case 5:return fz(a),b=b.filter(function(y){return!y.h}),r=l,u=m,l={},m=0,F(D,nz(g,c,d,r,u,function(){return fz(a)}),6);case 6:fz(a);case 4:if(p){D.u(7);break}return F(D,n(b,!1),8);case 8:return fz(a),v=l,w=m,l={},m=0,F(D,nz(g,c,d,v,w,function(){return fz(a)}),9);case 9:fz(a);case 7:ta(D,0);break;case 2:return A=ua(D),z=Object.values(l),F(D,
|
|
1256
|
+
g.removeSegments(z,function(){}),10);case 10:throw A;}})}function kz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new ly,F(f,b.init(),2);case 2:return F(f,ny(b),3);case 3:return c=f.h,d=new Ey("manifest",c.path.ob,c.path.Ia,a),F(f,b.destroy(),4);case 4:return e=new $y,F(f,e.remove(d.toString()),0)}})}
|
|
1257
|
+
function nz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;ra(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
|
|
1258
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return F(A,a.updateManifest(b,c),4);case 4:g=!0;f();ta(A,0);break;case 2:return v=ua(A),F(A,kz(b),5);case 5:if(g){A.u(6);break}w=Object.values(d);return F(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
|
|
1259
|
+
function gz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,D,y,B,C,E,G,L,K,I,J,M,N,P;return O(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Oe(a,c.restrictions,d),F(R,Se(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Me(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(jf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
|
|
1258
1260
|
e.push(kf(r));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(lf(w));return F(R,c.offline.trackSelectionCallback(e),3);case 3:A=R.h;z=a.presentationTimeline.getDuration();D=0;y=t(A);for(B=y.next();!B.done;B=y.next())C=B.value,E=C.bandwidth*z/8,D+=E;ra(R,4);return F(R,c.offline.downloadSizeCallback(D),6);case 6:G=R.h;if(!G)throw new T(2,9,9014);ta(R,5);break;case 4:L=ua(R);if(L instanceof T)throw L;throw new T(2,9,9015);case 5:K=new Set;I=new Set;J=new Set;M=t(A);for(N=M.next();!N.done;N=
|
|
1259
|
-
M.next())P=N.value,"variant"==P.type&&K.add(P.id),"text"==P.type&&I.add(P.id),"image"==P.type&&J.add(P.id);a.variants=a.variants.filter(function(Q){return K.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return I.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return J.has(Q.id)});
|
|
1260
|
-
function
|
|
1261
|
-
n&&p&&(n.initData=[]);return{wi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ad(),streams:f,sessionIds:p?ei(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Xf:m}}function
|
|
1262
|
-
function
|
|
1263
|
-
function
|
|
1264
|
-
function
|
|
1265
|
-
function
|
|
1266
|
-
function
|
|
1267
|
-
q.list=function(){return
|
|
1268
|
-
function
|
|
1269
|
-
onMetadata:function(){},disableStream:function(){}},c.configure(d.manifest),
|
|
1261
|
+
M.next())P=N.value,"variant"==P.type&&K.add(P.id),"text"==P.type&&I.add(P.id),"image"==P.type&&J.add(P.id);a.variants=a.variants.filter(function(Q){return K.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return I.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return J.has(Q.id)});oz(a);H(R)}})}
|
|
1262
|
+
function hz(a,b,c,d,e,f){var g=Ty(c,b,d),h=e.offline.progressCallback;Xx(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&Wh(a,"cenc",r)});var k=lz(b)&&!mz(b),l=null;k&&(l=pz.get(a.g.keySystem));for(var m=new Wy,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Yy(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Xy(m,p.value);m=qz(f,m,b,e);f=m.streams;m=m.Xf;n=a.g;p=e.offline.usePersistentLicense;
|
|
1263
|
+
n&&p&&(n.initData=[]);return{wi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ad(),streams:f,sessionIds:p?ei(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Xf:m}}function lz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1264
|
+
function mz(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 jz(a,b,c,d){b.expiration=c.ad();c=ei(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(lz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return rz(this,sz(this,a))};
|
|
1265
|
+
function sz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:dz();c=Fy(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new ly;sa(k,2);return F(k,e.init(),4);case 4:return F(k,py(e,d.ob(),d.Ia()),5);case 5:return f=k.h,F(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],F(k,Promise.all([tz(a,h,e),uz(f,d,h)]),2);case 2:return xa(k),F(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
1266
|
+
function vz(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:Zd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Zd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function tz(a,b,c){return O(function(d){return F(d,wz(a.g,a.h.drm,c,b),0)})}
|
|
1267
|
+
function uz(a,b,c){function d(){}var e=xz(c);Vy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ni=function(){return rz(this,yz(this))};
|
|
1268
|
+
function yz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return dz(),b=a.g,c=a.h.drm,d=new ly,e=!1,sa(n,2),F(n,d.init(),4);case 4:f=[],qy(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,Qy(c,b,l),9);case 9:return m=n.h,F(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return xa(n),F(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
|
|
1269
|
+
q.list=function(){return rz(this,zz())};function zz(){var a,b,c;return O(function(d){switch(d.g){case 1:return dz(),a=[],b=new ly,sa(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),oy(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return F(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Vy(new Ey("manifest",e.ob,e.Ia,l),k);a.push(k)});H(h)})})}),F(d,c,2);case 2:return xa(d),F(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
|
|
1270
|
+
function ez(a,b,c,d){var e,f,g,h,k;return O(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},
|
|
1271
|
+
onMetadata:function(){},disableStream:function(){}},c.configure(d.manifest),fz(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,fz(a),k=Az(h),F(l,Promise.all(Cg(k,function(m){return m.createSegmentIndex()})),3);fz(a);if(e)throw e;return l.return(h)})}
|
|
1270
1272
|
q.Ac=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Gh({Mb:d.g,onError:b,de:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),F(f,Lh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?F(f,Yh(e),3):f.return(e)})};
|
|
1271
|
-
function
|
|
1272
|
-
function
|
|
1273
|
-
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;
|
|
1274
|
-
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});0!==h&&(k=(k+1)%h)});return g}function
|
|
1275
|
-
function
|
|
1276
|
-
function
|
|
1277
|
-
function
|
|
1278
|
-
function
|
|
1279
|
-
function
|
|
1280
|
-
|
|
1281
|
-
var
|
|
1282
|
-
function
|
|
1283
|
-
da.Object.defineProperties(
|
|
1284
|
-
function
|
|
1285
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
1286
|
-
function
|
|
1287
|
-
function
|
|
1288
|
-
(r+="; spatialRendering=true");l=lb(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return F(p,
|
|
1289
|
-
function
|
|
1290
|
-
function
|
|
1291
|
-
distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=c.keySystem;
|
|
1292
|
-
|
|
1293
|
-
var
|
|
1294
|
-
function
|
|
1295
|
-
function
|
|
1296
|
-
function eA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"
|
|
1297
|
-
function
|
|
1298
|
-
function
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
function
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1273
|
+
function qz(a,b,c,d){var e=new Map,f=Az(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Bz(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()),Xf:Array.from(e.values())}}
|
|
1274
|
+
function Bz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1275
|
+
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;Cz(d,c.presentationTimeline.nb(),function(l){var m=Rx(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Zy(b,d.id)*p;p=Ux(a.g,p);f.set(m,new Qx(l,p,k,!1))}l.Z&&(n=Rx(l.Z),f.has(n)||(p=.5*Zy(b,d.id),p=Ux(a.g,p),f.set(n,new Qx(l.Z,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
1276
|
+
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});0!==h&&(k=(k+1)%h)});return g}function Cz(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 fz(a){if(a.l.g)throw new T(2,9,7001);}
|
|
1277
|
+
function dz(){if(!az())throw new T(2,9,9E3);}function rz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),sa(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);Nb(a.i,b);return ya(c,0)})}function cz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Nb(a.i,c)})}
|
|
1278
|
+
function xz(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)}
|
|
1279
|
+
function wz(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=ry(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:vz(d,!1),videoCapabilities:vz(d,!0)}});return F(h,Qy(b,a,f),2)}return 3!=h.g?(g=h.h,F(h,e.remove(g),3)):F(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1280
|
+
function Az(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
|
|
1281
|
+
function oz(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());}S("shaka.offline.Storage",$y);$y.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new ly,sa(b,2),F(b,sy(a),2)):5!=b.g?(xa(b),F(b,a.destroy(),5)):ya(b,0)})};
|
|
1282
|
+
$y.prototype.list=$y.prototype.list;$y.prototype.removeEmeSessions=$y.prototype.Ni;$y.prototype.remove=$y.prototype.remove;$y.prototype.store=$y.prototype.store;$y.prototype.getNetworkingEngine=$y.prototype.xb;$y.prototype.getConfiguration=$y.prototype.getConfiguration;$y.prototype.configure=$y.prototype.configure;$y.prototype.destroy=$y.prototype.destroy;$y.support=az;
|
|
1283
|
+
var pz=(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");wp.offline=az;function Dz(){}function Ez(a,b){a={priority:b||0,callback:a};for(b=0;b<Fz.length;b++)if(Fz[b].priority<a.priority){Fz.splice(b,0,a);return}Fz.push(a)}S("shaka.polyfill",Dz);Dz.register=Ez;Dz.installAll=function(){for(var a=t(Fz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Ya("Error installing polyfill!",c)}}};var Fz=[];function Gz(){this.g=new Hz}function Iz(){window.AbortController||(window.AbortController=Gz,window.AbortSignal=Hz)}Gz.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 U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(Gz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Dz.AbortController=Gz;Gz.install=Iz;
|
|
1284
|
+
function Hz(){this.h=!1;this.g=void 0;this.onabort=null;this.i=new kg}Hz.prototype.addEventListener=function(a,b,c){return this.i.addEventListener(a,b,c)};Hz.prototype.removeEventListener=function(a,b,c){return this.i.removeEventListener(a,b,c)};Hz.prototype.dispatchEvent=function(a){return this.i.dispatchEvent(a)};Hz.prototype.throwIfAborted=function(){if(this.h)throw this.g;};
|
|
1285
|
+
da.Object.defineProperties(Hz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Ez(Iz);function Jz(){}function Kz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Lz(b.value)}function Lz(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)}})}Dz.Aria=Jz;Jz.install=Kz;Ez(Kz);function Mz(){}function Nz(){id()||Zc("Sky_STB")||Oz()}Dz.EncryptionScheme=Mz;Mz.install=Nz;Ez(Nz,-2);function Pz(){}
|
|
1286
|
+
function Qz(){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}}),
|
|
1287
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Rz);document.addEventListener("webkitfullscreenerror",Rz);document.addEventListener("mozfullscreenchange",Rz);document.addEventListener("mozfullscreenerror",Rz);document.addEventListener("MSFullscreenChange",Rz);document.addEventListener("MSFullscreenError",Rz)}}
|
|
1288
|
+
function Rz(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)}Dz.Fullscreen=Pz;Pz.install=Qz;Ez(Qz);function Sz(){}function Tz(){var a=!0;!fd()||fd()&&nd()||fd()&&Zc("Fuchsia")||(a=!1);if(gd()||jd()||id()||cd()||$c()||Zc("PC=EOS")||kd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Uz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Vz)}
|
|
1289
|
+
function Vz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Tc(e),!f)||d&&(g=d.contentType,h=Tc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Sc())return p.return(b);if(!c){p.u(3);break}return F(p,Wz(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var r=d.contentType;fd()&&d.spatialRendering&&
|
|
1290
|
+
(r+="; spatialRendering=true");l=lb(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return F(p,Xz(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
|
|
1291
|
+
function Wz(a){var b,c;return O(function(d){return 1==d.g?fd()?F(d,Yz(a),3):$c()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(lb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(lb(a.contentType))})}
|
|
1292
|
+
function Xz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return O(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},$c()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h=
|
|
1293
|
+
{initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=ie(k)+";"+he(k);n=ie(l)+";"+he(l);p=c.keySystem;r=null;ra(u,2);if(Pc.has(m+"#"+n+"#"+p)){r=Pc.get(m+"#"+n+"#"+p)||null;u.u(4);break}return F(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=u.h,Pc.set(m+"#"+n+"#"+p,r);case 4:ta(u,
|
|
1294
|
+
3);break;case 2:ua(u);case 3:return u.return(r)}})}
|
|
1295
|
+
function Yz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(lb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Zz?(c=Zz[b],d.u(2)):F(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Zz[b]=c);return d.return(c)})}Dz.MediaCapabilities=Sz;Sz.install=Tz;
|
|
1296
|
+
var Uz=null;Sz.originalMcap=Uz;var Zz={};Sz.memoizedCanDisplayTypeRequests_=Zz;Ez(Tz,-1);function $z(){}function aA(){var a=ld();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(bA(),cA()):15>=a&&bA():Zc("DT_STB_BCM")?(bA(),cA()):(bd()||ad()||Zc("Tizen 4"))&&dA();(window.MediaSource||window.ManagedMediaSource)&&eA();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&fA()}
|
|
1297
|
+
function bA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function cA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1298
|
+
function eA(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ee(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ee(c)&&b(c)}}}
|
|
1299
|
+
function dA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=he(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=he(c)&&b(c)}}}
|
|
1300
|
+
function fA(){var a=MediaSource.isTypeSupported;cd()||(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)})}Dz.MediaSource=$z;$z.install=aA;Ez(aA);function gA(){}function hA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?iA():void 0!=window.orientation&&jA())}function iA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1301
|
+
function jA(){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 kA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}Dz.Orientation=gA;gA.install=hA;function kA(){kg.call(this);this.type="";this.angle=0}na(kA,kg);
|
|
1302
|
+
kA.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)};
|
|
1303
|
+
kA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ez(hA);function lA(){}var mA,nA,oA,pA,qA,rA;function sA(a,b){try{var c=new tA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function uA(a){var b=this.mediaKeys;b&&b!=a&&vA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?vA(a,this):Promise.resolve()}
|
|
1304
|
+
function wA(a){a=zb(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=xd(a.subarray(4),!0);a=Ad(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ab(a);this.dispatchEvent(b)}Dz.PatchedMediaKeysApple=lA;
|
|
1305
|
+
lA.uninstall=function(){mA&&(mA=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",nA),HTMLMediaElement.prototype.setMediaKeys=oA,window.MediaKeys=pA,window.MediaKeySystemAccess=qA,navigator.requestMediaKeySystemAccess=rA,nA=rA=oA=qA=pA=null,window.shakaMediaKeysPolyfill="")};
|
|
1306
|
+
lA.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)mA=!0,nA=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),oA=HTMLMediaElement.prototype.setMediaKeys,pA=window.MediaKeys,qA=window.MediaKeySystemAccess,rA=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=uA;window.MediaKeys=xA;window.MediaKeySystemAccess=tA;navigator.requestMediaKeySystemAccess=
|
|
1307
|
+
sA;window.shakaMediaKeysPolyfill=yA}};
|
|
1308
|
+
function tA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1306
1309
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1307
|
-
|
|
1308
|
-
function
|
|
1309
|
-
q.generateRequest=function(a,b){var c=this;this.h=new ag;try{var d=this.l.createSession("video/mp4",zb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Zb()?"license-request":"license-renewal").set("message",Ab(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(
|
|
1310
|
-
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:
|
|
1311
|
-
q.update=function(a){this.g=new ag;try{this.i.update(zb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function
|
|
1312
|
-
function
|
|
1313
|
-
function
|
|
1314
|
-
|
|
1315
|
-
function
|
|
1316
|
-
function
|
|
1317
|
-
function
|
|
1310
|
+
tA.prototype.createMediaKeys=function(){var a=new xA(this.keySystem);return Promise.resolve(a)};tA.prototype.getConfiguration=function(){return this.g};function xA(a){this.h=new WebKitMediaKeys(a);this.g=new gb}xA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new zA(this.h,a)};xA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1311
|
+
function vA(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",wA);try{return yk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}xA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function zA(a){kg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new gb;this.sessionId="";this.expiration=NaN;this.closed=new ag;this.keyStatuses=new AA}na(zA,kg);q=zA.prototype;
|
|
1312
|
+
q.generateRequest=function(a,b){var c=this;this.h=new ag;try{var d=this.l.createSession("video/mp4",zb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Zb()?"license-request":"license-renewal").set("message",Ab(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(BA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1313
|
+
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:BA(c,"output-not-allowed");break;default:BA(c,"internal-error")}});BA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1314
|
+
q.update=function(a){this.g=new ag;try{this.i.update(zb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function BA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
|
|
1315
|
+
function AA(){this.size=0;this.g=void 0}q=AA.prototype;q.Zb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Oc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Oc.value();return this.g&&xb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var yA="apple";function CA(){}function DA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ad()||Zc("Tizen 4")||Zc("Tizen 5.0")||dd())&&(MediaKeys.prototype.setServerCertificate=EA)}function EA(){return Promise.resolve(!1)}Dz.PatchedMediaKeysCert=CA;CA.install=DA;Ez(DA);function FA(){}function GA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=HA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=IA,window.MediaKeys=JA,window.MediaKeySystemAccess=KA,window.shakaMediaKeysPolyfill=LA)}function HA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1316
|
+
function IA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Dz.PatchedMediaKeysNop=FA;FA.install=GA;function JA(){throw new TypeError("Illegal constructor.");}JA.prototype.createSession=function(){};JA.prototype.setServerCertificate=function(){};JA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function KA(){this.keySystem="";throw new TypeError("Illegal constructor.");}KA.prototype.getConfiguration=function(){};
|
|
1317
|
+
KA.prototype.createMediaKeys=function(){};var LA="nop";Ez(GA,-10);function MA(){}
|
|
1318
|
+
function NA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)OA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=PA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=QA;window.MediaKeys=RA;window.MediaKeySystemAccess=SA;window.shakaMediaKeysPolyfill=TA}}
|
|
1319
|
+
function UA(a){var b=OA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function PA(a,b){try{var c=new SA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function QA(a){var b=this.mediaKeys;b&&b!=a&&VA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&VA(a,this);return Promise.resolve()}Dz.PatchedMediaKeysWebkit=MA;MA.install=NA;
|
|
1320
|
+
function SA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
1318
1321
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1319
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1320
|
-
function
|
|
1321
|
-
a.g.D(b,c+"keyerror",function(d){var e=
|
|
1322
|
-
|
|
1323
|
-
function
|
|
1324
|
-
function
|
|
1325
|
-
function
|
|
1326
|
-
function
|
|
1327
|
-
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
1328
|
-
q.forEach=function(a){this.g&&a(this.g,Oc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Oc.value();return this.g&&xb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var
|
|
1329
|
-
function
|
|
1330
|
-
function
|
|
1331
|
-
function
|
|
1332
|
-
S("shaka.text.LrcTextParser",
|
|
1333
|
-
|
|
1334
|
-
kh(e,"metadata")[0];g=(g?g.children:[]).filter(function(u){return"\n"!=u});h=kh(e,"style");e=kh(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next())(r=
|
|
1322
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}SA.prototype.createMediaKeys=function(){var a=new RA(this.g);return Promise.resolve(a)};SA.prototype.getConfiguration=function(){return this.h};function RA(a){this.l=a;this.h=null;this.g=new gb;this.i=[];this.j=new Map}
|
|
1323
|
+
function VA(a,b){a.h=b;a.g.Qa();var c=OA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ab(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=WA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Zb()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=WA(a,d.sessionId))&&d.ready()}),
|
|
1324
|
+
a.g.D(b,c+"keyerror",function(d){var e=WA(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?XA(e,"output-restricted"):1==f?XA(e,"expired"):XA(e,"internal-error"))}}))}
|
|
1325
|
+
RA.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 YA(b,this.l,a);this.i.push(a);return a};RA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};RA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1326
|
+
function WA(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 YA(a,b,c){kg.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 ag;this.keyStatuses=new ZA}na(YA,kg);q=YA.prototype;q.ready=function(){XA(this,"usable");this.g&&this.g.resolve();this.g=null};
|
|
1327
|
+
function $A(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=zb(Ad("LOAD_SESSION|"+c));else{var e=Ad("PERSISTENT|");d=Kd(e,b)}else d=zb(b)}catch(g){return Promise.reject(g)}a.h=new ag;var f=UA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Rc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).$(.01)}return a.h}
|
|
1328
|
+
function aB(a,b,c){if(a.g)a.g.then(function(){return aB(a,b,c)}).catch(function(){return aB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=vd(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=Hd(e.keys[0].k);e=Hd(e.keys[0].kid)}else d=zb(c),e=null;var f=UA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1329
|
+
function XA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return $A(this,b,null)};q.load=function(a){return"persistent-license"==this.l?$A(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new ag;aB(this,b,a);return b};
|
|
1330
|
+
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=UA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function ZA(){this.size=0;this.g=void 0}q=ZA.prototype;q.Zb=function(){return this.g};
|
|
1331
|
+
q.forEach=function(a){this.g&&a(this.g,Oc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Oc.value();return this.g&&xb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var OA="",TA="webkit";Ez(NA);function bB(){}function cB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=dB,Object.defineProperty(a,"disablePictureInPicture",{get:eB,set:fB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=gB,document.addEventListener("webkitpresentationmodechanged",hB,!0))}}
|
|
1332
|
+
function hB(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)}
|
|
1333
|
+
function dB(){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 gB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1334
|
+
function eB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function fB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Dz.PiPWebkit=bB;bB.install=cB;Ez(cB);function iB(){}function jB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=kB))}function kB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Dz.RandomUUID=iB;iB.install=jB;Ez(jB);function lB(){}function mB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:nB})}function nB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Dz.Symbol=lB;lB.install=mB;Ez(mB);function oB(){}function pB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Dz.VideoPlayPromise=oB;oB.install=pB;Ez(pB);function qB(){}function rB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||dd())&&(a.getVideoPlaybackQuality=sB)}}function sB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Dz.VideoPlaybackQuality=qB;qB.install=rB;Ez(rB);function tB(){}function uB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=vB;else if(6==b)a=wB;else{try{var c=!!vB(1,2,"")}catch(d){c=!1}c&&(a=vB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function vB(a,b,c){return new window.TextTrackCue(a,b,c)}function wB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Dz.VTTCue=tB;tB.install=uB;Ez(uB);function xB(){}xB.prototype.parseInit=function(){};xB.prototype.setSequenceMode=function(){};xB.prototype.setManifestType=function(){};xB.prototype.parseMedia=function(a,b){var c=null,d=[];a=vd(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=yB.exec(e))){var f=zB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Qb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1335
|
+
S("shaka.text.LrcTextParser",xB);xB.prototype.parseMedia=xB.prototype.parseMedia;xB.prototype.setManifestType=xB.prototype.setManifestType;xB.prototype.setSequenceMode=xB.prototype.setSequenceMode;xB.prototype.parseInit=xB.prototype.parseInit;var yB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,zB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;pe["application/x-subtitle-lrc"]=function(){return new xB};function AB(){}AB.prototype.parseInit=function(){};AB.prototype.setSequenceMode=function(){};AB.prototype.setManifestType=function(){};
|
|
1336
|
+
AB.prototype.parseMedia=function(a,b,c){var d=vd(a);a=[];if(""==d)return a;var e=ah(d,"tt",!0);if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=kh(e,"body")[0];if(!d)return[];var f=qh(e,BB,"frameRate"),g=qh(e,BB,"subFrameRate"),h=qh(e,BB,"frameRateMultiplier"),k=qh(e,BB,"tickRate"),l=qh(e,BB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=qh(e,CB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new DB(f,g,h,k);l=EB(l);g=
|
|
1337
|
+
kh(e,"metadata")[0];g=(g?g.children:[]).filter(function(u){return"\n"!=u});h=kh(e,"style");e=kh(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next())(r=FB(r.value,h,n))&&k.push(r);if(hh(d,"p").length)throw new T(2,2,2001,"<p> can only be inside <div> in TTML");n=t(hh(d,"div"));for(p=n.next();!p.done;p=n.next())if(hh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=GB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),
|
|
1335
1338
|
a.push(b);return a};
|
|
1336
|
-
function
|
|
1337
|
-
[];if(!A)for(var z=t(r.children),D=z.next();!D.done;D=z.next())(D=
|
|
1338
|
-
if(!D&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==r.tagName)return e=new Qb(n,z,""),e.lineBreak=!0,e;b="";A&&(b=Dd(ih(r)||""),w&&(b=b.replace(/\s+/g," ")));b=new Qb(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
1339
|
-
!r.attributes.style&&(g=
|
|
1340
|
-
function
|
|
1341
|
-
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Kb,d.height=100-d.viewportAnchorY,d.heightUnits=Kb):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Kb:0;return d}function
|
|
1342
|
-
function
|
|
1343
|
-
g))a.backgroundColor=
|
|
1344
|
-
k}).join(",")}(h=
|
|
1345
|
-
e);if(d=
|
|
1346
|
-
d;switch(
|
|
1347
|
-
function
|
|
1348
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Nb(a.textDecoration,"overline")}}function
|
|
1349
|
-
function
|
|
1350
|
-
function
|
|
1351
|
-
function
|
|
1352
|
-
function
|
|
1353
|
-
function
|
|
1354
|
-
var
|
|
1355
|
-
end:"end"},
|
|
1356
|
-
|
|
1357
|
-
pe['application/mp4; codecs="stpp.ttml"']=function(){return new
|
|
1358
|
-
|
|
1359
|
-
95443.7176888889,d+=8589934592;a=b.periodStart+d/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new
|
|
1360
|
-
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");
|
|
1339
|
+
function GB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(fh(a)){if(!m)return null;var r={tagName:"span",children:[ih(a)],attributes:{},parent:null}}else r=a;for(var u=null,v=t(HB),w=v.next();!w.done&&!(u=IB(r,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=qh(r,HB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new tc(n),A=new tc(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(r.attributes["xml:space"]||(h?"default":"preserve"));A=r.children.every(fh);h=
|
|
1340
|
+
[];if(!A)for(var z=t(r.children),D=z.next();!D.done;D=z.next())(D=GB(D.value,b,c,d,e,f,g,w,k,r,m,n))&&h.push(D);d=null!=l;n=ih(r);n=r.children.length&&n&&/\S/.test(n);D=r.attributes.begin||r.attributes.end||r.attributes.dur;if(!(D||n||"br"==r.tagName||0!=h.length||d&&!w))return null;z=JB(r,c);n=z.start;for(z=z.end;p&&p.tagName&&"tt"!=p.tagName;)z=KB(p,c,n,z),n=z.start,z=z.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;z=null==z?Infinity:z+b.periodStart;n=Math.max(n,b.segmentStart);z=Math.min(z,b.segmentEnd);
|
|
1341
|
+
if(!D&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==r.tagName)return e=new Qb(n,z,""),e.lineBreak=!0,e;b="";A&&(b=Dd(ih(r)||""),w&&(b=b.replace(/\s+/g," ")));b=new Qb(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=IB(r,"region",f,"")[0];if(r.attributes.region&&k&&k.attributes["xml:id"]){var y=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==y})[0]}g=k;l&&d&&!r.attributes.region&&
|
|
1342
|
+
!r.attributes.style&&(g=IB(l,"region",f,"")[0]);LB(b,r,g,u,v,e,a,0==h.length);return b}
|
|
1343
|
+
function FB(a,b,c){var d=new Jb,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=MB.exec(c)||NB.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=OB(a,b,"extent");if(g){var h=(f=MB.exec(g))||NB.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Kb:0,d.heightUnits=f||null!=e?Kb:0)}if(a=OB(a,b,"origin"))if(h=(f=MB.exec(a))||NB.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
|
|
1344
|
+
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Kb,d.height=100-d.viewportAnchorY,d.heightUnits=Kb):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Kb:0;return d}function PB(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
|
|
1345
|
+
function LB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==QB(b,c,f,"direction",g)&&(a.direction="rtl");h=QB(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=Ub);(h=QB(b,c,f,"textAlign",!0))?(a.positionAlign=RB[h],a.lineAlign=SB[h],a.textAlign=ec[h.toUpperCase()]):a.textAlign=Tb;if(h=QB(b,c,f,"displayAlign",!0))a.displayAlign=fc[h.toUpperCase()];if(h=QB(b,c,f,"color",g))a.color=PB(h);if(h=QB(b,c,f,"backgroundColor",
|
|
1346
|
+
g))a.backgroundColor=PB(h);if(h=QB(b,c,f,"border",g))a.border=h;if(h=QB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
|
|
1347
|
+
k}).join(",")}(h=QB(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=QB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=QB(b,c,f,"lineHeight",g))&&h.match(TB)&&(a.lineHeight=h);(h=QB(b,c,f,"fontSize",g))&&(h.match(TB)||h.match(UB))&&(a.fontSize=h);if(h=QB(b,c,f,"fontStyle",g))a.fontStyle=jc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=ih(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
|
|
1348
|
+
e);if(d=QB(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(TB)?a.textStrokeColor=a.color:(a.textStrokeColor=PB(d[0]),d.shift()),d[0]&&d[0].match(TB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=QB(b,c,f,"letterSpacing",g))&&d.match(TB)&&(a.letterSpacing=d);(d=QB(b,c,f,"linePadding",g))&&d.match(TB)&&(a.linePadding=d);if(d=QB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=OB(c,f,"textDecoration"))&&VB(a,d);(d=WB(b,f,"textDecoration"))&&VB(a,d);if(d=QB(b,c,f,"textCombine",g))a.textCombineUpright=
|
|
1349
|
+
d;switch(QB(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
1350
|
+
function VB(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")&&Nb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Nb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1351
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Nb(a.textDecoration,"overline")}}function QB(a,b,c,d,e){e=void 0===e?!0:e;return(a=WB(a,c,d))?a:e?OB(b,c,d):null}function OB(a,b,c){if(!a)return null;var d=qh(a,CB,c);return d?d:XB(a,b,c)}function WB(a,b,c){var d=qh(a,CB,c);return d?d:XB(a,b,c)}
|
|
1352
|
+
function XB(a,b,c){a=IB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ph(a[e],"urn:ebu:tt:style",c);f||(f=qh(a[e],CB,c));f||(f=WB(a[e],b,c));f&&(d=f)}return d}function IB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?ph(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1353
|
+
function KB(a,b,c,d){a=JB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function JB(a,b){var c=YB(a.attributes.begin,b),d=YB(a.attributes.end,b);a=YB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1354
|
+
function YB(a,b){var c=null;if(ZB.test(a)){a=ZB.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($B.test(a))c=aC($B,a);else if(bC.test(a))c=aC(bC,a);else if(cC.test(a))a=cC.exec(a),c=Number(a[1])/b.frameRate;else if(dC.test(a))a=dC.exec(a),c=Number(a[1])/b.g;else if(eC.test(a))c=aC(eC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1355
|
+
function aC(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function EB(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{hc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",AB);AB.prototype.parseMedia=AB.prototype.parseMedia;AB.prototype.setManifestType=AB.prototype.setManifestType;AB.prototype.setSequenceMode=AB.prototype.setSequenceMode;AB.prototype.parseInit=AB.prototype.parseInit;
|
|
1356
|
+
function DB(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]))}
|
|
1357
|
+
var MB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,UB=/^(\d{1,4}(?:\.\d+)?|100)%$/,TB=/^(\d+px|\d+em|\d*\.?\d+c)$/,NB=/^(\d+)px (\d+)px$/,ZB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,$B=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,bC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,cC=/^(\d*(?:\.\d*)?)f$/,dC=/^(\d*(?:\.\d*)?)t$/,eC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),SB={left:Xb,center:"center",right:"end",start:Xb,
|
|
1358
|
+
end:"end"},RB={left:"line-left",center:"center",right:"line-right"},BB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],CB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],HB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];pe["application/ttml+xml"]=function(){return new AB};function fC(){this.g=new AB}fC.prototype.parseInit=function(a){var b=!1;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).T("stsd",Sg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};fC.prototype.setSequenceMode=function(){};fC.prototype.setManifestType=function(){};
|
|
1359
|
+
fC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Lg).box("mdat",Xg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",fC);fC.prototype.parseMedia=fC.prototype.parseMedia;fC.prototype.setManifestType=fC.prototype.setManifestType;fC.prototype.setSequenceMode=fC.prototype.setSequenceMode;fC.prototype.parseInit=fC.prototype.parseInit;pe['application/mp4; codecs="stpp"']=function(){return new fC};
|
|
1360
|
+
pe['application/mp4; codecs="stpp.ttml"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new fC};pe['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new fC};function gC(){this.h=!1;this.g="UNKNOWN"}gC.prototype.parseInit=function(){};gC.prototype.setSequenceMode=function(a){this.h=a};gC.prototype.setManifestType=function(a){this.g=a};
|
|
1361
|
+
gC.prototype.parseMedia=function(a,b){a=vd(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=hC(new Rp(a[1]));if(null==a)throw new T(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=
|
|
1362
|
+
95443.7176888889,d+=8589934592;a=b.periodStart+d/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Rp(e);var f=new Jb;Up(e);Sp(e);for(var g=Up(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=
|
|
1363
|
+
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");Sp(e);g=Up(e)}b.push(f)}d=new Map;iC(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
|
|
1361
1364
|
t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Qb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;
|
|
1362
1365
|
case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=700;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=$b;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,
|
|
1363
|
-
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new
|
|
1364
|
-
|
|
1365
|
-
function
|
|
1366
|
-
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=
|
|
1367
|
-
m.next())
|
|
1368
|
-
function
|
|
1369
|
-
|
|
1370
|
-
if(!f)break;if(f=
|
|
1371
|
-
function
|
|
1372
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Rb);else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
1373
|
-
function
|
|
1374
|
-
pe["text/vtt"]=function(){return new
|
|
1375
|
-
|
|
1376
|
-
p.value;var r=p.Jf||l,u=p.me?c+p.me:a;a=u+(r||0);var v=0;do{var w=m.R();v+=w;var A=m.R(),z=null;"vttc"==Pg(A)?8<w&&(z=m.
|
|
1377
|
-
function
|
|
1378
|
-
function
|
|
1379
|
-
function
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={lh:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
1383
|
-
l.lh}}(a)))&&
|
|
1384
|
-
function
|
|
1366
|
+
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Rp(l[0]),g=hC(h),n=Tp(h,/[ \t]+--\x3e[ \t]+/g),k=hC(h),null==g||null==n||null==k)Ya("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;l=l.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=g,m.endTime=k,m.payload=""):m=new Qb(g,k,"");Sp(h);for(g=Up(h);g;)jC(m,g,b),Sp(h),g=Up(h);
|
|
1367
|
+
kC(l,m,d);null!=f&&(m.id=f);f=m}f&&e.push(f)}return e};function iC(a){for(var b=t(Object.entries(hc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Qb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(ic));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Qb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1368
|
+
function kC(a,b,c){if(a.includes("<")){0===c.size&&iC(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(lC)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
|
|
1369
|
+
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=mC(a);try{var m=ah("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
|
|
1370
|
+
m.next())nC(a.value,b,c);else b.payload=Dd(a);else b.payload=Dd(a)}else b.payload=Dd(a)}function mC(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function oC(a,b){return a&&0<a.length?a:b}
|
|
1371
|
+
function nC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Jb;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=oC(g.backgroundColor,h.backgroundColor),h.color=oC(g.color,h.color),h.fontFamily=oC(g.fontFamily,h.fontFamily),h.fontSize=
|
|
1372
|
+
oC(g.fontSize,h.fontSize),h.textShadow=oC(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=ac(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
|
|
1373
|
+
if(!f)break;if(f=hC(new Rp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(fh(a)||1==e.length&&fh(e[0]))for(c=ih(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ac(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())nC(a.value,d,c)}
|
|
1374
|
+
function jC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Tb:a.textAlign=ec[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"==
|
|
1375
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Rb);else if(d=/^region:(.*)$/.exec(b)){if(b=pC(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=gc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=gc[c[2].toUpperCase()])}
|
|
1376
|
+
function pC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function hC(a){a=Tp(a,lC);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)}S("shaka.text.VttTextParser",gC);gC.prototype.parseMedia=gC.prototype.parseMedia;gC.prototype.setManifestType=gC.prototype.setManifestType;gC.prototype.setSequenceMode=gC.prototype.setSequenceMode;gC.prototype.parseInit=gC.prototype.parseInit;var lC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1377
|
+
pe["text/vtt"]=function(){return new gC};pe['text/vtt; codecs="vtt"']=function(){return new gC};pe['text/vtt; codecs="wvtt"']=function(){return new gC};function qC(){this.g=null}qC.prototype.parseInit=function(a){var b=this,c=!1;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).T("mdhd",function(d){d=$i(d.reader,d.version);b.g=d.timescale}).box("minf",Qg).box("stbl",Qg).T("stsd",Sg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};qC.prototype.setSequenceMode=function(){};qC.prototype.setManifestType=function(){};
|
|
1378
|
+
qC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Lg).box("moof",Qg).box("traf",Qg).T("tfdt",function(D){g=!0;c=Zi(D.reader,D.version).baseMediaDecodeTime}).T("tfhd",function(D){l=Yi(D.reader,D.flags).Zc}).T("trun",function(D){h=!0;d=aj(D.reader,D.version,D.flags).Yg}).box("mdat",Xg(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Ig(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1379
|
+
p.value;var r=p.Jf||l,u=p.me?c+p.me:a;a=u+(r||0);var v=0;do{var w=m.R();v+=w;var A=m.R(),z=null;"vttc"==Pg(A)?8<w&&(z=m.rb(w-8)):m.skip(w-8);r&&z&&(w=rC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(ye)};function rC(a,b,c){var d,e,f;(new Lg).box("payl",Xg(function(g){d=vd(g)})).box("iden",Xg(function(g){e=vd(g)})).box("sttg",Xg(function(g){f=vd(g)})).parse(a);return d?sC(d,e,f,b,c):null}
|
|
1380
|
+
function sC(a,b,c,d,e){d=new Qb(d,e,"");kC(a,d,new Map);b&&(d.id=b);if(c)for(a=new Rp(c),b=Up(a);b;)jC(d,b,[]),Sp(a),b=Up(a);return d}S("shaka.text.Mp4VttParser",qC);qC.prototype.parseMedia=qC.prototype.parseMedia;qC.prototype.setManifestType=qC.prototype.setManifestType;qC.prototype.setSequenceMode=qC.prototype.setSequenceMode;qC.prototype.parseInit=qC.prototype.parseInit;pe['application/mp4; codecs="wvtt"']=function(){return new qC};function tC(){}tC.prototype.parseInit=function(){};tC.prototype.setSequenceMode=function(){};tC.prototype.setManifestType=function(){};tC.prototype.parseMedia=function(a){var b=vd(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 Rp(c[0]),e=uC(d),f=Tp(d,/,/g);d=uC(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Qb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1381
|
+
function uC(a){a=Tp(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)}S("shaka.text.SbvTextParser",tC);tC.prototype.parseMedia=tC.prototype.parseMedia;tC.prototype.setManifestType=tC.prototype.setManifestType;tC.prototype.setSequenceMode=tC.prototype.setSequenceMode;tC.prototype.parseInit=tC.prototype.parseInit;pe["text/x-subviewer"]=function(){return new tC};function vC(){this.g=new gC}vC.prototype.parseInit=function(){};vC.prototype.setSequenceMode=function(){};vC.prototype.setManifestType=function(){};vC.prototype.parseMedia=function(a,b,c){a=vd(a);a=wC(a);a=zb(Ad(a));return this.g.parseMedia(a,b,c)};
|
|
1382
|
+
function wC(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}S("shaka.text.SrtTextParser",vC);vC.srt2webvtt=wC;vC.prototype.parseMedia=vC.prototype.parseMedia;
|
|
1383
|
+
vC.prototype.setManifestType=vC.prototype.setManifestType;vC.prototype.setSequenceMode=vC.prototype.setSequenceMode;vC.prototype.parseInit=vC.prototype.parseInit;pe["text/srt"]=function(){return new vC};function xC(){}xC.prototype.parseInit=function(){};xC.prototype.setSequenceMode=function(){};xC.prototype.setManifestType=function(){};
|
|
1384
|
+
xC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=vd(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=yC.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=zC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(AC);else if("Style"==a){a=f.split(AC);f={};for(var g=0;g<e.length&&
|
|
1385
|
+
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={lh:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=zC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(AC);else if("Dialogue"==f){g=g.split(AC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=BC(f.Start);var k=BC(f.End);g=new Qb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.lh=f.Style;(a=d.find(function(l){return function(m){return m.Name==
|
|
1386
|
+
l.lh}}(a)))&&CC(g,a);e.push(g)}return e};
|
|
1387
|
+
function CC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=DC(c))a.color=c;if(c=b.BackColour)if(c=DC(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=Yb;a.textAlign="start";break;case 2:a.displayAlign=Yb;a.textAlign=Tb;break;case 3:a.displayAlign=Yb;a.textAlign="end";
|
|
1385
1388
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Tb;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=Tb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1386
|
-
function
|
|
1387
|
-
var
|
|
1388
|
-
function
|
|
1389
|
-
function
|
|
1390
|
-
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
|
|
1391
|
-
q.transmux=function(a,b,c,d){for(var e=zb(a),f=Xi(e),g=f.length;g<e.length&&!
|
|
1392
|
-
k.Nd,g+l),size:k.ca,duration:1024,
|
|
1393
|
-
S("shaka.transmuxer.AacTransmuxer",
|
|
1389
|
+
function DC(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 BC(a){a=EC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",xC);xC.prototype.parseMedia=xC.prototype.parseMedia;xC.prototype.setManifestType=xC.prototype.setManifestType;xC.prototype.setSequenceMode=xC.prototype.setSequenceMode;xC.prototype.parseInit=xC.prototype.parseInit;
|
|
1390
|
+
var yC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,zC=/^\s*([^:]+):\s*(.*)/,AC=/\s*,\s*/,EC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;pe["text/x-ssa"]=function(){return new xC};function FC(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)?{Nd:c,ca:a}:null}function GC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
|
|
1391
|
+
function HC(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}
|
|
1392
|
+
function IC(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,
|
|
1393
|
+
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 JC(a){this.i=a;this.h=0;this.g=new Map}q=JC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(je(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1394
|
+
q.transmux=function(a,b,c,d){for(var e=zb(a),f=Xi(e),g=f.length;g<e.length&&!HC(e,g);g++);a=1E3*c.endTime;f=Wi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=GC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=FC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));var l=k.Nd+k.ca;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1395
|
+
k.Nd,g+l),size:k.ca,duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:h},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};
|
|
1396
|
+
S("shaka.transmuxer.AacTransmuxer",JC);JC.prototype.transmux=JC.prototype.transmux;JC.prototype.getOriginalMimeType=JC.prototype.getOriginalMimeType;JC.prototype.convertCodecs=JC.prototype.convertCodecs;JC.prototype.isSupported=JC.prototype.isSupported;JC.prototype.destroy=JC.prototype.destroy;lc("audio/aac",function(){return new JC("audio/aac")},rc);function KC(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,
|
|
1394
1397
|
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,pa:a,ca:e}}
|
|
1395
|
-
function
|
|
1396
|
-
q.transmux=function(a,b,c,d){a=zb(a);for(var e=Xi(a),f=e.length;f<a.length&&!
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
q.transmux=function(a,b,c,d){a=zb(a);for(var e=Xi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Wi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=
|
|
1400
|
-
size:l.ca,duration:1536,
|
|
1401
|
-
|
|
1398
|
+
function LC(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 MC(a){this.i=a;this.h=0;this.g=new Map}q=MC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1399
|
+
q.transmux=function(a,b,c,d){a=zb(a);for(var e=Xi(a),f=e.length;f<a.length&&!LC(a,f);f++);var g=1E3*c.endTime;e=Wi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=KC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),size:l.ca,duration:1536,
|
|
1400
|
+
eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.ca}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,$a:[],pa:h,xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",MC);MC.prototype.transmux=MC.prototype.transmux;
|
|
1401
|
+
MC.prototype.getOriginalMimeType=MC.prototype.getOriginalMimeType;MC.prototype.convertCodecs=MC.prototype.convertCodecs;MC.prototype.isSupported=MC.prototype.isSupported;MC.prototype.destroy=MC.prototype.destroy;lc("audio/ac3",function(){return new MC("audio/ac3")},rc);function NC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new gj(a.subarray(b+2));ij(c,2);ij(c,3);var d=jj(c,11)+1<<1,e=jj(c,2);if(3==e){e=jj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=jj(c,2);var g=jj(c,3),h=jj(c,1);c=jj(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,pa:a,ca:d}};function OC(a){this.i=a;this.h=0;this.g=new Map}q=OC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1402
|
+
q.transmux=function(a,b,c,d){a=zb(a);for(var e=Xi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Wi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=NC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),
|
|
1403
|
+
size:l.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.ca}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,$a:[],pa:h,xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",OC);OC.prototype.transmux=OC.prototype.transmux;
|
|
1404
|
+
OC.prototype.getOriginalMimeType=OC.prototype.getOriginalMimeType;OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;lc("audio/ec3",function(){return new OC("audio/ec3")},rc);function PC(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new gj(b.data),d=oj(c);oj(c);oj(c);lj(c);if(QC.includes(d)&&(d=V(c),3===d&&ij(c,1),lj(c),lj(c),ij(c,1),nj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)nj(c)&&(6>e?pj(c,16):pj(c,64))}lj(c);d=V(c);if(0===d)V(c);else if(1===d)for(ij(c,1),lj(c),lj(c),d=V(c),e=0;e<d;e++)lj(c);lj(c);ij(c,1);var f=V(c),g=V(c),h=jj(c,1);0===h&&ij(c,1);ij(c,1);var k=0,l=0,m=0,n=0;
|
|
1402
1405
|
nj(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(nj(c)&&nj(c)){var p=oj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=jj(c,16),e=jj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],
|
|
1403
|
-
k[5],255,225].concat(k,[1],b));return{height:c,width:f,
|
|
1404
|
-
function
|
|
1405
|
-
{data:
|
|
1406
|
-
|
|
1407
|
-
function
|
|
1406
|
+
k[5],255,225].concat(k,[1],b));return{height:c,width:f,xa:a,Ba:d,Ca:e}}
|
|
1407
|
+
function RC(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=qj(new gj(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.fullData.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(h),c.push(f.fullData))}return c.length?
|
|
1408
|
+
{data:Kd.apply(Ed,x(c)),kd:b}:null}var QC=[100,110,122,244,44,83,86,118,128,138,139,134];function SC(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=TC(b.fullData);a=UC(c.fullData);var f=VC(d.fullData);b=WC(b.fullData,c.fullData,d.fullData,{yf:e.yf,Wf:e.Wf,cf:a.cf,df:a.df,Xe:a.Xe,bf:a.bf,Ye:a.Ye,Ze:a.Ze,$e:a.$e,af:a.af,Re:a.Re,Se:a.Se,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,Ke:a.Ke,Yd:a.Yd,Ie:a.Ie,Ge:a.Ge,Fe:a.Fe,Bf:f.Bf});return{height:a.height,width:a.width,
|
|
1409
|
+
xa:b,Ba:a.Ti,Ca:a.Si}}function TC(a){var b=new gj(a,!0);oj(b);oj(b);jj(b,4);jj(b,2);jj(b,6);a=jj(b,3);b=nj(b);return{yf:a+1,Wf:b}}
|
|
1410
|
+
function UC(a){a=new gj(a,!0);oj(a);oj(a);var b=0,c=0,d=0,e=0;jj(a,4);var f=jj(a,3);nj(a);for(var g=jj(a,2),h=jj(a,1),k=jj(a,5),l=oj(a),m=oj(a),n=oj(a),p=oj(a),r=oj(a),u=oj(a),v=oj(a),w=oj(a),A=oj(a),z=oj(a),D=oj(a),y=[],B=[],C=0;C<f;C++)y.push(nj(a)),B.push(nj(a));if(0<f)for(C=f;8>C;C++)jj(a,2);for(C=0;C<f;C++)y[C]&&jj(a,88),B[C]&&oj(a);V(a);y=V(a);3==y&&jj(a,1);B=V(a);C=V(a);nj(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var E=V(a),G=V(a),L=V(a);if(nj(a))for(var K=0;K<=f;K++)V(a),V(a),V(a);else V(a),
|
|
1408
1411
|
V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(nj(a)&&nj(a))for(K=0;4>K;K++)for(var I=0;I<(3===K?2:6);I++)if(nj(a)){var J=Math.min(64,1<<4+(K<<1));1<K&&mj(a);for(var M=0;M<J;M++)mj(a)}else V(a);nj(a);nj(a);nj(a)&&(oj(a),V(a),V(a),nj(a));K=V(a);for(J=I=0;J<K;J++)if(M=!1,0!==J&&(M=nj(a)),M){J===K&&V(a);nj(a);V(a);for(var N=M=0;N<=I;N++){var P=nj(a),R=!1;P||(R=nj(a));(P||R)&&M++}I=M}else{N=V(a);M=V(a);I=N+M;for(P=0;P<N;P++)V(a),nj(a);for(N=0;N<M;N++)V(a),nj(a)}if(nj(a))for(K=V(a),I=0;I<K;I++){for(J=0;J<
|
|
1409
1412
|
L+4;J++)jj(a,1);jj(a,1)}K=L=1;I=0;nj(a);nj(a);if(nj(a)){nj(a)&&(J=oj(a),M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<J&&16>=J?(L=M[J-1],K=N[J-1]):255===J&&(L=jj(a,16),K=jj(a,16)));nj(a)&&nj(a);nj(a)&&(jj(a,3),nj(a),nj(a)&&(oj(a),oj(a),oj(a)));nj(a)&&(V(a),V(a));nj(a);nj(a);nj(a);if(J=nj(a))V(a),V(a),V(a),V(a);if(nj(a)&&(jj(a,32),jj(a,32),nj(a)&&V(a),nj(a))){N=!1;J=nj(a);M=nj(a);if(J||M){if(N=nj(a))oj(a),jj(a,5),nj(a),jj(a,5);jj(a,4);jj(a,4);N&&
|
|
1410
1413
|
jj(a,4);jj(a,5);jj(a,5);jj(a,5)}for(P=0;P<=f;P++){var Q=!0;R=1;nj(a)||(Q=nj(a));var W=!1;Q?V(a):W=nj(a);W||(R=V(a)+1);if(J){for(Q=0;Q<R;Q++)V(a),V(a),N&&(V(a),V(a));nj(a)}if(M){for(Q=0;Q<R;Q++)V(a),V(a),N&&(V(a),V(a));nj(a)}}}nj(a)&&(nj(a),nj(a),nj(a),I=V(a),V(a),V(a),V(a),V(a))}return{Xe:D,cf:g,df:h,bf:k,Ye:l,Ze:m,$e:n,af:p,Re:r,Se:u,Te:v,Ue:w,Ve:A,We:z,Yd:I,Ke:0,Ie:y,Ge:E,Fe:G,width:B-(b+c)*(1===y||2===y?2:1),height:C-(d+e)*(1===y?2:1),Ti:L,Si:K}}
|
|
1411
|
-
function
|
|
1412
|
-
function
|
|
1413
|
-
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
|
|
1414
|
-
function
|
|
1415
|
-
var
|
|
1416
|
-
q.transmux=function(a,b,c,d){for(var e=zb(a),f=Xi(e).length;f<e.length&&!
|
|
1417
|
-
duration:d,$a:[],pa:new Uint8Array([]),
|
|
1418
|
-
|
|
1419
|
-
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new rj;a=zb(a);a=this.g.parse(a);if("mp3"!=a.$c().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));c=new Uint8Array([]);e=t(a.Vb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=
|
|
1420
|
-
|
|
1414
|
+
function VC(a){var b=new gj(a,!0);oj(b);oj(b);V(b);V(b);nj(b);nj(b);jj(b,3);nj(b);nj(b);V(b);V(b);mj(b);nj(b);nj(b);nj(b)&&V(b);mj(b);mj(b);nj(b);nj(b);nj(b);nj(b);a=nj(b);b=nj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Bf:c}}
|
|
1415
|
+
function WC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.cf&3)<<6|(d.df?1:0)<<5|d.bf&31;e[2]=d.Ye;e[3]=d.Ze;e[4]=d.$e;e[5]=d.af;e[6]=d.Re;e[7]=d.Se;e[8]=d.Te;e[9]=d.Ue;e[10]=d.Ve;e[11]=d.We;e[12]=d.Xe;e[13]=240|(d.Yd&3840)>>8;e[14]=d.Yd&255;e[15]=252|d.Bf&3;e[16]=252|d.Ie&3;e[17]=248|d.Ge&7;e[18]=248|d.Fe&7;e[19]=0;e[20]=0;e[21]=(d.Ke&3)<<6|(d.yf&7)<<3|(d.Wf?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&
|
|
1416
|
+
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 XC(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*YC[14*(3===c?3-d:3===d?3:4)+e-1];f=ZC[3*(3===c?0:2===c?1:2)+f];c=$C[c][d];var h=aD[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,ca:k,Ri:8*c*h}}return null}
|
|
1417
|
+
function bD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function cD(a,b){if(b+1<a.length&&bD(a,b)){var c=XC(a,b),d=4;c&&c.ca&&(d=c.ca);b+=d;return b===a.length||b+1<a.length&&bD(a,b)}return!1}
|
|
1418
|
+
var YC=[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],ZC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],$C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],aD=[0,1,1,4];function dD(a){this.i=a;this.h=0;this.g=new Map}q=dD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1419
|
+
q.transmux=function(a,b,c,d){for(var e=zb(a),f=Xi(e).length;f<e.length&&!cD(e,f);f++);var g;for(a=[];f<e.length;){var h=XC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));g||(g=h);f+h.ca<=e.length&&a.push({data:e.subarray(f,f+h.ca),size:h.ca,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=h.ca}if(!g)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));e=9E4*g.Ri/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1420
|
+
duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:e,Ya:a},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",dD);dD.prototype.transmux=dD.prototype.transmux;dD.prototype.getOriginalMimeType=dD.prototype.getOriginalMimeType;dD.prototype.convertCodecs=dD.prototype.convertCodecs;dD.prototype.isSupported=dD.prototype.isSupported;
|
|
1421
|
+
dD.prototype.destroy=dD.prototype.destroy;lc("audio/mpeg",function(){return new dD("audio/mpeg")},rc);function eD(a){this.h=a;this.g=null}q=eD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=je(a).split(","),c=Sd("audio",b);b=Sd("video",b);return!c||b||"mp3"!=fe(c)?!1:lb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
|
|
1422
|
+
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new rj;a=zb(a);a=this.g.parse(a);if("mp3"!=a.$c().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));c=new Uint8Array([]);e=t(a.Vb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=XC(a,b))?(b+d.ca<=a.length&&(c=Kd(c,a.subarray(b,b+d.ca))),b+=d.ca):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",eD);eD.prototype.transmux=eD.prototype.transmux;
|
|
1423
|
+
eD.prototype.getOriginalMimeType=eD.prototype.getOriginalMimeType;eD.prototype.convertCodecs=eD.prototype.convertCodecs;eD.prototype.isSupported=eD.prototype.isSupported;eD.prototype.destroy=eD.prototype.destroy;lc("video/mp2t",function(){return new eD("video/mp2t")},qc);/*
|
|
1421
1424
|
@license
|
|
1422
1425
|
MSS Transmuxer
|
|
1423
1426
|
Copyright 2015 Dash Industry Forum
|
|
1424
1427
|
SPDX-License-Identifier: BSD-3-Clause
|
|
1425
1428
|
*/
|
|
1426
|
-
function
|
|
1427
|
-
function
|
|
1429
|
+
function fD(a){this.h=a;(this.g=av.get("ISOBoxer")())&&gD(this)}
|
|
1430
|
+
function gD(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1428
1431
|
"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",
|
|
1429
|
-
"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]!==
|
|
1432
|
+
"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]!==hD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=fD.prototype;q.destroy=function(){};
|
|
1430
1433
|
q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return lb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return lb(b)||lb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
|
|
1431
1434
|
q.transmux=function(a,b,c){if(!c)return Promise.resolve(zb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.L()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1432
1435
|
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
|
|
1433
|
-
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=
|
|
1434
|
-
|
|
1435
|
-
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=je(c).split(",");c=Sd("audio",d);d=Sd("video",d);if(c&&(c=fe(c),!
|
|
1436
|
+
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=iD(u,"traf")+iD(h,"senc")+16);var w=zb(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.L()[0]:null))}};function iD(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}S("shaka.transmuxer.MssTransmuxer",fD);fD.prototype.transmux=fD.prototype.transmux;
|
|
1437
|
+
fD.prototype.getOriginalMimeType=fD.prototype.getOriginalMimeType;fD.prototype.convertCodecs=fD.prototype.convertCodecs;fD.prototype.isSupported=fD.prototype.isSupported;fD.prototype.destroy=fD.prototype.destroy;var hD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);lc("mss/audio/mp4",function(){return new fD("mss/audio/mp4")},rc);lc("mss/video/mp4",function(){return new fD("mss/video/mp4")},rc);function jD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=jD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1438
|
+
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=je(c).split(",");c=Sd("audio",d);d=Sd("video",d);if(c&&(c=fe(c),!kD.includes(c))||d&&(c=fe(d),!lD.includes(c)))return!1;if(b)return lb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return lb(b)||lb(a)};
|
|
1436
1439
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=je(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return $e(c,"audio/mp4")}).map(Ze).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1437
|
-
q.transmux=function(a,b,c,d,e){var f=zb(a);if("audio"==e&&!Fj(f)){for(var g=Xi(f),h=g.length;h<f.length;h++)if(
|
|
1438
|
-
if(!v.length)throw new T(2,3,3023,c?c.L()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var D=
|
|
1439
|
-
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),
|
|
1440
|
-
P=!0;break;case 19:case 20:case 21:M=Y=P=!0;break;case 32:Y=!0;break;case 33:Y=!0;break;case 34:Y=!0;break;case 35:P=Y=!0;break;case 39:case 40:Y=!0;break;default:Y=!1}if(P&&Y){var va=W.fullData.byteLength,
|
|
1441
|
-
0):9E4*(c.endTime-c.startTime);C.push({data:wa.data,size:wa.data.byteLength,duration:Pa,
|
|
1442
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Va=[],za,bb=null,
|
|
1443
|
-
Xa:0,Wa:0,Ua:0,Va:2,
|
|
1444
|
-
duration:1024,
|
|
1445
|
-
|
|
1446
|
-
Ba:0,Ca:0,data:{
|
|
1447
|
-
yf++}}if(0==wj||0
|
|
1448
|
-
|
|
1440
|
+
q.transmux=function(a,b,c,d,e){var f=zb(a);if("audio"==e&&!Fj(f)){for(var g=Xi(f),h=g.length;h<f.length;h++)if(cD(f,h))return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));for(h=g.length;h<f.length;h++)if(HC(f,h))return this.h||(this.h=new JC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.L()[0]:null))}this.j?this.j.clearData():this.j=new rj;var k=this.j.parse(f),l=[],m=k.$c();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.Hc();
|
|
1441
|
+
if(!v.length)throw new T(2,3,3023,c?c.L()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var D=RC(z);if(D){null==r&&(r=A.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(A.dts||0):1<v.length?(A.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:D.data,size:D.data.byteLength,duration:y,eb:Math.round((A.pts||0)-(A.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:D.kd?2:1,ib:D.kd?0:1}})}}var B=PC(u);if(!B||null==r)throw new T(2,3,3018,c?c.L()[0]:null);b.height=B.height;
|
|
1442
|
+
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),xa:B.xa,Ba:B.Ba,Ca:B.Ca,data:{sb:this.g,baseMediaDecodeTime:r,Ya:p},stream:b};break;case "hvc":var C=[],E=null,G=[],L=k.Hc();if(!L.length)throw new T(2,3,3023,c?c.L()[0]:null);for(var K=0;K<L.length;K++){var I=L[K],J=I.nalus;G.push.apply(G,x(J));for(var M=!1,N=[],P=!1,R=t(J),Q=R.next();!Q.done;Q=R.next()){var W=Q.value;switch(W.type){case 1:case 0:var Y=
|
|
1443
|
+
P=!0;break;case 19:case 20:case 21:M=Y=P=!0;break;case 32:Y=!0;break;case 33:Y=!0;break;case 34:Y=!0;break;case 35:P=Y=!0;break;case 39:case 40:Y=!0;break;default:Y=!1}if(P&&Y){var va=W.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=va>>24&255;Fa[1]=va>>16&255;Fa[2]=va>>8&255;Fa[3]=va&255;N.push(Fa);N.push(W.fullData)}}var wa=N.length?{data:Kd.apply(Ed,x(N)),kd:M}:null;if(wa){null==E&&null!=I.dts&&(E=I.dts);var Pa=void 0;Pa=K+1<L.length?(L[K+1].dts||0)-(I.dts||0):1<L.length?(I.dts||0)-(L[K-1].dts||
|
|
1444
|
+
0):9E4*(c.endTime-c.startTime);C.push({data:wa.data,size:wa.data.byteLength,duration:Pa,eb:Math.round((I.pts||0)-(I.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:wa.kd?2:1,ib:wa.kd?0:1}})}}var Za=SC(G);if(!Za||null==E)throw new T(2,3,3018,c?c.L()[0]:null);b.height=Za.height;b.width=Za.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),xa:Za.xa,Ba:Za.Ba,Ca:Za.Ca,data:{sb:this.g,baseMediaDecodeTime:E,Ya:C},stream:b}}n&&
|
|
1445
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Va=[],za,bb=null,bc=t(k.Vb()),Sa=bc.next();!Sa.done;Sa=bc.next()){var nb=Sa.value,Sb=nb.data;if(Sb){var Vc=0;za=GC(Sb,Vc);if(!za)throw new T(2,3,3018,c?c.L()[0]:null);b.audioSamplingRate=za.sampleRate;b.channelsCount=za.channelCount;null==bb&&null!==nb.pts&&(bb=nb.pts);for(;Vc<Sb.length;){var ud=FC(Sb,Vc);if(ud){var me=ud.Nd+ud.ca;Vc+me<=Sb.length&&Va.push({data:Sb.subarray(Vc+ud.Nd,Vc+me),size:ud.ca,duration:1024,eb:0,flags:{hb:0,
|
|
1446
|
+
Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Vc+=me}else Vc++}}}if(!za||null==bb){if(!k.Hc().length)throw new T(2,3,3018,c?c.L()[0]:null);bb=9E4*c.startTime;var Ld=Sd("audio",b.codecs.split(","));if(!Ld||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.L()[0]:null);za={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Ld};var pf=IC(Ld,b.channelsCount);if(!pf)throw new T(2,3,3018,c?c.L()[0]:null);for(var ne=bb+9E4*(c.endTime-c.startTime),Ni=bb;Ni<ne;)Va.push({data:pf,size:pf.byteLength,
|
|
1447
|
+
duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Ni+=1024/za.sampleRate*9E4}var Fg=za.sampleRate,Oi=bb/9E4*Fg;n={id:b.id,type:"audio",codecs:za.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Fg,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:Oi,Ya:Va},stream:b};break;case "ac3":for(var Gg=[],cc=0,Wm=new Uint8Array([]),vj=null,Ou=t(k.Vb()),Xm=Ou.next();!Xm.done;Xm=Ou.next()){var Ym=Xm.value,Zm=Ym.data;null==vj&&null!==
|
|
1448
|
+
Ym.pts&&(vj=Ym.pts);for(var xf=0;xf<Zm.length;){var Od=KC(Zm,xf);Od?(b.audioSamplingRate=Od.sampleRate,b.channelsCount=Od.channelCount,cc=Od.sampleRate,Wm=Od.pa,Gg.push({data:Zm.subarray(xf,xf+Od.ca),size:Od.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),xf+=Od.ca):xf++}}if(0==cc||0==Wm.byteLength||null==vj)throw new T(2,3,3018,c?c.L()[0]:null);var BD=vj/9E4*cc;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:cc,duration:d,$a:[],pa:Wm,xa:new Uint8Array([]),
|
|
1449
|
+
Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:BD,Ya:Gg},stream:b};break;case "ec3":for(var Pu=[],wj=0,$m=new Uint8Array([]),xj=null,Qu=t(k.Vb()),an=Qu.next();!an.done;an=Qu.next()){var bn=an.value,cn=bn.data;null==xj&&null!==bn.pts&&(xj=bn.pts);for(var yf=0;yf<cn.length;){var Pd=NC(cn,yf);Pd?(b.audioSamplingRate=Pd.sampleRate,b.channelsCount=Pd.channelCount,wj=Pd.sampleRate,$m=Pd.pa,Pu.push({data:cn.subarray(yf,yf+Pd.ca),size:Pd.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),yf+=Pd.ca):
|
|
1450
|
+
yf++}}if(0==wj||0==$m.byteLength||null==xj)throw new T(2,3,3018,c?c.L()[0]:null);var CD=xj/9E4*wj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wj,duration:d,$a:[],pa:$m,xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:CD,Ya:Pu},stream:b};break;case "mp3":for(var Ru=[],yj,zj=null,Su=t(k.Vb()),dn=Su.next();!dn.done;dn=Su.next()){var en=dn.value,Ug=en.data;if(Ug){null==zj&&null!==en.pts&&(zj=en.pts);for(var re=0;re<Ug.length;){var zf=XC(Ug,
|
|
1451
|
+
re);zf?(yj||(yj=zf),re+zf.ca<=Ug.length&&Ru.push({data:Ug.subarray(re,re+zf.ca),size:zf.ca,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),re+=zf.ca):re++}}}if(!yj||null==zj)throw new T(2,3,3018,c?c.L()[0]:null);var Tu=yj.sampleRate,DD=zj/9E4*Tu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Tu,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:DD,Ya:Ru},stream:b};break;case "opus":var Uu=
|
|
1449
1452
|
[],Aj=null,Xc=k.F;if(!Xc)throw new T(2,3,3018,c?c.L()[0]:null);var Cb=[];switch(Xc.Eh){case 1:case 2:Cb=[0];break;case 0:Cb=[255,1,1,0,1];break;case 128:Cb=[255,2,0,0,1];break;case 3:Cb=[1,2,1,0,2,1];break;case 4:Cb=[1,2,2,0,1,2,3];break;case 5:Cb=[1,3,2,0,4,1,2,3];break;case 6:Cb=[1,4,2,0,4,1,2,3,5];break;case 7:Cb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Cb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Cb=[1,1,2,0,1];break;case 131:Cb=[1,1,3,0,1,2];break;case 132:Cb=[1,1,4,0,1,2,3];break;case 133:Cb=[1,1,5,
|
|
1450
|
-
0,1,2,3,4];break;case 134:Cb=[1,1,6,0,1,2,3,4,5];break;case 135:Cb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Cb=[1,1,8,0,1,2,3,4,5,6,7]}var
|
|
1451
|
-
wd=Vg+2,Bj=0;255===Af[wd];)Bj+=255,wd+=1;Bj+=Af[wd];wd+=1;wd+=
|
|
1452
|
-
Ca:0,data:{
|
|
1453
|
-
|
|
1453
|
+
0,1,2,3,4];break;case 134:Cb=[1,1,6,0,1,2,3,4,5];break;case 135:Cb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Cb=[1,1,8,0,1,2,3,4,5,6,7]}var Vu=new Uint8Array([0,Xc.channelCount,0,0,Xc.sampleRate>>>24&255,Xc.sampleRate>>>17&255,Xc.sampleRate>>>8&255,Xc.sampleRate>>>0&255,0,0].concat(x(Cb)));for(var Wu=Xc.sampleRate,Xu=t(k.Vb()),fn=Xu.next();!fn.done;fn=Xu.next()){var gn=fn.value,Af=gn.data;null==Aj&&null!==gn.pts&&(Aj=gn.pts);for(var Vg=0;Vg<Af.length;){for(var ED=0!==(Af[Vg+1]&16),FD=0!==(Af[Vg+1]&8),
|
|
1454
|
+
wd=Vg+2,Bj=0;255===Af[wd];)Bj+=255,wd+=1;Bj+=Af[wd];wd+=1;wd+=ED?2:0;wd+=FD?2:0;var Yu=Af.slice(wd,wd+Bj);Uu.push({data:Yu,size:Yu.byteLength,duration:960,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Vg=wd+Bj}}if(0==Vu.byteLength||null==Aj)throw new T(2,3,3018,c?c.L()[0]:null);b.audioSamplingRate=Xc.sampleRate;b.channelsCount=Xc.channelCount;var GD=Aj/9E4*Wu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Wu,duration:d,$a:[],pa:Vu,xa:new Uint8Array([]),Ba:0,
|
|
1455
|
+
Ca:0,data:{sb:this.g,baseMediaDecodeTime:GD,Ya:Uu},stream:b}}n&&(l.push(n),n=null)}}catch(hn){return hn&&3023==hn.code?Promise.resolve(new Uint8Array([])):Promise.reject(hn)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));var Zu=new Tw(l),jn=b.id+"_"+c.i;if(this.i.has(jn))var kn=this.i.get(jn);else kn=Zw(Zu),this.i.set(jn,kn);var HD=px(Zu);this.g++;var ID=Kd(kn,HD);return Promise.resolve(ID)};S("shaka.transmuxer.TsTransmuxer",jD);jD.prototype.transmux=jD.prototype.transmux;
|
|
1456
|
+
jD.prototype.getOriginalMimeType=jD.prototype.getOriginalMimeType;jD.prototype.convertCodecs=jD.prototype.convertCodecs;jD.prototype.isSupported=jD.prototype.isSupported;jD.prototype.destroy=jD.prototype.destroy;var kD=["aac","ac-3","ec-3","mp3","opus"],lD=["avc","hevc"];lc("video/mp2t",function(){return new jD("video/mp2t")},pc);/*
|
|
1454
1457
|
@license
|
|
1455
1458
|
EME Encryption Scheme Polyfill
|
|
1456
1459
|
Copyright 2019 Google LLC
|
|
1457
1460
|
SPDX-License-Identifier: Apache-2.0
|
|
1458
1461
|
*/
|
|
1459
|
-
function
|
|
1460
|
-
function
|
|
1461
|
-
function
|
|
1462
|
+
function mD(){}var nD;
|
|
1463
|
+
function oD(){nD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(nD=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=pD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1464
|
+
function pD(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),F(e,nD.call(c,a,b),2);d=e.h;if(qD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=nD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=rD;return e.return(rD.call(c,
|
|
1462
1465
|
a,b))})}
|
|
1463
|
-
function
|
|
1464
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return F(v,
|
|
1465
|
-
function
|
|
1466
|
-
function
|
|
1467
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
1468
|
-
function
|
|
1469
|
-
new
|
|
1470
|
-
function
|
|
1471
|
-
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return F(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",
|
|
1472
|
-
|
|
1473
|
-
function
|
|
1474
|
-
function
|
|
1466
|
+
function rD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=sD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=tD(h.videoCapabilities,d),l=tD(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."),
|
|
1467
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return F(v,nD.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new uD(p,r,u))})}function tD(a,b){return a?a.filter(function(c){return vD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",mD);mD.install=oD;function wD(){}var xD;
|
|
1468
|
+
function yD(){xD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(xD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=zD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1469
|
+
function zD(a){var b=this,c,d;return O(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),F(e,xD.call(b,a),2);case 2:c=e.h;if(!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&qD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=xD,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1470
|
+
navigator.mediaCapabilities.decodingInfo=AD;if(d){e.u(3);break}return F(e,JD(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(AD.call(b,a))}})}
|
|
1471
|
+
function AD(a){var b=this,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=sD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},vD(d,g)&&vD(c,g))?F(l,xD.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1472
|
+
new uD(k.keySystemAccess,c,d);l.u(3);break}if(!a.keySystemConfiguration){l.u(3);break}return F(l,JD(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
|
|
1473
|
+
function JD(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
1474
|
+
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return F(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",wD);wD.install=yD;function uD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
|
|
1475
|
+
uD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};uD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
|
|
1476
|
+
function sD(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function qD(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}
|
|
1477
|
+
function vD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(KD||LD)return!0;return!1}function MD(){}function Oz(){oD();yD()}S("EncryptionSchemePolyfills",MD);MD.install=Oz;var LD=navigator.userAgent.includes("CrKey"),KD=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=MD);}).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})();
|
|
1475
1478
|
|
|
1476
1479
|
//# sourceMappingURL=shaka-player.compiled.map
|