shaka-player 4.9.28 → 4.9.30
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/cast-boot.js +7 -0
- package/dist/deps.js +4 -4
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.debug.js +79 -76
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +699 -694
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +97 -94
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +445 -440
- package/dist/shaka-player.ui.map +3 -3
- package/lib/dash/dash_parser.js +39 -11
- package/lib/dash/segment_template.js +1 -1
- package/lib/media/drm_engine.js +11 -0
- package/lib/media/media_source_engine.js +19 -30
- package/lib/media/playhead.js +3 -1
- package/lib/media/preload_manager.js +17 -0
- package/lib/media/presentation_timeline.js +7 -1
- package/lib/media/streaming_engine.js +43 -12
- package/lib/player.js +40 -32
- package/lib/polyfill/encryption_scheme.js +9 -0
- package/lib/polyfill/media_capabilities.js +8 -2
- package/lib/util/periods.js +3 -0
- package/lib/util/platform.js +12 -3
- package/lib/util/player_configuration.js +3 -1
- package/package.json +1 -1
- package/ui/externs/ui.js +2 -1
- package/ui/locales/zh-HK.json +30 -11
- package/ui/remote_button.js +3 -2
- package/ui/resolution_selection.js +4 -1
- package/ui/ui.js +6 -3
package/dist/shaka-player.ui.js
CHANGED
|
@@ -13,20 +13,20 @@ var p;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:
|
|
|
13
13
|
function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function ea(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
|
|
14
14
|
ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
|
|
15
15
|
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
|
-
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var
|
|
16
|
+
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ja=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ja;
|
|
18
|
-
function pa(a,b){a.prototype=
|
|
18
|
+
function pa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ml=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.u=function(a){this.h=a};
|
|
19
19
|
function sa(a,b){a.i={ph:b,Bh:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function F(a,b,c){a.g=c;return{value:b}}qa.prototype.B=function(a){this.g=a};function G(a){a.g=0}function va(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function wa(a,b){a.m=0;a.j=b||0}function xa(a,b,c){a.g=b;a.m=c||0}function ya(a,b){a.m=b||0;b=a.i.ph;a.i=null;return b}function za(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function Aa(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Bh?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Ca(a){this.g=new qa;this.h=a}function Da(a,b){ra(a.g);var c=a.g.l;if(c)return Ea(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Fa(a)}
|
|
21
21
|
function Ea(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,sa(a.g,g),Fa(a)}a.g.l=null;d.call(a.g,f);return Fa(a)}function Fa(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,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Bh)throw b.ph;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
|
-
function
|
|
23
|
-
function O(a){return Ia(new
|
|
22
|
+
function Ga(a){this.next=function(b){ra(a.g);a.g.l?b=Ea(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Fa(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Ea(a,a.g.l["throw"],b,a.g.u):(sa(a.g,b),b=Fa(a));return b};this.return=function(b){return Da(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(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 Ia(new Ga(new Ca(a)))}function Ja(){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.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.G(g):this.m(g)}};
|
|
26
26
|
b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.A()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
|
|
27
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.J=function(g){var h=this.j();g.
|
|
29
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.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.J=function(g){var h=this.j();g.Zd(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,r){return"function"==typeof q?function(u){try{l(q(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.Zd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Zd=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).Zd(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){q[u]=v;r--;0==r&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).Zd(n(q.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ka(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(!Ka(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(!Ka(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ka(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ka(k,
|
|
@@ -91,14 +91,14 @@ CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_I
|
|
|
91
91
|
function Pb(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||
|
|
92
92
|
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}
|
|
93
93
|
function Qb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Rb=new Nb(function(){return Hb(new Uint8Array([0]))}),Sb=new Map;function Tb(a){this.h=a;this.g=null}Tb.prototype.V=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};Tb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Ub(a){this.h=a;this.g=null}Ub.prototype.Pa=function(){this.stop();this.h();return this};Ub.prototype.V=function(a){var b=this;this.stop();this.g=(new Tb(function(){b.h()})).V(a);return this};Ub.prototype.Ba=function(a){var b=this;this.stop();this.g=(new Tb(function(){b.g.V(a);b.h()})).V(a);return this};Ub.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};Q("shaka.util.Timer",Ub);Ub.prototype.stop=Ub.prototype.stop;Ub.prototype.tickEvery=Ub.prototype.Ba;
|
|
94
|
-
Ub.prototype.tickAfter=Ub.prototype.V;Ub.prototype.tickNow=Ub.prototype.Pa;function Vb(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Wb(a){return""!=Xb().canPlayType(a)}function Yb(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Zb(){return $b("Xbox One")}function ac(){return $b("Tizen")}function bc(){return $b("Tizen 3")}function cc(){return $b("Tizen 2")}function
|
|
95
|
-
function gc(){if(!$b("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function ic(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!ac()&&!$b("PC=EOS")&&!$b("PC=APL")&&!$b("VirginMedia")&&!jc()&&!kc()&&!$b("AFT")&&!$b("WPE")&&!$b("DT_STB_BCM")}function lc(){return $b("PlayStation 5")}function kc(){return $b("PlayStation 4")}function mc(){return $b("Hisense")||$b("VIDAA")}
|
|
94
|
+
Ub.prototype.tickAfter=Ub.prototype.V;Ub.prototype.tickNow=Ub.prototype.Pa;function Vb(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Wb(a){return""!=Xb().canPlayType(a)}function Yb(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Zb(){return $b("Xbox One")}function ac(){return $b("Tizen")}function bc(){return $b("Tizen 3")}function cc(){return $b("Tizen 2")}function dc(){return $b("Web0S")}function fc(){return dc()&&38===gc()}function hc(){return $b("CrKey")}
|
|
95
|
+
function gc(){if(!$b("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function ic(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!ac()&&!$b("PC=EOS")&&!$b("PC=APL")&&!$b("VirginMedia")&&!jc()&&!kc()&&!$b("AFT")&&!$b("WPE")&&!$b("DT_STB_BCM")&&!$b("Sky_STB")}function lc(){return $b("PlayStation 5")}function kc(){return $b("PlayStation 4")}function mc(){return $b("Hisense")||$b("VIDAA")}
|
|
96
96
|
function jc(){return $b("SOPOpenBrowser")}function nc(){if(!ic())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 oc(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1}function pc(){return $b("Android")}
|
|
97
|
-
function qc(){return ac()||
|
|
97
|
+
function qc(){return ac()||dc()||Zb()||kc()||lc()||$b("AFT")||$b("PC=EOS")||$b("PC=APL")||$b("VirginMedia")||jc()||$b("WPE")||hc()||mc()||$b("DT_STB_BCM")?!0:!1}function $b(a){return(navigator.userAgent||"").includes(a)}function Xb(){if(rc)return rc;sc||(sc=new Ub(function(){rc=null}));(rc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(rc=document.createElement("video"));sc.V(1);return rc}
|
|
98
98
|
function tc(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
|
|
99
99
|
function uc(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u;return O(function(v){switch(v.g){case 1:a={width:Infinity,height:Infinity};if(hc()){n=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;va(v,15);if(!(q=n)){v.B(17);break}return F(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(ac()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
100
100
|
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(w){Za("Tizen: Error detecting screen size, default screen size 1920x1080.")}v.B(3);break}if(Zb()){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;
|
|
101
|
-
e=c.Media.Protection.ProtectionCapabilityResult;f=null;do f=d.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(f===e.maybe);f===e.probably&&(a.width=3840,a.height=2160)}catch(w){Za("Xbox: Error detecting screen size, default screen size 1920x1080.")}v.B(3);break}if(
|
|
101
|
+
e=c.Media.Protection.ProtectionCapabilityResult;f=null;do f=d.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(f===e.maybe);f===e.probably&&(a.width=3840,a.height=2160)}catch(w){Za("Xbox: Error detecting screen size, default screen size 1920x1080.")}v.B(3);break}if(dc()){try{g=JSON.parse(window.PalmSystem.deviceInfo),
|
|
102
102
|
a.width=Math.max(1920,g.screenWidth),a.height=Math.max(1080,g.screenHeight)}catch(w){Za("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}v.B(3);break}if(mc()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.B(3);break}if(!kc()&&!lc()){v.B(3);break}h=!1;va(v,9);return F(v,window.msdk.device.getDisplayInfo(),11);case 11:k=v.h;h="4K"===k.resolution;xa(v,10);break;case 9:return ya(v),
|
|
103
103
|
va(v,12),F(v,window.msdk.device.getDisplayInfoImmediate(),14);case 14:l=v.h;h="4K"===l.resolution;xa(v,10);break;case 12:m=ya(v),Za("PlayStation: Failed to get the display info:",m);case 10:h?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.B(3);break;case 18:q=v.h;case 17:if(q){a.width=3840;a.height=2160;v.B(19);break}if(!(r=n)){v.B(20);break}return F(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),21);case 21:r=v.h;case 20:r&&(a.width=1920,
|
|
104
104
|
a.height=1080);case 19:xa(v,3);break;case 15:u=ya(v),Ya("Failed to check canDisplayType:",u);case 3:return v.return(a)}})}var sc=null,rc=null;function vc(){}
|
|
@@ -127,23 +127,23 @@ var Zc=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
127
127
|
p.hh=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Wc(c.value));hd(this);a=kb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new T("unknown-locales",(new Map).set("locales",a)));a=kb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new T("locale-changed",a))};
|
|
128
128
|
p.Ka=function(a,b,c){a=Wc(a);void 0===c&&(c=id);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=id||d.set(f,e)});this.h.set(a,d);hd(this);this.dispatchEvent(new T("locale-updated"));return this};p.dk=function(a){for(var b=t(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};p.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new T("unknown-localization",a));return""};
|
|
129
129
|
p.Ui=function(){return this.g};
|
|
130
|
-
function hd(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f=t(d),g=f.next(),h={};!g.done;h={
|
|
130
|
+
function hd(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f=t(d),g=f.next(),h={};!g.done;h={Id:void 0},g=f.next()){h.Id=g.value;e.add(h.Id);e.add(bd(h.Id));g=kb(b.keys(),function(l){return function(m){return $c(m,l.Id)}}(h));g.sort();g=t(g);for(var k=g.next();!k.done;k=g.next())e.add(k.value);h=kb(b.keys(),function(l){return function(m){return bd(m)==l.Id}}(h));h.sort();h=t(h);for(g=h.next();!g.done;g=h.next())e.add(g.value)}e.add(c);c=[];e=t(e);for(f=e.next();!f.done;f=e.next())(f=b.get(f.value))&&c.push(f);
|
|
131
131
|
c.reverse();a.i.clear();b=t(c);for(e=b.next();!e.done;e=b.next())e.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(f=c.next();!f.done;f=c.next())f=a.h.get(f.value)||new Map,jd(f,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new T("missing-localizations",d)))}function jd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}Q("shaka.ui.Localization",gd);gd.prototype.getCurrentLocales=gd.prototype.Ui;
|
|
132
|
-
gd.prototype.resolve=gd.prototype.resolve;gd.prototype.resolveDictionary=gd.prototype.dk;gd.prototype.insert=gd.prototype.Ka;gd.prototype.changeLocale=gd.prototype.hh;gd.prototype.release=gd.prototype.release;var id=1;gd.ConflictResolution={USE_OLD:0,USE_NEW:id};gd.UNKNOWN_LOCALES="unknown-locales";gd.UNKNOWN_LOCALIZATION="unknown-localization";gd.MISSING_LOCALIZATIONS="missing-localizations";gd.LOCALE_CHANGED="locale-changed";gd.LOCALE_UPDATED="locale-updated";function kd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}kd.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 ld(a){return a.h/(1-Math.pow(a.g,a.i))};function md(){this.h=new kd(2);this.j=new kd(5);this.g=0;this.i=128E3;this.l=16E3}md.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)};md.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)}};md.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(ld(this.h),ld(this.j))};function nd(){this.g=new eb}p=nd.prototype;p.release=function(){this.ob();this.g=null};p.s=function(a,b,c,d){this.g&&(a=new od(a,b,c,d),this.g.push(b,a))};p.
|
|
133
|
-
p.ob=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.Xa();this.g.g={}}};Q("shaka.util.EventManager",nd);nd.prototype.removeAll=nd.prototype.ob;nd.prototype.unlisten=nd.prototype.Xa;nd.prototype.listenOnce=nd.prototype.
|
|
132
|
+
gd.prototype.resolve=gd.prototype.resolve;gd.prototype.resolveDictionary=gd.prototype.dk;gd.prototype.insert=gd.prototype.Ka;gd.prototype.changeLocale=gd.prototype.hh;gd.prototype.release=gd.prototype.release;var id=1;gd.ConflictResolution={USE_OLD:0,USE_NEW:id};gd.UNKNOWN_LOCALES="unknown-locales";gd.UNKNOWN_LOCALIZATION="unknown-localization";gd.MISSING_LOCALIZATIONS="missing-localizations";gd.LOCALE_CHANGED="locale-changed";gd.LOCALE_UPDATED="locale-updated";function kd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}kd.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 ld(a){return a.h/(1-Math.pow(a.g,a.i))};function md(){this.h=new kd(2);this.j=new kd(5);this.g=0;this.i=128E3;this.l=16E3}md.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)};md.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)}};md.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(ld(this.h),ld(this.j))};function nd(){this.g=new eb}p=nd.prototype;p.release=function(){this.ob();this.g=null};p.s=function(a,b,c,d){this.g&&(a=new od(a,b,c,d),this.g.push(b,a))};p.sa=function(a,b,c,d){function e(g){f.Xa(a,b,e);c(g)}var f=this;this.s(a,b,e,d)};p.Xa=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.Xa(),this.g.remove(b,e))}};
|
|
133
|
+
p.ob=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.Xa();this.g.g={}}};Q("shaka.util.EventManager",nd);nd.prototype.removeAll=nd.prototype.ob;nd.prototype.unlisten=nd.prototype.Xa;nd.prototype.listenOnce=nd.prototype.sa;nd.prototype.listen=nd.prototype.s;nd.prototype.release=nd.prototype.release;function od(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=pd(a,d);this.target.addEventListener(b,c,this.g)}
|
|
134
134
|
od.prototype.Xa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function pd(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 qd(a)?b:b.capture||!1}
|
|
135
|
-
function qd(a){var b=rd;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}rd=b}return b||!1}var rd=void 0;function sd(a){if(td.has(a))return td.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);td.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),td.set(a,b),b):!1}function ud(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var td=new Map;function vd(a,b){this.g=a;this.h=b}vd.prototype.toString=function(){return"v"+this.g+"."+this.h};function wd(a,b){var c=new vd(5,0),d=xd,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function yd(a,b,c,d){Za([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function zd(a,b,c,d){Ya([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var xd=null;function Ad(){}Ad.prototype.extract=function(){};Ad.prototype.decode=function(){return[]};Ad.prototype.clear=function(){};Ad.prototype.getStreams=function(){return[]};function Bd(){}Bd.prototype.init=function(){};Bd.prototype.parse=function(){return[]};function Cd(){}Cd.prototype.init=function(){};Cd.prototype.i=function(){};Cd.prototype.g=function(){};Cd.prototype.j=function(){};Q("shaka.media.IClosedCaptionParser",Cd);function
|
|
136
|
-
|
|
137
|
-
function Rd(a,b,c){c||(c=Od);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Sd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Ld;this.position=null;this.positionAlign=Td;this.size=0;this.textAlign=Ud;this.direction=Vd;this.writingMode=Wd;this.lineInterpretation=Xd;this.line=null;this.lineHeight="";this.lineAlign=Yd;this.displayAlign=Zd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight
|
|
138
|
-
"";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={tc:32,rows:15}}function
|
|
135
|
+
function qd(a){var b=rd;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}rd=b}return b||!1}var rd=void 0;function sd(a){if(td.has(a))return td.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);td.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),td.set(a,b),b):!1}function ud(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var td=new Map;function vd(a,b){this.g=a;this.h=b}vd.prototype.toString=function(){return"v"+this.g+"."+this.h};function wd(a,b){var c=new vd(5,0),d=xd,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function yd(a,b,c,d){Za([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function zd(a,b,c,d){Ya([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var xd=null;function Ad(){}Ad.prototype.extract=function(){};Ad.prototype.decode=function(){return[]};Ad.prototype.clear=function(){};Ad.prototype.getStreams=function(){return[]};function Bd(){}Bd.prototype.init=function(){};Bd.prototype.parse=function(){return[]};function Cd(){}Cd.prototype.init=function(){};Cd.prototype.i=function(){};Cd.prototype.g=function(){};Cd.prototype.j=function(){};Q("shaka.media.IClosedCaptionParser",Cd);function Dd(a){this.l=new Bd;if(a=Id[a.toLowerCase()])this.l=a();this.h=new Ad;if(a=Kd)this.h=a()}Dd.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Dd.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=Gb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
136
|
+
Dd.prototype.g=function(){this.h.clear()};Dd.prototype.j=function(){return this.h.getStreams()};Q("shaka.media.ClosedCaptionParser",Dd);Dd.findDecoder=function(){return Kd};Dd.unregisterDecoder=function(){Kd=null};Dd.registerDecoder=function(a){Kd=a};Dd.findParser=function(a){return Id[a]};Dd.unregisterParser=function(a){delete Id[a]};Dd.registerParser=function(a,b){Id[a]=b};var Id={},Kd=null;function Ld(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Md;this.scroll=Nd}Q("shaka.text.CueRegion",Ld);var Md=1;Ld.units={PX:0,PERCENTAGE:Md,LINES:2};var Nd="";Ld.scrollMode={NONE:Nd,UP:"up"};function Od(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Pd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Qd(a,b,c){c||(c=Od);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={Ch:void 0},d=a.next()){e.Ch=d.value;d=b.findIndex(function(f){return function(g){return c(f.Ch,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
|
|
137
|
+
function Rd(a,b,c){c||(c=Od);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Sd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Ld;this.position=null;this.positionAlign=Td;this.size=0;this.textAlign=Ud;this.direction=Vd;this.writingMode=Wd;this.lineInterpretation=Xd;this.line=null;this.lineHeight="";this.lineAlign=Yd;this.displayAlign=Zd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=$d;this.fontStyle=ae;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
138
|
+
"";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={tc:32,rows:15}}function be(a,b){a=new Sd(a,b,"");a.lineBreak=!0;return a}Sd.prototype.clone=function(){var a=new Sd(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
139
139
|
function ee(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Rd(a.nestedCues,b.nestedCues,ee))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Rd(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}Q("shaka.text.Cue",Sd);Sd.equal=ee;Sd.prototype.clone=Sd.prototype.clone;var Td="auto";
|
|
140
140
|
Sd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Td};var Ud="center",fe={LEFT:"left",RIGHT:"right",CENTER:Ud,START:"start",END:"end"};Sd.textAlign=fe;var Zd="after",ge={BEFORE:"before",CENTER:"center",AFTER:Zd};Sd.displayAlign=ge;var Vd="ltr";Sd.direction={HORIZONTAL_LEFT_TO_RIGHT:Vd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Wd="horizontal-tb";Sd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Wd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Xd=0;
|
|
141
|
-
Sd.lineInterpretation={LINE_NUMBER:Xd,PERCENTAGE:1};var Yd="start",he={CENTER:"center",START:Yd,END:"end"};Sd.lineAlign=he;var ie={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Sd.defaultTextColor=ie;var je={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Sd.defaultTextBackgroundColor=je;var
|
|
142
|
-
var
|
|
141
|
+
Sd.lineInterpretation={LINE_NUMBER:Xd,PERCENTAGE:1};var Yd="start",he={CENTER:"center",START:Yd,END:"end"};Sd.lineAlign=he;var ie={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Sd.defaultTextColor=ie;var je={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Sd.defaultTextBackgroundColor=je;var $d=400;Sd.fontWeight={NORMAL:$d,BOLD:700};
|
|
142
|
+
var ae="normal",ke={NORMAL:ae,ITALIC:"italic",OBLIQUE:"oblique"};Sd.fontStyle=ke;Sd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function le(){}le.prototype.destroy=function(){};function me(a,b,c){ne[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,Je:b}}function oe(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([pe,qe,re,se]),e=d.next();!e.done;e=d.next())if(e=ne[c+"-"+e.value]){var f=e.Je(),g=f.isSupported(a,b);f.destroy();if(g)return e.Je}return null}Q("shaka.transmuxer.TransmuxerEngine",le);le.findTransmuxer=oe;le.unregisterTransmuxer=function(a,b){delete ne[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
143
143
|
le.registerTransmuxer=me;le.prototype.destroy=le.prototype.destroy;var ne={},se=1,re=2,qe=3,pe=4;le.PluginPriority={FALLBACK:se,PREFERRED_SECONDARY:re,PREFERRED:qe,APPLICATION:pe};function te(){}function ue(a,b){var c=a;b&&!ve.includes(a)&&(c+='; codecs="'+b+'"');return c}function we(a,b){b&&(a+='; codecs="'+b+'"');return a}function xe(a,b,c){var d=ue(a,b);b=we(a,b);oe(b)?(a=oe(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}
|
|
144
|
-
function ye(a,b,c){var d=[b];ze.forEach(function(e,f){var g=a[f];"codecs"==f?ve.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function
|
|
144
|
+
function ye(a,b,c){var d=[b];ze.forEach(function(e,f){var g=a[f];"codecs"==f?ve.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Ae(a){return a.split(";")[0].split("/")[1]}
|
|
145
145
|
function Ce(a){var b=De(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"===
|
|
146
|
-
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"}return a}function
|
|
146
|
+
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"}return a}function Ee(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=De(c.value),b.push(c[0]);return b.sort().join(",")}
|
|
147
147
|
function Ge(a){return a.split(";")[0]}function He(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ie(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function De(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}Q("shaka.util.MimeUtils",te);te.getFullTypeWithAllCodecs=we;te.getFullType=ue;
|
|
148
148
|
var ze=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),ve=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Je(a){this.i=null;this.j=a;this.F=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.o=new Map}function Ke(a){return Le[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Kd:!1}Je.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
149
149
|
function Me(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(q){if(1==q.g)return F(q,Promise.resolve(),2);if(!a.i||!a.j)return q.return();if(null==c||null==d)return a.i.parseInit(Gb(b)),q.return();f=a.F?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Gb(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);G(q)})}
|
|
@@ -162,8 +162,8 @@ function cf(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return Zb()&&ff(b.va
|
|
|
162
162
|
function ff(a){var b={dvav:"avc3",dva1:"avc1",dvhe:"hev1",dvh1:"hvc1"},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}}}
|
|
163
163
|
function hf(a,b){var c=Zb(),d=$b("Firefox")&&pc(),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=kf(e.codecs);if(e.codecs.includes(",")){f=e.codecs.split(",");c=Oc("video",f);c=kf(c);f=Oc("audio",f);f=lf(f,e.mimeType);g=xe(e.mimeType,f,"audio");if(!sd(g))return!1;c=[c,f].join()}f=xe(e.mimeType,c,"video");if(!sd(f))return!1;e.codecs=c}e=a.audio;if(d&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus"))return!1;
|
|
164
164
|
if(e){d=lf(e.codecs,e.mimeType);c=xe(e.mimeType,d,"audio");if(!sd(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 mf(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=mf(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
165
|
-
function nf(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 q=Ve(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,
|
|
166
|
-
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache[m.
|
|
165
|
+
function nf(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 q=Ve(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,Yd:void 0},g=f.next())k=g.value,h.Yd=mf(k),h.cache=of,h.cache[h.Yd]?d=c(d,h.cache[h.Yd]):e.push(pf(k).then(function(m){return function(n){var q=
|
|
166
|
+
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache[m.Yd]=q,d=c(d,q))}}(h)));return F(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);G(l)})}
|
|
167
167
|
function pf(a){var b=[""];a.video&&(b=He(a.video.contentType).split(","));var c=[""];a.audio&&(c=He(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={Rc:void 0},g=f.next())g=g.value,h.Rc=Ue(a),a.video&&(h.Rc.video.contentType=ue(Ge(h.Rc.video.contentType),e)),a.audio&&(h.Rc.audio.contentType=ue(Ge(h.Rc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Rc).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
168
168
|
return null})}
|
|
169
169
|
function gf(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C;return O(function(I){switch(I.g){case 1:if(e=a.some(function(E){return E.decodingInfos.length}))return I.return();f=t(d);g=f.next();h={};case 2:if(g.done){I.B(4);break}h.Nh=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){I.B(7);break}n=m.value;q=qf(n,b,c).filter(function(E){return function(J){J=J[0];return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===E.Nh}}(h));r=t(q);u=r.next();case 8:if(u.done){I.B(10);break}v=u.value;
|
|
@@ -173,7 +173,7 @@ function qf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMime
|
|
|
173
173
|
k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=n.next();!m.done;m=
|
|
174
174
|
n.next()){m=Object.assign({},m.value);var q=c.get(k),r={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};q=t(q);for(var u=q.next();!u.done;u=q.next()){u=u.value;if(u.initData&&u.initData.length){for(var v=new Set,w=t(u.initData),A=w.next();!A.done;A=w.next())v.add(A.value.initDataType);r.initDataType=u.initData[0].initDataType}u.distinctiveIdentifierRequired&&(r.distinctiveIdentifier="required");u.persistentStateRequired&&(r.persistentState="required");
|
|
175
175
|
u.sessionType&&(r.sessionTypes=[u.sessionType]);d&&(r.audio?(u.encryptionScheme&&(r.audio.encryptionScheme=r.audio.encryptionScheme||u.encryptionScheme),r.audio.robustness=r.audio.robustness||u.audioRobustness):(r.audio={robustness:u.audioRobustness},u.encryptionScheme&&(r.audio.encryptionScheme=u.encryptionScheme)),""==r.audio.robustness&&delete r.audio.robustness);e&&(r.video?(u.encryptionScheme&&(r.video.encryptionScheme=r.video.encryptionScheme||u.encryptionScheme),r.video.robustness=r.video.robustness||
|
|
176
|
-
u.videoRobustness):(r.video={robustness:u.videoRobustness},u.encryptionScheme&&(r.video.encryptionScheme=u.encryptionScheme)),""==r.video.robustness&&delete r.video.robustness)}m.keySystemConfiguration=r;l.push(m)}a.push(l)}return a}function lf(a,b){return"flac"==a.toLowerCase()?nc()?"fLaC":"flac":"opus"===a.toLowerCase()?nc()?"mp4"==
|
|
176
|
+
u.videoRobustness):(r.video={robustness:u.videoRobustness},u.encryptionScheme&&(r.video.encryptionScheme=u.encryptionScheme)),""==r.video.robustness&&delete r.video.robustness)}m.keySystemConfiguration=r;l.push(m)}a.push(l)}return a}function lf(a,b){return"flac"==a.toLowerCase()?nc()?"fLaC":"flac":"opus"===a.toLowerCase()?nc()?"mp4"==Ae(b)?"Opus":"opus":"opus":a}
|
|
177
177
|
function kf(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function df(a){a.textStreams=a.textStreams.filter(function(b){b=ue(b.mimeType,b.codecs);return Ke(b)})}
|
|
178
178
|
function ef(a){var b,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(rf.has(f)){l.B(5);break}g=sf.get(f);if(!g){rf.set(f,!1);l.B(5);break}return F(l,tf(g),7);case 7:h=l.h,rf.set(f,h);case 5:(k=rf.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,G(l)}})}
|
|
179
179
|
function tf(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
|
|
@@ -201,7 +201,7 @@ function Lf(a){if(!a.I){var b=a.j;if(!(b.g>=b.i))return;a.I=!0;a.l-=1E3*(a.g.swi
|
|
|
201
201
|
function Kf(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})}Q("shaka.abr.SimpleAbrManager",If);If.prototype.configure=If.prototype.configure;If.prototype.setCmsdManager=If.prototype.setCmsdManager;If.prototype.setMediaElement=If.prototype.setMediaElement;If.prototype.playbackRateChanged=If.prototype.playbackRateChanged;If.prototype.setVariants=If.prototype.setVariants;
|
|
202
202
|
If.prototype.getBandwidthEstimate=If.prototype.getBandwidthEstimate;If.prototype.trySuggestStreams=If.prototype.trySuggestStreams;If.prototype.segmentDownloaded=If.prototype.segmentDownloaded;If.prototype.disable=If.prototype.disable;If.prototype.enable=If.prototype.enable;If.prototype.chooseVariant=If.prototype.chooseVariant;If.prototype.init=If.prototype.init;If.prototype.release=If.prototype.release;If.prototype.stop=If.prototype.stop;var Mf=1;Q("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});Q("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Nf(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)}Nf.prototype.add=function(a,b,c){return Sf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
203
203
|
function Sf(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||c&&!Tf(e,f)||!Uf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Tf(a,b))&&Uf(a.roles,b.roles)));return d?!1:!0}Nf.prototype.values=function(){return this.g.values()};
|
|
204
|
-
function Tf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return
|
|
204
|
+
function Tf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Ee(d)});b=b.codecs.split(",").map(function(d){return Ee(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Uf(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Vf(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Wf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Vf.prototype.create=function(a){var b=this,c="smooth"==this.h&&ud(),d=a.filter(function(e){return Sf(b.i,e,!c,b.g)});return d.length?new Nf(d[0],d,!c,this.g):this.j.create(a)};
|
|
205
205
|
function Wf(a,b,c,d,e,f,g,h,k,l){this.u=a;this.A=b;this.h=c;this.i=d;this.F=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.o=void 0===l?!1:l}
|
|
206
206
|
Wf.prototype.create=function(a){var b=[];b=Xf(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Yf(b,this.A);a.length&&(b=a);this.l&&(a=Zf(b,this.l),a.length&&(b=a));this.i&&(a=$f(b,this.i),a.length&&(b=a));this.h&&(a=ag(b,this.h),a.length&&(b=a));this.g&&(a=bg(b,this.g),a.length&&(b=a));this.j&&(a=cg(b,this.j),a.length&&(b=a));a=dg(b,this.F);a.length&&(b=a);return new Nf(b[0],b,!("smooth"==this.m&&ud()),this.o)};
|
|
207
207
|
function Xf(a,b){b=Wc(b);var c=fd(b,a.map(function(d){return ed(d)}));return c?a.filter(function(d){return c==ed(d)}):[]}function Yf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function bg(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function cg(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
@@ -218,31 +218,31 @@ function Dg(a,b,c,d){function e(h){f=f.Qa(function(){c.body&&(c.body=Hb(c.body))
|
|
|
218
218
|
function Eg(a,b,c,d,e,f,g,h){a.u&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new mb(c.uris[f]),l=k.Rb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),nb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=yg[l])?l.Je:null;if(!n)return ng(new U(2,1,1E3,k));var q=l.Sj,r=null,u=null,v=!1,w=!1,A;return qg(kg(e)).Qa(function(){if(a.i)return og();A=Date.now();var y=0;c.requestStartTime=Date.now();
|
|
219
219
|
var D=n(c.uris[f],c,b,function(C,I,E){r&&r.stop();u&&u.V(B/1E3);a.l&&b==Gg&&(y++,c.packetNumber=y,a.l(C,I,Hg(d),c),m=!0,h.g=E)},function(C){a.j&&a.j(C,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!q)return D;var z=c.retryParameters.connectionTimeout;z&&(r=new Ub(function(){v=!0;D.abort()}),r.V(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Ub(function(){v=!0;D.abort()}));return D}).Qa(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var D={response:y,
|
|
220
220
|
wj:m};!w&&a.j&&a.j(y.headers,c,b);return D},function(y){r&&r.stop();u&&u.stop();if(a.A){var D=null,z=0;y instanceof U&&(D=y,1001==y.code&&(z=y.data[1]));a.A(c,D,z,v)}if(a.i)return og();v&&(y=new U(1,1,1003,c.uris[f],b));if(y instanceof U){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return D=(new Map).set("error",y),D=new T("retry",D),a.dispatchEvent(D),f=(f+1)%c.uris.length,Eg(a,b,c,d,e,f,y,h)}throw y;})}
|
|
221
|
-
function Fg(a,b,c,d){var e=pg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Sh:void 0},f=a.next())g.Sh=f.value,e=e.Qa(function(h){return function(){var k=c.response;k.data&&(k.data=Hb(k.data));return(0,h.Sh)(b,k,d)}}(g));return e.Qa(function(){return c},function(h){var k=2;if(h instanceof U){if(7001==h.code)throw h;k=h.severity}throw new U(k,1,1007,h);})}function Hg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.
|
|
221
|
+
function Fg(a,b,c,d){var e=pg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Sh:void 0},f=a.next())g.Sh=f.value,e=e.Qa(function(h){return function(){var k=c.response;k.data&&(k.data=Hb(k.data));return(0,h.Sh)(b,k,d)}}(g));return e.Qa(function(){return c},function(h){var k=2;if(h instanceof U){if(7001==h.code)throw h;k=h.severity}throw new U(k,1,1007,h);})}function Hg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Od)return!1}return!0}Q("shaka.net.NetworkingEngine",vg);
|
|
222
222
|
vg.prototype.request=vg.prototype.request;vg.prototype.destroy=vg.prototype.destroy;vg.makeRequest=Ag;vg.defaultRetryParameters=function(){return jg()};vg.prototype.clearAllResponseFilters=vg.prototype.Hi;vg.prototype.unregisterResponseFilter=vg.prototype.zk;vg.prototype.registerResponseFilter=vg.prototype.Wj;vg.prototype.clearAllRequestFilters=vg.prototype.Gi;vg.prototype.unregisterRequestFilter=vg.prototype.yk;vg.prototype.registerRequestFilter=vg.prototype.Vj;vg.unregisterScheme=function(a){delete yg[a]};
|
|
223
223
|
vg.registerScheme=wg;vg.prototype.setForceHTTPS=vg.prototype.Kg;vg.prototype.setForceHTTP=vg.prototype.Jg;function Bg(){this.g=0}vg.NumBytesRemainingClass=Bg;function Cg(a,b,c){mg.call(this,a,b);this.h=c}pa(Cg,mg);vg.PendingRequest=Cg;var Gg=1;vg.RequestType={MANIFEST:0,SEGMENT:Gg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};vg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var xg=3;
|
|
224
|
-
vg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:xg};var yg={};function Ig(a){this.g=!1;this.h=new lg;this.i=a}Ig.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 Jg(a,b){if(a.g){if(b instanceof U&&7003==b.code)throw b;throw new U(2,7,7003,b);}};function Kg(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 Lg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Mg(a,b){this.h=Lb(a);this.i=b==Ng;this.g=0}p=Mg.prototype;p.
|
|
225
|
-
p.Ph=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Og();}};p.hd=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 Og();}if(2097151<b)throw new U(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.
|
|
226
|
-
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Og();this.g+=a};p.ek=function(a){if(this.g<a)throw Og();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw Og();this.g=a};p.Hc=function(){for(var a=this.g;this.
|
|
227
|
-
Mg.prototype.skip=Mg.prototype.skip;Mg.prototype.readBytes=Mg.prototype.
|
|
228
|
-
p.ed=function(a,b,c,d){var e=b.Ja();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.T(),g=b.T(),h=Tg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ja()+8>b.getLength()){this.g=!0;return}f=b.hd();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Sg){if(d&&b.Ja()+4>b.getLength()){this.g=!0;return}n=b.T();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.Ja(),b=0<d?b.
|
|
229
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ja(),b.getLength()-b.Ja()))}};function Ug(a){for(var b=Vg(a);a.reader.
|
|
230
|
-
function Yg(a){var b=Vg(a);a.reader.skip(8);var c=a.reader.
|
|
231
|
-
function Vg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}Q("shaka.util.Mp4Parser",Pg);Pg.headerSize=Vg;Pg.typeToString=Tg;Pg.allData=Zg;Pg.audioSampleEntry=Yg;Pg.visualSampleEntry=Xg;Pg.sampleDescription=Wg;Pg.children=Ug;Pg.prototype.parseNext=Pg.prototype.ed;Pg.prototype.parse=Pg.prototype.parse;Pg.prototype.stop=Pg.prototype.stop;Pg.prototype.fullBox=Pg.prototype.X;Pg.prototype.box=Pg.prototype.box;var Rg=0,Sg=1;function $g(a){var b=this;this.g=[];this.h=[];this.data=[];(new Pg).box("moov",Ug).box("moof",Ug).X("pssh",function(c){if(!(1<c.version)){var d=Gb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Jc(c.reader.
|
|
224
|
+
vg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:xg};var yg={};function Ig(a){this.g=!1;this.h=new lg;this.i=a}Ig.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 Jg(a,b){if(a.g){if(b instanceof U&&7003==b.code)throw b;throw new U(2,7,7003,b);}};function Kg(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 Lg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Mg(a,b){this.h=Lb(a);this.i=b==Ng;this.g=0}p=Mg.prototype;p.Da=function(){return this.g<this.h.byteLength};p.Ja=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.$=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Og();}};p.za=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Og();}};p.T=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Og();}};
|
|
225
|
+
p.Ph=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Og();}};p.hd=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 Og();}if(2097151<b)throw new U(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.Hb=function(a){if(this.g+a>this.h.byteLength)throw Og();var b=Gb(this.h,this.g,a);this.g+=a;return b};
|
|
226
|
+
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Og();this.g+=a};p.ek=function(a){if(this.g<a)throw Og();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw Og();this.g=a};p.Hc=function(){for(var a=this.g;this.Da()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Gb(this.h,a,this.g-a);this.g+=1;return wc(a)};function Og(){return new U(2,3,3E3)}Q("shaka.util.DataViewReader",Mg);Mg.prototype.readTerminatedString=Mg.prototype.Hc;Mg.prototype.seek=Mg.prototype.seek;Mg.prototype.rewind=Mg.prototype.ek;
|
|
227
|
+
Mg.prototype.skip=Mg.prototype.skip;Mg.prototype.readBytes=Mg.prototype.Hb;Mg.prototype.readUint64=Mg.prototype.hd;Mg.prototype.readInt32=Mg.prototype.Ph;Mg.prototype.readUint32=Mg.prototype.T;Mg.prototype.readUint16=Mg.prototype.za;Mg.prototype.readUint8=Mg.prototype.$;Mg.prototype.getLength=Mg.prototype.getLength;Mg.prototype.getPosition=Mg.prototype.Ja;Mg.prototype.hasMoreData=Mg.prototype.Da;var Ng=1;Mg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ng};function Pg(){this.i=[];this.h=[];this.g=!1}p=Pg.prototype;p.box=function(a,b){a=Qg(a);this.i[a]=Rg;this.h[a]=b;return this};p.X=function(a,b){a=Qg(a);this.i[a]=Sg;this.h[a]=b;return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Mg(a,0);for(this.g=!1;a.Da()&&!this.g;)this.ed(0,a,b,c)};
|
|
228
|
+
p.ed=function(a,b,c,d){var e=b.Ja();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.T(),g=b.T(),h=Tg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ja()+8>b.getLength()){this.g=!0;return}f=b.hd();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Sg){if(d&&b.Ja()+4>b.getLength()){this.g=!0;return}n=b.T();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.Ja(),b=0<d?b.Hb(d):new Uint8Array(0),b=new Mg(b,0),l({name:h,parser:this,
|
|
229
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ja(),b.getLength()-b.Ja()))}};function Ug(a){for(var b=Vg(a);a.reader.Da()&&!a.parser.g;)a.parser.ed(a.start+b,a.reader,a.partialOkay)}function Wg(a){for(var b=Vg(a),c=a.reader.T(),d=0;d<c&&(a.parser.ed(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Xg(a){var b=Vg(a);for(a.reader.skip(78);a.reader.Da()&&!a.parser.g;)a.parser.ed(a.start+b,a.reader,a.partialOkay)}
|
|
230
|
+
function Yg(a){var b=Vg(a);a.reader.skip(8);var c=a.reader.za();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Da()&&!a.parser.g;)a.parser.ed(a.start+b,a.reader,a.partialOkay)}function Zg(a){return function(b){a(b.reader.Hb(b.reader.getLength()-b.reader.Ja()))}}function Qg(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 Tg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
231
|
+
function Vg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}Q("shaka.util.Mp4Parser",Pg);Pg.headerSize=Vg;Pg.typeToString=Tg;Pg.allData=Zg;Pg.audioSampleEntry=Yg;Pg.visualSampleEntry=Xg;Pg.sampleDescription=Wg;Pg.children=Ug;Pg.prototype.parseNext=Pg.prototype.ed;Pg.prototype.parse=Pg.prototype.parse;Pg.prototype.stop=Pg.prototype.stop;Pg.prototype.fullBox=Pg.prototype.X;Pg.prototype.box=Pg.prototype.box;var Rg=0,Sg=1;function $g(a){var b=this;this.g=[];this.h=[];this.data=[];(new Pg).box("moov",Ug).box("moof",Ug).X("pssh",function(c){if(!(1<c.version)){var d=Gb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Jc(c.reader.Hb(16)));if(0<c.version){d=c.reader.T();for(var e=0;e<d;e++){var f=Jc(c.reader.Hb(16));b.h.push(f)}}}}).parse(a)}
|
|
232
232
|
function ah(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=Lb(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=Ic(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
233
233
|
@license
|
|
234
234
|
tXml
|
|
235
235
|
Copyright 2015 Tobias Nickel
|
|
236
236
|
SPDX-License-Identifier: MIT
|
|
237
237
|
*/
|
|
238
|
-
function bh(a,b){var c=void 0===c?!1:c;a=zc(a);return ch(a,b,c)}function ch(a,b,c){a=
|
|
239
|
-
function
|
|
238
|
+
function bh(a,b){var c=void 0===c?!1:c;a=zc(a);return ch(a,b,c)}function ch(a,b,c){a=dh(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return d.tagName===b}))?a:null}function gh(a){return hh.has(a)?hh.get(a):""}
|
|
239
|
+
function dh(a,b){function c(f,g){g=void 0===g?!1:g;for(var h=[];a[e];)if(60==a.charCodeAt(e)){if(47===a.charCodeAt(e+1)){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0<l&&(k=g.indexOf(f.substring(0,l)))}if(-1==k)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(33===a.charCodeAt(e+1)){if(45==a.charCodeAt(e+2)){for(;-1!==e&&(62!==a.charCodeAt(e)||
|
|
240
240
|
45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var q=a.charCodeAt(e);if(64<q&&91>q||96<q&&123>q){q=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123>
|
|
241
241
|
r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(q.startsWith("xmlns:")){r=u;var v=q.split(":")[1];hh.set(r,v);ih.set(v,r)}"tt"===m&&"xml:space"===q&&"preserve"===u&&(l=!0);n[q]=u}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n=
|
|
242
242
|
0;n<m;n++)q=k[n],"string"!==typeof q?b&&(q.parent=l):n==m-1&&"\n"==q&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
|
|
243
243
|
function jh(a){return"string"===typeof a}function kh(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function lh(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function mh(a){if("string"===typeof a)return Dc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Dc(a)}
|
|
244
|
-
function nh(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=mh(a))&&(a=a.trim());return a}function oh(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())oh(d.value,b,c)}return c}function ph(a,b){a=lh(a,b);return 1!=a.length?null:a[0]}function qh(a,b,c){a=
|
|
245
|
-
function uh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function vh(a,b,c){b=gh(b);return a.attributes[b+":"+c]||null}function
|
|
244
|
+
function nh(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=mh(a))&&(a=a.trim());return a}function oh(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())oh(d.value,b,c)}return c}function ph(a,b){a=lh(a,b);return 1!=a.length?null:a[0]}function qh(a,b,c){a=rh(a,b,c);return 1!=a.length?null:a[0]}
|
|
245
|
+
function uh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function vh(a,b,c){b=gh(b);return a.attributes[b+":"+c]||null}function rh(a,b,c){b=gh(b);var d=[];if(a.children){a=t(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function wh(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=vh(a,d.value,c))return d;return null}
|
|
246
246
|
function xh(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function yh(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
247
247
|
function zh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Ah(a){a=Number(a);return 0===a%1?a:null}function Bh(a){a=Number(a);return 0===a%1&&0<a?a:null}function Ch(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Dh(a){a=Number(a);return isNaN(a)?null:a}function Eh(a){return a?"true"===a.toLowerCase():!1}
|
|
248
248
|
function Fh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
@@ -258,13 +258,13 @@ function Uh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:
|
|
|
258
258
|
function Sh(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z;return O(function(B){if(1==B.g){if(c=Wh(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=Kg(a.h.servers),Xh(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=Yh(n),r=t(q),u=r.next();!u.done;u=r.next())v=u.value,k.add(v);w=t(k);for(A=w.next();!A.done;A=
|
|
259
259
|
w.next())y=A.value,Zh(y,Kg(a.h.servers),Kg(a.h.advanced||{}),a.h.keySystemsMapping);return F(B,gf(b,a.P,a.Y,a.h.preferredKeySystems),2)}Jg(a.j);D=g||Object.keys(a.h.servers).length;if(!D)return a.Z=!0,B.return(Promise.resolve());z=Vh(a,void 0,b);return B.return(g?z:z.catch(function(){}))})}
|
|
260
260
|
function $h(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.I){c.B(2);break}return F(c,a.I,3);case 3:return Jg(a.j),c.return();case 2:return va(c,4),a.I=a.m.setMediaKeys(a.u),F(c,a.I,6);case 6:xa(c,5);break;case 4:b=ya(c),a.o(new U(2,6,6003,b.message));case 5:Jg(a.j),G(c)}})}function ai(a,b){return O(function(c){if(1==c.g)return F(c,$h(a),2);bi(a,b.initDataType,Gb(b.initData));G(c)})}
|
|
261
|
-
p.rc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.u)return b.F.
|
|
261
|
+
p.rc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.u)return b.F.sa(a,"encrypted",function(){b.o(new U(2,6,6010))}),c.return();b.m=a;b.F.sa(b.m,"play",function(){for(var d=t(b.O),e=d.next();!e.done;e=d.next())ci(b,e.value);b.S=!0;b.O=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.F.s(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Qh(b)});b.H=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.H||"com.apple.fps"!==b.g.keySystem||
|
|
262
262
|
b.A.size?F(c,$h(b),2):c.B(2)}di(b).catch(function(){});b.H||b.A.size||b.h.parseInbandPsshEnabled||b.F.s(b.m,"encrypted",function(d){return ai(b,d)});G(c)})};
|
|
263
263
|
function ei(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=Ag([a.g.serverCertificateUri],a.h.retryParameters);va(g,3);c=a.G.Yb.request(5,b);return F(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Gb(d.data);xa(g,4);break;case 3:throw e=ya(g),new U(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();
|
|
264
|
-
va(g,6);return F(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:xa(g,0);break;case 6:throw f=ya(g),new U(2,6,6004,f.message);}})}function fi(a,b){var c,d,e;return O(function(f){if(1==f.g)return F(f,gi(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.
|
|
264
|
+
va(g,6);return F(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:xa(g,0);break;case 6:throw f=ya(g),new U(2,6,6004,f.message);}})}function fi(a,b){var c,d,e;return O(function(f){if(1==f.g)return F(f,gi(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.Ab=new lg,d.push(e.Ab);d.push(c.remove());return F(f,Promise.all(d),3)}a.i.delete(c);G(f)})}
|
|
265
265
|
function di(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.B(2);a.A.forEach(function(h,k){gi(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&&hi(a))return g.return(a.l);a.l=new lg;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,bi(a,f.initDataType,f.initData);ii(a)&&a.l.resolve();return g.return(a.l)})}
|
|
266
|
-
function bi(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(Eb(c,e.value.initData))return}0<a.i.size&&ii(a)&&(a.l.resolve(),a.l=new lg,a.l.catch(function(){}));ji(a,b,c,a.g.sessionType)}}function ki(a){a=a.i.keys();a=hb(a,function(b){return b.sessionId});return Array.from(a)}
|
|
267
|
-
p.Uf=function(){var a=this,b=this.i.keys();b=hb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.vd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};p.
|
|
266
|
+
function bi(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(Eb(c,e.value.initData))return;var f=!1;a.A.forEach(function(g){!f&&Eb(c,g.initData)&&(f=!0)});if(f)return}0<a.i.size&&ii(a)&&(a.l.resolve(),a.l=new lg,a.l.catch(function(){}));ji(a,b,c,a.g.sessionType)}}function ki(a){a=a.i.keys();a=hb(a,function(b){return b.sessionId});return Array.from(a)}
|
|
267
|
+
p.Uf=function(){var a=this,b=this.i.keys();b=hb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.vd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};p.ke=function(){return Lg(this.ea)};
|
|
268
268
|
function Vh(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y;return O(function(D){switch(D.g){case 1:d=new Map;if(c.length){e=li(a,c,d);D.B(2);break}return F(D,mi(a,b),3);case 3:e=D.h;case 2:f=e;if(!f)throw new U(2,6,6001);Jg(a.j);va(D,4);a.J.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.J.add(n.contentType.toLowerCase());q=t(k);for(r=q.next();!r.done;r=q.next())u=r.value,a.J.add(u.contentType.toLowerCase());if(c.length){var z=
|
|
269
269
|
f.keySystem;var B=d.get(f.keySystem);var C=[],I=[],E=[],J=[],K=[],H=new Set;ni(B,C,I,J,E,K,H);var M=a.P?"persistent-license":"temporary";z={keySystem:z,encryptionScheme:C[0],licenseServerUri:I[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||M,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:J[0],serverCertificateUri:E[0],initData:K,keyIds:H};B=t(B);
|
|
270
270
|
for(C=B.next();!C.done;C=B.next())C=C.value,C.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(z.persistentStateRequired=C.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),C=[],I=[],E=[],J=[],K=[],H=new Set,ni(z.drmInfos,C,I,J,E,K,H),B={keySystem:B,encryptionScheme:C[0],licenseServerUri:I[0],distinctiveIdentifierRequired:"required"==z.distinctiveIdentifier,persistentStateRequired:"required"==z.persistentState,
|
|
@@ -275,22 +275,22 @@ l.Oh}}(d)))return f.keySystemAccess;a=t([!0,!1]);for(d=a.next();!d.done;d=a.next
|
|
|
275
275
|
function mi(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A;return O(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new U(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){y.B(4);break}k=h.value;if(!b.has(k)){y.B(3);break}l=b.get(k);va(y,6);return F(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
276
276
|
y.h,y.return(c);case 6:ya(y);case 7:Jg(a.j);case 3:h=g.next();y.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.B(11);break}q=n.value;r=t(b.keys());u=r.next();case 12:if(u.done){n=m.next();y.B(9);break}v=u.value;w=b.get(v);A=w.drmInfos.some(function(D){return!!D.licenseServerUri});if(A!=q){y.B(13);break}va(y,15);return F(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:ya(y);case 16:Jg(a.j);case 13:u=r.next();y.B(12);break;case 11:return y.return(c)}})}
|
|
277
277
|
function Wh(a){a=Kg(a.h.clearKeys);return 0==a.size?null:Nc(a)}function oi(a){ii(a)&&a.l.resolve()}function pi(a,b){(new Ub(function(){b.loaded=!0;oi(a)})).V(qi)}
|
|
278
|
-
function gi(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.u.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.F.s(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(n):ci(a,n)});a.F.s(d,"keystatuseschange",function(n){return ri(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,ug:Infinity,
|
|
278
|
+
function gi(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.u.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.F.s(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(n):ci(a,n)});a.F.s(d,"keystatuseschange",function(n){return ri(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,ug:Infinity,Ab:null,type:"persistent-license"};a.i.set(d,f);va(m,2);return F(m,
|
|
279
279
|
d.load(b),4);case 4:return g=m.h,Jg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new U(h,6,6013)),f.loaded=!0),pi(a,f),oi(a),m.return(d);case 2:k=ya(m),Jg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new U(l,6,6005,k.message)),f.loaded=!0,oi(a);case 3:return m.return(Promise.resolve())}})}
|
|
280
|
-
function ji(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.o(new U(2,6,6005,f.message));return}a.F.s(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(f):ci(a,f)});a.F.s(e,"keystatuseschange",function(f){return ri(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,ug:Infinity,
|
|
280
|
+
function ji(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.o(new U(2,6,6005,f.message));return}a.F.s(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(f):ci(a,f)});a.F.s(e,"keystatuseschange",function(f){return ri(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,ug:Infinity,Ab:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof U||(b=new U(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Gc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
281
281
|
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 U(2,6,6006,f.message,f,h))}})}
|
|
282
282
|
function ci(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Gc(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=Ag([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]=
|
|
283
283
|
f.headers[h];if(Qb(a.g.keySystem)){var A=xc(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=ch(A,"PlayReadyKeyMessage");var y=oh(A,"HttpHeader");y=t(y);for(var D=y.next();!D.done;D=y.next()){var z=D.value;D=oh(z,"name")[0];z=oh(z,"value")[0];g.headers[mh(D)]=mh(z)}A=oh(A,"Challenge")[0];g.body=Hc(mh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();va(w,2);m=a.G.Yb.request(2,g);return F(w,m.promise,4);case 4:l=w.h;xa(w,3);break;case 2:n=ya(w);if(a.j.g)return w.return();
|
|
284
|
-
q=new U(2,6,6007,n);1==a.i.size?(a.o(q),d&&d.
|
|
284
|
+
q=new U(2,6,6007,n);1==a.i.size?(a.o(q),d&&d.Ab&&d.Ab.reject(q)):(d&&d.Ab&&d.Ab.reject(q),a.i.delete(c),ii(a)&&(a.l.resolve(),a.N.V(.1)));return w.return();case 3:if(a.j.g)return w.return();a.K+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Gc(l.data);va(w,5);return F(w,c.update(l.data),7);case 7:xa(w,6);break;case 5:return r=ya(w),u=new U(2,6,6008,r.message),a.o(u),d&&d.Ab&&d.Ab.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new T("drmsessionupdate");a.G.onEvent(v);d&&(d.Ab&&d.Ab.resolve(),
|
|
285
285
|
pi(a,d));G(w)}})}
|
|
286
|
-
function ri(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(Qb(a.g.keySystem)&&16==g.byteLength&&(Yb()||kc())){h=Lb(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=Jc(g).slice(0,32);a.W.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.
|
|
286
|
+
function ri(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(Qb(a.g.keySystem)&&16==g.byteLength&&(Yb()||kc())){h=Lb(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=Jc(g).slice(0,32);a.W.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ab&&(a.i.delete(b),b.close().catch(function(){}));ii(a)&&
|
|
287
287
|
(a.l.resolve(),a.N.V(si))}function Nh(a){var b=a.W,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 U(2,6,6014));a.G.Fe(Lg(c))}
|
|
288
288
|
function ti(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H;return O(function(M){if(1==M.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=
|
|
289
|
-
[{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(N,L){var P,S,R,
|
|
290
|
-
(P=L.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,bc()&&(S=!1),R=L.getConfiguration().videoCapabilities,
|
|
291
|
-
|
|
292
|
-
Wa=[Qa,R];return F(gb,navigator.requestMediaKeySystemAccess(N,Wa),4);case 4:return ua=gb.h,F(gb,l(N,ua),5);case 5:xa(gb,0);break;case 2:ya(gb),G(gb)}})};n=function(N,L,P,S){var R,
|
|
293
|
-
robustness:S}}},F(ta,navigator.mediaCapabilities.decodingInfo(R),4);case 4:return
|
|
289
|
+
[{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(N,L){var P,S,R,ha,ka,ta,Va,Ba;return O(function(Ha){switch(Ha.g){case 1:return va(Ha,2),F(Ha,L.createMediaKeys(),4);case 4:xa(Ha,3);break;case 2:return ya(Ha),Ha.return();case 3:S=
|
|
290
|
+
(P=L.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,bc()&&(S=!1),R=L.getConfiguration().videoCapabilities,ha=L.getConfiguration().audioCapabilities,ka={persistentState:S,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(N)&&k.get(N)?ka=k.get(N):k.set(N,ka),(ta=R[0].encryptionScheme)&&!ka.encryptionSchemes.includes(ta)&&ka.encryptionSchemes.push(ta),(Va=R[0].robustness)&&!ka.videoRobustnessLevels.includes(Va)&&ka.videoRobustnessLevels.push(Va),(Ba=
|
|
291
|
+
ha[0].robustness)&&!ka.audioRobustnessLevels.includes(Ba)&&ka.audioRobustnessLevels.push(Ba),G(Ha)}})};m=function(N,L,P,S){var R,ha,ka,ta,Va,Ba,Ha,Qa,Wa,ua;return O(function(gb){switch(gb.g){case 1:va(gb,2);R=Ue(g);ha=t(R.videoCapabilities);for(ka=ha.next();!ka.done;ka=ha.next())ta=ka.value,ta.encryptionScheme=L,ta.robustness=P;Va=t(R.audioCapabilities);for(Ba=Va.next();!Ba.done;Ba=Va.next())Ha=Ba.value,Ha.encryptionScheme=L,Ha.robustness=S;Qa=Ue(R);Qa.persistentState="required";Qa.sessionTypes=["persistent-license"];
|
|
292
|
+
Wa=[Qa,R];return F(gb,navigator.requestMediaKeySystemAccess(N,Wa),4);case 4:return ua=gb.h,F(gb,l(N,ua),5);case 5:xa(gb,0);break;case 2:ya(gb),G(gb)}})};n=function(N,L,P,S){var R,ha,ka;return O(function(ta){switch(ta.g){case 1:return va(ta,2),R={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:N,video:{encryptionScheme:L,robustness:P},audio:{encryptionScheme:L,
|
|
293
|
+
robustness:S}}},F(ta,navigator.mediaCapabilities.decodingInfo(R),4);case 4:return ha=ta.h,ka=ha.keySystemAccess,F(ta,l(N,ka),5);case 5:xa(ta,0);break;case 2:ya(ta),G(ta)}})};q=t(a);for(r=q.next();!r.done;r=q.next())u=r.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(y=A.value,D=t(a),z=D.next();!z.done;z=D.next())B=z.value,"org.w3.clearkey"===B&&nc()||(v.push(m(B,y,"","")),v.push(n(B,y,"","")));C=t(a);for(I=C.next();!I.done;I=C.next())for(E=I.value,J=t(d[E]||[]),K=J.next();!K.done;K=
|
|
294
294
|
J.next())H=K.value,v.push(m(E,null,H,"")),v.push(m(E,null,"",H)),v.push(n(E,null,H,"")),v.push(n(E,null,"",H));return F(M,Promise.all(v),2)}return M.return(Lg(k))})}function ui(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Ub(e)).V(vi)}),va(c,2),F(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return xa(c,0);ya(c);G(c)})}
|
|
295
295
|
function Qh(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 va(g,2),a.ha||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?F(g,ui(e),5):F(g,e.remove(),5);if(2!=g.g)return xa(g,0);ya(g);G(g)})})),0)})}function Yh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
296
296
|
function Oh(a){a.i.forEach(function(b,c){var d=b.ug,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ug=e)})}function ii(a){a=a.i.values();return ib(a,function(b){return b.loaded})}function hi(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.W.get(c.value))return!1;return!0}
|
|
@@ -307,19 +307,19 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
307
307
|
*/
|
|
308
308
|
function wi(a,b,c){this.h=a;this.i=b;this.g=c}function xi(a,b){return O(function(c){if(1==c.g)return F(c,bf(a.g,b,a.h.drm.preferredKeySystems),2);Xe(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(Cf))throw new U(2,4,4032);return c.return(yi(a,b))})}
|
|
309
309
|
function yi(a,b){var c=af(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.u)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,zi(a,d.keySystem,f.video),zi(a,d.keySystem,f.audio);Ai(a,b)}return c}function zi(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,bi(a.g,e.initDataType,e.initData)}}}
|
|
310
|
-
function Ai(a,b){a=a.g?a.g.
|
|
311
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var Bi=["output-restricted","internal-error"];function Ci(){}function Di(a,b){if(b){var c=Ei[b.toLowerCase()];if(c)return c}throw new U(2,4,4E3,a,b);}Q("shaka.media.ManifestParser",Ci);Ci.unregisterParserByMime=function(a){delete Ei[a]};Ci.registerParserByMime=function(a,b){Ei[a]=b};Ci.registerParserByExtension=function(){wd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ci.AccessibilityPurpose={Fl:"visually impaired",Rk:"hard of hearing"};var Ei={};function Fi(a,b){function c(){f=!0}function d(m){h.push(m);Ug(m)}var e=a=Gb(a),f=!1,g,h=[],k=[];(new Pg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).X("stsd",function(m){g=m;h.push(m);Wg(m)}).X("encv",c).X("enca",c).X("dvav",function(m){k.push({box:m,
|
|
312
|
-
function(m){k.push({box:m,
|
|
313
|
-
e=Gi(e,g,l.box,h,l.
|
|
310
|
+
function Ai(a,b){a=a.g?a.g.ke():{};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?Bi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
311
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var Bi=["output-restricted","internal-error"];function Ci(){}function Di(a,b){if(b){var c=Ei[b.toLowerCase()];if(c)return c}throw new U(2,4,4E3,a,b);}Q("shaka.media.ManifestParser",Ci);Ci.unregisterParserByMime=function(a){delete Ei[a]};Ci.registerParserByMime=function(a,b){Ei[a]=b};Ci.registerParserByExtension=function(){wd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ci.AccessibilityPurpose={Fl:"visually impaired",Rk:"hard of hearing"};var Ei={};function Fi(a,b){function c(){f=!0}function d(m){h.push(m);Ug(m)}var e=a=Gb(a),f=!1,g,h=[],k=[];(new Pg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).X("stsd",function(m){g=m;h.push(m);Wg(m)}).X("encv",c).X("enca",c).X("dvav",function(m){k.push({box:m,yb:1701733238})}).X("dva1",function(m){k.push({box:m,yb:1701733238})}).X("dvh1",function(m){k.push({box:m,yb:1701733238})}).X("dvhe",function(m){k.push({box:m,yb:1701733238})}).X("hev1",function(m){k.push({box:m,yb:1701733238})}).X("hvc1",
|
|
312
|
+
function(m){k.push({box:m,yb:1701733238})}).X("avc1",function(m){k.push({box:m,yb:1701733238})}).X("avc3",function(m){k.push({box:m,yb:1701733238})}).X("ac-3",function(m){k.push({box:m,yb:1701733217})}).X("ec-3",function(m){k.push({box:m,yb:1701733217})}).X("ac-4",function(m){k.push({box:m,yb:1701733217})}).X("mp4a",function(m){k.push({box:m,yb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw db(Jc(a)),new U(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
|
|
313
|
+
e=Gi(e,g,l.box,h,l.yb);return Yb()&&oc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
314
314
|
function Gi(a,b,c,d,e){var f=Hi.value(),g=a.subarray(c.start,c.start+c.size),h=Lb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Lb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ii(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Zb()||Yb()?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,Ii(e,d.start,d.size+k.byteLength);k=Lb(e,b.start);b=Vg(b);
|
|
315
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ii(a,b,c){a=Lb(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 Hi=new Nb(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 Ji(a,b,c,d,e,f,g){this.R=a;this.Wa=b;this.Fa=c;this.qg=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}Ji.prototype.
|
|
316
|
-
Ji.prototype.getEndByte=Ji.prototype.
|
|
317
|
-
function Li(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v){l=void 0===l?[]:l;r=void 0===r?Mi:r;this.startTime=a;this.j=this.endTime=b;this.G=c;this.Wa=d;this.Fa=e;this.
|
|
318
|
-
a.next())b.value.Hh();this.o&&this.g.length&&this.g[this.g.length-1].Gh();this.F=this.mimeType=this.codecs=null}p=Li.prototype;p.R=function(){return this.G()};p.getStartTime=function(){return this.startTime};p.Wi=function(){return this.endTime};p.
|
|
319
|
-
p.ye=function(){this.l=!1};p.Bj=function(){return this.l};p.Hh=function(){this.
|
|
320
|
-
p.Rg=function(a){null==this.h?Ya("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};p.tk=function(a){this.F=a};p.
|
|
315
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ii(a,b,c){a=Lb(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 Hi=new Nb(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 Ji(a,b,c,d,e,f,g){this.R=a;this.Wa=b;this.Fa=c;this.qg=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}Ji.prototype.Ob=function(){return this.Wa};Ji.prototype.Mb=function(){return this.Fa};Ji.prototype.zd=function(){return this.g};function Ki(a,b){return a===b?!0:a&&b?a.Ob()==b.Ob()&&a.Mb()==b.Mb()&&Rd(a.R().sort(),b.R().sort())&&Eb(a.zd(),b.zd()):a==b}Q("shaka.media.InitSegmentReference",Ji);
|
|
316
|
+
Ji.prototype.getEndByte=Ji.prototype.Mb;Ji.prototype.getStartByte=Ji.prototype.Ob;
|
|
317
|
+
function Li(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v){l=void 0===l?[]:l;r=void 0===r?Mi:r;this.startTime=a;this.j=this.endTime=b;this.G=c;this.Wa=d;this.Fa=e;this.ra=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===q?null:q;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.u=null;this.i=0;this.o=void 0===v?!1:v;this.we=this.Od=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
318
|
+
a.next())b.value.Hh();this.o&&this.g.length&&this.g[this.g.length-1].Gh();this.F=this.mimeType=this.codecs=null}p=Li.prototype;p.R=function(){return this.G()};p.getStartTime=function(){return this.startTime};p.Wi=function(){return this.endTime};p.Ob=function(){return this.Wa};p.Mb=function(){return this.Fa};p.pj=function(){return this.tilesLayout};p.oj=function(){return this.A};p.yc=function(){return this.status};p.Mj=function(){this.status=Ni};p.pg=function(){this.preload=!0};p.Ej=function(){return this.preload};
|
|
319
|
+
p.ye=function(){this.l=!1};p.Bj=function(){return this.l};p.Hh=function(){this.Od=!0};p.Dj=function(){return this.Od};p.Gh=function(){this.we=!0};p.Cj=function(){return this.we};p.Fh=function(){this.m=!0};p.xj=function(){return this.m};p.ai=function(a){this.u=a};p.nj=function(){return this.u};p.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};
|
|
320
|
+
p.Rg=function(a){null==this.h?Ya("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};p.tk=function(a){this.F=a};p.zd=function(){return this.F};function Oi(a,b){a.ra=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Oi(c.value,b)}Q("shaka.media.SegmentReference",Li);Li.prototype.getSegmentData=Li.prototype.zd;Li.prototype.setSegmentData=Li.prototype.tk;Li.prototype.syncAgainst=Li.prototype.Rg;Li.prototype.offset=Li.prototype.offset;
|
|
321
321
|
Li.prototype.getThumbnailSprite=Li.prototype.nj;Li.prototype.setThumbnailSprite=Li.prototype.ai;Li.prototype.hasByterangeOptimization=Li.prototype.xj;Li.prototype.markAsByterangeOptimization=Li.prototype.Fh;Li.prototype.isLastPartial=Li.prototype.Cj;Li.prototype.markAsLastPartial=Li.prototype.Gh;Li.prototype.isPartial=Li.prototype.Dj;Li.prototype.markAsPartial=Li.prototype.Hh;Li.prototype.isIndependent=Li.prototype.Bj;Li.prototype.markAsNonIndependent=Li.prototype.ye;Li.prototype.isPreload=Li.prototype.Ej;
|
|
322
|
-
Li.prototype.markAsPreload=Li.prototype.pg;Li.prototype.markAsUnavailable=Li.prototype.Mj;Li.prototype.getStatus=Li.prototype.yc;Li.prototype.getTileDuration=Li.prototype.oj;Li.prototype.getTilesLayout=Li.prototype.pj;Li.prototype.getEndByte=Li.prototype.
|
|
322
|
+
Li.prototype.markAsPreload=Li.prototype.pg;Li.prototype.markAsUnavailable=Li.prototype.Mj;Li.prototype.getStatus=Li.prototype.yc;Li.prototype.getTileDuration=Li.prototype.oj;Li.prototype.getTilesLayout=Li.prototype.pj;Li.prototype.getEndByte=Li.prototype.Mb;Li.prototype.getStartByte=Li.prototype.Ob;Li.prototype.getEndTime=Li.prototype.Wi;Li.prototype.getStartTime=Li.prototype.getStartTime;Li.prototype.getUris=Li.prototype.R;var Mi=0,Ni=1;Li.Status={Ek:Mi,Dl:Ni,Xk:2};function Pi(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Qi(a){return!a||Pi(a)?null:a.length?a.end(a.length-1):null}function Ri(a,b){return!a||!a.length||Pi(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Si(a,b){if(!a||!a.length||Pi(a))return 0;var c=0;a=t(Ti(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}
|
|
323
323
|
function Ui(a,b,c){if(!a||!a.length||Pi(a))return null;a=Ti(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ti(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};/*
|
|
324
324
|
@license
|
|
325
325
|
Shaka Player
|
|
@@ -331,9 +331,9 @@ function Zi(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
331
331
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=wc(Gb(a.data,1,d));a=wc(Gb(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=wc(Gb(a.data,1,d));a=wc(Gb(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=wc(Gb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
332
332
|
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=Hb(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=wc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=wc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Hb(a.data),b):null}
|
|
333
333
|
function $i(a){for(var b=0,c=[];Wi(a,b);){var d=Yi(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=Yi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Zi(e))&&c.push(f);b+=e.size+10}Xi(a,b)&&(b+=10)}return c}function aj(a,b){for(var c=b=void 0===b?0:b,d=0;Wi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Yi(a,b+6),Xi(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}Q("shaka.util.Id3Utils",Vi);Vi.getID3Data=aj;
|
|
334
|
-
Vi.getID3Frames=$i;function bj(a,b){var c=null,d=null,e=null,f=a.T();b&1&&(e=a.hd());b&2&&a.skip(4);b&8&&(c=a.T());b&16&&(d=a.T());return{trackId:f,td:c,
|
|
335
|
-
function ej(a,b,c){var d=a.T(),e=[],f=null;c&1&&(f=a.T());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Cg:null,sampleSize:null,Pe:null};c&256&&(h.Cg=a.T());c&512&&(h.sampleSize=a.T());c&1024&&a.skip(4);c&2048&&(h.Pe=0==b?a.T():a.Ph());e.push(h)}return{Ll:d,Th:e,Ki:f}}function fj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.
|
|
336
|
-
function hj(a){var b=null,c=null,d=a.
|
|
334
|
+
Vi.getID3Frames=$i;function bj(a,b){var c=null,d=null,e=null,f=a.T();b&1&&(e=a.hd());b&2&&a.skip(4);b&8&&(c=a.T());b&16&&(d=a.T());return{trackId:f,td:c,ce:d,Hl:e}}function cj(a,b){return 1==b?(b=a.T(),a=a.T(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.T()}}function dj(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.T();a.skip(4);a=a.za();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
335
|
+
function ej(a,b,c){var d=a.T(),e=[],f=null;c&1&&(f=a.T());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Cg:null,sampleSize:null,Pe:null};c&256&&(h.Cg=a.T());c&512&&(h.sampleSize=a.T());c&1024&&a.skip(4);c&2048&&(h.Pe=0==b?a.T():a.Ph());e.push(h)}return{Ll:d,Th:e,Ki:f}}function fj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.za();a.skip(2);a.skip(2);a.skip(2);a=a.za()+a.za()/65536;return{channelCount:b,sampleRate:a}}function gj(a){a=a.T();return{codec:Tg(a)}}
|
|
336
|
+
function hj(a){var b=null,c=null,d=a.Hb(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.za()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.za();a.za();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,Ud:c}}
|
|
337
337
|
function ij(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function jj(a){return(10>a?"0":"")+a};/*
|
|
338
338
|
|
|
339
339
|
Copyright Brightcove, Inc.
|
|
@@ -351,7 +351,7 @@ function ij(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
|
|
|
351
351
|
limitations under the License.
|
|
352
352
|
*/
|
|
353
353
|
function kj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Gb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function lj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Mg(c,0)).T(),a.g=8*d,a.i-=d)}function mj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;lj(a)}a.h<<=b;a.g-=b}
|
|
354
|
-
function nj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&lj(a);c=b-c;return 0<c?d<<c|nj(a,c):d}function oj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;lj(a);return b+oj(a)}function
|
|
354
|
+
function nj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&lj(a);c=b-c;return 0<c?d<<c|nj(a,c):d}function oj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;lj(a);return b+oj(a)}function sj(a){mj(a,1+oj(a))}function V(a){var b=oj(a);return nj(a,b+1)-1}function tj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function uj(a){return 1===nj(a,1)}function vj(a){return nj(a,8)}
|
|
355
355
|
function wj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=tj(a),d=(c+d+256)%256),c=0===d?c:d}function xj(a){vj(a);V(a);return V(a)}Q("shaka.util.ExpGolomb",kj);function yj(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.A=this.F=null;this.i=[];this.h=[];this.G=null;this.l=[];this.H=this.o=this.u=null}p=yj.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
356
356
|
p.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,zj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,qe:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
357
357
|
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,q=m;2<q;){var r=f[n+1]+2;switch(f[n]){case 5:var u=yc(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
|
|
@@ -366,128 +366,130 @@ p.dc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.n
|
|
|
366
366
|
p.Zc=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=Kc.apply(Ec,x(d.value)),f=Aj(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=Kc(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.xg(e,
|
|
367
367
|
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)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.dc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Zc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.ud=function(){return{audio:this.A,video:this.m}};
|
|
368
368
|
p.oe=function(){for(var a=[],b=t(this.Zc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};p.uj=function(){wd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.$f();return{height:a.height,width:a.width}};p.$f=function(){return"hvc"==this.m?Cj(this):Dj(this)};
|
|
369
|
-
function Dj(a){var b={height:null,width:null,codec:null};a=a.oe();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new kj(a.data);var c=vj(a),d=vj(a),e=vj(a);
|
|
369
|
+
function Dj(a){var b={height:null,width:null,codec:null};a=a.oe();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new kj(a.data);var c=vj(a),d=vj(a),e=vj(a);sj(a);if(Ej.includes(c)){var f=V(a);3===f&&mj(a,1);sj(a);sj(a);mj(a,1);if(uj(a)){f=3!==f?8:12;for(var g=0;g<f;g++)uj(a)&&(6>g?wj(a,16):wj(a,64))}}sj(a);f=V(a);if(0===f)V(a);else if(1===f)for(mj(a,1),sj(a),sj(a),f=V(a),g=0;g<f;g++)sj(a);sj(a);mj(a,1);f=V(a);g=V(a);var h=nj(a,1);0===h&&mj(a,1);mj(a,1);var k=0,l=0,
|
|
370
370
|
m=0,n=0;uj(a)&&(k=V(a),l=V(a),m=V(a),n=V(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.codec="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
371
371
|
function Cj(a){var b={height:null,width:null,codec:null};a=a.oe();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new kj(a.fullData,!0);vj(c);vj(c);nj(c,4);var d=nj(c,3);uj(c);var e=nj(c,2),f=nj(c,1),g=nj(c,5),h=nj(c,32);a=vj(c);for(var k=vj(c),l=vj(c),m=vj(c),n=vj(c),q=vj(c),r=vj(c),u=[],v=[],w=0;w<d;w++)u.push(uj(c)),v.push(uj(c));if(0<d)for(w=d;8>w;w++)nj(c,2);for(w=0;w<d;w++)u[w]&&nj(c,88),v[w]&&vj(c);V(c);d=V(c);3==d&&nj(c,1);u=V(c);v=V(c);var A=w=0,y=0,D=
|
|
372
372
|
0;uj(c)&&(w+=V(c),A+=V(c),y+=V(c),D+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(y+D)*(1===d?2:1));c=function(z){for(var B=0,C=0;32>C;C++)B|=(z>>C&1)<<31-C;return B>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+r;q&&(e+="."+q.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());
|
|
373
373
|
a&&(e+="."+a.toString(16).toUpperCase());b.codec=e;return b}function Bj(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>zj(a)?!1:!0}function zj(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}Q("shaka.util.TsParser",yj);yj.syncOffset=zj;yj.probe=Fj;yj.prototype.getVideoInfo=yj.prototype.$f;yj.prototype.getVideoResolution=yj.prototype.uj;yj.prototype.getVideoNalus=yj.prototype.oe;
|
|
374
374
|
yj.prototype.getCodecs=yj.prototype.ud;yj.prototype.getStartTime=yj.prototype.getStartTime;yj.prototype.getVideoData=yj.prototype.Zc;yj.prototype.getAudioData=yj.prototype.dc;yj.prototype.getMetadata=yj.prototype.getMetadata;yj.prototype.parseNalus=yj.prototype.xg;yj.prototype.parseAvcNalus=yj.prototype.Rj;yj.prototype.parse=yj.prototype.parse;yj.prototype.clearData=yj.prototype.clearData;yj.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&&Za("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,wd("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Za("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Za("Could not find LCEVC Library on this page"),
|
|
375
375
|
a=!1):(this.h.SupportObject.SupportStatus||Za(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Hj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
376
|
-
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))}Q("shaka.lcevc.Dec",Gj);Gj.prototype.release=Gj.prototype.release;function Jj(a,b,c,d){var e=this;this.
|
|
377
|
-
function Kj(a,b){if(window.ManagedMediaSource){a.
|
|
376
|
+
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))}Q("shaka.lcevc.Dec",Gj);Gj.prototype.release=Gj.prototype.release;function Jj(a,b,c,d){var e=this;this.j=a;this.Y=c;this.A=null;this.H=b;this.h={};this.I={};this.Ia={};this.g=null;this.ea=!1;this.S=d||null;this.l={};this.u=new nd;this.i={};this.J=null;this.N=new lg;this.wa="";this.Ma=!1;this.m=Kj(this,this.N);this.G=!1;this.K=new Ig(function(){return Lj(e)});this.F=!1;this.W="UNKNOWN";this.Ea=this.Ga=!1;this.qa=new lg;this.o=!1;this.na=!0;this.Ca=this.O=this.ma=this.P=this.L=this.Z=null;this.ha=new lg}
|
|
377
|
+
function Kj(a,b){if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.u.s(c,"startstreaming",function(){a.na=!0});a.u.s(c,"endstreaming",function(){a.na=!1})}else c=new MediaSource;a.u.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.wa);b.resolve()});a.u.sa(a.j,"playing",function(){a.Ma=!0});a.wa=Mj(c);a.j.src=a.wa;return c}
|
|
378
378
|
function Nj(a,b){var c,d,e,f,g,h,k,l,m,n,q;return O(function(r){if(1==r.g)return a.createSegmentIndex?F(r,a.createSegmentIndex(),2):r.B(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Tc;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.Ha){if(m=ue(h,k),!Ke(m))return r.return(!1)}else if(b==c.ua?k=kf(k):b==c.ba&&(k=lf(k,h)),n=
|
|
379
379
|
ye(a,h,k),q=we(h,k),!sd(n)&&!oe(q))return r.return(!1);return r.return(!0)})}p=Jj.prototype;p.destroy=function(){return this.K.destroy()};
|
|
380
|
-
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(Se)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new U(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.H&&b.push(a.H.destroy());for(k in a.
|
|
381
|
-
a.l={};a.
|
|
380
|
+
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(Se)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new U(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.H&&b.push(a.H.destroy());for(k in a.i)b.push(a.i[k].destroy());return F(l,Promise.all(b),2)}a.u&&(a.u.release(),a.u=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.A=null;a.m=null;a.g=null;a.H=null;a.h={};a.i={};a.J=null;
|
|
381
|
+
a.l={};a.S=null;a.L=null;a.Y=null;G(l)})}p.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Tc,F(m,e.N,2);case 2:e.F=b,e.W=c,e.Ga=d,e.Ea=!e.F&&"HLS"==e.W&&!e.Ga,e.L=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.B(0);break}k=h.value;l=a.get(k);return F(m,Oj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.ba]=[],e.l[f.ua]=[]):e.l[k]=[],h=g.next(),m.B(3)}})};
|
|
382
382
|
function Oj(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v;return O(function(w){switch(w.g){case 1:return e=Tc,f=Ra,g=Sa,F(w,Nj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=ue(c.mimeType,d);if(b==e.Ha){Pj(a,h,a.F,c.external);w.B(0);break}k=a.A.forceTransmux;if(!sd(h)||!a.F&&ve.includes(h))k=!0;l=we(c.mimeType,d);if(!k){w.B(4);break}m=Pc(e.ba,(d||"").split(","));n=Pc(e.ua,(d||"").split(","));if(!m||!n){w.B(5);break}a.o=!0;return F(w,Oj(a,e.ba,c,m),6);case 6:return F(w,
|
|
383
|
-
Oj(a,e.ua,c,n),7);case 7:return w.return();case 5:if(q=oe(l))r=q(),a.
|
|
383
|
+
Oj(a,e.ua,c,n),7);case 7:return w.return();case 5:if(q=oe(l))r=q(),a.i[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Jg(a.K);try{v=a.m.addSourceBuffer(u)}catch(A){throw new U(2,3,3015,A,"The mediaSource_ status was "+a.m.readyState+" expected 'open'",null);}a.F&&(v.mode=Qj);a.u.s(v,"error",function(){var A=a.l[b][0];A.p.reject(new U(2,3,3014,a.j.error?a.j.error.code:0,A.uri))});a.u.s(v,"updateend",function(){return Rj(a,b)});a.h[b]=v;a.I[b]=h;a.Ia[b]=!!c.drmInfos.length;
|
|
384
384
|
G(w)}})}p.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
385
|
-
function Pj(a,b,c,d){a.g||(a.g=new Je(a.H),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.
|
|
385
|
+
function Pj(a,b,c,d){a.g||(a.g=new Je(a.H),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ea;a=a.W;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Le[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):wd("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):wd("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.F=d)}
|
|
386
386
|
function Sj(a){return a.G?!1:a.m?"ended"==a.m.readyState:!0}function Tj(a,b){a.G||!Object.keys(a.h).length?a=null:b==Rc?a=a.g.g:(a=Uj(a,b),a=!a||Pi(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Vj(a,b){return a.G?null:b==Rc?a.g.h:Qi(Uj(a,b))}function Wj(a,b,c){if(a.G)return 0;if(b==Rc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Uj(a,b);return Si(a,c)}
|
|
387
|
-
p.
|
|
388
|
-
function Xj(a,b,c,d,e,f){var g=null,h=Gb(c);if(ve.includes(e))f=$i(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.
|
|
389
|
-
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Fj(h)||(a.L?a.L.clearData():a.L=new yj,h=a.L.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.
|
|
390
|
-
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,q,r,u,v,w,A,y,D,z,B,C,I;return O(function(E){switch(E.g){case 1:m=Tc;if(b!=m.Ha){E.B(2);break}if(!a.F){E.B(3);break}return F(E,a.
|
|
391
|
-
case 6:if(!a.h[b])return E.return();q=a.h[b].timestampOffset;r=a.I[b];a.
|
|
392
|
-
D=b==m.ua||!(m.ua in a.h),a.F&&D&&a.
|
|
393
|
-
a.
|
|
387
|
+
p.Lb=function(){var a={total:this.G?[]:Ti(this.j.buffered),audio:this.G?[]:Ti(Uj(this,"audio")),video:this.G?[]:Ti(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}}
|
|
388
|
+
function Xj(a,b,c,d,e,f){var g=null,h=Gb(c);if(ve.includes(e))f=$i(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.Y.Ge([{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.ra&&d.ra.timescale){var k=d.ra.timescale;if(!isNaN(k)){var l=0,m=!1;(new Pg).box("moof",Ug).box("traf",Ug).X("tfdt",function(n){l=cj(n.reader,
|
|
389
|
+
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Fj(h)||(a.L?a.L.clearData():a.L=new yj,h=a.L.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.Y.Ge(h,f,d?d.endTime:null));return g}
|
|
390
|
+
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,q,r,u,v,w,A,y,D,z,B,C,I;return O(function(E){switch(E.g){case 1:m=Tc;if(b!=m.Ha){E.B(2);break}if(!a.F){E.B(3);break}return F(E,a.qa,4);case 4:n=E.h,a.g.u=n;case 3:return F(E,Me(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.R()[0]:null),5);case 5:return E.return();case 2:if(l||!a.o){E.B(6);break}return F(E,Yj(a,m.ba,c,d,e,f,g,h,k,!0),7);case 7:return F(E,Yj(a,m.ua,c,d,e,f,g,h,k,!0),8);case 8:return E.return();
|
|
391
|
+
case 6:if(!a.h[b])return E.return();q=a.h[b].timestampOffset;r=a.I[b];a.i[b]&&(r=a.i[b].getOriginalMimeType());d&&(u=Xj(a,b,c,d,r,q),null!=u&&(null==a.P&&b==m.ua&&(a.P=u,a.ma=d.startTime,null!=a.O&&(v=0,a.ma==a.Ca&&(v=a.P-a.O),a.ha.resolve(v))),null==a.O&&b==m.ba&&(a.O=u,a.Ca=d.startTime,null!=a.P&&(w=0,a.ma==a.Ca&&(w=a.P-a.O),a.ha.resolve(w))),A=d.startTime-u,y=Math.abs(q-A),(.001<=y||g||h)&&(!k||0<A||!q)&&(q=A,a.Ea&&(Zj(a,b,function(){return hk(a,b)},null),Zj(a,b,function(){return ik(a,b,q)},null))),
|
|
392
|
+
D=b==m.ua||!(m.ua in a.h),a.F&&D&&a.qa.resolve(q)));f&&b==m.ua&&(a.g||Pj(a,"application/cea-608",a.F,!1),a.J||(z=r.split(";",1)[0],a.J=new Dd(z)),d?(B=a.J.i(c),B.length&&Qe(a.g,B,d.startTime,d.endTime,q)):a.J.init(c,h));if(!a.i[b]){E.B(9);break}return F(E,a.i[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=E.h;case 9:c=jk(a,c,d?d.startTime:null,b,d?d.R()[0]:null);if(!d||!a.F||b==m.Ha){E.B(11);break}if(!g&&!h){E.B(11);break}C=d.startTime;if("HLS"!=a.W||a.o||b!=m.ba||!a.h[m.ua]){E.B(13);break}return F(E,
|
|
393
|
+
a.ha,14);case 14:I=E.h,.1<Math.abs(I)&&(C-=I);case 13:Zj(a,b,function(){return hk(a,b)},null),Zj(a,b,function(){return ik(a,b,C)},null);case 11:return F(E,Zj(a,b,function(){var J=c;if("video"==b&&a.S){var K=a.S;K.g&&K.g.appendBuffer(J,"video",K.o,-q)}a.h[b].appendBuffer(J)},d?d.R()[0]:null),15);case 15:G(E)}})}function kk(a,b){var c=Vj(a,"video")||0;Oe(a.g,b,c)}function lk(a){a.g&&Oe(a.g,"",0)}
|
|
394
394
|
p.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Tc,a==e.Ha?F(f,d.g.remove(b,c),0):F(f,Zj(d,a,function(){return mk(d,a,b,c)},null),4)):d.o?F(f,Zj(d,e.ba,function(){return mk(d,e.ba,b,c)},null),0):f.B(0)})};function nk(a,b){var c;return O(function(d){return 1==d.g?(c=Tc,b==c.Ha?a.g?F(d,a.g.remove(0,Infinity),0):d.return():F(d,Zj(a,b,function(){return mk(a,b,0,a.m.duration)},null),4)):a.o?F(d,Zj(a,c.ba,function(){return mk(a,c.ba,0,a.m.duration)},null),0):d.B(0)})}
|
|
395
|
-
p.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Tc,a==c.Ha?d.return():F(d,Zj(b,a,function(){b.
|
|
396
|
-
function ok(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(q){if(1==q.g){l=Tc;if(b==l.Ha)return f||(a.g.u=c),Ne(a.g,d,e),q.return();m=[];return F(q,pk(a,b,g,h,k),2)}n=q.h;n||(m.push(Zj(a,b,function(){return
|
|
395
|
+
p.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Tc,a==c.Ha?d.return():F(d,Zj(b,a,function(){b.j.currentTime-=.001;Rj(b,a)},null),2)):b.o?F(d,Zj(b,c.ba,function(){var e=c.ba;b.j.currentTime-=.001;Rj(b,e)},null),0):d.B(0)})};
|
|
396
|
+
function ok(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(q){if(1==q.g){l=Tc;if(b==l.Ha)return f||(a.g.u=c),Ne(a.g,d,e),q.return();m=[];return F(q,pk(a,b,g,h,k),2)}n=q.h;n||(m.push(Zj(a,b,function(){return hk(a,b)},null)),a.o&&m.push(Zj(a,l.ba,function(){return hk(a,l.ba)},null)));f||(m.push(Zj(a,b,function(){return ik(a,b,c)},null)),a.o&&m.push(Zj(a,l.ba,function(){return ik(a,l.ba,c)},null)));m.push(Zj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=
|
|
397
397
|
d;Rj(a,b)},null));a.o&&m.push(Zj(a,l.ba,function(){var r=l.ba;a.h[r].appendWindowStart=0;a.h[r].appendWindowEnd=e;a.h[r].appendWindowStart=d;Rj(a,r)},null));return F(q,Promise.all(m),0)})}
|
|
398
|
-
function qk(a,b,c){var d;return O(function(e){if(1==e.g){d=Tc;if(b==d.Ha)return e.return();b==d.ua&&(a.
|
|
399
|
-
p.qb=function(a){var b=this;return O(function(c){return F(c,rk(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new lg,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.
|
|
398
|
+
function qk(a,b,c){var d;return O(function(e){if(1==e.g){d=Tc;if(b==d.Ha)return e.return();b==d.ua&&(a.qa=new lg);Zj(a,b,function(){return hk(a,b)},null);a.o&&Zj(a,d.ba,function(){return hk(a,d.ba)},null);return F(e,Zj(a,b,function(){return ik(a,b,c)},null),2)}return a.o?F(e,Zj(a,d.ba,function(){return ik(a,d.ba,c)},null),0):e.B(0)})}p.endOfStream=function(a){var b=this;return O(function(c){return F(c,rk(b,function(){Sj(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
|
|
399
|
+
p.qb=function(a){var b=this;return O(function(c){return F(c,rk(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new lg,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.Z=a}),0)})};p.getDuration=function(){return this.m.duration};function mk(a,b,c,d){d<=c?Rj(a,b):a.h[b].remove(c,d)}function hk(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Rj(a,b)}
|
|
400
400
|
function ik(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Rj(a,b)}function Rj(a,b){if(!a.G){var c=a.l[b][0];c&&(c.p.resolve(),sk(a,b))}}function Zj(a,b,c,d){Jg(a.K);c={start:c,p:new lg,uri:d};a.l[b].push(c);1==a.l[b].length&&tk(a,b);return c.p}
|
|
401
|
-
function rk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Jg(a.K);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new lg,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();va(l,2);return F(l,Promise.all(c),4);case 4:xa(l,3);break;case 2:throw g=ya(l),g;case 3:return va(l,5,6),F(l,b(),6);case 6:za(l);for(h in a.h)sk(a,h);Aa(l,0);break;case 5:throw k=ya(l),new U(2,3,3015,k,a.
|
|
402
|
-
null);}})}function sk(a,b){a.l[b].shift();tk(a,b)}function tk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new U(2,3,3017,b)):c.p.reject(new U(2,3,3015,d,a.
|
|
403
|
-
function uk(a,b,c,d){return Zj(a,b,function(){b!==Rc&&(ud()&&(a.
|
|
404
|
-
function vk(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J;return O(function(K){switch(K.g){case 1:c=Tc;a.G=!0;a.o=!1;d=a.
|
|
405
|
-
Promise.all(g),4);case 4:return a.
|
|
406
|
-
|
|
407
|
-
function pk(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,A,y,D;return O(function(z){if(1==z.g){f=Tc;if(b==f.Ha)return z.return(!1);g=Ce(He(a.I[b]));h=Ge(a.I[b]);l=!1;m=ue(c,d);n=a.A.forceTransmux;if(!sd(m)||!a.F&&ve.includes(m))n=!0;n&&(q=we(c,d),r=oe(q))&&(k=r(),u=Pc(f.ba,(d||"").split(",")),v=Pc(f.ua,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.ba&&(w=u),m=k.convertCodecs(b,we(c,w))):m=k.convertCodecs(b,q));A=Ce(He(m));y=Ge(m);if(g===A&&h===y)return a.
|
|
408
|
-
k:k&&(a.
|
|
409
|
-
function xk(a,b,c,d){if(b==Rc)var e=!1;else{e=Ce(He(a.I[b]));var f=Ge(a.I[b]),g=ue(c,d),h=a.A.forceTransmux;if(!sd(g)||!a.F&&ve.includes(g))h=!0;c=we(c,d);h&&(h=oe(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Ce(He(g));g=Ge(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ud()||a.o:!1}var Mj=window.URL.createObjectURL,Qj="sequence";function yk(a,b,c){this.i=a;this.u=b;this.m=this.
|
|
410
|
-
p.Lh=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.De(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.
|
|
411
|
-
p.
|
|
412
|
-
p.De=function(a){
|
|
413
|
-
p.fc=function(){return this.U()||this.Cc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.J,this.
|
|
414
|
-
p.Vh=function(a){this.J=a};Q("shaka.media.PresentationTimeline",yk);yk.prototype.setAvailabilityTimeOffset=yk.prototype.Vh;yk.prototype.usingPresentationStartTime=yk.prototype.mi;yk.prototype.getSeekRangeEnd=yk.prototype.
|
|
415
|
-
yk.prototype.isInProgress=yk.prototype.Cc;yk.prototype.isLive=yk.prototype.U;yk.prototype.offset=yk.prototype.offset;yk.prototype.notifyMaxSegmentDuration=yk.prototype.rg;yk.prototype.notifyMinSegmentStartTime=yk.prototype.De;yk.prototype.getInitialProgramDateTime=yk.prototype.Yi;yk.prototype.setInitialProgramDateTime=yk.prototype.Yh;yk.prototype.isStartTimeLocked=yk.prototype.Gj;yk.prototype.lockStartTime=yk.prototype.xe;yk.prototype.notifySegments=yk.prototype.
|
|
401
|
+
function rk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Jg(a.K);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new lg,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();va(l,2);return F(l,Promise.all(c),4);case 4:xa(l,3);break;case 2:throw g=ya(l),g;case 3:return va(l,5,6),F(l,b(),6);case 6:za(l);for(h in a.h)sk(a,h);Aa(l,0);break;case 5:throw k=ya(l),new U(2,3,3015,k,a.j.error||"No error in the media element",
|
|
402
|
+
null);}})}function sk(a,b){a.l[b].shift();tk(a,b)}function tk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new U(2,3,3017,b)):c.p.reject(new U(2,3,3015,d,a.j.error||"No error in the media element",c.uri)),sk(a,b)}}function jk(a,b,c,d,e){var f=null==c,g=a.Ia[d];c=a.Y.Zi();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Qb(c),f=ac()||Zb()||jc()||Yb()&&oc()&&c;f&&"mp4"==Ae(a.I[d])&&(b=Fi(b,e));return b}
|
|
403
|
+
function uk(a,b,c,d){return Zj(a,b,function(){b!==Rc&&(ud()&&(a.i[b]&&(a.i[b].destroy(),delete a.i[b]),d&&(a.i[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.I[b]=c),Rj(a,b))},null)}
|
|
404
|
+
function vk(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J;return O(function(K){switch(K.g){case 1:c=Tc;a.G=!0;a.o=!1;d=a.j.currentTime;e=a.j.autoplay;f=a.j.paused;a.Ma&&(a.j.autoplay=!1);wa(K,2);a.u.ob();g=[];for(h in a.i)g.push(a.i[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(Se)),n=t(l.slice(1)),q=n.next();!q.done;q=n.next())r=q.value,r.p.reject(new U(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(H){}}return F(K,
|
|
405
|
+
Promise.all(g),4);case 4:return a.i={},a.h={},w=a.m.duration,a.N=new lg,a.m=Kj(a,a.N),F(K,a.N,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.Z)&&a.Z&&(a.m.duration=a.Z),A=new lg,y=a.m.sourceBuffers,D=b.size,z=0,B=function(){z++;z===D&&(A.resolve(),a.u.Xa(y,"addsourcebuffer",B))},a.u.s(y,"addsourcebuffer",B),C=t(b.keys()),I=C.next();case 6:if(I.done)return a.j.currentTime=d,F(K,A,2);E=I.value;J=b.get(E);return F(K,Oj(a,E,J,J.codecs),9);case 9:a.o?(a.l[c.ba]=[],a.l[c.ua]=[]):a.l[E]=[];I=C.next();K.B(6);
|
|
406
|
+
break;case 2:za(K),a.G=!1,Jg(a.K),a.u.sa(a.j,"canplaythrough",function(){a.K.g||(a.j.autoplay=e,f||a.j.play())}),Aa(K,0)}})}function wk(a,b){return rk(a,function(){return vk(a,b)})}
|
|
407
|
+
function pk(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,A,y,D;return O(function(z){if(1==z.g){f=Tc;if(b==f.Ha)return z.return(!1);g=Ce(He(a.I[b]));h=Ge(a.I[b]);l=!1;m=ue(c,d);n=a.A.forceTransmux;if(!sd(m)||!a.F&&ve.includes(m))n=!0;n&&(q=we(c,d),r=oe(q))&&(k=r(),u=Pc(f.ba,(d||"").split(",")),v=Pc(f.ua,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.ba&&(w=u),m=k.convertCodecs(b,we(c,w))):m=k.convertCodecs(b,q));A=Ce(He(m));y=Ge(m);if(g===A&&h===y)return a.i[b]&&!k?(a.i[b].destroy(),delete a.i[b]):!a.i[b]&&k?a.i[b]=
|
|
408
|
+
k:k&&(a.i[b]&&a.i[b].transmux!=k.transmux?(a.i[b].destroy(),delete a.i[b],a.i[b]=k):k.destroy()),z.return(!1);D=!0;if(a.o||l&&k&&!a.i[b])D=!1;if(D&&"smooth"===a.A.codecSwitchingStrategy&&ud())return F(z,uk(a,b,m,k),3);k&&k.destroy();return F(z,wk(a,e),3)}return z.return(!0)})}
|
|
409
|
+
function xk(a,b,c,d){if(b==Rc)var e=!1;else{e=Ce(He(a.I[b]));var f=Ge(a.I[b]),g=ue(c,d),h=a.A.forceTransmux;if(!sd(g)||!a.F&&ve.includes(g))h=!0;c=we(c,d);h&&(h=oe(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Ce(He(g));g=Ge(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ud()||a.o:!1}var Mj=window.URL.createObjectURL,Qj="sequence";function yk(a,b,c){this.i=a;this.u=b;this.m=this.l=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.G=!0;this.K=!1;this.I=0;this.H=void 0===c?!0:c;this.J=0;this.o=!1;this.F=a}p=yk.prototype;p.getDuration=function(){return this.l};p.dj=function(){return this.g};p.$h=function(a){this.i=a};p.qb=function(a){this.l=a};p.hj=function(){return this.i};p.Wh=function(a){this.A=a};p.Kc=function(a){a&&!this.G&&(this.K=!0);this.G=a};p.Te=function(a){this.m=a};p.me=function(){return this.m};
|
|
410
|
+
p.Hg=function(a){this.u=a};p.Vi=function(){return this.u};p.Lh=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.De(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.H&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
411
|
+
p.Md=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.De(b);this.h=Math.max(this.h,c);null!=this.i&&this.H&&!this.o&&(this.i=d-this.h-this.g)}};p.xe=function(){this.o=!0};p.Gj=function(){return this.o};p.Yh=function(a){this.F=a};p.Yi=function(){return this.F};
|
|
412
|
+
p.De=function(a){null==this.j?this.j=a:this.K||(this.j=Math.min(this.j,a))};p.rg=function(a){this.g=Math.max(this.g,a)};p.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};p.U=function(){return Infinity==this.l&&!this.G};p.Cc=function(){return Infinity!=this.l&&!this.G};p.Cb=function(){return Math.max(this.I,this.fc()-this.m)};p.ci=function(a){this.I=a};
|
|
413
|
+
p.fc=function(){return this.U()||this.Cc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.J,this.l):this.h?Math.min(this.h,this.l):this.l};p.yd=function(a){var b=Math.max(this.j,this.I);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.fc()-this.m+a,this.Nb()))};p.Vb=function(){return this.yd(0)};p.Nb=function(){return Math.max(0,this.fc()-(this.U()||this.Cc()?this.u:0))};p.mi=function(){return null==this.i||null!=this.h&&this.H?!1:!0};
|
|
414
|
+
p.Vh=function(a){this.J=a};Q("shaka.media.PresentationTimeline",yk);yk.prototype.setAvailabilityTimeOffset=yk.prototype.Vh;yk.prototype.usingPresentationStartTime=yk.prototype.mi;yk.prototype.getSeekRangeEnd=yk.prototype.Nb;yk.prototype.getSeekRangeStart=yk.prototype.Vb;yk.prototype.getSafeSeekRangeStart=yk.prototype.yd;yk.prototype.getSegmentAvailabilityEnd=yk.prototype.fc;yk.prototype.setUserSeekStart=yk.prototype.ci;yk.prototype.getSegmentAvailabilityStart=yk.prototype.Cb;
|
|
415
|
+
yk.prototype.isInProgress=yk.prototype.Cc;yk.prototype.isLive=yk.prototype.U;yk.prototype.offset=yk.prototype.offset;yk.prototype.notifyMaxSegmentDuration=yk.prototype.rg;yk.prototype.notifyMinSegmentStartTime=yk.prototype.De;yk.prototype.getInitialProgramDateTime=yk.prototype.Yi;yk.prototype.setInitialProgramDateTime=yk.prototype.Yh;yk.prototype.isStartTimeLocked=yk.prototype.Gj;yk.prototype.lockStartTime=yk.prototype.xe;yk.prototype.notifySegments=yk.prototype.Md;yk.prototype.notifyTimeRange=yk.prototype.Lh;
|
|
416
416
|
yk.prototype.getDelay=yk.prototype.Vi;yk.prototype.setDelay=yk.prototype.Hg;yk.prototype.getSegmentAvailabilityDuration=yk.prototype.me;yk.prototype.setSegmentAvailabilityDuration=yk.prototype.Te;yk.prototype.setStatic=yk.prototype.Kc;yk.prototype.setClockOffset=yk.prototype.Wh;yk.prototype.getPresentationStartTime=yk.prototype.hj;yk.prototype.setDuration=yk.prototype.qb;yk.prototype.setPresentationStartTime=yk.prototype.$h;yk.prototype.getMaxSegmentDuration=yk.prototype.dj;
|
|
417
417
|
yk.prototype.getDuration=yk.prototype.getDuration;function zk(a,b,c){this.j=c;this.l=a;this.u=Ak(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}zk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function Bk(a,b){a.i=b}function Ck(a){this.g=a}function Ak(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(Ti(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 Dk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.F=b;this.m=c;this.l=new nd;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.u=!1;this.l.s(a,"waiting",function(){return Ek(f)});this.o=(new Ub(function(){Ek(f)})).Ba(this.m.gapJumpTimerTime)}Dk.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.F=this.A=null};Dk.prototype.vg=function(){this.u=!0;Ek(this)};
|
|
418
418
|
function Ek(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Ak(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new T("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Ui(c,b,a.m.gapDetectionThreshold),
|
|
419
|
-
null!=d&&(0!=d||a.u))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Zb()||ac())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.F.
|
|
420
|
-
function Lk(a,b){0<a.g.readyState?Mk(a.i,b):Fk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Jk(a,a.j())})}function Jk(a,b){.001>Math.abs(a.g.currentTime-b)?Nk(a):(a.h.
|
|
421
|
-
function Ik(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Ub(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--)})}Ik.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Mk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ba(.1)};function Ok(a){this.h=a;this.j=!1;this.g=null;this.i=new nd}p=Ok.prototype;p.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.
|
|
422
|
-
p.
|
|
423
|
-
function Pk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.o=Qk(a,c,f);this.j=new Dk(a,b.presentationTimeline,c,this.o,f);this.h=new Hk(a,function(){a:{var h=g.j;h.j=!0;h.u=!1;var k=Kk(g.h);h=Rk(g,k);if(.001<Math.abs(h-k)){k=!1;if(!hc()||hc()&&pc())k=!0;else{var l=Date.now()/1E3;if(!g.u||g.u<l-
|
|
424
|
-
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Vb():g.g.
|
|
425
|
-
p.tf=function(a){Lk(this.h,a)};p.
|
|
426
|
-
function Rk(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Vb(),f=a.g.
|
|
419
|
+
null!=d&&(0!=d||a.u))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Zb()||ac())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.F.Nb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.A(new T("gapjumped")))}}}};function Fk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Gk.value().get(b),c.sa(a,b,d))}var Gk=new Nb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Hk(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new nd;this.i=new Ik(a);Fk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Jk(e,e.j())})}Hk.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 Kk(a){return a.o?a.g.currentTime:a.j()}
|
|
420
|
+
function Lk(a,b){0<a.g.readyState?Mk(a.i,b):Fk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Jk(a,a.j())})}function Jk(a,b){.001>Math.abs(a.g.currentTime-b)?Nk(a):(a.h.sa(a.g,"seeking",function(){Nk(a)}),Mk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Nk(a){a.o=!0;a.h.s(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
|
|
421
|
+
function Ik(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Ub(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--)})}Ik.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Mk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ba(.1)};function Ok(a){this.h=a;this.j=!1;this.g=null;this.i=new nd}p=Ok.prototype;p.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.sa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;Fk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};p.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};p.tf=function(a){this.g=this.j?this.g:a};
|
|
422
|
+
p.Vd=function(){return(this.j?this.h.currentTime:this.g)||0};p.$g=function(){return 0};p.Zg=function(){return 0};p.Kh=function(){};
|
|
423
|
+
function Pk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.o=Qk(a,c,f);this.j=new Dk(a,b.presentationTimeline,c,this.o,f);this.h=new Hk(a,function(){a:{var h=g.j;h.j=!0;h.u=!1;var k=Kk(g.h);h=Rk(g,k);if(.001<Math.abs(h-k)){k=!1;if(!hc()||hc()&&pc())k=!0;else{var l=Date.now()/1E3,m=hc()&&$b("Fuchsia")?3:1;if(!g.u||g.u<l-m)g.u=l,k=!0}if(k){Lk(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&
|
|
424
|
+
!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Vb():g.g.Nb():0>h&&(h=g.g.Nb()+h);return Sk(g,Tk(g,h))});this.m=new Ub(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Kk(g.h),k=g.g.Vb(),l=g.g.Nb();3>l-k&&(k=l-3);h<k&&(h=Rk(g,h),g.i.currentTime=h)}})}p=Pk.prototype;p.ready=function(){this.m.Ba(.25)};
|
|
425
|
+
p.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};p.tf=function(a){Lk(this.h,a)};p.Vd=function(){var a=Kk(this.h);return 0<this.i.readyState&&!this.i.paused?Tk(this,a):a};p.$g=function(){return this.o?this.o.o:0};p.Zg=function(){return this.j.G};p.Kh=function(){this.j.vg()};function Sk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
426
|
+
function Rk(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Vb(),f=a.g.Nb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.yd(c),k=a.g.yd(d);c=a.g.yd(c+d);return b>=g?Sk(a,b):b>f?f:b<e?Ri(a.i.buffered,k)?k:c:b>=h||Ri(a.i.buffered,b)?b:c}function Tk(a,b){var c=a.g.Vb();if(b<c)return c;a=a.g.Nb();return b>a?a:b}
|
|
427
427
|
function Qk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new zk(new Ck(a),b.stallThreshold,c);Bk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Uk(a){this.g=a;this.m=null;this.i=0;this.o=!1}p=Uk.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Nj=function(){this.o=!0};p.uc=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
428
428
|
p.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};p.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
429
|
-
p.Ae=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};p.
|
|
430
|
-
p.Vc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Li(a.startTime,b,a.G,a.Wa,a.Fa,a.
|
|
429
|
+
p.Ae=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};p.Kd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Ae(a);this.Va(b)};p.Va=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
|
|
430
|
+
p.Vc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Li(a.startTime,b,a.G,a.Wa,a.Fa,a.ra,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
|
|
431
431
|
p.Ye=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Ub(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Ba(a))};Uk.prototype[Symbol.iterator]=function(){return this.Ub(0)};
|
|
432
432
|
Uk.prototype.Ub=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Ya("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Vk(this,d,f,c)};function Wk(a,b,c){a=new Li(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Uk([a])}
|
|
433
|
-
Q("shaka.media.SegmentIndex",Uk);Uk.forSingleSegment=Wk;Uk.prototype.getIteratorForTime=Uk.prototype.Ub;Uk.prototype.updateEvery=Uk.prototype.Ye;Uk.prototype.fit=Uk.prototype.Vc;Uk.prototype.evict=Uk.prototype.Va;Uk.prototype.mergeAndEvict=Uk.prototype.
|
|
433
|
+
Q("shaka.media.SegmentIndex",Uk);Uk.forSingleSegment=Wk;Uk.prototype.getIteratorForTime=Uk.prototype.Ub;Uk.prototype.updateEvery=Uk.prototype.Ye;Uk.prototype.fit=Uk.prototype.Vc;Uk.prototype.evict=Uk.prototype.Va;Uk.prototype.mergeAndEvict=Uk.prototype.Kd;Uk.prototype.offset=Uk.prototype.offset;Uk.prototype.get=Uk.prototype.get;Uk.prototype.find=Uk.prototype.find;Uk.prototype.markImmutable=Uk.prototype.Nj;Uk.prototype.release=Uk.prototype.release;Uk.prototype.getNumEvicted=Uk.prototype.getNumEvicted;
|
|
434
434
|
Uk.prototype.getNumReferences=Uk.prototype.getNumReferences;function Vk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Vk.prototype.md=function(a){this.reverse=a};Vk.prototype.Ji=function(){return this.h};Vk.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};
|
|
435
435
|
Vk.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}};Q("shaka.media.SegmentIterator",Vk);Vk.prototype.next=Vk.prototype.next;Vk.prototype.current=Vk.prototype.current;Vk.prototype.currentPosition=Vk.prototype.Ji;
|
|
436
436
|
Vk.prototype.setReverse=Vk.prototype.md;function Xk(){Uk.call(this,[]);this.h=[]}pa(Xk,Uk);p=Xk.prototype;p.clone=function(){var a=new Xk;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};p.uc=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.uc(a)};
|
|
437
437
|
p.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};p.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.Ae=function(){};
|
|
438
|
-
p.Va=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Va(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};p.
|
|
438
|
+
p.Va=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Va(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};p.Kd=function(){};p.Vc=function(){};p.Ye=function(){};Q("shaka.media.MetaSegmentIndex",Xk);Xk.prototype.updateEvery=Xk.prototype.Ye;Xk.prototype.fit=Xk.prototype.Vc;Xk.prototype.mergeAndEvict=Xk.prototype.Kd;Xk.prototype.evict=Xk.prototype.Va;Xk.prototype.merge=Xk.prototype.Ae;Xk.prototype.offset=Xk.prototype.offset;
|
|
439
439
|
Xk.prototype.get=Xk.prototype.get;Xk.prototype.find=Xk.prototype.find;Xk.prototype.forEachTopLevelReference=Xk.prototype.uc;Xk.prototype.release=Xk.prototype.release;function Yk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.le();this.h=new Ub(function(){b.g.Jh(.25*b.i)})}Yk.prototype.release=function(){this.set(this.xc());this.h&&(this.h.stop(),this.h=null);this.g=null};Yk.prototype.set=function(a){this.i=a;Zk(this)};Yk.prototype.xc=function(){return this.g.xc()};function Zk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.le()!=b&&a.g.Lg(b);return}catch(c){}a.h.Ba(.25);0!=a.g.le()&&a.g.Lg(0)};function $k(a){var b=this;this.h=a;this.g=new Set;this.i=(new Ub(function(){al(b,!1)})).Ba(.25)}$k.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 al(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function bl(){this.g=null;this.h=[]}function cl(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 dl(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 el(){this.i=this.h=null;this.g=[]}function fl(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 gl(){this.sc=this.A=this.F=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.N=this.O=this.J=this.K=this.L=this.l=this.o=NaN;this.g=new bl;this.h=new el};function hl(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 il(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
440
|
-
function jl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ub(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.Fa&&(c=!1);2==b.yc()&&(c=!1);c&&b.
|
|
440
|
+
function jl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ub(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.Fa&&(c=!1);2==b.yc()&&(c=!1);c&&b.ra&&kl(a,b.ra);c&&!a.h.has(b)&&(c=new ll(a.l),ml(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.Od&&b.we)break}nl(a)}}function kl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Ki(d,b)})){var c=new ll(a.l);ml(c,b,a.i);a.j.set(b,c)}}
|
|
441
441
|
function ol(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&pl(a,c)}function ql(a){ol(a,a.h);ol(a,a.j);a.g=null}hl.prototype.Va=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&&pl(this,d);b&&nl(this)};hl.prototype.md=function(a){this.o=a;this.g&&this.g.md(a)};
|
|
442
|
-
function nl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={gg:void 0},d=c.next())e.gg=d.value,b.some(function(f){return function(g){return Ki(g.
|
|
443
|
-
function ml(a,b,c){var d=new Uint8Array(0);a.He=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Kc(d,e):d=e,a.Qg?F(f,a.Qg(d),3):f.B(0);d=new Uint8Array(0);G(f)})})}ll.prototype.abort=function(){this.He&&this.He.abort()};function tl(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Ub(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 T("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ba(2)}pa(tl,fb);tl.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function ul(a){fb.call(this);this.g=new Map;this.h=a}pa(ul,fb);ul.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function vl(a,b){var c=a.g.get(b);c||(c={
|
|
444
|
-
ul.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.
|
|
445
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.kh=d,JSON.stringify(d),c=new T("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function xl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.
|
|
442
|
+
function nl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={gg:void 0},d=c.next())e.gg=d.value,b.some(function(f){return function(g){return Ki(g.ra,f.gg)}}(e))||pl(a,e.gg)}function rl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&pl(a,d)}nl(a)}function sl(a,b){b&&b!==a.i&&(ql(a),a.i=b)}function pl(a,b){var c=a.h;b instanceof Ji&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function ll(a){this.g=a;this.He=this.Qg=null}
|
|
443
|
+
function ml(a,b,c){var d=new Uint8Array(0);a.He=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Kc(d,e):d=e,a.Qg?F(f,a.Qg(d),3):f.B(0);d=new Uint8Array(0);G(f)})})}ll.prototype.abort=function(){this.He&&this.He.abort()};function tl(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Ub(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 T("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ba(2)}pa(tl,fb);tl.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function ul(a){fb.call(this);this.g=new Map;this.h=a}pa(ul,fb);ul.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function vl(a,b){var c=a.g.get(b);c||(c={Rd:[],kh:null,contentType:b},a.g.set(b,c));return c}function wl(a,b,c){var d=vl(a,b.contentType);xl(a,d);a={qg:b,position:c};d=d.Rd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
444
|
+
ul.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Rd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.qg;break a}}d=null}if(e=d)e=c.kh,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
445
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.kh=d,JSON.stringify(d),c=new T("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function xl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Rd;b.Rd=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.Rd=[]};function yl(a,b,c,d,e){a=Ag(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function zl(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.I=new Map;this.F=1;this.u=this.j=null;this.L=0;this.J=!1;this.i=new Map;this.H=!1;this.N=null;this.A=!1;this.m=new Ig(function(){return Al(c)});this.O=Date.now()/1E3;this.o=new Map;this.K={projection:null,hfov:null};this.S=0;this.P=Infinity;this.G=null}p=zl.prototype;p.destroy=function(){return this.m.destroy()};
|
|
446
446
|
function Al(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,Bl(e),b.push(Cl(e)),e.aa&&(ql(e.aa),e.aa=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,ql(h);return F(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;G(k)})}
|
|
447
|
-
p.configure=function(a){this.h=a;this.
|
|
448
|
-
b.aa&&(ql(b.aa),b.aa=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.aa&&(ql(b.aa),b.aa=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.aa?(rl(c.aa,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(ql(c.aa),c.aa=null)):0<a.segmentPrefetchLimit&&(c.aa=Dl(this,c.stream));a.disableAudioPrefetch||El(this)};function Fl(a,b,c){a.l.presentationTimeline.U()||(a.
|
|
449
|
-
p.start=function(a){var b=this;return O(function(c){if(1==c.g)return F(c,Gl(b,a||new Map),2);Jg(b.m);b.
|
|
450
|
-
function Kl(a){var b=a.i.get(Rc);b&&(Bl(b),Cl(b).catch(function(){}),a.i.delete(Rc));a.u=null}function Ll(a,b){for(var c=0>a.g.Ra(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.va&&e.va.md(c),e.aa&&e.aa.md(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.md(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.lc&&(Ml(a,b,!1,0,!1),c.lc=d);else if(b=c.lc)c.lc=null,Ml(a,b,!0,0,!1)}
|
|
451
|
-
function Nl(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.
|
|
452
|
-
function Ml(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Rc?g&&(g.lc&&(b.trickModeVideo?(g.lc=b,b=b.trickModeVideo):g.lc=null),g.stream!=b||e)&&(a.o.has(b)?g.aa=a.o.get(b):g.aa&&sl(g.aa,b),b.type==Rc&&(e=ue(b.mimeType,b.codecs),Pj(a.g.ia,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.ab?(e="("+g.type+":"+g.stream.id+")",a.
|
|
453
|
-
d,g.hf=!0):(Bl(g),Ql(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.ab||g.
|
|
454
|
-
function Rl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.
|
|
455
|
-
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.
|
|
456
|
-
p.kd=function(){if(this.g)for(var a=this.g.
|
|
457
|
-
function Sl(a,b){b.qd||b.qc||(b.ab?(b.qc=!0,b.
|
|
447
|
+
p.configure=function(a){this.h=a;this.N=new ig({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.aa&&(ql(b.aa),b.aa=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,ql(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Rc))&&
|
|
448
|
+
b.aa&&(ql(b.aa),b.aa=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.aa&&(ql(b.aa),b.aa=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.aa?(rl(c.aa,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(ql(c.aa),c.aa=null)):0<a.segmentPrefetchLimit&&(c.aa=Dl(this,c.stream));a.disableAudioPrefetch||El(this)};function Fl(a,b,c){a.l.presentationTimeline.U()||(a.S=b,a.P=c)}
|
|
449
|
+
p.start=function(a){var b=this;return O(function(c){if(1==c.g)return F(c,Gl(b,a||new Map),2);Jg(b.m);b.H=!0;G(c)})};function Hl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Tc,a.L++,d=a.L,va(l,2),F(l,nk(a.g.ia,c.Ha),4);case 4:xa(l,3);break;case 2:if(e=ya(l),a.g)a.g.onError(e);case 3:f=ue(b.mimeType,b.codecs),Pj(a.g.ia,f,a.l.sequenceMode,b.external),g=a.g.ia.H,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.L==d&&(k=Il(a,b),a.i.set(c.Ha,k),Jl(a,k,0)),G(l)}})}
|
|
450
|
+
function Kl(a){var b=a.i.get(Rc);b&&(Bl(b),Cl(b).catch(function(){}),a.G=a.i.get(Rc),a.i.delete(Rc));a.u=null}function Ll(a,b){for(var c=0>a.g.Ra(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.va&&e.va.md(c),e.aa&&e.aa.md(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.md(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.lc&&(Ml(a,b,!1,0,!1),c.lc=d);else if(b=c.lc)c.lc=null,Ml(a,b,!0,0,!1)}
|
|
451
|
+
function Nl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.H&&(b.video&&Ml(a,b.video,c,d,e,f),b.audio&&Ml(a,b.audio,c,d,e,f))}function Ol(a,b){O(function(c){if(1==c.g)return a.G=null,a.u=b,a.H?b.segmentIndex?c.B(2):F(c,b.createSegmentIndex(),2):c.return();Ml(a,b,!0,0,!1);G(c)})}function Pl(a,b){for(var c=t(a.I.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.I.delete(d))}}
|
|
452
|
+
function Ml(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Rc?g&&(g.lc&&(b.trickModeVideo?(g.lc=b,b=b.trickModeVideo):g.lc=null),g.stream!=b||e)&&(a.o.has(b)?g.aa=a.o.get(b):g.aa&&sl(g.aa,b),b.type==Rc&&(e=ue(b.mimeType,b.codecs),Pj(a.g.ia,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.ab?(e="("+g.type+":"+g.stream.id+")",a.I.has(e)||a.I.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.va=null,g.ah=!!f,c?g.qd?g.hf=!0:g.ab?(g.qc=!0,g.be=
|
|
453
|
+
d,g.hf=!0):(Bl(g),Ql(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.ab||g.Jb||Jl(a,g,0),Rl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Hl(a,b)}
|
|
454
|
+
function Rl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.zb)return e.return();c=b.stream;d=b.zb;return c.segmentIndex?e.B(2):F(e,c.createSegmentIndex(),2)}if(b.zb!=d||b.stream!=c)return e.return();var f=a.g.xd();var g=Vj(a.g.ia,b.type),h=b.stream.segmentIndex.find(b.eb?b.eb.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Fa?k.Fa-k.Wa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ra)&&(h+=(k.Fa?k.Fa-k.Wa:null)||0),k=a.g.getBandwidthEstimate(),
|
|
455
|
+
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.zb.h.g>h?!0:!1):f=!1;f&&b.zb.abort();G(e)})}
|
|
456
|
+
p.kd=function(){if(this.g)for(var a=this.g.xd(),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.ia;e.G?e=!1:d==Rc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Uj(e,d),e=Ri(e,a));if(!e){c.aa&&(c.aa.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.va=null;(null!=Vj(this.g.ia,d)||c.ab)&&Sl(this,c);c.zb&&(c.zb.abort(),c.zb=null);d===Rc&&(d=this.g.ia,d.J&&d.J.g());c.kd=!0}}};
|
|
457
|
+
function Sl(a,b){b.qd||b.qc||(b.ab?(b.qc=!0,b.be=0):null==Tj(a.g.ia,b.type)?null==b.Jb&&Jl(a,b,0):(Bl(b),Ql(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
458
458
|
function Gl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(q){if(1==q.g){c=Tc;if(!a.j)throw new U(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.ba,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ua,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Ha,a.u),e.add(a.u));f=a.g.ia;return F(q,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Jg(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=Il(a,l),b.has(l.id)&&(n=
|
|
459
|
-
b.get(l.id),il(n,function(r,u,v){return Tl(r,u,v||null,a.h.retryParameters,a.g.Yb)}),m.aa=n),a.i.set(k,m),Jl(a,m,0));G(q)})}function Il(a,b){return{stream:b,type:b.type,va:null,aa:Dl(a,b),eb:null,Fc:null,ng:null,lg:null,kg:null,lc:null,endOfStream:!1,ab:!1,
|
|
459
|
+
b.get(l.id),il(n,function(r,u,v){return Tl(r,u,v||null,a.h.retryParameters,a.g.Yb)}),m.aa=n),a.i.set(k,m),Jl(a,m,0));G(q)})}function Il(a,b){return{stream:b,type:b.type,va:null,aa:Dl(a,b),eb:null,Fc:null,ng:null,lg:null,kg:null,lc:null,endOfStream:!1,ab:!1,Jb:null,qc:!1,be:0,hf:!1,qd:!1,kd:!0,zg:!1,Cd:!1,zb:null}}
|
|
460
460
|
function Dl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Rc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Rc&&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.aa)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new hl(a.h.segmentPrefetchLimit,b,function(d,e,f){return Tl(d,e,f||null,a.h.retryParameters,a.g.Yb)},0>a.g.Ra()):null}
|
|
461
|
-
function El(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={
|
|
462
|
-
(f.
|
|
463
|
-
function Ul(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Jg(a.m);if(b.ab||null==b.
|
|
464
|
-
ya(h),F(h,Wl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.
|
|
465
|
-
function Vl(a,b){if(Xl(b))return kk(a.g.ia,b.stream.originalId||""),null;b.type==Rc&&lk(a.g.ia);if(!a.g.ia.
|
|
461
|
+
function El(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={Bb:void 0},e=d.next())if(f.Bb=e.value,f.Bb.audio)if(a.o.has(f.Bb.audio)){if(e=a.o.get(f.Bb.audio),rl(e,b),!(0<b&&c.some(function(h){return function(k){return Vc(h.Bb.audio.language,k)}}(f)))){var g=a.i.get(f.Bb.audio.type);e!==(g&&g.aa)&&ql(e);a.o.delete(f.Bb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Vc(h.Bb.audio.language,k)}}(f))||!(e=Dl(a,f.Bb.audio))||
|
|
462
|
+
(f.Bb.audio.segmentIndex||f.Bb.audio.createSegmentIndex(),a.o.set(f.Bb.audio,e))}p.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.ia.qb(a):this.g.ia.qb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
463
|
+
function Ul(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Jg(a.m);if(b.ab||null==b.Jb||b.qd)return h.return();b.Jb=null;if(!b.qc){h.B(2);break}return F(h,Ql(a,b,b.hf,b.be),3);case 3:return h.return();case 2:Pl(a,b);if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return F(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ab||b.Jb||Jl(a,b,0),h.return();case 4:va(h,6);d=Vl(a,b);null!=d&&(Jl(a,b,d),b.Cd=!1);xa(h,7);break;case 6:return e=
|
|
464
|
+
ya(h),F(h,Wl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.H||!f.every(function(k){return k.endOfStream})){h.B(0);break}return F(h,a.g.ia.endOfStream(),10);case 10:Jg(a.m),g=a.g.ia.getDuration(),0!=g&&g<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.qb(g),G(h)}})}
|
|
465
|
+
function Vl(a,b){if(Xl(b))return kk(a.g.ia,b.stream.originalId||""),null;b.type==Rc&&lk(a.g.ia);if(!a.g.ia.na&&b.type!=Rc)return a.h.updateIntervalSeconds/2;var c=a.g.xd();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.Va(c,!0),jl(e,c);d=b.eb?b.eb.endTime:c;var f=Wj(a.g.ia,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.F),h=a.l.presentationTimeline.getDuration()-d;e=Vj(a.g.ia,b.type);if(1E-6>h&&e)return b.endOfStream=
|
|
466
466
|
!0,"video"==b.type&&(a=a.i.get(Rc))&&Xl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.va;e=Yl(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.ah&&(f=!0,b.ah=!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,Xl(k)||k.va&&!k.va.current()||(g=Math.min(g,k.eb?k.eb.endTime:c));if(d>=g+a.l.presentationTimeline.g)return a.h.updateIntervalSeconds;b.aa&&b.va&&!a.o.has(b.stream)&&(b.aa.Va(e.startTime),jl(b.aa,
|
|
467
467
|
e.startTime));Zl(a,b,c,e,f).catch(function(){});return null}
|
|
468
468
|
function Yl(a,b,c,d){if(b.va)return b.va.current();if(b.eb||d)return c=b.eb?b.eb.endTime:d,a=0>a.g.Ra(),b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.Ub(c,!1,a)),b.va&&b.va.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ra();var f=null;d&&(b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.Ub(e,!1,a)),f=b.va&&b.va.next().value);f||(b.stream.segmentIndex&&(b.va=b.stream.segmentIndex.Ub(c,!1,a)),f=b.va&&b.va.next().value);return f}
|
|
469
469
|
function Zl(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z;return O(function(B){switch(B.g){case 1:f=Tc;g=b.stream;h=b.va;b.ab=!0;va(B,2);if(2==d.yc())throw new U(1,1,1011);return F(B,$l(a,b,d,e),4);case 4:Jg(a.m);if(a.A)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if(a.h.lowLatencyMode&&l&&k&&("HLS"!=a.l.type||d.m))return q=new Uint8Array(0),u=r=!1,w=function(C){var I,E,J,K;return O(function(H){switch(H.g){case 1:if(r)return H.return();u=!0;Jg(a.m);
|
|
470
470
|
if(a.A)return H.return();va(H,2);q=am(q,C);I=!1;E=0;(new Pg).box("mdat",function(M){E=M.size+M.start;I=!0}).parse(q,!1,!0);if(!I){H.B(4);break}J=q.subarray(0,E);q=q.subarray(E);return F(H,bm(a,b,c,g,d,J,!0,e),5);case 5:b.aa&&b.va&&jl(b.aa,d.startTime,!0);case 4:xa(H,0);break;case 2:v=K=ya(H),G(H)}})},F(B,cm(a,b,d,w),9);m=cm(a,b,d);return F(B,m,7);case 7:n=B.h;Jg(a.m);if(a.A)return B.return();Jg(a.m);return b.qc?(b.ab=!1,Jl(a,b,0),B.return()):F(B,bm(a,b,c,g,d,n,!1,e),6);case 9:A=B.h;if(v)throw v;if(u){B.B(10);
|
|
471
|
-
break}r=!0;Jg(a.m);return a.A?B.return():b.qc?(b.ab=!1,Jl(a,b,0),B.return()):F(B,bm(a,b,c,g,d,A,!1,e),10);case 10:b.aa&&b.va&&jl(b.aa,d.startTime,!0);case 6:Jg(a.m);if(a.A)return B.return();b.eb=d;h.next();b.ab=!1;b.zg=!1;y=a.g.ia.
|
|
472
|
-
z.code)dm(a,b,z),
|
|
473
|
-
function am(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
474
|
-
function
|
|
471
|
+
break}r=!0;Jg(a.m);return a.A?B.return():b.qc?(b.ab=!1,Jl(a,b,0),B.return()):F(B,bm(a,b,c,g,d,A,!1,e),10);case 10:b.aa&&b.va&&jl(b.aa,d.startTime,!0);case 6:Jg(a.m);if(a.A)return B.return();b.eb=d;h.next();b.ab=!1;b.zg=!1;y=a.g.ia.Lb();D=y[b.type];cb(JSON.stringify(D));b.qc||a.g.vg(d,b.stream);Jl(a,b,0);xa(B,0);break;case 2:z=ya(B);Jg(a.m,z);if(a.A)return B.return();b.ab=!1;if(7001==z.code)b.ab=!1,Bl(b),Jl(a,b,0),B.B(0);else if(b.type==f.Ha&&a.h.ignoreTextStreamFailures)a.i.delete(f.Ha),B.B(0);else{if(3017==
|
|
472
|
+
z.code)return F(B,dm(a,b,z),0);b.Cd=!0;1==z.category&&b.aa&&pl(b.aa,d);z.severity=2;return F(B,Wl(a,b,z),0)}}})}function em(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.B(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Gb(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))})}
|
|
473
|
+
function am(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
474
|
+
function dm(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.zg}))return l.B(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.ee(b.stream,f))return l.return();h=Math.round(100*a.F);if(20<h)a.F-=.2;else if(4<h)a.F-=.04;else return b.Cd=!0,a.A=!0,a.g.onError(c),l.return();b.zg=!0;k=a.g.xd();return F(l,fm(a,b,k),2)}Jl(a,b,4);G(l)})}
|
|
475
|
+
function $l(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z;return O(function(B){switch(B.g){case 1:e=Tc;f=null==b.eb&&null==b.Fc;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.S)-.1);k=Math.min(c.appendWindowEnd,a.P)+.01;l=c.codecs||b.stream.codecs;m=Ee(l);n=Ge(c.mimeType||b.stream.mimeType);q=c.timestampOffset;if(q==b.ng&&h==b.lg&&k==b.kg&&m==b.mg&&n==b.Dh){B.B(2);break}r=b.mg&&b.Dh&&xk(a.g.ia,b.type,n,l);if(!r){B.B(3);break}u=null;b.type===e.ua?u=a.i.get(e.ba):b.type===e.ba&&(u=a.i.get(e.ua));
|
|
475
476
|
if(!u){B.B(3);break}return F(B,Cl(u).catch(function(){}),5);case 5:u.Fc=null,Sl(a,u);case 3:return v=function(){var C,I,E;return O(function(J){if(1==J.g)return C=new Map,a.j.audio&&C.set(e.ba,a.j.audio),a.j.video&&C.set(e.ua,a.j.video),va(J,2),b.lg=h,b.kg=k,b.mg=m,b.Dh=n,b.ng=q,I=a.l.sequenceMode||"HLS"==a.l.type,F(J,ok(a.g.ia,b.type,q,h,k,I,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,C),4);if(2!=J.g)return xa(J,0);E=ya(J);b.lg=null;b.kg=null;b.mg=null;b.ng=null;throw E;})},F(B,v(),2);
|
|
476
|
-
case 2:return Ki(c.
|
|
477
|
-
Ug).X("stsd",Wg).box("encv",Xg).box("avc1",Xg).box("avc3",Xg).box("hev1",Xg).box("hvc1",Xg).box("dvav",Xg).box("dva1",Xg).box("dvh1",Xg).box("dvhe",Xg).box("vexu",Ug).box("proj",Ug).X("prji",function(L){L=L.reader.Hc();J.projection=L}).box("hfov",function(L){L=L.reader.T()/1E3;J.hfov=L}).parse(C),
|
|
478
|
-
b.stream,H,b.kd,d),6);case 6:xa(N,0);break;case 2:throw M=ya(N),b.Fc=null,M;}})},y=c.startTime,f&&(D=Vj(a.g.ia,b.type),null!=D&&(y=D)),a.g.Pj(y,c.
|
|
479
|
-
function bm(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,q;return O(function(r){switch(r.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.
|
|
480
|
-
u.reader.T(),C=u.reader.hd()/y+e.timestampOffset,D=C-e.startTime,z=u.reader.T(),B=u.reader.T(),w=u.reader.Hc(),A=u.reader.Hc();u=u.reader.
|
|
481
|
-
w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=$i(u),w.length&&a.g.Ge([{cueTime:C,data:u,frames:w,dts:C,pts:C}],0,v)))});n&&l.X("prft",function(u){if(!a.
|
|
482
|
-
v);a.g.onEvent(v);a.
|
|
483
|
-
function
|
|
484
|
-
function
|
|
477
|
+
case 2:return Ki(c.ra,b.Fc)||(b.Fc=c.ra,c.l&&c.ra&&(w=cm(a,b,c.ra),A=function(){var C,I,E,J,K,H,M;return O(function(N){switch(N.g){case 1:return va(N,2),F(N,w,4);case 4:return C=N.h,Jg(a.m),I=null,E=new Map,J={projection:null,hfov:null},K=new Pg,K.box("moov",Ug).box("trak",Ug).box("mdia",Ug).X("mdhd",function(L){I=dj(L.reader,L.version).timescale}).box("hdlr",function(L){L=L.reader;L.skip(8);switch(L.Hc()){case "soun":E.set(e.ba,I);break;case "vide":E.set(e.ua,I)}I=null}).box("minf",Ug).box("stbl",
|
|
478
|
+
Ug).X("stsd",Wg).box("encv",Xg).box("avc1",Xg).box("avc3",Xg).box("hev1",Xg).box("hvc1",Xg).box("dvav",Xg).box("dva1",Xg).box("dvh1",Xg).box("dvhe",Xg).box("vexu",Ug).box("proj",Ug).X("prji",function(L){L=L.reader.Hc();J.projection=L}).box("hfov",function(L){L=L.reader.T()/1E3;J.hfov=L}).parse(C),gm(a,J),E.has(b.type)?c.ra.timescale=E.get(b.type):null!=I&&(c.ra.timescale=I),H=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,F(N,a.g.fh(b.type,C),5);case 5:return F(N,Yj(a.g.ia,b.type,C,null,
|
|
479
|
+
b.stream,H,b.kd,d),6);case 6:xa(N,0);break;case 2:throw M=ya(N),b.Fc=null,M;}})},y=c.startTime,f&&(D=Vj(a.g.ia,b.type),null!=D&&(y=D)),a.g.Pj(y,c.ra),g.push(A()))),a.l.sequenceMode&&(z=b.eb?b.eb.i:null,c.i!=z&&g.push(qk(a.g.ia,b.type,c.startTime))),F(B,Promise.all(g),0)}})}
|
|
480
|
+
function bm(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,q;return O(function(r){switch(r.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.J;if(m||n)l=new Pg;m&&l.X("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.Hc();var A=u.reader.Hc();var y=u.reader.T();var D=u.reader.T();var z=u.reader.T();var B=u.reader.T();var C=e.startTime+D/y}else y=
|
|
481
|
+
u.reader.T(),C=u.reader.hd()/y+e.timestampOffset,D=C-e.startTime,z=u.reader.T(),B=u.reader.T(),w=u.reader.Hc(),A=u.reader.Hc();u=u.reader.Hb(u.reader.getLength()-u.reader.Ja());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Qj():(v=C+z/y,y=(new Map).set("detail",{startTime:C,endTime:v,schemeIdUri:w,value:A,timescale:y,presentationTimeDelta:D,eventDuration:z,id:B,messageData:u}),y=new T("emsg",y),y.cancelable=!0,a.g.onEvent(y),y.defaultPrevented||"https://aomedia.org/emsg/ID3"!=
|
|
482
|
+
w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=$i(u),w.length&&a.g.Ge([{cueTime:C,data:u,frames:w,dts:C,pts:C}],0,v)))});n&&l.X("prft",function(u){if(!a.J&&e.ra.timescale){var v=u.reader,w=u.version;v.T();u=v.T();var A=v.T();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.T():(w=v.T(),v=v.T(),v=w*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.ra.timescale*1E3)});v=new T("prft",
|
|
483
|
+
v);a.g.onEvent(v);a.J=!0}});(m||n)&&l.parse(f);return F(r,fm(a,b,c),2);case 2:return Jg(a.m),q=b.kd,b.kd=!1,F(r,a.g.fh(b.type,f),3);case 3:return F(r,Yj(a.g.ia,b.type,f,e,d,k,q,h,g),4);case 4:Jg(a.m),G(r)}})}
|
|
484
|
+
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 Xk&&d.Va(a.l.presentationTimeline.Vb());e=Math.max(a.h.bufferBehind*a.F,a.l.presentationTimeline.g);f=Tj(a.g.ia,b.type);if(null==f)return a.G==b&&(a.G=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():F(k,a.g.ia.remove(b.type,f,f+h),2)}if(4!=k.g)return Jg(a.m),a.G?F(k,fm(a,a.G,c),4):k.B(0);Jg(a.m);G(k)})}
|
|
485
|
+
function Xl(a){return a&&a.type==Rc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
486
|
+
function cm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.zd())return l.return(e);f=null;if(b.aa){var m=b.aa,n=m.h;c instanceof Ji&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Qg=d),f=m.He):f=null}f||(f=Tl(c,b.stream,d||null,a.h.retryParameters,a.g.Yb));g=0;b.va&&(g=b.va.h);b.zb=f;return F(l,f.promise,2);case 2:h=l.h;b.zb=null;k=h.data;if(!c.aesKey){l.B(3);break}return F(l,em(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
485
487
|
function Tl(a,b,c,d,e){var f=a instanceof Li?a:void 0,g=f?1:0;a=yl(a.R(),a.Wa,a.Fa,d,c);a.contentType=b.type;return e.request(Gg,a,{type:g,stream:b,segment:f})}
|
|
486
|
-
function Ql(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.qc=!1,b.hf=!1,b.
|
|
487
|
-
function Jl(a,b,c){var d=b.type;if(d!=Rc||a.i.has(d))b.
|
|
488
|
-
function Wl(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,kg(a.
|
|
489
|
-
function hm(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.
|
|
490
|
-
function
|
|
488
|
+
function Ql(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.qc=!1,b.hf=!1,b.be=0,b.qd=!0,b.eb=null,b.va=null,b.aa&&!a.o.has(b.stream)&&ql(b.aa),d?(e=a.g.xd(),f=a.g.ia.getDuration(),F(g,a.g.ia.remove(b.type,e+d,f),3)):F(g,nk(a.g.ia,b.type),4);if(3!=g.g)return Jg(a.m),c?F(g,a.g.ia.flush(b.type),3):g.B(3);Jg(a.m);b.qd=!1;b.endOfStream=!1;b.ab||b.Jb||Jl(a,b,0);G(g)})}
|
|
489
|
+
function Jl(a,b,c){var d=b.type;if(d!=Rc||a.i.has(d))b.Jb=(new Tb(function(){var e;return O(function(f){if(1==f.g)return va(f,2),F(f,Ul(a,b),4);if(2!=f.g)return xa(f,0);e=ya(f);if(a.g)a.g.onError(e);G(f)})})).V(c)}function Bl(a){null!=a.Jb&&(a.Jb.stop(),a.Jb=null)}function Cl(a){return O(function(b){return a.zb?F(b,a.zb.abort(),0):b.B(0)})}
|
|
490
|
+
function Wl(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,kg(a.N),2);Jg(a.m);if(1===c.category&&1003!=c.code){if(b.lc)return Ll(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.ee(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);G(e)})}
|
|
491
|
+
function hm(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.O<c)return h.return(!1);a.O=b;d=Tc;if(e=a.i.get(d.ba))e.Fc=null,Sl(a,e),Cl(e).catch(function(){});if(f=a.i.get(d.ua))f.Fc=null,Sl(a,f),Cl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.ba,a.j.audio);a.j.video&&g.set(d.ua,a.j.video);return F(h,wk(a.g.ia,g),2)}return h.return(!0)})}
|
|
492
|
+
function gm(a,b){if(a.K.projection!=b.projection||a.K.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.K=b}};function im(){}
|
|
491
493
|
function jm(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]=Ue(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ue(n)),m=jm(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Ya("Invalid config, wrong type for "+m),
|
|
492
494
|
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&Za("Unexpected number of arguments for "+m),a[l]=b[l]):(Ya("Invalid config, unrecognized key "+m),k=!1)}return k}function km(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 lm(a,b){return a&&b}
|
|
493
495
|
function mm(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]=
|
|
@@ -497,30 +499,30 @@ nm.conaxFairPlayRequest=function(a,b){rm(a,b)};nm.ezdrmFairPlayRequest=function(
|
|
|
497
499
|
nm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Kb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return pm(a,d,b)};nm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zc(a).split(";").pop();return pm(a,c,b)};nm.verimatrixInitDataTransform=function(a,b,c){return qm(a,b,c)};nm.initDataTransform=pm;
|
|
498
500
|
nm.defaultGetContentId=om;nm.isFairPlaySupported=function(){var a;return O(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},va(b,2),F(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);ya(b);return b.return(!1)})};function sm(){}
|
|
499
501
|
function tm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:jg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,q){tc()&&"skd"==n&&(n=q.serverCertificate,q=om(m),m=pm(m,q,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Zb(),minHdcpVersion:"",ignoreDuplicateInitData:!cc()};
|
|
500
|
-
(Zb()||kc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1
|
|
501
|
-
ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
502
|
+
(Zb()||kc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!ud()||cc()||bc()||$b("Tizen 4")||$b("Tizen 5")||$b("Tizen 6")||fc()||dc()&&53===gc()||dc()&&68===gc()||kc()||lc()||!(!hc()||hc()&&pc()||hc()&&$b("Fuchsia"))||oc()&&Yb()||(c="smooth",d=!0);d={retryParameters:jg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,
|
|
503
|
+
dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
502
504
|
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:um,manifestPreprocessorTXml:vm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',
|
|
503
505
|
useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:bc()||cc()||fc()||kc()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:um,manifestPreprocessorTXml:vm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:jg(),failureCallback:function(m){return lm([m])},
|
|
504
506
|
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,
|
|
505
507
|
maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncTargetLatencyTolerance:.5,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:.95,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,
|
|
506
|
-
infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:kc()||lc()};if(
|
|
508
|
+
infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:kc()||lc()};if(dc()||ac()||hc()||mc())e.stallSkip=0;ac()&&(e.gapPadding=2);var f={trackSelectionCallback:function(m){return O(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return O(function(q){if(1==q.g)return navigator.storage&&navigator.storage.estimate?F(q,navigator.storage.estimate(),3):q.return(!0);n=q.h;return q.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return lm([m,
|
|
507
509
|
n])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,
|
|
508
510
|
restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:ic()?.5:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return lm([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return lm([m,n])}};var g=!1,h=!1,k=!0;qc()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new If},abr:a,autoShowText:3,preferredAudioLanguage:"",
|
|
509
511
|
preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,
|
|
510
512
|
maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=
|
|
511
513
|
function(m){return O(function(n){return n.return(wm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}function xm(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 jm(a,b,c||tm(),d,"")}
|
|
512
514
|
function wm(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=fd(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Wc(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-
|
|
513
|
-
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!=Rc&&"image"!=c.type||b.push(c);return b}function um(a){return lm([a],a)}function vm(a){return lm([a],a)}Q("shaka.util.PlayerConfiguration",sm);sm.mergeConfigObjects=xm;sm.createDefault=tm;function ym(a,b,c,d,e){fb.call(this);this.L=a;this.P=b;this.
|
|
514
|
-
function zm(a,b,c){(a=b?a.I:a.J)?a.push(c):c()}function Am(a){if(a.I)for(var b=t(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function Bm(a,b){a.N=b;a.O=!0;if(a.J){b=t(a.J);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.J=null}p=ym.prototype;p.getStartTime=function(){return this.S};p.Xc=function(){return this.L};p.Wf=function(){return this.h};function Cm(a){a.Y=!0;return a.i}function Dm(a){a.
|
|
515
|
-
function Fm(a){a.Z=!0;return a.l}function Gm(a){a.
|
|
516
|
-
p.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 va(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 Wf(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));
|
|
517
|
-
if(a.
|
|
515
|
+
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!=Rc&&"image"!=c.type||b.push(c);return b}function um(a){return lm([a],a)}function vm(a){return lm([a],a)}Q("shaka.util.PlayerConfiguration",sm);sm.mergeConfigObjects=xm;sm.createDefault=tm;function ym(a,b,c,d,e){fb.call(this);this.L=a;this.P=b;this.Ea=e.networkingEngine;this.S=d;this.o=null;this.vb=c;this.wa=0;this.Ya=e.Sc;this.F=e.Kj;this.jb=e.Lj;this.g=e.config;this.j=this.G=this.h=null;this.ha=!1;this.H=e.Uj;this.na=!1;this.l=null;this.Z=!1;this.i=this.A=null;this.Y=!1;this.K=new Map;this.qa=!1;this.Ia=e.Tj;this.W=new gl;this.ea=new lg;this.m=new lg;this.N=null;this.u=!1;this.Ma=e.Ei;this.ma=null;this.Ga=e.Di;this.O=!1;this.J=[];this.I=[]}pa(ym,fb);
|
|
516
|
+
function zm(a,b,c){(a=b?a.I:a.J)?a.push(c):c()}function Am(a){if(a.I)for(var b=t(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function Bm(a,b){a.N=b;a.O=!0;if(a.J){b=t(a.J);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.J=null}p=ym.prototype;p.getStartTime=function(){return this.S};p.Xc=function(){return this.L};p.Wf=function(){return this.h};function Cm(a){a.Y=!0;return a.i}function Dm(a){a.ha=!0;return a.j}function Em(a){a.na=!0;return a.H}p.getStats=function(){return this.W};
|
|
517
|
+
function Fm(a){a.Z=!0;return a.l}function Gm(a){a.qa=!0;return a.K}
|
|
518
|
+
p.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 va(c,3),F(c,Hm(a),5);case 5:return Im(a),a.ea.resolve(),F(c,Jm(a),6);case 6:Im(a);a.o||(a.o=new Wf(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));
|
|
519
|
+
if(a.Ga){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ma){d=a.h.presentationTimeline.U();var e=Df(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(!0))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();xa(c,0);break;case 3:b=ya(c),a.m.reject(b),G(c)}})})()};p.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):fb.prototype.dispatchEvent.call(this,a)};
|
|
518
520
|
p.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Im(a){if(a.u)throw new U(2,7,7003);}function Lm(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
|
|
519
|
-
function Hm(a){var b,c,d,e;return O(function(f){if(1==f.g)return Lm(a,"manifest-parser"),a.j||(a.G=Di(a.L,a.P),a.j=a.G(),a.j.configure(a.g.manifest)),b=Date.now()/1E3,Lm(a,"manifest"),a.h?f.B(2):F(f,a.j.start(a.L,a.
|
|
520
|
-
function Jm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Lm(a,"drm-engine");a.
|
|
521
|
+
function Hm(a){var b,c,d,e;return O(function(f){if(1==f.g)return Lm(a,"manifest-parser"),a.j||(a.G=Di(a.L,a.P),a.j=a.G(),a.j.configure(a.g.manifest)),b=Date.now()/1E3,Lm(a,"manifest"),a.h?f.B(2):F(f,a.j.start(a.L,a.jb),3);2!=f.g&&(a.h=f.h);c=new T("manifestparsed",void 0);a.dispatchEvent(c);if(0==a.h.variants.length)throw new U(2,4,4036);Mm(a.h);d=Date.now()/1E3;e=d-b;a.W.H=e;G(f)})}
|
|
522
|
+
function Jm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Lm(a,"drm-engine");a.wa=Date.now()/1E3;a.l=a.Ya();a.F.g=a.l;a.l.configure(a.g.drm);var h=a.F;b=af(a.h.variants,h.h.restrictions,h.i);if(!b){g.B(2);break}c=new T("trackschanged",void 0);return F(g,Promise.resolve(),3);case 3:Im(a),a.dispatchEvent(c);case 2:return d=Df(a.h.variants),F(g,Th(a.l,d,a.h.offlineSessionIds),4);case 4:return Im(a),F(g,xi(a.F,a.h),5);case 5:e=g.h;if(!e){g.B(0);break}f=new T("trackschanged",void 0);return F(g,
|
|
521
523
|
Promise.resolve(),7);case 7:a.dispatchEvent(f),G(g)}})}p.configure=function(a,b){a=km(a,b);xm(this.g,a)};p.getConfiguration=function(){return Ue(this.g)};
|
|
522
|
-
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 hl(d,b,function(l,m,n){return Tl(l,m,n||null,a.g.streaming.retryParameters,a.
|
|
523
|
-
p.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.
|
|
524
|
+
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 hl(d,b,function(l,m,n){return Tl(l,m,n||null,a.g.streaming.retryParameters,a.Ea)},!1),a.K.set(b.id,e),F(k,b.createSegmentIndex(),2);f=a.S||0;(h=(g=b.segmentIndex.Ub(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ra&&kl(e,h.ra):jl(e,h.startTime));G(k)})}p.Ck=function(){return this.m};
|
|
525
|
+
p.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.ha){e.B(2);break}return F(e,a.j.stop(),2);case 2:if(!a.i||a.Y){e.B(4);break}return F(e,a.i.stop(),4);case 4:a.H&&!a.na&&a.H.release();if(!a.l||a.Z){e.B(6);break}return F(e,a.l.destroy(),6);case 6:if(0<a.K.size&&!a.qa)for(b=t(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,ql(d);G(e)}})};
|
|
524
526
|
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))}Q("shaka.media.PreloadManager",ym);ym.prototype.destroy=ym.prototype.destroy;ym.prototype.waitForFinish=ym.prototype.Ck;function Nm(a,b){fb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Pc:null,Oc:Om,Bc:function(d,e){return Pm(c,"enter",d,e)}},{Pc:Qm,Oc:Om,Bc:function(d,e){return Pm(c,"enter",d,e)}},{Pc:Rm,Oc:Om,Bc:function(d,e){return Pm(c,"enter",d,e)}},{Pc:Om,Oc:Qm,Bc:function(d,e){return Pm(c,"exit",d,e)}},{Pc:Om,Oc:Rm,Bc:function(d,e){return Pm(c,"exit",d,e)}},{Pc:Qm,Oc:Rm,Bc:function(d,e){return Pm(c,"skip",d,e)}},{Pc:Rm,Oc:Qm,Bc:function(d,e){return Pm(c,"skip",d,e)}}];this.h=new nd;this.h.s(this.i,
|
|
525
527
|
"regionremove",function(d){c.g.delete(d.region)})}pa(Nm,fb);Nm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;fb.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.Pc==e&&h.Oc==f&&h.Bc(d,b)}}};
|
|
526
528
|
function Pm(a,b,c,d){b=new T(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 mb(a)).fb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Tm[d])return m.return(e);f=0;g=Ag([a],c);va(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];xa(m,3);break;case 2:k=ya(m);if(!k||1002!=k.code&&1001!=k.code){m.B(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?
|
|
@@ -556,111 +558,111 @@ break;case "right":g.push("align:right");break;case Ud:g.push("align:middle");br
|
|
|
556
558
|
function rn(a,b,c){try{if(!a.g.enabled)return b;var d=sn(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=tn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=un;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=vn;break a}e=void 0}d.ot=e;d.su=
|
|
557
559
|
!0;var f=wn(d);return xn(b,f)}catch(g){return $a("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function sn(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}}
|
|
558
560
|
function yn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,sn(a));c.pr=a.h.Ra();var e=c.ot===zn||c.ot===un;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=An(a,c);if(d)d=Bn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=wn(a);f&&(b.uris=b.uris.map(function(g){return xn(g,f)}))}}}function An(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}
|
|
559
|
-
function Cn(a){if(0===a.type)return Dn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?un:zn;if("audio"==b)return tn;if("text"==b)return"application/mp4"===a.mimeType?En:Fn}}function Gn(a,b){b=a.h.
|
|
560
|
-
function Hn(a,b){b=a.h.
|
|
561
|
+
function Cn(a){if(0===a.type)return Dn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?un:zn;if("audio"==b)return tn;if("text"==b)return"application/mp4"===a.mimeType?En:Fn}}function Gn(a,b){b=a.h.Lb()[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}
|
|
562
|
+
function Hn(a,b){b=a.h.Lb()[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 In(a,b){var c=a.h.Db();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 zn:return a.videoBandwidth||NaN;case tn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
561
563
|
function wn(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"===
|
|
562
564
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Bn(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=wn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
563
565
|
function xn(a,b){if(!b||a.includes("offline:"))return a;a=new mb(a);a.g.set("CMCD",b);return a.toString()}var vn="m",tn="a",zn="v",un="av",Dn="i",Fn="c",En="tt";Q("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",jl:"s",OTHER:"o"});function Jn(a){this.h=a;this.g=null}p=Jn.prototype;p.configure=function(a){this.h=a};p.vh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Kn)?1E3*this.g.get(Kn):null};p.uh=function(){return this.h.enabled&&this.g&&this.g.has(Ln)?1E3*this.g.get(Ln):null};p.ij=function(){return this.h.enabled&&this.g&&this.g.has(Mn)?this.g.get(Mn):null};p.jj=function(){return this.h.enabled&&this.g&&this.g.has(Nn)?this.g.get(Nn):null};
|
|
564
566
|
p.getBandwidthEstimate=function(a){var b=this.uh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function On(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}Q("shaka.util.CmsdManager",Jn);Jn.prototype.getBandwidthEstimate=Jn.prototype.getBandwidthEstimate;Jn.prototype.getRoundTripTime=Jn.prototype.jj;Jn.prototype.getResponseDelay=Jn.prototype.ij;Jn.prototype.getEstimatedThroughput=Jn.prototype.uh;
|
|
565
|
-
Jn.prototype.getMaxBitrate=Jn.prototype.vh;var Ln="etp",Kn="mb",Mn="rd",Nn="rtt";function Pn(){this.g=null;this.h=[]}function
|
|
566
|
-
this.lf=[];this.u=null;this.
|
|
567
|
+
Jn.prototype.getMaxBitrate=Jn.prototype.vh;var Ln="etp",Kn="mb",Mn="rd",Nn="rtt";function Pn(){this.g=null;this.h=[]}function Qn(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.B(2);a.g=b;G(c)})}Pn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){fb.call(this);var c=this;this.l=go;this.Oe=this.h=null;this.ea=!1;this.jf=new nd;this.Ec=new nd;this.m=new nd;this.Ea=new nd;this.Ac=new nd;this.H=this.G=this.F=this.I=null;this.kf=0;this.S=new Pn;this.ha=this.Xg=this.W=this.i=this.Ia=this.K=this.j=this.jb=this.L=this.Yg=this.Y=this.O=this.vb=this.N=this.Xe=this.J=this.Ya=null;this.Ma=!1;this.qa=this.o=null;this.nf=1E9;this.Qd=[];this.P=NaN;this.g=ho(this);this.Z={width:Infinity,height:Infinity};this.Ke=new wi(this.g,this.Z,null);
|
|
568
|
+
this.lf=[];this.u=null;this.wa=new Wf(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.Ga=this.g.preferredTextLanguage;this.Nd=this.g.preferredTextRole;this.Ld=this.g.preferForcedSubs;this.Jd=[];b&&b(this);this.O=io(this);this.Y=new Jn(this.g.cmsd);
|
|
567
569
|
this.I=jo(this);this.I.Jg(this.g.streaming.forceHTTP);this.I.Kg(this.g.streaming.forceHTTPS);this.qf=this.ma=this.A=null;this.pf=new Ub(function(){return O(function(d){if(1==d.g)return c.ma?F(d,c.rc(c.qf,!0),3):d.B(0);if(4!=d.g)return F(d,c.load(c.ma),4);c.qf.play();c.ma=null;G(d)})});ko&&(this.A=ko(),this.A.configure(this.g.ads),this.Ac.s(this.A,"ad-started",function(d){var e,f;return O(function(g){if(1==g.g){if(c.g.ads.supportsMultipleMediaElements)return g.return();e=d.originalEvent;if(!e)return g.return();
|
|
568
570
|
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return g.return();c.pf.stop();if(c.ma)return g.B(0);c.qf=c.h;return F(g,c.nh(!0),3)}c.ma=g.h;G(g)})}),this.Ac.s(this.A,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.pf.V(.1)}));this.jf.s(window,"online",function(){lo(c);c.Bg()});this.df=new Ub(function(){return mo(c)});this.na=null;a&&(wd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
|
|
569
|
-
this.rc(a,!0))}pa(X,fb);function no(a){null!=a.L&&(Hj(a.L),a.L.release(),a.L=null)}function oo(a,b){b.lcevc.enabled?(no(a),null==a.L&&(a.L=new Gj(a.h,a.Yg,b.lcevc),a.
|
|
570
|
-
p.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==qo)return g.return();no(a);b=a.detach();a.l=qo;return F(g,b,2);case 2:c=[];d=t(a.lf);for(e=d.next();!e.done;e=d.next())f=e.value,f.u||c.push(f.destroy());a.lf=[];return F(g,Promise.all(c),3);case 3:a.jf&&(a.jf.release(),a.jf=null);a.Ec&&(a.Ec.release(),a.Ec=null);a.m&&(a.m.release(),a.m=null);a.
|
|
571
|
+
this.rc(a,!0))}pa(X,fb);function no(a){null!=a.L&&(Hj(a.L),a.L.release(),a.L=null)}function oo(a,b){b.lcevc.enabled?(no(a),null==a.L&&(a.L=new Gj(a.h,a.Yg,b.lcevc),a.G&&(a.G.S=a.L))):no(a)}function po(a,b){return new T(a,b)}p=X.prototype;
|
|
572
|
+
p.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==qo)return g.return();no(a);b=a.detach();a.l=qo;return F(g,b,2);case 2:c=[];d=t(a.lf);for(e=d.next();!e.done;e=d.next())f=e.value,f.u||c.push(f.destroy());a.lf=[];return F(g,Promise.all(c),3);case 3:a.jf&&(a.jf.release(),a.jf=null);a.Ec&&(a.Ec.release(),a.Ec=null);a.m&&(a.m.release(),a.m=null);a.Ea&&(a.Ea.release(),a.Ea=null);a.Ac&&(a.Ac.release(),a.Ac=null);a.qa=null;a.g=null;a.u=null;a.Oe=null;a.O=null;a.Y=
|
|
571
573
|
null;if(!a.I){g.B(4);break}return F(g,a.I.destroy(),5);case 5:a.I=null;case 4:a.o&&(a.o.release(),a.o=null),fb.prototype.release.call(a),G(g)}})};
|
|
572
574
|
function ro(){window.Promise||Za("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||$b("Trident/"))return!1;var a=nc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Vb()?!0:Wb("application/x-mpegurl")}function so(a,b){a.dispatchEvent(po("onstatechange",(new Map).set("state",b)))}
|
|
573
|
-
p.rc=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==qo)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return F(g,c.detach(),2);case 2:return F(g,to(c,"attach"),4);case 4:if(g.h)return g.return();va(g,5,6);d||(so(c,"attach"),e=function(){var h=uo(c,!1);h&&vo(c,h)},c.Ec.s(a,"error",e),c.h=a);if(!b||!Vb()||c.
|
|
574
|
-
}})};p.bh=function(a){this.Yg=a};p.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==qo)throw new U(2,7,7E3);return F(c,b.Mc(!1,a),2)}if(3!=c.g)return F(c,to(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Ec.ob(),b.h=null),so(b,"detach"),b.A&&!a&&b.A.release()}finally{b.S.release()}G(c)})};function to(a,b){var c;return O(function(d){return 1==d.g?(c=++a.kf,F(d,
|
|
575
|
-
p.Mc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q;return O(function(r){switch(r.g){case 1:return c.l!=qo&&(c.l=go),F(r,to(c,"unload"),2);case 2:if(r.h)return r.return();wa(r,3);c.Ma=!1;so(c,"unload");a&&!Vb()&&(a=!1);no(c);d=c.
|
|
576
|
-
if(!c.K){r.B(6);break}return F(r,c.K.stop(),7);case 7:c.K=null,c.Ia=null;case 6:if(!c.o){r.B(8);break}return F(r,c.o.stop(),8);case 8:if(!c.j){r.B(10);break}return F(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.J&&(c.J.release(),c.J=null);c.
|
|
577
|
-
null);b||c.pf.stop();c.O&&qn(c.O);c.Y&&(c.Y.g=null);c.h&&dn(c.h);
|
|
578
|
-
|
|
579
|
-
p.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==qo)throw new U(2,7,7E3);e=null;f="";a instanceof ym?(e=a,f=e.Xc()||""):f=a||"";return F(A,
|
|
580
|
-
2),F(z,
|
|
581
|
-
A.h)?(Bm(e,d),d.u=e.getStats(),e.start(),e.m.catch(function(){})):d.u=new gl;case 11:m=!e
|
|
582
|
-
e.
|
|
583
|
-
function(){}),"function"!=typeof d.o.setCmsdManager&&(wd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(wd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=Gm(e),v=e.
|
|
584
|
-
k(function(){return O(function(y){return F(y,Do(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(po("loaded"));case 6:za(A);if(!e){A.B(
|
|
575
|
+
p.rc=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==qo)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return F(g,c.detach(),2);case 2:return F(g,to(c,"attach"),4);case 4:if(g.h)return g.return();va(g,5,6);d||(so(c,"attach"),e=function(){var h=uo(c,!1);h&&vo(c,h)},c.Ec.s(a,"error",e),c.h=a);if(!b||!Vb()||c.G){g.B(6);break}return F(g,wo(c),6);case 6:za(g);c.S.release();Aa(g,0);break;case 5:return f=ya(g),F(g,c.detach(),10);case 10:throw f;
|
|
576
|
+
}})};p.bh=function(a){this.Yg=a};p.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==qo)throw new U(2,7,7E3);return F(c,b.Mc(!1,a),2)}if(3!=c.g)return F(c,to(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Ec.ob(),b.h=null),so(b,"detach"),b.A&&!a&&b.A.release()}finally{b.S.release()}G(c)})};function to(a,b){var c;return O(function(d){return 1==d.g?(c=++a.kf,F(d,Qn(a.S,b),2)):c!=a.kf?(a.S.release(),d.return(!0)):d.return(!1)})}
|
|
577
|
+
p.Mc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q;return O(function(r){switch(r.g){case 1:return c.l!=qo&&(c.l=go),F(r,to(c,"unload"),2);case 2:if(r.h)return r.return();wa(r,3);c.Ma=!1;so(c,"unload");a&&!Vb()&&(a=!1);no(c);d=c.Jd.map(function(u){return u()});c.Jd=[];return F(r,Promise.all(d),5);case 5:c.dispatchEvent(po("unloading"));c.vb&&(c.vb.release(),c.vb=null);c.h&&(c.m.ob(),c.Ea.ob());c.df.stop();c.Ya&&(c.Ya.release(),c.Ya=null);c.Xe&&(c.Xe.stop(),c.Xe=null);
|
|
578
|
+
if(!c.K){r.B(6);break}return F(r,c.K.stop(),7);case 7:c.K=null,c.Ia=null;case 6:if(!c.o){r.B(8);break}return F(r,c.o.stop(),8);case 8:if(!c.j){r.B(10);break}return F(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.J&&(c.J.release(),c.J=null);c.H&&(c.H.release(),c.H=null);if(!tc("webkit")||!c.F){r.B(12);break}return F(r,c.F.destroy(),13);case 13:c.F=null;case 12:if(!c.G){r.B(14);break}return F(r,c.G.destroy(),15);case 15:c.G=null;case 14:if(c.A&&!b)c.A.onAssetUnload();c.ma&&!b&&(c.ma.destroy(),c.ma=
|
|
579
|
+
null);b||c.pf.stop();c.O&&qn(c.O);c.Y&&(c.Y.g=null);c.h&&dn(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.F){r.B(16);break}return F(r,c.F.destroy(),17);case 17:c.F=null;case 16:c.na&&c.W!=c.na.Xc()&&(c.na.u||c.na.destroy(),c.na=null);c.W=null;c.Xg=null;c.N=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=
|
|
580
|
+
m.next())q=n.value,q.segmentIndex&&q.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(of={},Sb.clear());c.i=null;c.u=new gl;c.mf=null;c.Qd=[];c.P=NaN;xo(c);case 3:za(r);c.S.release();Aa(r,4);break;case 4:if(a&&Vb()&&!c.G)return F(r,wo(c),0);r.B(0)}})};p.Bk=function(a){this.ha=a};
|
|
581
|
+
p.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==qo)throw new U(2,7,7E3);e=null;f="";a instanceof ym?(e=a,f=e.Xc()||""):f=a||"";return F(A,Qn(d.S,"load"),2);case 2:d.S.release();if(!d.h)throw new U(2,7,7002);if(!d.W){A.B(3);break}d.W=f;return F(A,d.Mc(!1),3);case 3:g=++d.kf;h=function(){return O(function(y){if(1==y.g)return d.kf==g?y.B(0):e?F(y,e.destroy(),3):y.B(3);throw new U(2,7,7E3);})};k=function(y,D){return O(function(z){switch(z.g){case 1:return wa(z,
|
|
582
|
+
2),F(z,Qn(d.S,D),4);case 4:return F(z,h(),5);case 5:return F(z,y(),6);case 6:return F(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:za(z),d.S.release(),Aa(z,0)}})};va(A,5,6);null==b&&e&&(b=e.getStartTime());d.ha=b;d.Ma=!1;d.dispatchEvent(po("loading"));if(e){c=e.P;A.B(8);break}if(c){A.B(8);break}return F(A,k(function(){return O(function(y){if(1==y.g)return F(y,yo(d,f),2);c=y.h;G(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Bm(e,d);d.u=e.getStats();A.B(11);break}return F(A,zo(d,f,b,c,!0),12);case 12:(e=
|
|
583
|
+
A.h)?(Bm(e,d),d.u=e.getStats(),e.start(),e.m.catch(function(){})):d.u=new gl;case 11:return m=!e,n=e?e.vb:Date.now()/1E3,d.u=e?e.getStats():new gl,d.W=f,d.Xg=c||null,m?F(A,k(function(){return O(function(y){return F(y,Ao(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):F(A,k(function(){return O(function(y){return F(y,Promise.race([e.ea,e.m]),0)})},"waitForFinish"),15);case 15:d.Ia=e.G;d.K=Dm(e);d.i=e.Wf();if(d.G){A.B(16);break}return F(A,k(function(){return O(function(y){return F(y,wo(d),0)})},"initializeMediaSourceEngineInner_"),
|
|
584
|
+
16);case 16:return F(A,k(function(){return O(function(y){return F(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Ke=e.F;d.vb=Em(e);d.jb=e.Ia;if(q=e.o)d.wa=q;l&&d.h&&"AUDIO"===d.h.nodeName&&(Bo(d),d.configure("manifest.disableVideo",!0));d.F=Fm(e);return F(A,k(function(){return O(function(y){return F(y,d.F.rc(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.A)||d.qa&&d.qa==r||(d.o=Cm(e),d.qa=e.A,"function"!=typeof d.o.setMediaElement&&(wd("AbrManager w/o setMediaElement",
|
|
585
|
+
"Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(wd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(wd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=Gm(e),v=e.ma,F(A,k(function(){return O(function(y){return F(y,
|
|
586
|
+
Co(d,n,v,u),0)})},"loadInner_"),20);case 20:Am(e);A.B(14);break;case 21:return F(A,k(function(){return O(function(y){return F(y,Do(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(po("loaded"));case 6:za(A);if(!e){A.B(23);break}return F(A,e.destroy(),23);case 23:d.na=null;Aa(A,0);break;case 5:w=ya(A);if(!w||7E3==w.code){A.B(25);break}return F(A,d.Mc(!1),25);case 25:throw w;}})};
|
|
585
587
|
function Bo(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})}p.xk=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,Eo(c),2):3!=e.g?(d=e.h,F(e,c.Mc(a,b),3)):e.return(d)})};
|
|
586
588
|
p.nh=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?F(d,Eo(b),2):3!=d.g?(c=d.h,F(d,b.detach(a),3)):d.return(c)})};
|
|
587
|
-
function Eo(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.K&&a.Ia&&a.W))return e.B(2);c=a.h.currentTime;a.U()&&(c=null);d=Date.now()/1E3;return F(e,Fo(a,a.W,c,a.Xg,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.K,h=a.Ia;f.h=a.i;f.j=g;f.G=h;f=b;g=a.
|
|
588
|
-
p.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,zo(d,a,b,c),2);(e=f.h)?e.start():vo(d,new U(2,7,7005));return f.return(e)})};function zo(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 f=Date.now()/1E3,d?l.B(2):F(l,yo(a,b),3);2!=l.g&&(d=l.h);if(g=Go(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.
|
|
589
|
+
function Eo(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.K&&a.Ia&&a.W))return e.B(2);c=a.h.currentTime;a.U()&&(c=null);d=Date.now()/1E3;return F(e,Fo(a,a.W,c,a.Xg,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.K,h=a.Ia;f.h=a.i;f.j=g;f.G=h;f=b;g=a.qa;f.i=a.o;f.A=g;b.o=a.wa;b.start();a.i=null;a.K=null;a.Ia=null;a.o=null;a.qa=null}return e.return(b)})}
|
|
590
|
+
p.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,zo(d,a,b,c),2);(e=f.h)?e.start():vo(d,new U(2,7,7005));return f.return(e)})};function zo(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 f=Date.now()/1E3,d?l.B(2):F(l,yo(a,b),3);2!=l.g&&(d=l.h);if(g=Go(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.qa==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(Fo(a,b,c,d||null,f,!e,h,k))})}
|
|
589
591
|
function Fo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,r,u,v,w,A,y,D,z,B,C;return O(function(I){if(1==I.g)return k=null,l=Ue(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.O&&k.u?null:k},n=function(){return m()?m().getConfiguration():a.g},q=function(E,J){m()?k.configure(E,J):a.configure(E,J)},Infinity!=a.Z.width||Infinity!=a.Z.height?I.B(2):F(I,uc(),3);2!=I.g&&(r=I.h,a.Z.width=r.width,a.Z.height=r.height);u=new wi(l,a.Z,null);v={networkingEngine:a.I,
|
|
590
592
|
filter:function(E){var J,K;return O(function(H){if(1==H.g)return F(H,xi(u,E),2);if(4!=H.g){J=H.h;if(!J)return H.B(0);K=po("trackschanged");return F(H,Promise.resolve(),4)}k.dispatchEvent(K);G(H)})},makeTextStreamsForClosedCaptions:function(E){return Ho(a,E)},onTimelineRegionAdded:function(E){var J=k.H;a:{var K=t(J.g);for(var H=K.next();!H.done;H=K.next())if(H=H.value,H.schemeIdUri==E.schemeIdUri&&H.id==E.id&&H.startTime==E.startTime&&H.endTime==E.endTime){K=H;break a}K=null}null==K&&(J.g.add(E),E=
|
|
591
593
|
new T("regionadd",new Map([["region",E]])),J.dispatchEvent(E))},onEvent:function(E){return k.dispatchEvent(E)},onError:function(E){return k.onError(E)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){q("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.O&&a.j.updateDuration()},newDrmInfo:function(E){var J=k.l,K=J?J.g:null;K&&J.u&&zi(u,K.keySystem,E)},onManifestUpdated:function(){var E=
|
|
592
|
-
(new Map).set("isLive",a.U());k.dispatchEvent(po("manifestupdated",E));zm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new tl(function(){return a.Ta()});w.addEventListener("regionadd",function(E){var J=E.region;Io(a,"timelineregionadded",J,k);zm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(J)})});A=null;l.streaming.observeQualityChanges&&(A=new ul(function(){return a.
|
|
594
|
+
(new Map).set("isLive",a.U());k.dispatchEvent(po("manifestupdated",E));zm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new tl(function(){return a.Ta()});w.addEventListener("regionadd",function(E){var J=E.region;Io(a,"timelineregionadded",J,k);zm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(J)})});A=null;l.streaming.observeQualityChanges&&(A=new ul(function(){return a.Lb()}),A.addEventListener("qualitychange",function(E){var J=
|
|
593
595
|
E.quality;E=E.position;J=(new Map).set("mediaQuality",{bandwidth:J.bandwidth,audioSamplingRate:J.audioSamplingRate,codecs:J.codecs,contentType:J.contentType,frameRate:J.frameRate,height:J.height,mimeType:J.mimeType,channelsCount:J.channelsCount,pixelAspectRatio:J.pixelAspectRatio,width:J.width}).set("position",E);a.dispatchEvent(po("mediaqualitychanged",J))}));y=!0;D={Yb:a.I,onError:function(E){return k.onError(E)},Fe:function(E){zm(k,!0,function(){a:{var J=E,K=po("keystatuschanged");a.dispatchEvent(K);
|
|
594
596
|
var H=Object.keys(J);1==H.length&&""==H[0]&&(H=["00"],J={"00":J[""]});K=1==H.length&&"00"==H[0];var M=!1;if(H.length){H=t(a.i.variants);for(var N=H.next();!N.done;N=H.next()){N=N.value;var L=[];N.audio&&L.push(N.audio);N.video&&L.push(N.video);L=t(L);for(var P=L.next();!P.done;P=L.next()){var S=P.value;P=N.allowedByKeySystem;if(S.keyIds.size){N.allowedByKeySystem=!0;S=t(S.keyIds);for(var R=S.next();!R.done;R=S.next())if(R=R.value,(R=J[K?"00":R])||a.F.H)N.allowedByKeySystem=N.allowedByKeySystem&&!!R&&
|
|
595
|
-
!Bi.includes(R)}P!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(Jo(a),!Ko(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&Lo(a)}})},onExpirationUpdated:function(E,J){var K=po("expirationupdated");k.dispatchEvent(K);if((K=k.j)&&K.onExpirationUpdated)K.onExpirationUpdated(E,J)},onEvent:function(E){k.dispatchEvent(E);"drmsessionupdate"==E.type&&y&&(y=!1,E=Date.now()/1E3-k.
|
|
597
|
+
!Bi.includes(R)}P!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(Jo(a),!Ko(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&Lo(a)}})},onExpirationUpdated:function(E,J){var K=po("expirationupdated");k.dispatchEvent(K);if((K=k.j)&&K.onExpirationUpdated)K.onExpirationUpdated(E,J)},onEvent:function(E){k.dispatchEvent(E);"drmsessionupdate"==E.type&&y&&(y=!1,E=Date.now()/1E3-k.wa,(a.u||k.getStats()).j=E,a.L&&Hj(a.L))}};z=jo(a,m);zg(a.I,z);B=function(){return a.Sc(D)};C={config:l,Lj:v,Uj:w,Tj:A,Sc:B,Kj:u,networkingEngine:z,
|
|
596
598
|
Ei:f,Di:h};k=new ym(b,d,e,c,C);a.lf.push(k);return I.return(k)})}function yo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,F(e,Sm(b,a.I,c),2);d=e.h;"application/x-mpegurl"==d&&ic()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
597
599
|
function Go(a,b){if(!Vb())return!0;if(b){if(""==(a.h||Xb()).canPlayType(b))return!1;if(!(Vb()&&b in Ei))return!0;if(Ie(b)){if(a.g.streaming.preferNativeHls)return!0;if(ic()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(ic())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
598
|
-
function wo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return so(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):wd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.mf=b,d=Mo(a.h,c,{Zi:function(){return a.keySystem()},Ge:function(h,k,l){No(a,h,k,l)}},a.L),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.
|
|
599
|
-
function Co(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J;return O(function(K){switch(K.g){case 1:so(a,"load");e=a.h;a.J=new Yk({le:function(){return e.playbackRate},xc:function(){return e.defaultPlaybackRate},Lg:function(H){e.playbackRate=H},Jh:function(H){e.currentTime+=H}});f=function(){return Oo(a)};g=function(){return Po(a)};a.m.s(e,"playing",f);a.m.s(e,"pause",f);a.m.s(e,"ended",f);a.m.s(e,"ratechange",g);oo(a,a.g);a.Ga=a.g.preferredTextLanguage;a.
|
|
600
|
+
function wo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return so(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):wd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.mf=b,d=Mo(a.h,c,{Zi:function(){return a.keySystem()},Ge:function(h,k,l){No(a,h,k,l)}},a.L),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ea=f,F(g,d.N,2);a.G=d;G(g)})}
|
|
601
|
+
function Co(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J;return O(function(K){switch(K.g){case 1:so(a,"load");e=a.h;a.J=new Yk({le:function(){return e.playbackRate},xc:function(){return e.defaultPlaybackRate},Lg:function(H){e.playbackRate=H},Jh:function(H){e.currentTime+=H}});f=function(){return Oo(a)};g=function(){return Po(a)};a.m.s(e,"playing",f);a.m.s(e,"pause",f);a.m.s(e,"ended",f);a.m.s(e,"ratechange",g);oo(a,a.g);a.Ga=a.g.preferredTextLanguage;a.Nd=a.g.preferredTextRole;a.Ld=a.g.preferForcedSubs;
|
|
600
602
|
Qo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(H,M,N){a.i&&a.j&&H!=a.j.j&&Ro(a,H,!0,void 0===M?!1:M,void 0===N?0:N)});a.o.setMediaElement(e);a.o.setCmsdManager(a.Y);a.j=So(a);a.j.configure(a.g.streaming);a.l=To;e.textTracks&&a.m.s(e.textTracks,"addtrack",function(H){if(H.track)switch(H=H.track,H.kind){case "chapters":Uo(a,H)}});a.dispatchEvent(po("streaming"));h=c;(k=a.j.j)||h||(h=Vo(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(q=n.next();!q.done;q=n.next())(r=
|
|
601
|
-
q.value)&&!r.segmentIndex&&l.push(r.createSegmentIndex());if(!(0<l.length)){K.B(2);break}return F(K,Promise.all(l),2);case 2:if(a.K&&a.K.onInitialVariantChosen)a.K.onInitialVariantChosen(m);Qo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Fl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(H){a.
|
|
602
|
-
break}v=a.i.presentationTimeline;w=a.ha||a.h.currentTime;A=v.Vb();y=v.
|
|
603
|
+
q.value)&&!r.segmentIndex&&l.push(r.createSegmentIndex());if(!(0<l.length)){K.B(2);break}return F(K,Promise.all(l),2);case 2:if(a.K&&a.K.onInitialVariantChosen)a.K.onInitialVariantChosen(m);Qo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Fl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(H){a.H=Wo(a,H);a.Ya=Xo(a,H);Yo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ha);if(k){K.B(4);break}if(!a.g.streaming.startAtSegmentBoundary){K.B(5);
|
|
604
|
+
break}v=a.i.presentationTimeline;w=a.ha||a.h.currentTime;A=v.Vb();y=v.Nb();w<A?w=A:w>y&&(w=y);return F(K,Zo(h,w),6);case 6:D=K.h,u(D);case 5:Ro(a,h,!0,!1,0);case 4:return a.H.ready(),z=a.hc().find(function(H){return H.active}),z||((B=Ef(a.i.textStreams,a.Ga,a.Nd,a.Ld)[0]||null)&&fl(a.u.h,B,!0),h&&(B?($o(a,h.audio,B)&&(a.ea=!0),a.ea&&a.G.H.setTextVisibility(!0),ap(a)):a.ea=!1),B&&(a.g.streaming.alwaysStreamText||a.Dc())&&Ol(a.j,B)),F(K,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),bp(a));Jo(a);
|
|
603
605
|
Ko(a);a.i.variants.some(function(H){return H.primary});if((C=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)I=function(){return cp(a)},a.m.s(e,"timeupdate",I);C||(E=function(){return dp(a)},a.m.s(e,"timeupdate",E),dp(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(J=function(){var H;return O(function(M){if(1==M.g){H=a.h.duration-a.h.currentTime;if(isNaN(H)||!(H<=a.g.streaming.preloadNextUrlWindow))return M.B(0);
|
|
604
|
-
a.m.Xa(e,"timeupdate",J);return F(M,a.preload(a.i.nextUrl),4)}a.na=M.h;G(M)})},a.m.s(e,"timeupdate",J)),a.m.s(e,"ended",function(){a.load(a.na||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(C);a.Ma=!0;a.m.
|
|
606
|
+
a.m.Xa(e,"timeupdate",J);return F(M,a.preload(a.i.nextUrl),4)}a.na=M.h;G(M)})},a.m.s(e,"timeupdate",J)),a.m.s(e,"ended",function(){a.load(a.na||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(C);a.Ma=!0;a.m.sa(e,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});G(K)}})}
|
|
605
607
|
function Ao(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Tc,d=Date.now()/1E3,e=!0,a.F=a.Sc({Yb:a.I,onError:function(k){vo(a,k)},Fe:function(){},onExpirationUpdated:function(){var k=po("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.u.j=Date.now()/1E3-d)}}),a.F.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
606
608
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Ge(b):"",codecs:b?He(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ua,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(ue(g.mimeType,
|
|
607
609
|
g.codecs)),b.startsWith("audio/")?(g.type=c.ba,f.audio=g):f.video=g,a.F.Y=!0,F(h,Th(a.F,[f],[]),2)):F(h,a.F.rc(a.h),0)})}
|
|
608
|
-
function Do(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;return O(function(v){if(1==v.g)return so(a,"src-equals"),d=a.h,a.
|
|
609
|
-
"ratechange",h),"none"!=d.preload&&a.m.
|
|
610
|
-
a.m.s(d.textTracks,"change",function(){return Jo(a)})),k=rn(a.O,a.W,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,(ac()||
|
|
611
|
-
a.m,function(){var w;return O(function(A){if(1==A.g)return gp(a),w=hp(a),w.find(function(y){return"disabled"!=y.mode})?(0<w.length&&(a.ea=!0),A.B(2)):F(A,new Promise(function(y){a.m.
|
|
612
|
-
l.resolve()),a.m.
|
|
610
|
+
function Do(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;return O(function(v){if(1==v.g)return so(a,"src-equals"),d=a.h,a.H=new Ok(d),e=!1,a.Jd.push(function(){e=!0}),null!=a.ha&&a.H.tf(a.ha),a.J=new Yk({le:function(){return d.playbackRate},xc:function(){return d.defaultPlaybackRate},Lg:function(w){d.playbackRate=w},Jh:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,Yo(a,d,f),g=function(){return Oo(a)},h=function(){return Po(a)},a.m.s(d,"playing",g),a.m.s(d,"pause",g),a.m.s(d,"ended",g),a.m.s(d,
|
|
611
|
+
"ratechange",h),"none"!=d.preload&&a.m.sa(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.s(d.audioTracks,"addtrack",function(){return Jo(a)}),a.m.s(d.audioTracks,"removetrack",function(){return Jo(a)}),a.m.s(d.audioTracks,"change",function(){return Jo(a)})),d.textTracks&&(a.m.s(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":ep(a,w);break;case "chapters":Uo(a,w);break;default:Jo(a)}}),a.m.s(d.textTracks,"removetrack",function(){return Jo(a)}),
|
|
612
|
+
a.m.s(d.textTracks,"change",function(){return Jo(a)})),k=rn(a.O,a.W,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,a.G&&window.ManagedMediaSource&&(d.disableRemotePlayback=!1),(ac()||dc())&&d.load(),"none"!=d.preload&&!d.autoplay&&Ie(c)&&nc()&&d.load(),a.l=fp,a.dispatchEvent(po("streaming")),l=new lg,Fk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.H.ready();
|
|
613
|
+
l.resolve()}),Fk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(A){if(1==A.g)return gp(a),w=hp(a),w.find(function(y){return"disabled"!=y.mode})?(0<w.length&&(a.ea=!0),A.B(2)):F(A,new Promise(function(y){a.m.sa(d.textTracks,"change",y);(new Ub(y)).V(1)}),2);if(e)return A.return();ip(a);G(A)})}),d.error?l.reject(uo(a)):"none"==d.preload&&(Za('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),
|
|
614
|
+
l.resolve()),a.m.sa(d,"error",function(){l.reject(uo(a))}),m=new Promise(function(w,A){(new Ub(A)).V(a.g.streaming.loadTimeout)}),F(v,Promise.race([l,m]),2);if((n=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return cp(a)},a.m.s(d,"timeupdate",q);n||(r=function(){return dp(a)},a.m.s(d,"timeupdate",r),dp(a));a.A&&(a.A.onManifestUpdated(n),n&&(u=a.Ta().end,a.m.s(d,"progress",function(){var w=a.Ta().end;u!=w&&(a.A.onManifestUpdated(a.U()),
|
|
613
615
|
u=w)})));a.Ma=!0;G(v)})}function gp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Re(b,a.g.preferredVariantRole)}function ip(a){var b=a.g.preferredTextLanguage;""!=b&&a.Eg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
614
|
-
function ep(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.s(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,jp(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Ub(function(){var d=kp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Pa().V(.5);a.
|
|
616
|
+
function ep(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.s(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,jp(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Ub(function(){var d=kp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Pa().V(.5);a.Jd.push(function(){c.stop()})}}
|
|
615
617
|
function No(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())jp(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function jp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(po("metadata",b))}
|
|
616
|
-
function Uo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ub(function(){b.mode="hidden"})).Pa().V(.5);a.
|
|
618
|
+
function Uo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ub(function(){b.mode="hidden"})).Pa().V(.5);a.Jd.push(function(){c.stop()})}}p.Yj=function(){for(var a=this.S;a.g;)a.release()};p.Sc=function(a){return new Mh(a)};
|
|
617
619
|
function jo(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?zm(b(),!0,e):e()}b||(b=function(){return null});return new vg(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(po("downloadheadersreceived",f));d(function(){if(a.Y){var h=a.Y;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],
|
|
618
620
|
On(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var q=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");q.set(u[0],On(u[1]))}var v=q}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(po("downloadfailed",e))},function(e,f,g){d(function(){var h=a.O,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)yn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
619
621
|
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}yn(h,f,{ot:vn,su:!h.i})}}catch(L){$a("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",L)}break;case Gg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=Cn(k);var q=n.ot===zn||n.ot===tn||n.ot===un||n.ot===En,r=k.stream;if(r){var u=h.h.Ra();if(q&&(n.bl=Gn(h,r.type),n.ot!==En)){var v=Hn(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);
|
|
620
622
|
if(r.segmentIndex&&m){var w=r.segmentIndex.Ub(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Rd(m.R(),A.R())){var y=A.R()[0],D=f.uris[0],z=new URL(y),B=new URL(D);if(z.origin!==B.origin)var C=y;else{for(var I=z.pathname.split("/").slice(1),E=B.pathname.split("/").slice(1,-1);I[0]===E[0];)I.shift(),E.shift();for(;E.length;)E.shift(),I.unshift("..");C=I.join("/")}n.nor=C}if((A.Wa||A.Fa)&&(m.Wa!=A.Wa||m.Fa!=A.Fa)){var J=A.Wa+"-";A.Fa&&(J+=A.Fa);n.nrr=J}}}var K=h.h.Ra()||1,H=Hn(h,r.type)||
|
|
621
623
|
500,M=r.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(H/K/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}q&&n.ot!==En&&(n.tb=In(h,n.ot)/1E3);yn(h,f,n)}}catch(L){$a("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",L)}break;case 2:case 5:case 6:yn(h,f,{ot:"k"});break;case 4:yn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.K)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.u)&&(f.sc=isNaN(f.sc)?e:f.sc+e)})}
|
|
622
624
|
function Wo(a,b){return new Pk(a.h,a.i,a.g.streaming,b,function(){a.Ya&&al(a.Ya,!0);a.j&&a.j.kd();a.N&&lp(a)},function(c){return a.dispatchEvent(c)})}
|
|
623
|
-
function Xo(a,b){b=new Nm(a.
|
|
625
|
+
function Xo(a,b){b=new Nm(a.vb,a.U()||0<b);b.addEventListener("enter",function(d){Io(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Io(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Io(a,"timelineregionenter",e),Io(a,"timelineregionexit",e))});var c=new $k(a.h);c.g.add(b);a.jb&&c.g.add(a.jb);return c}
|
|
624
626
|
function Yo(a,b,c){a.N=new eg;a.N.g=gg;hg(a.N,c,Math.min(.5,c/2));xo(a);a.Xe=(new Ub(function(){lp(a)})).Ba(.25);a.m.s(b,"waiting",function(){return lp(a)});a.m.s(b,"stalled",function(){return lp(a)});a.m.s(b,"canplaythrough",function(){return lp(a)});a.m.s(b,"progress",function(){return lp(a)})}
|
|
625
|
-
function lp(a){switch(a.l){case fp:if(a.h.ended)var b=!0;else{var c=Qi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case To:a:if(a.h.ended||Sj(a.
|
|
626
|
-
function io(a){return new pn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},
|
|
627
|
-
function So(a){return new zl(a.i,{
|
|
628
|
-
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(po("segmentappended",d));a.o&&c.fastSwitching&&b.
|
|
629
|
-
e),e+=f.length;bi(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},Ge:function(b,c,d){No(a,b,c,d)},
|
|
627
|
+
function lp(a){switch(a.l){case fp:if(a.h.ended)var b=!0;else{var c=Qi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case To:a:if(a.h.ended||Sj(a.G))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.fc();var d=Qi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Si(a.h.buffered,a.h.currentTime);c=a.N;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?fg:gg;c.g=d;(b=b!=d)&&d===fg&&(c.h=Date.now());b&&xo(a)}function Mo(a,b,c,d){return new Jj(a,b,c,d)}
|
|
628
|
+
function io(a){return new pn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},Lb:function(){return a.Lb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Ra:function(){return a.Ra()},ec:function(){return a.ec()},Db:function(){return a.Db()},U:function(){return a.U()}},a.g.cmcd)}
|
|
629
|
+
function So(a){return new zl(a.i,{xd:function(){return a.H?a.H.Vd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Ra:function(){return a.Ra()},ia:a.G,Yb:a.I,onError:function(b){return vo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Qj:function(){a.K&&a.K.update&&a.K.update()},vg:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(f!=Rc){if(a.H){a.H.Kh();var h=Tj(a.G,f);!a.U()&&a.h.paused&&null!=h&&0<h&&a.H.Vd()<h&&a.H.tf(h)}lp(a)}d=(new Map).set("start",
|
|
630
|
+
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(po("segmentappended",d));a.o&&c.fastSwitching&&b.Od&&b.we&&a.o.trySuggestStreams()},Pj:function(b,c){(c=c.qg)&&a.jb&&wl(a.jb,c,b)},fh:function(b,c){var d=a.F;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new $g(Gb(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,
|
|
631
|
+
e),e+=f.length;bi(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},Ge:function(b,c,d){No(a,b,c,d)},ee:function(b,c){return a.ee(b,c)}})}
|
|
630
632
|
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=km(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(wd("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(wd("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
631
633
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&wd("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){wd("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
|
|
632
634
|
a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==
|
|
633
635
|
a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&
|
|
634
636
|
(a.drm.retryParameters.baseDelay=100));var d=xm(this.g,a,ho(this));mp(this);return d};
|
|
635
|
-
function mp(a){a.Ke=new wi(a.g,a.Z,a.F);if(a.K){var b=Ue(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.F&&a.F.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=qo&&yi(a.Ke,a.i)&&Jo(a)}catch(f){vo(a,f)}a.o&&Ko(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Lo(a)}a.I&&(a.I.Jg(a.g.streaming.forceHTTP),a.I.Kg(a.g.streaming.forceHTTPS));if(a.
|
|
636
|
-
a.mf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):wd("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.
|
|
637
|
+
function mp(a){a.Ke=new wi(a.g,a.Z,a.F);if(a.K){var b=Ue(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.F&&a.F.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=qo&&yi(a.Ke,a.i)&&Jo(a)}catch(f){vo(a,f)}a.o&&Ko(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Lo(a)}a.I&&(a.I.Jg(a.g.streaming.forceHTTP),a.I.Kg(a.g.streaming.forceHTTPS));if(a.G)if(a.G.configure(a.g.mediaSource),a.G.ea=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
638
|
+
a.mf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):wd("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.G,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.mf=b;a.j&&(b=a.j,(c=b.i.get(Rc))&&Ml(b,c.stream,!0,0,!0))}else b=a.G.H,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(),bp(a));a.N&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
637
639
|
hg(a.N,b,Math.min(.5,b/2)));a.i&&Qo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.O&&a.O.configure(a.g.cmcd);a.Y&&a.Y.configure(a.g.cmsd)}p.getConfiguration=function(){var a=ho(this);xm(a,this.g,ho(this));return a};p.fj=function(){var a=ho(this);xm(a,this.g,ho(this));return mm(this.g,ho(this))};
|
|
638
640
|
p.rh=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.Ta().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};p.ck=function(){for(var a in this.g)delete this.g[a];xm(this.g,ho(this),ho(this));mp(this)};p.wd=function(){return this.l};p.Xf=function(){return this.i?this.i.type:null};p.ej=function(){return this.h};
|
|
639
|
-
p.ec=function(){return this.I};p.Xc=function(){return this.W};p.
|
|
640
|
-
p.Ta=function(){if(this.i){if(!this.Ma&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Vb(),end:a.
|
|
641
|
-
p.Uf=function(){return this.F?this.F.Uf():[]};p.
|
|
642
|
-
p.Lc=function(a){var b=this;0==a?Za("A trick play rate of 0 is unsupported!"):(this.
|
|
643
|
-
p.Qc=function(){var a=this.J.xc();this.l==fp&&this.J.set(a);this.l==To&&(this.J.set(a),this.o.playbackRateChanged(a),Ll(this.j,!1));this.
|
|
644
|
-
p.
|
|
645
|
-
p.hc=function(){if(this.i){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=vf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?hp(this).map(function(f){return zf(f)}):[]};p.
|
|
646
|
-
p.Li=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=To&&b.l!=fp)return g.return(null);c=b.
|
|
641
|
+
p.ec=function(){return this.I};p.Xc=function(){return this.W};p.ie=function(){return this.A?this.A:null};p.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};p.Cc=function(){return this.i?this.i.presentationTimeline.Cc():!1};p.bd=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};
|
|
642
|
+
p.Ta=function(){if(this.i){if(!this.Ma&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Vb(),end:a.Nb()}}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}};p.vj=function(){this.U()&&(this.h.currentTime=this.Ta().end)};p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.F?this.F.g:null};p.vd=function(){return this.F?this.F.vd():Infinity};
|
|
643
|
+
p.Uf=function(){return this.F?this.F.Uf():[]};p.ke=function(){return this.F?this.F.ke():{}};p.Ed=function(){return this.N?this.N.g==gg:!1};p.Ra=function(){return this.h?this.J?this.J.i:1:0};
|
|
644
|
+
p.Lc=function(a){var b=this;0==a?Za("A trick play rate of 0 is unsupported!"):(this.Ea.ob(),this.h.paused&&this.h.play(),this.J.set(a),this.l==To&&(this.o.playbackRateChanged(a),Ll(this.j,1<Math.abs(a))),this.U()&&this.Ea.s(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Ta(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Qc():Math.floor(c)<=Math.floor(d.start+e)&&b.Qc()}))};
|
|
645
|
+
p.Qc=function(){var a=this.J.xc();this.l==fp&&this.J.set(a);this.l==To&&(this.J.set(a),this.o.playbackRateChanged(a),Ll(this.j,!1));this.Ea.ob()};
|
|
646
|
+
p.Db=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,Cf(e)){var f=uf(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 Bf(g)}):[]};
|
|
647
|
+
p.hc=function(){if(this.i){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=vf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?hp(this).map(function(f){return zf(f)}):[]};p.je=function(){var a=this.Qd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return wf(b)})};
|
|
648
|
+
p.Li=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=To&&b.l!=fp)return g.return(null);c=b.Qd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):F(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.uc(function(h){var k=np(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.tc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.Zf(a,h.startTime+l*m/k))}}),F(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
647
649
|
function np(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{tc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
648
|
-
p.Zf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z;return O(function(B){if(1==B.g){if(c.l!=To&&c.l!=fp)return B.return(null);d=c.
|
|
650
|
+
p.Zf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z;return O(function(B){if(1==B.g){if(c.l!=To&&c.l!=fp)return B.return(null);d=c.Qd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(C){return C.id==a}))?e.segmentIndex?B.B(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=np(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.tc;n=l/h.rows;q=h.tc*h.rows;r=g.j-g.startTime;
|
|
649
651
|
u=g.A||r/q;v=g.startTime;A=w=0;1<q&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.tc*m,A=Math.floor(y/h.tc)*n);D=!1;if(z=g.u)D=!0,n=z.height,w=z.positionX,A=z.positionY,m=z.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.R(),width:m,sprite:D})})};
|
|
650
652
|
p.Fg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.u&&(fl(this.u.h,b,!1),Ol(this.j,b),op(this),this.Ga=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=hp(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,xf(c)==a.id?c.mode=this.ea?"showing":"hidden":c.mode="disabled";op(this)}};
|
|
651
|
-
p.Se=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&&Cf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Za("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Ro(this,d,!1,b,c);this.
|
|
652
|
-
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,xf(c)==a.id){pp(this,c);break}};p.Ni=function(){return qp(this.
|
|
653
|
-
p.Re=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.
|
|
654
|
-
b))c=f;c!=b&&(c?(a=uf(c),this.Se(a,!0,d)):Lo(this))}else this.h&&this.h.audioTracks&&(d=Ef(this.
|
|
655
|
-
p.jk=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.
|
|
656
|
-
p.Dc=function(){var a=this.ea;return this.
|
|
653
|
+
p.Se=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&&Cf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Za("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Ro(this,d,!1,b,c);this.wa=new Vf(d,
|
|
654
|
+
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,xf(c)==a.id){pp(this,c);break}};p.Ni=function(){return qp(this.Db())};p.mj=function(){return qp(this.hc())};p.Mi=function(){return Array.from(rp(this.Db()))};p.lj=function(){return Array.from(rp(this.hc()))};
|
|
655
|
+
p.Re=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.H){this.wa=new Wf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.wa.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
656
|
+
b))c=f;c!=b&&(c?(a=uf(c),this.Se(a,!0,d)):Lo(this))}else this.h&&this.h.audioTracks&&(d=Ef(this.Db(),a,b||"",!1)[0])&&this.Se(d)};p.Eg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.H){if(this.Ga=a,this.Nd=b||"",this.Ld=c,(a=Ef(this.i.textStreams,this.Ga,this.Nd,this.Ld)[0]||null)&&a!=this.j.u&&(fl(this.u.h,a,!1),this.g.streaming.alwaysStreamText||this.Dc()))Ol(this.j,a),op(this)}else(a=Ef(this.hc(),a,b||"",c)[0])&&this.Fg(a)};
|
|
657
|
+
p.jk=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.H){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.wa=new Wf(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&&pp(this,b)}};
|
|
658
|
+
p.Dc=function(){var a=this.ea;return this.G&&this.l==To?this.G.H.isTextVisible():this.h&&this.h.src&&this.h.textTracks?hp(this).some(function(b){return"showing"==b.mode}):a};p.sh=function(){return this.h&&this.h.src&&this.h.textTracks?sp(this).map(function(a){return zf(a)}):[]};
|
|
657
659
|
p.Pi=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Wc(a),c=sp(this).filter(function(h){return Wc(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};
|
|
658
660
|
function hp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function kp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function sp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
659
|
-
p.Ue=function(a){a=!!a;if(this.ea!=a){this.ea=a;if(this.l==To)this.
|
|
660
|
-
p.gj=function(){if(this.
|
|
661
|
-
p.me=function(){return this.U()?this.i?this.i.presentationTimeline.me():null:null};p.
|
|
661
|
+
p.Ue=function(a){a=!!a;if(this.ea!=a){this.ea=a;if(this.l==To)this.G.H.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=Ef(this.i.textStreams,this.Ga,this.Nd,this.Ld),0<a.length&&(Ol(this.j,a[0]),op(this))):Kl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=hp(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")}ap(this)}};
|
|
662
|
+
p.gj=function(){if(this.H)var a=this.H.Vd();else{if(null==this.ha)return new Date;a=this.ha}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.F||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};p.wh=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.F||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
663
|
+
p.me=function(){return this.U()?this.i?this.i.presentationTimeline.me():null:null};p.Lb=function(){if(this.l==To)return this.G.Lb();var a={total:[],audio:[],video:[],text:[]};this.l==fp&&(a.total=Ti(this.h.buffered));return a};
|
|
662
664
|
p.getStats=function(){if(this.l!=To&&this.l!=fp)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};Oo(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&
|
|
663
|
-
!this.U()){var c=this.u;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.
|
|
665
|
+
!this.U()){var c=this.u;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.H&&(this.u.N=this.H.Zg(),this.u.O=this.H.$g());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.u.J=Number(c.corruptedVideoFrames)}this.F?(c=this.F,c=c.K?c.K:NaN):c=NaN;this.u.u=c;if(this.l==To){c=this.j.j;b=this.j.u;if(c){d=this.J?this.J.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.u.F=e}c&&c.video&&(b=
|
|
664
666
|
this.u,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.wh().valueOf()+1E3*a.currentTime,this.u.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.I=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.u.A=c}this.l==fp&&(c=this.u,c.sc=isNaN(c.sc)?NaN:c.sc+NaN,c=this.u,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.u;a=f.o;c=f.l;b=f.F;d=f.K;e=f.L;var g=f.J,h=f.O,k=f.N,l=f.A,m=f.i,n=f.m,q=f.H,r=f.j,u=cl(f.g,"playing"),v=cl(f.g,"paused"),
|
|
665
667
|
w=cl(f.g,"buffering"),A=f.u,y=f.G,D=f.I,z=f.sc,B=dl(f.g),C=[];f=t(f.h.g);for(var I=f.next();!I.done;I=f.next())I=I.value,C.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,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:y,
|
|
666
668
|
maxSegmentDuration:D,bytesDownloaded:z,stateHistory:B,switchHistory:C}};
|
|
@@ -670,55 +672,56 @@ codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalL
|
|
|
670
672
|
p.Ai=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:if(c.l!=To&&c.l!=fp)throw new U(1,7,7004);if(b){z.B(2);break}return F(z,tp(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new U(1,2,2017,a);d=Tc;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new U(1,4,4045);return F(z,vp(c,a,c.I,c.g.streaming.retryParameters),4);case 4:f=z.h;g=Le[b];if(!g)throw new U(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
671
673
|
vttOffset:0};l=Gb(f);m=h.parseMedia(l,k,a);n=[];q=t(m);r=q.next();for(u={};!r.done;u={cf:void 0,Tc:void 0},r=q.next())u.Tc=r.value,u.cf=null,v=function(B){return function(){null==B.cf&&(B.cf=Lc([a],[B.Tc.payload]));return B.cf||[]}}(u),w=new Li(u.Tc.startTime,u.Tc.endTime,v,0,null,null,0,0,Infinity),u.Tc.payload.includes("#xywh")&&(A=u.Tc.payload.split("#xywh=")[1].split(","),4===A.length&&w.ai({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
672
674
|
n.push(w);y=b;if(!n.length){z.B(5);break}return F(z,Sm(n[0].R()[0],c.I,c.g.manifest.retryParameters),6);case 6:y=z.h;case 5:return D={id:c.nf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Uk(n),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.rf,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
|
|
673
|
-
closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ue(y||"","")])},c.l==fp?c.
|
|
674
|
-
p.xi=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=To&&d.l!=fp)throw new U(1,7,7004);if(c){k.B(2);break}return F(k,tp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),F(k,up(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.sh();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return F(k,new Promise(function(l,m){d.m.
|
|
675
|
+
closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ue(y||"","")])},c.l==fp?c.Qd.push(D):c.i.imageStreams.push(D),Jo(c),z.return(wf(D))}})};
|
|
676
|
+
p.xi=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=To&&d.l!=fp)throw new U(1,7,7004);if(c){k.B(2);break}return F(k,tp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),F(k,up(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.sh();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return F(k,new Promise(function(l,m){d.m.sa(f,"load",l);d.m.sa(f,"error",function(){m(new U(1,2,2015))})}),6);case 6:return Jo(d),k.return(h);case 5:throw new U(1,
|
|
675
677
|
2,2012);}})};function tp(a,b){var c;return O(function(d){switch(d.g){case 1:return va(d,2),F(d,Sm(b,a.I,a.g.streaming.retryParameters),4);case 4:c=d.h;xa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}
|
|
676
678
|
function up(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,vp(a,b,a.I,a.g.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=wp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Mj(l),e="text/vtt");m=document.createElement("track");var q=a.O,r=b;try{if(q.g.enabled){var u=sn(q);u.ot=Fn;u.su=!0;var v=wn(u);var w=xn(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")||
|
|
677
679
|
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function vp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=Gg;f=Ag([b],d);f.method="GET";var k=a.O;try{k.g.enabled&&yn(k,f,{ot:Fn,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)})}
|
|
678
|
-
function wp(a,b,c,d){var e=Le[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Gb(b),b=c.parseMedia(b,a,null),on(b,d);throw new U(2,2,2014,c);}p.rk=function(a,b){this.Z.width=a;this.Z.height=b};p.Bg=function(a){if(this.l==To){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.
|
|
680
|
+
function wp(a,b,c,d){var e=Le[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Gb(b),b=c.parseMedia(b,a,null),on(b,d);throw new U(2,2,2014,c);}p.rk=function(a,b){this.Z.width=a;this.Z.height=b};p.Bg=function(a){if(this.l==To){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.Cd||d.ab||d.Jb||(d.Cd=!1,Jl(b,d,a));b=!0}}else b=!1;return b};
|
|
679
681
|
p.Wf=function(){Za("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.cj=function(){return this.Ia};
|
|
680
682
|
function ho(a){var b=tm();b.streaming.failureCallback=function(c){if(a.U()){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.Bg(d))}};b.textDisplayFactory=function(){if(a.Oe){var c=a.getConfiguration();return new en(a.h,a.Oe,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Zm(a.h,"Shaka Player TextTrack"):new an};return b}p.Ng=function(a){this.Oe=a};
|
|
681
683
|
function Ho(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 Xk,l=e.closedCaptions.get(g);h={id:a.nf++,originalId:g,groupId:null,
|
|
682
684
|
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:Rc,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([ue(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
683
685
|
function Zo(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,q;return O(function(r){if(1==r.g)return k?F(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.Ub(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},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)})}
|
|
684
|
-
function xo(a){var b=a.
|
|
686
|
+
function xo(a){var b=a.Ed();if(a.u&&a.N&&a.H){var c=a.J;c.j=b;Zk(c);a.O&&(c=a.O,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Oo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(po("buffering",b))}function Po(a){var b=a.h.playbackRate;0!=b&&(a.J&&a.J.set(b),b=po("ratechange"),a.dispatchEvent(b))}
|
|
685
687
|
function Oo(a){if(a.u&&a.N){var b=a.u.g,c="playing";a.N.g==gg?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(po("statechanged",c)))}}
|
|
686
688
|
function cp(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.rh();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Lc(d):1==e&&b!==a.J.xc()&&a.Qc()}if(c&&(e=a.Ta(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
|
|
687
689
|
f=a.i.serviceDescription.targetLatency+a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.maxLatency&&(f=a.i.serviceDescription.maxLatency),g=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var h=a.g.streaming.liveSyncMinLatency;var k=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.g.streaming.liveSyncMinLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency-
|
|
688
690
|
a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==fp){var l=a.h.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.g.streaming.liveSyncPanicMode;l=1E3*a.g.streaming.liveSyncPanicThreshold;var m=Date.now()-a.N.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.Lc(k):f&&g&&c-
|
|
689
691
|
d>f?b!=g&&a.Lc(g):h&&k&&c-d<h?b!=k&&a.Lc(k):b!==a.J.xc()&&a.Qc()}}function dp(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.P)?(a.P=c,b=!0):(c=Math.max(a.P,c),a.P!=c&&(a.P=c,b=!0)));if(b){var d;0==a.P?d=po("started"):25==a.P?d=po("firstquartile"):50==a.P?d=po("midpoint"):75==a.P?d=po("thirdquartile"):100==a.P&&(d=po("complete"));d&&a.dispatchEvent(d)}}}
|
|
690
|
-
function Ko(a){try{Ai(a.Ke,a.i)}catch(c){return vo(a,c),!1}var b=Df(a.i.variants);b=a.
|
|
692
|
+
function Ko(a){try{Ai(a.Ke,a.i)}catch(c){return vo(a,c),!1}var b=Df(a.i.variants);b=a.wa.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Vo(a,b){b=void 0===b?!1:b;return Ko(a)?a.o.chooseVariant(b):null}
|
|
691
693
|
function mo(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,db("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.df.stop();d&&Lo(a,!1,void 0,!1,!1)}
|
|
692
|
-
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=Vo(a);f&&Ro(a,f,e,b,c,d)}
|
|
694
|
+
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=Vo(a);f&&Ro(a,f,e,b,c,d)}
|
|
695
|
+
function Ro(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Nl(a.j,b,d,e,!0);else{var h=a.u.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Nl(a.j,b,d,e,f,c);d=null;g&&(d=uf(g));b=uf(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&Ij(a.L,b,a.Xf()),c=po("adaptation",c),xp(a,c)):yp(a,d,b)}}
|
|
693
696
|
function pp(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=Bf(c),b=Bf(b),yp(a,c,b))}function $o(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Wc(a.g.preferredTextLanguage);c=Wc(c.language);if(2==a.g.autoShowText)return Vc(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Wc(b.language);return Vc(c,d)&&!Vc(a,c)}Za("Invalid autoShowText setting!");return!1}
|
|
694
697
|
function Jo(a){var b=po("trackschanged");xp(a,b)}function yp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Ij(a.L,c,a.Xf());c=po("variantchanged",b);xp(a,c)}function op(a){var b=po("textchanged");xp(a,b)}function ap(a){var b=po("texttrackvisibility");xp(a,b)}function bp(a){a.g.abr.enabled||lo(a);var b=(new Map).set("newStatus",a.g.abr.enabled);xp(a,po("abrstatuschanged",b))}
|
|
695
698
|
function lo(a,b){b=void 0===b?!0:b;if(a.l==To){a.df.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Ko(a)}}
|
|
696
|
-
p.
|
|
699
|
+
p.ee=function(a,b){if(!this.g.abr.enabled||this.l===qo||!navigator.onLine||0==b)return!1;if(this.i.variants.some(function(h){return(h=h[a.type])&&h.id!==a.id?"audio"==a.type?a.language===h.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.df.Ba(1);b=this.Lb().video.reduce(function(h,k){return h+k.end-
|
|
697
700
|
k.start},0);Lo(this,!1,b,!0,!1);return!0}return!1};function vo(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==qo)return f.return();c=!0;if(!(a.Ma&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.B(2);break}va(f,3);return F(f,hm(a.j),5);case 5:d=f.h;c=!d;xa(f,2);break;case 3:ya(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&lo(a,!1);e=po("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);G(f)}})}
|
|
698
701
|
function Io(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(po(b,a))}function uo(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new U(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 U(2,3,3016,c,b,a.h.error.message)}
|
|
699
702
|
function Qo(a,b,c){0<b&&(a.U()||a.ci(b));b=a.getDuration();c<b&&(a.U()||a.qb(c))}function xp(a,b){O(function(c){if(1==c.g)return F(c,Promise.resolve(),2);a.l!=qo&&a.dispatchEvent(b);G(c)})}function rp(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(Wc(c.language)):b.add("und");return b}
|
|
700
703
|
function qp(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=Wc(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));
|
|
701
704
|
h.push({language:l,role:m,label:n})}});return h}Q("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Ng;X.prototype.getManifestParserFactory=X.prototype.cj;X.prototype.getManifest=X.prototype.Wf;X.prototype.retryStreaming=X.prototype.Bg;X.prototype.setMaxHardwareResolution=X.prototype.rk;X.prototype.addChaptersTrack=X.prototype.xi;X.prototype.addThumbnailsTrack=X.prototype.Ai;X.prototype.addTextTrackAsync=X.prototype.zi;X.prototype.getStats=X.prototype.getStats;
|
|
702
|
-
X.prototype.getBufferedInfo=X.prototype.
|
|
703
|
-
X.prototype.selectAudioLanguage=X.prototype.Re;X.prototype.getTextLanguages=X.prototype.lj;X.prototype.getAudioLanguages=X.prototype.Mi;X.prototype.getTextLanguagesAndRoles=X.prototype.mj;X.prototype.getAudioLanguagesAndRoles=X.prototype.Ni;X.prototype.selectVariantTrack=X.prototype.Se;X.prototype.selectTextTrack=X.prototype.Fg;X.prototype.getThumbnails=X.prototype.Zf;X.prototype.getAllThumbnails=X.prototype.Li;X.prototype.getImageTracks=X.prototype.
|
|
704
|
-
X.prototype.getVariantTracks=X.prototype.
|
|
705
|
-
X.prototype.isAudioOnly=X.prototype.bd;X.prototype.isInProgress=X.prototype.Cc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.
|
|
705
|
+
X.prototype.getBufferedInfo=X.prototype.Lb;X.prototype.getSegmentAvailabilityDuration=X.prototype.me;X.prototype.getPresentationStartTimeAsDate=X.prototype.wh;X.prototype.getPlayheadTimeAsDate=X.prototype.gj;X.prototype.setTextTrackVisibility=X.prototype.Ue;X.prototype.getChapters=X.prototype.Pi;X.prototype.getChaptersTracks=X.prototype.sh;X.prototype.isTextTrackVisible=X.prototype.Dc;X.prototype.selectVariantsByLabel=X.prototype.jk;X.prototype.selectTextLanguage=X.prototype.Eg;
|
|
706
|
+
X.prototype.selectAudioLanguage=X.prototype.Re;X.prototype.getTextLanguages=X.prototype.lj;X.prototype.getAudioLanguages=X.prototype.Mi;X.prototype.getTextLanguagesAndRoles=X.prototype.mj;X.prototype.getAudioLanguagesAndRoles=X.prototype.Ni;X.prototype.selectVariantTrack=X.prototype.Se;X.prototype.selectTextTrack=X.prototype.Fg;X.prototype.getThumbnails=X.prototype.Zf;X.prototype.getAllThumbnails=X.prototype.Li;X.prototype.getImageTracks=X.prototype.je;X.prototype.getTextTracks=X.prototype.hc;
|
|
707
|
+
X.prototype.getVariantTracks=X.prototype.Db;X.prototype.cancelTrickPlay=X.prototype.Qc;X.prototype.trickPlay=X.prototype.Lc;X.prototype.getPlaybackRate=X.prototype.Ra;X.prototype.isBuffering=X.prototype.Ed;X.prototype.getKeyStatuses=X.prototype.ke;X.prototype.getActiveSessionsMetadata=X.prototype.Uf;X.prototype.getExpiration=X.prototype.vd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.vj;X.prototype.seekRange=X.prototype.Ta;
|
|
708
|
+
X.prototype.isAudioOnly=X.prototype.bd;X.prototype.isInProgress=X.prototype.Cc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.ie;X.prototype.getAssetUri=X.prototype.Xc;X.prototype.getNetworkingEngine=X.prototype.ec;X.prototype.getMediaElement=X.prototype.ej;X.prototype.getManifestType=X.prototype.Xf;X.prototype.getLoadMode=X.prototype.wd;X.prototype.resetConfiguration=X.prototype.ck;X.prototype.getBufferFullness=X.prototype.rh;X.prototype.getNonDefaultConfiguration=X.prototype.fj;
|
|
706
709
|
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.Yj;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.nh;X.prototype.unloadAndSavePreload=X.prototype.xk;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Bk;X.prototype.unload=X.prototype.Mc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.bh;X.prototype.attach=X.prototype.rc;
|
|
707
710
|
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.B(2);break}return F(k,ti(),3);case 3:b=k.h;case 2:var l={};if(Vb())for(var m in Ei)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]=Vb()?!!Ei[n]:Wb(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(ve));
|
|
708
711
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Ke(n)?!0:Vb()?sd(n)||(oe(n)?!0:!1):Wb(n);var q=n.split(";")[0];l[q]=l[q]||l[n]}d=l;return F(k,uc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=zp;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=ro;X.setAdManagerFactory=function(a){ko=a};X.registerSupportPlugin=function(a,b){zp[a]=b};X.prototype.destroy=X.prototype.destroy;var qo=0,go=1,To=2,fp=3;
|
|
709
|
-
X.LoadMode={DESTROYED:qo,NOT_LOADED:go,MEDIA_SOURCE:To,SRC_EQUALS:fp};X.version="v4.9.
|
|
712
|
+
X.LoadMode={DESTROYED:qo,NOT_LOADED:go,MEDIA_SOURCE:To,SRC_EQUALS:fp};X.version="v4.9.30";var Ap=["4","9"];xd=new function(a){this.g=a;this.i=yd;this.h=zd}(new vd(Number(Ap[0]),Number(Ap[1])));var zp={},ko=null;function Bp(){this.h=[];this.j=this.i=this.g=0};function Cp(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 nd;this.m.s(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.s(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Cp.prototype;p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};
|
|
710
713
|
p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
711
714
|
p.isMuted=function(){return 0==this.h.getVolume()};p.isLinear=function(){return this.g.isLinear()};p.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)};p.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
712
715
|
p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
713
716
|
p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};Q("shaka.ads.ClientSideAd",Cp);Cp.prototype.release=Cp.prototype.release;
|
|
714
717
|
Cp.prototype.getPodIndex=Cp.prototype.getPodIndex;Cp.prototype.getTimeOffset=Cp.prototype.getTimeOffset;Cp.prototype.getMediaUrl=Cp.prototype.getMediaUrl;Cp.prototype.getAdvertiserName=Cp.prototype.getAdvertiserName;Cp.prototype.getCreativeAdId=Cp.prototype.getCreativeAdId;Cp.prototype.getAdId=Cp.prototype.getAdId;Cp.prototype.getVastMediaWidth=Cp.prototype.getVastMediaWidth;Cp.prototype.getVastMediaHeight=Cp.prototype.getVastMediaHeight;Cp.prototype.getVastMediaBitrate=Cp.prototype.getVastMediaBitrate;
|
|
715
718
|
Cp.prototype.getDescription=Cp.prototype.getDescription;Cp.prototype.getTitle=Cp.prototype.getTitle;Cp.prototype.getPositionInSequence=Cp.prototype.getPositionInSequence;Cp.prototype.getSequenceLength=Cp.prototype.getSequenceLength;Cp.prototype.setMuted=Cp.prototype.setMuted;Cp.prototype.resize=Cp.prototype.resize;Cp.prototype.isLinear=Cp.prototype.isLinear;Cp.prototype.isMuted=Cp.prototype.isMuted;Cp.prototype.setVolume=Cp.prototype.setVolume;Cp.prototype.getVolume=Cp.prototype.getVolume;
|
|
716
|
-
Cp.prototype.play=Cp.prototype.play;Cp.prototype.pause=Cp.prototype.pause;Cp.prototype.skip=Cp.prototype.skip;Cp.prototype.canSkipNow=Cp.prototype.canSkipNow;Cp.prototype.getTimeUntilSkippable=Cp.prototype.getTimeUntilSkippable;Cp.prototype.isSkippable=Cp.prototype.isSkippable;Cp.prototype.isPaused=Cp.prototype.isPaused;Cp.prototype.getRemainingTime=Cp.prototype.getRemainingTime;Cp.prototype.getMinSuggestedDuration=Cp.prototype.getMinSuggestedDuration;Cp.prototype.getDuration=Cp.prototype.getDuration;function Dp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new nd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.
|
|
717
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Ep(f,g)});this.h.s(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Fp(f,g)});this.h.s(this.i,"ended",function(){f.l.contentComplete()});this.h.
|
|
719
|
+
Cp.prototype.play=Cp.prototype.play;Cp.prototype.pause=Cp.prototype.pause;Cp.prototype.skip=Cp.prototype.skip;Cp.prototype.canSkipNow=Cp.prototype.canSkipNow;Cp.prototype.getTimeUntilSkippable=Cp.prototype.getTimeUntilSkippable;Cp.prototype.isSkippable=Cp.prototype.isSkippable;Cp.prototype.isPaused=Cp.prototype.isPaused;Cp.prototype.getRemainingTime=Cp.prototype.getRemainingTime;Cp.prototype.getMinSuggestedDuration=Cp.prototype.getMinSuggestedDuration;Cp.prototype.getDuration=Cp.prototype.getDuration;function Dp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new nd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.30");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.s(this.l,
|
|
720
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Ep(f,g)});this.h.s(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Fp(f,g)});this.h.s(this.i,"ended",function(){f.l.contentComplete()});this.h.sa(this.i,"play",function(){f.H=!0})}Dp.prototype.configure=function(a){this.u=a};Dp.prototype.stop=function(){this.g&&this.g.stop();this.o&&dn(this.o)};
|
|
718
721
|
Dp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.G.destroy()};function Fp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new T("ad-error",b));Gp(a,null);a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
719
722
|
function Ep(a,b){a.m(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.s(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.s(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.F);a.m(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
720
723
|
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.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Hp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.s(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
721
|
-
a.i.offsetHeight,Ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.s(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.u.skipPlayDetection?a.g.start():a.h.
|
|
724
|
+
a.i.offsetHeight,Ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.s(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Ip(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.u.skipPlayDetection?a.g.start():a.h.sa(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){Gp(a,null)}}
|
|
722
725
|
function Ip(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
723
726
|
function Hp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new T(d,c))}a.h.s(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Fp(a,c)});a.h.s(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Jp(a,c)});a.h.s(a.g,google.ima.AdEvent.Type.STARTED,function(c){Jp(a,c)});a.h.s(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.s(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.s(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
724
727
|
function(c){b(c,"ad-third-quartile")});a.h.s(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.s(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Gp(a,c)});a.h.s(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Gp(a,c)});a.h.s(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.s(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.s(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
@@ -765,8 +768,8 @@ function cq(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
765
768
|
p.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);fb.prototype.release.call(this)};p.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new T("ad-stopped"));this.j=new Bp};p.requestClientSideAds=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.I=Date.now()/1E3;b.l.requestAds(a)};
|
|
766
769
|
p.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};p.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Qp(a,b,c,function(e){return eq(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new U(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new lg,Tp(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
767
770
|
p.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new U(1,10,10005);var b=this.h;b.I=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.g&&this.g.release();this.g=new bq(a,b,this.m,function(d){return eq(c,d)});this.g.configure(this.l)};
|
|
768
|
-
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Za('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.
|
|
769
|
-
(c.I=!0),c.j=new lg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Za('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.
|
|
771
|
+
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Za('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.30";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
772
|
+
(c.I=!0),c.j=new lg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Za('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.30";this.g.g.replaceAdTagParameters(a)};
|
|
770
773
|
p.getServerSideCuePoints=function(){wd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};p.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};p.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
771
774
|
p.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)};p.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
772
775
|
function eq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}Q("shaka.ads.AdManager",dq);dq.prototype.onCueMetadataChange=dq.prototype.onCueMetadataChange;dq.prototype.onHlsTimedMetadata=dq.prototype.onHlsTimedMetadata;dq.prototype.onDashTimedMetadata=dq.prototype.onDashTimedMetadata;dq.prototype.onManifestUpdated=dq.prototype.onManifestUpdated;
|
|
@@ -793,7 +796,7 @@ function Cq(a){Dq?window.__onGCastApiAvailable=Dq:delete window.__onGCastApiAvai
|
|
|
793
796
|
p.destroy=function(a){a&&this.g.Wc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;fb.prototype.release.call(this);return Promise.all(a)};p.ic=function(){return this.l};p.Yc=function(){return this.u};p.xf=function(){return this.g.m&&Aq};p.Oa=function(){return this.g.Oa()};p.Me=function(){return this.g.Me()};
|
|
794
797
|
p.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.Mc(),0):b.return()})};p.Gg=function(a){this.g.Gg(a)};p.ii=function(){Gq(this.g)};p.Wc=function(){this.g.Wc()};
|
|
795
798
|
p.ih=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.Wc();return F(d,c.g.destroy(),2)}c.g=null;c.g=new tq(a,function(){return Iq(c)},function(){return Jq(c)},function(e,f){return Kq(c,e,f)},function(){return Lq(c)},function(){return Mq(c)},b);c.g.init();G(d)})};
|
|
796
|
-
function Nq(a){a.g.init();a.m=new nd;for(var b=t(iq),c=b.next();!c.done;c=b.next())a.m.s(a.i,c.value,function(f){a.g.Oa()||(f=Ta(f),a.j.dispatchEvent(f))});for(var d in Ua)a.m.s(a.h,Ua[d],function(f){a.g.Oa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={
|
|
799
|
+
function Nq(a){a.g.init();a.m=new nd;for(var b=t(iq),c=b.next();!c.done;c=b.next())a.m.s(a.i,c.value,function(f){a.g.Oa()||(f=Ta(f),a.j.dispatchEvent(f))});for(var d in Ua)a.m.s(a.h,Ua[d],function(f){a.g.Oa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={Hd:b.Hd},b.Hd=e,Object.defineProperty(a.l,b.Hd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Oq(a,f.Hd)}}(b),set:function(f){return function(g){var h=f.Hd;a.g.Oa()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};Pq(a,
|
|
797
800
|
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Qq(a,f)}})});Rq(a);a.j=new fb;a.j.gf=a.l;a.o=new fb;a.o.gf=a.u}function Rq(a){var b=new Map;Pq(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)})}
|
|
798
801
|
function Pq(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)}}
|
|
799
802
|
function Mq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Xc(),startTime:null};a.i.pause();for(var c=t(kq),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(pq);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(qq);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 Iq(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}
|
|
@@ -801,7 +804,7 @@ function Jq(a){var b=new T(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
|
801
804
|
function Lq(a){for(var b=t(pq),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(kq);for(d=c.next();!d.done;d=c.next())d=
|
|
802
805
|
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(kq),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(qq);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.Ue(h);g&&a.h.Eg(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new T("error",l);a.h.dispatchEvent(l)})}
|
|
803
806
|
function Oq(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.Oa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Oa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
804
|
-
function Qq(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.ec()};if("getDrmEngine"==b)return function(){return a.h.F};if("getAdManager"==b)return function(){return a.h.
|
|
807
|
+
function Qq(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.ec()};if("getDrmEngine"==b)return function(){return a.h.F};if("getAdManager"==b)return function(){return a.h.ie()};
|
|
805
808
|
if("setVideoContainer"==b)return function(c){return a.h.Ng(c)};if(a.g.Oa()){if("getManifest"==b||"drmInfo"==b)return function(){Za(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Za(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Oa()&&0==Object.keys(a.g.g.video).length&&(mq[b]||nq[b])||!a.g.Oa()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
806
809
|
function Kq(a,b,c){a.g.Oa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}Q("shaka.cast.CastProxy",Hq);Hq.prototype.changeReceiverId=Hq.prototype.ih;Hq.prototype.forceDisconnect=Hq.prototype.Wc;Hq.prototype.suggestDisconnect=Hq.prototype.ii;Hq.prototype.setAppData=Hq.prototype.Gg;Hq.prototype.cast=Hq.prototype.cast;Hq.prototype.receiverName=Hq.prototype.Me;Hq.prototype.isCasting=Hq.prototype.Oa;Hq.prototype.canCast=Hq.prototype.xf;Hq.prototype.getPlayer=Hq.prototype.Yc;
|
|
807
810
|
Hq.prototype.getVideo=Hq.prototype.ic;Hq.prototype.destroy=Hq.prototype.destroy;function Sq(a,b,c,d){fb.call(this);var e=this;this.g=a;this.h=b;this.j=new nd;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.o=!0;this.m=0;this.F=!1;this.A=!0;this.u=this.l=null;this.I=new Ub(function(){Tq(e)});Uq(this)}pa(Sq,fb);p=Sq.prototype;p.isConnected=function(){return this.H};p.Aj=function(){return this.o};p.nk=function(a){this.i=a};p.Ii=function(){this.i=null};
|
|
@@ -818,7 +821,7 @@ function Yq(a,b){var c=gq(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.A=!0
|
|
|
818
821
|
"player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return gr(a,g,f,null)},function(h){return gr(a,g,f,h)})}}
|
|
819
822
|
function Xq(a,b){var c=gq(b.data);switch(c.type){case "PLAY":a.g.play();cr(a);break;case "PAUSE":a.g.pause();cr(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(),cr(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),cr(a));break;case "STOP":a.h.Mc().then(function(){a.h&&cr(a)});break;case "GET_STATUS":fr(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));
|
|
820
823
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||cr(a);break;case "LOAD":a.m=0;a.F=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&fr(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Wq(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:Wq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
821
|
-
function gr(a,b,c,d){a.h&&Wq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Wq(a,b,c,d){a.H&&(a=fq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function cr(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?hr:a.h.
|
|
824
|
+
function gr(a,b,c,d){a.h&&Wq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Wq(a,b,c,d){a.H&&(a=fq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function cr(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?hr:a.h.Ed()?ir:a.g.paused?jr:kr,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Wq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
822
825
|
Q("shaka.cast.CastReceiver",Sq);Sq.prototype.destroy=Sq.prototype.destroy;Sq.prototype.setContentArtist=Sq.prototype.kk;Sq.prototype.setContentImage=Sq.prototype.lk;Sq.prototype.setContentTitle=Sq.prototype.pk;Sq.prototype.clearContentMetadata=Sq.prototype.Ii;Sq.prototype.setContentMetadata=Sq.prototype.nk;Sq.prototype.isIdle=Sq.prototype.Aj;Sq.prototype.isConnected=Sq.prototype.isConnected;var er=.5,ar=5,hr="IDLE",kr="PLAYING",ir="BUFFERING",jr="PAUSED";function lr(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(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=mr(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,u=-1,v=0;v<q.length;v++)if(null!=q[v]&&""!==q[v].g.trim()){r=v;break}for(v=q.length-1;0<=v;v--)if(null!=q[v]&&""!==q[v].g.trim()){u=v;break}if(-1===
|
|
823
826
|
r||-1===u)q=nr(d,e),a.nestedCues.push(q);else{for(;r<=u;r++)if(v=q[r]){var w=v.l,A=v.i,y=v.j,D=v.h;if(w!=h||A!=k||y!=l||D!=m)n.payload&&a.nestedCues.push(n),n=mr(d,e,w,A,y,D),h=w,k=A,l=y,m=D;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=nr(d,e),a.nestedCues.push(n));n=mr(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
824
827
|
function mr(a,b,c,d,e,f){a=new Sd(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function nr(a,b){a=new Sd(a,b,"");a.lineBreak=!0;return a}function or(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function pr(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.u=b;this.j=this.m=!1;this.l="white";this.o="black";qr(this)}function rr(a,b,c){var d="CC"+((a.A<<1|a.u)+1),e=new Sd(b,c,"");e.lineInterpretation=1;var f=sr.get(a.g);f&&(e.line=f);(b=lr(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=sr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function qr(a){tr(a,0,15);a.g=1}
|
|
@@ -827,94 +830,94 @@ var vr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u0
|
|
|
827
830
|
[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"]]),yr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
|
|
828
831
|
[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"]]),sr=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 Ar(a,b){this.h=0;this.o=new pr(a,b);this.i=new pr(a,b);this.g=this.j=new pr(a,b);this.l=0;this.m=null}function Br(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=rr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,tr(c,0,15),c=a.j,c.g=0<c.h?c.h:0,tr(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Cr(a){a.h=1;a.g=a.j;a.g.h=0}function Dr(a){$a("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var Er="black green blue cyan red yellow magenta black".split(" "),Fr="white green blue cyan red yellow magenta white_italics".split(" ");function Gr(a,b){this.K=b;this.O=a;this.L=this.l=!1;this.m=this.o=this.I=this.N=this.J=0;this.H=2;this.i=[];this.g=this.h=this.j=0;this.G=this.A=!1;this.F="white";this.u="black";Hr(this)}function Hr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Ir())}function Ir(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Jr(a,b){Kr(a)&&(a.i[a.h][a.g]=new or(b,a.G,a.A,a.u,a.F),a.g++)}function Kr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}Gr.prototype.isVisible=function(){return this.l};
|
|
829
832
|
function Lr(a,b,c){var d=new Sd(a.j,b,"");d.textAlign=0===a.H?"left":1===a.H?"right":Ud;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.N;e.viewportAnchorUnits=a.L?Md:2;switch(a.I){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
|
|
830
|
-
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=lr(d,"svc"+c,a.i,a.j,b))a.j=b;return c};function Mr(){this.i=[];this.h=null;this.g=0}function Nr(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Or(a.h)),a.h=null,a.g=0))}function Or(a){this.g=0;this.h=a}Or.prototype.
|
|
833
|
+
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=lr(d,"svc"+c,a.i,a.j,b))a.j=b;return c};function Mr(){this.i=[];this.h=null;this.g=0}function Nr(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Or(a.h)),a.h=null,a.g=0))}function Or(a){this.g=0;this.h=a}Or.prototype.Da=function(){return this.g<this.h.length};Or.prototype.Ja=function(){return this.g};function Pr(a){if(!a.Da())throw new U(2,2,3E3);return a.h[a.g++]}Or.prototype.skip=function(a){if(this.g+a>this.h.length)throw new U(2,2,3E3);this.g+=a};function Qr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
831
834
|
function Rr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Pr(b).value;b=null;c=t(Sr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Lr(e,d,a.i)),Hr(e);return b}if(137===c)for(b=Pr(b).value,b=t(Sr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Pr(b).value;b=null;c=t(Sr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Lr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Pr(b).value;
|
|
832
835
|
b=null;c=t(Sr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Lr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Pr(b).value,Tr(a,b,d);if(143===c)return d=Tr(a,255,d),Ur(a),d;if(144===c)b.skip(1),d=Pr(b).value,a.g&&(a.g.A=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=Pr(b).value,c=Pr(b).value,b.skip(1),a.g&&(b=Vr((c&48)>>4,(c&12)>>2,c&3),a.g.F=Vr((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=Pr(b).value,b=Pr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
833
836
|
b.skip(1),d=Pr(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Gr(c,a.i);f.j=d;a.h[c]=f}d=Pr(b).value;f=Pr(b).value;var g=Pr(b).value,h=Pr(b).value,k=Pr(b).value;b=Pr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.A=!1,b.F="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.N=f&127;b.J=g;b.I=(h&240)>>4;b.L=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
834
837
|
function Sr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Tr(a,b,c){var d=null;b=t(Sr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Lr(f,c,a.i));a.h[e]=null}return d}function Ur(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Vr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Wr[a<<2|b<<1|c]}
|
|
835
838
|
var Xr=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Wr="black blue green cyan red magenta yellow white".split(" ");function Yr(){this.h=[];this.g=[];this.i=new Mr;this.l=0;this.m=new Map([["CC1",new Ar(0,0)],["CC2",new Ar(0,1)],["CC3",new Ar(1,0)],["CC4",new Ar(1,1)]]);this.u=this.o=0;this.j=new Map;this.F=!0;this.A=new Set;Zr(this)}Yr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Zr(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Ur(b.value)};
|
|
836
839
|
function Zr(a){a.o=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,qr(c.i),qr(c.j),qr(c.o);a.F=!0}
|
|
837
|
-
Yr.prototype.extract=function(a,b){if(this.F){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.F=!1}a=new Mg(a,0);if(!(8>a.getLength())&&181===a.$()&&49===a.
|
|
840
|
+
Yr.prototype.extract=function(a,b){if(this.F){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.F=!1}a=new Mg(a,0);if(!(8>a.getLength())&&181===a.$()&&49===a.za()&&1195456820===a.T()&&3===a.$()&&(c=a.$(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.$(),f=(e&4)>>2,g=a.$(),h=a.$();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,sb:g,Sb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
838
841
|
Yr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=$r(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Nr(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=as(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
839
842
|
function $r(a,b){var c=b.type;if(16===(b.sb&112)){var d=b.sb>>3&1;0===c?a.o=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.o))+1);c=a.m.get(d);if(255===b.sb&&255===b.Sb||!b.sb&&!b.Sb||!bs(b.sb)||!bs(b.Sb))return 45<=++a.l&&Zr(a),null;a.l=0;b.sb&=127;b.Sb&=127;var e=b.sb;if(1<=e&&15>=e||!b.sb&&!b.Sb)return null;e=null;if(16===(b.sb&112))a:{a.A.add(d),d=b.sb;a=b.Sb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
840
843
|
"white";e=!1;7>f?d=Fr[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,zr(f,c,1+f.g-f.h,f.h),tr(f,0,c-1),tr(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",ur(c.g,0,32),d=!1,b=Fr[(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=Er[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))ur(c.g,
|
|
841
844
|
1,a);else if(18===(d&246)&&32===(a&224))ur(c.g,d&1?3:2,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Sb){case 32:Cr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Br(c,2,a);break;case 38:d=Br(c,3,a);break;case 39:d=Br(c,4,a);break;case 40:ur(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:qr(c.o);Dr(c);break;case 43:Dr(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=rr(b,c.l,a));tr(b,0,15);break;case 45:b=c.g;3!==c.h?d=null:(d=rr(b,c.l,a),e=b.g-b.h+1,zr(b,e-1,e,
|
|
842
845
|
b.h),tr(b,0,e-1),tr(b,b.g,15-b.g),c.l=a);break;case 46:tr(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=rr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Cr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.Sb,ur(c.g,0,b.sb),ur(c.g,0,a);return e}
|
|
843
|
-
function as(a,b){var c=[];try{for(;b.
|
|
846
|
+
function as(a,b){var c=[];try{for(;b.Da();){var d=Pr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Pr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Qr(e));for(var g=a.j.get(e),h=b.Ja();b.Ja()-h<f;){e=g;var k=b,l=Pr(k),m=l.value,n=l.pts;if(16===m){var q=Pr(k);m=m<<16|q.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:!Kr(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=Lr(v,u,k.i));if(v.h+1>=v.o){k=
|
|
844
847
|
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]=Ir()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=Lr(v,u,k.i));v.i[v.h]=Ir();v.g=0;break;case 12:v.isVisible()&&(e=Lr(v,u,k.i)),Hr(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=Rr(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&&
|
|
845
848
|
(127===k?Jr(e.g,"\u266a"):Jr(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&Jr(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Xr.has(k)){var A=Xr.get(k);Jr(e.g,A)}else Jr(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?Jr(e.g,"_"):Jr(e.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(y){if(y instanceof U&&3E3===y.code)$a("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}
|
|
846
849
|
function bs(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Yr.prototype.getStreams=function(){return Array.from(this.A)};Q("shaka.cea.CeaDecoder",Yr);Kd=function(){return new Yr};function cs(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function ds(){this.j=new Map;this.i=this.h=0;this.g=es}
|
|
847
|
-
ds.prototype.init=function(a){function b(f){f=f.name;f in fs&&(c.g=fs[f])}var c=this,d=[],e=[];(new Pg).box("moov",Ug).box("mvex",Ug).X("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.T();g=g.T();c.h=f;c.i=g}).box("trak",Ug).X("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.T();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.
|
|
850
|
+
ds.prototype.init=function(a){function b(f){f=f.name;f in fs&&(c.g=fs[f])}var c=this,d=[],e=[];(new Pg).box("moov",Ug).box("mvex",Ug).X("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.T();g=g.T();c.h=f;c.i=g}).box("trak",Ug).X("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.T();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.za();g.za();g.za();g.za();d.push(h)}).box("mdia",Ug).X("mdhd",
|
|
848
851
|
function(f){f=dj(f.reader,f.version);e.push(f.timescale)}).box("minf",Ug).box("stbl",Ug).X("stsd",Wg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Xg).box("sinf",Ug).box("frma",function(f){f=gj(f.reader).codec;f in fs&&(c.g=fs[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new U(2,2,2010);this.g==es&&Za("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
849
|
-
ds.prototype.parse=function(a){var b=this;if(this.g==es)return[];var c=[],d=0,e=[];(new Pg).box("moof",function(f){d=f.start;e=[];Ug(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,td:b.h,
|
|
850
|
-
1];f=cj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Ja(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Za("Unable to find base media decode time for CEA captions!"),new U(2,2,2010);f.reader.seek(h);gs(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.td,l.
|
|
851
|
-
function gs(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Th});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Ki);b.
|
|
852
|
-
c+(n[l].Cg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}Q("shaka.cea.Mp4CeaParser",ds);var es=0,hs=1,is=2,fs={avc1:hs,avc3:hs,hev1:is,hvc1:is,dvav:hs,dva1:hs,dvh1:is,dvhe:is};
|
|
853
|
-
Q("shaka.cea.TsCeaParser",js);
|
|
852
|
+
ds.prototype.parse=function(a){var b=this;if(this.g==es)return[];var c=[],d=0,e=[];(new Pg).box("moof",function(f){d=f.start;e=[];Ug(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,td:b.h,ce:b.i,Mh:[],timescale:9E4});Ug(f)}).X("trun",function(f){var g=e[e.length-1];f=ej(f.reader,f.version,f.flags);g.Mh.push(f)}).X("tfhd",function(f){var g=e[e.length-1];f=bj(f.reader,f.flags);g.td=f.td||b.h;g.ce=f.ce||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).X("tfdt",function(f){var g=e[e.length-
|
|
853
|
+
1];f=cj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Ja(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Za("Unable to find base media decode time for CEA captions!"),new U(2,2,2010);f.reader.seek(h);gs(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.td,l.ce,g,l.Mh,c)}}).parse(a,!1);return c};
|
|
854
|
+
function gs(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Th});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Ki);b.Da();){g=b.T();var q=b.$(),r=null;r=!1;h=1;switch(a.g){case hs:r=q&31;r=6==r;break;case is:h=2;b.skip(1);r=q>>1&63;r=39==r||40==r;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].Pe||0),q=(c+q)/d,h=t(cs(b.Hb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
855
|
+
c+(n[l].Cg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}Q("shaka.cea.Mp4CeaParser",ds);var es=0,hs=1,is=2,fs={avc1:hs,avc3:hs,hev1:is,hvc1:is,dvav:hs,dva1:hs,dvh1:is,dvhe:is};Id["video/mp4"]=function(){return new ds};function js(){this.g=null}js.prototype.init=function(){};js.prototype.parse=function(a){this.g?this.g.clearData():this.g=new yj;var b=[];a=Gb(a);if(!Fj(a))return b;a=this.g.parse(a);var c=a.ud(),d=a.oe();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(cs(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
856
|
+
Q("shaka.cea.TsCeaParser",js);Id["video/mp2t"]=function(){return new js};function ks(a,b,c){var d=ls(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new U(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.jd});if(1<f.length)throw new U(2,4,4050);f.length&&(g=ms(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.jd}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.jd?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
854
857
|
l.jd});f.length&&(a=ns(e,k,f,c,h),0==a.length&&(a=[Mc("",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(Mc(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{lh:h,Il:e,drmInfos:a,uf:g,qh:!0}}
|
|
855
858
|
function os(a,b,c,d){var e=ks(a,c,d);if(b.qh){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.qh=!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 U(2,4,4008);return e.lh||b.lh}
|
|
856
859
|
function ps(a){var b=0,c=Lb(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=Gb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function qs(a){a=t(oh(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 mh(c)}return""}
|
|
857
860
|
function rs(a){var b=qh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=mh(b)))return b;a=qh(a.node,"urn:microsoft:playready","pro");if(!a||!mh(a))return"";a=mh(a);a=Hc(a);a=ps(a).filter(function(c){return c.type===ss})[0];if(!a)return"";a=xc(a.value,!0);return(a=ch(a,"WRMHEADER"))?qs(a):""}
|
|
858
861
|
function ns(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.jd];if(h){var k;if((k=qh(g.node,"urn:microsoft:playready","pro"))&&mh(k)){k=mh(k);k=Hc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:ah(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.jd){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
|
|
859
862
|
172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:ah(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Mc(h,b,g.init||a||k||l);if(h=ts.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function ls(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=us(c.value))&&b.push(c);return b}
|
|
860
|
-
function us(a){var b=a.attributes.schemeIdUri,c=vh(a,"urn:mpeg:cenc:2013","default_KID"),d=
|
|
863
|
+
function us(a){var b=a.attributes.schemeIdUri,c=vh(a,"urn:mpeg:cenc:2013","default_KID"),d=rh(a,"urn:mpeg:cenc:2013","pssh").map(nh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new U(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Hc(g),keyId:null}})}catch(g){throw new U(2,4,4007);}return{node:a,jd:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
861
864
|
function ms(a){if(!window.crypto||!window.crypto.subtle)throw Za("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var b=qh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new U(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new U(2,4,4051);b=qh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new U(2,4,4051);a=b.attributes.IV;b=Dc(b.attributes.keyUriTemplate);
|
|
862
865
|
if(!a||!b)throw new U(2,4,4051);a=Ic(a.substr(2));if(16!=a.byteLength)throw new U(2,4,4048);return{Hj:b,iv:a}}
|
|
863
866
|
var ss=1,ts=(new Map).set("com.widevine.alpha",function(a){var b=qh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=mh(b))?b:(a=qh(a.node,"urn:microsoft","laurl"))?Dc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",rs).set("com.microsoft.playready.recommendation",rs).set("com.microsoft.playready.software",rs).set("com.microsoft.playready.hardware",rs).set("org.w3.clearkey",function(a){var b=qh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=mh(b))?b:(a=qh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
864
867
|
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=mh(a))?a:""});function vs(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Za("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
865
868
|
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})}
|
|
866
|
-
function ws(a,b){var c=xs(a,b,"timescale"),d=1;c&&(d=Bh(c)||1);c=xs(a,b,"duration");(c=Bh(c||""))&&(c/=d);var e=xs(a,b,"startNumber"),f=Number(xs(a,b,"presentationTimeOffset"))||0,g=Ch(e||"");if(null==e||null==g)g=1;e=null;if(b=ys(a,b,"SegmentTimeline")){b=lh(b,"S");e=d;a=a.
|
|
867
|
-
q)break;else if(r>=q)break;v=Math.ceil((q-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(q=0;q<=v;++q)l=r+u,k.push({start:r/e,end:l/e,Wg:r,Qb:n,ik:k.length+h}),r=l}}e=k}return{timescale:d,bb:c,
|
|
869
|
+
function ws(a,b){var c=xs(a,b,"timescale"),d=1;c&&(d=Bh(c)||1);c=xs(a,b,"duration");(c=Bh(c||""))&&(c/=d);var e=xs(a,b,"startNumber"),f=Number(xs(a,b,"presentationTimeOffset"))||0,g=Ch(e||"");if(null==e||null==g)g=1;e=null;if(b=ys(a,b,"SegmentTimeline")){b=lh(b,"S");e=d;a=a.oa.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],q=b[m+1],r=uh(n,"t",Ch),u=uh(n,"d",Ch),v=uh(n,"r",Ah);n=uh(n,"k",Ah)||0;null!=r&&(r-=f);if(u){r=null!=r?r:l;v=v||0;if(0>v)if(q){q=uh(q,"t",Ch);if(null==
|
|
870
|
+
q)break;else if(r>=q)break;v=Math.ceil((q-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(q=0;q<=v;++q)l=r+u,k.push({start:r/e,end:l/e,Wg:r,Qb:n,ik:k.length+h}),r=l}}e=k}return{timescale:d,bb:c,Sd:g,$b:f/d||0,Vg:f,timeline:e}}function zs(a,b){return[b(a.M),b(a.xa),b(a.ya)].filter(Te)}function xs(a,b,c){b=zs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
868
871
|
function ys(a,b,c){b=zs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=ph(d.value,c));d=b.next());return a}
|
|
869
872
|
function As(a,b,c,d,e,f){for(var g=vh(a,"http://www.w3.org/1999/xlink","href"),h=vh(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=gh("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return ng(new U(2,4,4028));if("onLoad"!=h)return ng(new U(2,4,4027));var q=Lc([d],[g]);return e.request(0,Ag(q,b)).Qa(function(r){r=bh(r.data,a.tagName);if(!r)return ng(new U(2,4,4001,g));for(a.children=
|
|
870
873
|
[];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 Bs(a,b,c,q[0],e,f+1)})}
|
|
871
874
|
function Bs(a,b,c,d,e,f){f=void 0===f?0:f;if(vh(a,"http://www.w3.org/1999/xlink","href")){var g=As(a,b,c,d,e,f);c&&(g=g.Qa(void 0,function(){return Bs(a,b,c,d,e,f)}));return g}g=[];for(var h=t(kh(a)),k=h.next(),l={};!k.done;l={pd:void 0},k=h.next())l.pd=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==vh(l.pd,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.pd}}(l)):"SegmentTimeline"!=l.pd.tagName&&g.push(Bs(l.pd,b,c,d,e,f));return rg(g).Qa(function(){return a})}
|
|
872
875
|
;function Cs(a,b,c,d,e,f,g){var h,k=(new Pg).X("sidx",function(l){h=Ds(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new U(2,3,3004);}
|
|
873
|
-
function Ds(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.T();if(0==k)throw new U(2,3,3005);if(0==g.version){var l=g.reader.T();var m=g.reader.T()}else l=g.reader.hd(),m=g.reader.hd();g.reader.skip(2);var n=g.reader.
|
|
876
|
+
function Ds(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.T();if(0==k)throw new U(2,3,3005);if(0==g.version){var l=g.reader.T();var m=g.reader.T()}else l=g.reader.hd(),m=g.reader.hd();g.reader.skip(2);var n=g.reader.za();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.T(),r=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.T();g.reader.skip(4);if(1==r)throw new U(2,3,3006);h.push(new Li(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function Es(a){this.h=Lb(a);this.g=new Mg(this.h,0)}Es.prototype.Da=function(){return this.g.Da()};
|
|
874
877
|
function Fs(a){var b=Gs(a);if(7<b.length)throw new U(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=Gs(a);a:{d=t(Hs);for(var e=d.next();!e.done;e=d.next())if(Eb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Ja();else{if(8==b.length&&b[1]&224)throw new U(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.Ja()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Ja();d=Lb(a.h,a.g.Ja(),b);a.g.skip(b);return new Is(c,
|
|
875
878
|
d)}function Gs(a){var b=a.g.Ja(),c=a.g.$();if(0==c)throw new U(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Gb(a.h,b,c)}var Hs=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Is(a,b){this.id=a;this.g=b}
|
|
876
|
-
function Js(a){if(8<a.g.byteLength)throw new U(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new U(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ks(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Es(a.g);for(var n=null,q=null;a.
|
|
877
|
-
function Ls(a){var b=new Es(a.g);a=Fs(b);if(179!=a.id)throw new U(2,3,3013);a=Js(a);b=Fs(b);if(183!=b.id)throw new U(2,3,3012);b=new Es(b.g);for(var c=0;b.
|
|
879
|
+
function Js(a){if(8<a.g.byteLength)throw new U(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new U(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ks(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Es(a.g);for(var n=null,q=null;a.Da();){var r=Fs(a);if(187==r.id){var u=Ls(r);u&&(r=c*u.Ak,u=b+u.Xj,null!=n&&m.push(new Li(n+g,r+g,l,q,u-1,f,g,h,k)),n=r,q=u)}}null!=n&&m.push(new Li(n+g,d+g,l,q,null,f,g,h,k));return m}
|
|
880
|
+
function Ls(a){var b=new Es(a.g);a=Fs(b);if(179!=a.id)throw new U(2,3,3013);a=Js(a);b=Fs(b);if(183!=b.id)throw new U(2,3,3012);b=new Es(b.g);for(var c=0;b.Da();){var d=Fs(b);if(241==d.id){c=Js(d);break}}return{Ak:a,Xj:c}};function Ms(a,b,c){b=ys(a,b,"Initialization");if(!b)return null;var d=a.M.cb(),e=b.attributes.sourceURL;e&&(d=Lc(d,[Dc(e)]));e=0;var f=null;if(b=uh(b,"range",zh))e=b.start,f=b.end;c=new Ji(function(){return d},e,f,Ns(a),null,null,c);c.codecs=a.M.codecs;c.mimeType=a.M.mimeType;return c}
|
|
878
881
|
function Os(a,b,c){var d=Number(xs(a,Ps,"presentationTimeOffset"))||0,e=xs(a,Ps,"timescale"),f=1;e&&(f=Bh(e)||1);var g=d/f||0,h=Ms(a,Ps,c);Qs(a,h);var k=Ve(a);return{wc:function(){var l=ys(k,Ps,"RepresentationIndex");var m=k.M.cb();l&&(l=Dc(l.attributes.sourceURL))&&(m=Lc(m,[l]));l=Rs(k);return Ss(k,b,h,m,l.start,l.end,g)}}}
|
|
879
|
-
function Ss(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E;return O(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.
|
|
880
|
-
3,3009);H=M.g.byteOffset;M=new Es(M.g);for(var N=null;M.
|
|
881
|
-
C.next())E=I.value,E.codecs=a.M.codecs,E.mimeType=a.M.mimeType;h.
|
|
882
|
-
function Ns(a){var b=a.M;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.Ee,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Us(a,b,c){var d=Ms(a,Vs,c),e=Ws(a);if(!e.bb&&!e.timeline&&1<e.dd.length)throw new U(2,4,4002);if(!e.bb&&!a.
|
|
883
|
-
a.
|
|
882
|
+
function Ss(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E;return O(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.Kb||!a.oa.hg,l=a.oa.start,m=a.oa.duration,n=a.M.mimeType.split("/")[1],q=b,r=null,u=[q(d,e,f,!1),"webm"==n?q(c.R(),c.Wa,c.Fa,!0):null],q=null,F(J,Promise.all(u),2);v=J.h;w=v[0];A=v[1]||null;y=null;D=l-g;z=l;B=m?l+m:Infinity;if("mp4"==n)var K=Cs(w,e,d,c,D,z,B);else{K=w;var H=new Es(A);if(440786851!=Fs(H).id)throw new U(2,3,3008);var M=Fs(H);if(408125543!=M.id)throw new U(2,
|
|
883
|
+
3,3009);H=M.g.byteOffset;M=new Es(M.g);for(var N=null;M.Da();){var L=Fs(M);if(357149030==L.id){N=L;break}}if(!N)throw new U(2,3,3010);N=new Es(N.g);L=1E6;for(M=null;N.Da();){var P=Fs(N);if(2807729==P.id)L=Js(P);else if(17545==P.id)if(4==P.g.byteLength)M=P.g.getFloat32(0);else if(8==P.g.byteLength)M=P.g.getFloat64(0);else throw new U(2,3,3003);}if(null==M)throw new U(2,3,3011);N=L/1E9;M*=N;K=Fs(new Es(K));if(475249515!=K.id)throw new U(2,3,3007);K=Ks(K,H,N,M,d,c,D,z,B)}y=K;C=t(y);for(I=C.next();!I.done;I=
|
|
884
|
+
C.next())E=I.value,E.codecs=a.M.codecs,E.mimeType=a.M.mimeType;h.Md(y);r=new Uk(y);k&&r.Vc(z,B,!0);return J.return(r)})}function Ps(a){return a.ld}function Rs(a){var b=ys(a,Ps,"RepresentationIndex");a=xs(a,Ps,"indexRange");a=zh(a||"");b&&(a=uh(b,"range",zh,a));return a}function Qs(a,b){Ts(a,b);if(!Rs(a))throw new U(2,4,4002);}function Ts(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Rc&&"mp4"!=c&&"webm"!=c)throw new U(2,4,4006);if("webm"==c&&!b)throw new U(2,4,4005);}
|
|
885
|
+
function Ns(a){var b=a.M;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.Ee,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Us(a,b,c){var d=Ms(a,Vs,c),e=Ws(a);if(!e.bb&&!e.timeline&&1<e.dd.length)throw new U(2,4,4002);if(!e.bb&&!a.oa.duration&&!e.timeline&&1==e.dd.length)throw new U(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new U(2,4,4002);var f=null,g=null;a.ya.id&&a.M.id&&(g=b[a.ya.id+","+a.M.id])&&(f=g.segmentIndex);var h=Xs(a.oa.start,a.oa.duration,a.M.cb,e,d,c,a.M.mimeType,a.M.codecs);b=!f;f?f.Kd(h,a.presentationTimeline.Cb()):f=new Uk(h);a.presentationTimeline.Md(h);a.Kb&&a.oa.hg||f.Vc(a.oa.start,
|
|
886
|
+
a.oa.duration?a.oa.start+a.oa.duration:Infinity,b);g&&(g.segmentIndex=f);return{wc:function(){f&&0!=f.getNumReferences()||f.Ae(h);return Promise.resolve(f)}}}function Vs(a){return a.ac}function Ws(a){var b=Ys(a);a=ws(a,Vs);var c=a.Sd;0==c&&(c=1);var d=0;a.bb?d=a.bb*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{bb:a.bb,startTime:d,Sd:c,$b:a.$b,timeline:a.timeline,dd:b}}
|
|
884
887
|
function Xs(a,b,c,d,e,f,g,h){var k=d.dd.length;d.timeline&&d.timeline.length!=d.dd.length&&(k=Math.min(d.timeline.length,d.dd.length));for(var l=a-d.$b,m=b?a+b:Infinity,n=[],q=d.startTime,r={},u=0;u<k;r={Ze:void 0,Qe:void 0},u++){r.Qe=d.dd[u];var v=q;q=void 0;q=null!=d.bb?v+d.bb:d.timeline?d.timeline[u].end:v+b;r.Ze=null;r=new Li(a+v,a+q,function(w){return function(){null==w.Ze&&(w.Ze=Lc(c(),[w.Qe.Oj]));return w.Ze}}(r),r.Qe.start,r.Qe.end,e,l,a,m,[],"",null,null,Mi,f);r.codecs=h;r.mimeType=g;n.push(r)}return n}
|
|
885
|
-
function Ys(a){return[a.M.ac,a.
|
|
886
|
-
(q=d.segmentIndex);var r=a.
|
|
887
|
-
function bt(a){var b=ws(a,$s),c=xs(a,$s,"media"),d=xs(a,$s,"index");return{bb:b.bb,timescale:b.timescale,
|
|
888
|
-
function dt(a,b,c,d,e,f,g){function h(H){var M=(H-v)*u,N=M+b.$b,L=M+n;M=L+u;var P=Math.min(M,l());L=new Li(L,P,function(){var S=N*w;"BigInt"in window&&S>Number.MAX_SAFE_INTEGER&&(S=BigInt(N)*BigInt(w));S=vs(A,D,H,null,y,S);return Lc(z(),[S])},0,null,d,B,n,l(),[],"",null,null,Mi,f);L.codecs=a.M.codecs;L.mimeType=a.M.mimeType;L.j=M;return L}function k(){var H=[Math.max(m.
|
|
889
|
-
v})}function l(){var H=null!=q&&e[q]||r;return H?n+H:Infinity}var m=a.presentationTimeline,n=a.
|
|
888
|
+
function Ys(a){return[a.M.ac,a.xa.ac,a.ya.ac].filter(Te).map(function(b){return lh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.eg&&(a.eg=!0);var c=Dc(b.attributes.media);b=uh(b,"mediaRange",zh,{start:0,end:null});return{Oj:c,start:b.start,end:b.end}})};function Zs(a,b,c,d,e,f,g,h,k){k||a.M.re||(a.M.re=xs(a,$s,"initialization"));var l=a.M.re?at(a,g):null,m=bt(a);ct(m);var n=Ve(a);if(m.Dd)return Ts(a,l),{wc:function(){var w=vs(m.Dd,n.M.id,null,null,n.bandwidth||null,null);w=Lc(n.M.cb(),[w]);return Ss(n,b,l,w,0,null,m.$b)}};if(m.bb)return d||"image"===a.xa.contentType||(a.presentationTimeline.rg(m.bb),a.presentationTimeline.De(a.oa.start)),{wc:function(){return dt(n,m,e,l,f,g,h)}};var q=null;d=d=null;a.ya.id&&a.M.id&&(d=a.ya.id+","+a.M.id,d=c[d])&&
|
|
889
|
+
(q=d.segmentIndex);var r=a.oa.start,u=a.oa.duration?r+a.oa.duration:Infinity,v=!(a.Kb&&a.oa.hg);q?(c=q,et(c,m,r,u,v,l),c.Va(a.presentationTimeline.Cb())):q=new ft(m,a.M.id,a.bandwidth,a.M.cb,r,u,l,v,g,a.M.Dg);m.timeline&&"image"!==a.xa.contentType&&a.presentationTimeline.Lh(m.timeline,r);d&&a.Kb&&(d.segmentIndex=q);return{wc:function(){q instanceof ft&&0==q.getNumReferences()&&et(q,m,r,u,v,l);return Promise.resolve(q)}}}function $s(a){return a.mc}
|
|
890
|
+
function bt(a){var b=ws(a,$s),c=xs(a,$s,"media"),d=xs(a,$s,"index");return{bb:b.bb,timescale:b.timescale,Sd:b.Sd,$b:b.$b,Vg:b.Vg,timeline:b.timeline,kc:c&&Dc(c),Dd:d,mimeType:a.M.mimeType,codecs:a.M.codecs}}function ct(a){var b=a.Dd?1:0;b+=a.timeline?1:0;b+=a.bb?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.Dd&&(a.timeline=null),a.bb=null);if(!a.Dd&&!a.kc)throw new U(2,4,4002);}
|
|
891
|
+
function dt(a,b,c,d,e,f,g){function h(H){var M=(H-v)*u,N=M+b.$b,L=M+n;M=L+u;var P=Math.min(M,l());L=new Li(L,P,function(){var S=N*w;"BigInt"in window&&S>Number.MAX_SAFE_INTEGER&&(S=BigInt(N)*BigInt(w));S=vs(A,D,H,null,y,S);return Lc(z(),[S])},0,null,d,B,n,l(),[],"",null,null,Mi,f);L.codecs=a.M.codecs;L.mimeType=a.M.mimeType;L.j=M;return L}function k(){var H=[Math.max(m.Cb(),n),Math.min(m.fc(),l())].map(function(M){return M-n});H=[Math.ceil(H[0]/u),Math.ceil(H[1]/u)-1];a.M.gb&&H[1]++;return H.map(function(M){return M+
|
|
892
|
+
v})}function l(){var H=null!=q&&e[q]||r;return H?n+H:Infinity}var m=a.presentationTimeline,n=a.oa.start,q=a.ya.id,r=a.oa.duration,u=b.bb,v=b.Sd,w=b.timescale,A=b.kc,y=a.bandwidth||null,D=a.M.id,z=a.M.cb,B=n-b.$b,C=k();c=a.Kb?Math.max(C[0],C[1]-c+1):C[0];g=g||C[1];C=[];for(var I=c;I<=g;++I){var E=h(I);C.push(E)}var J=new Uk(C);C=m.fc()<l();I=m.U();if(C||I){var K=Math.max(c,g+1);c=u;a.M.gb&&(c=.1);J.Ye(c,function(){var H=m.Cb();J.Va(H);var M=t(k());M.next();M=M.next().value;for(var N=[];K<=M;){var L=
|
|
890
893
|
h(K);N.push(L);K++}return H>l()&&!N.length?null:N})}return Promise.resolve(J)}function at(a,b){var c=a.M.re;c||(c=xs(a,$s,"initialization"));if(!c)return null;c=Dc(c);var d=a.M.id,e=a.bandwidth||null,f=a.M.cb;b=new Ji(function(){var g=vs(c,d,null,null,e,null);return Lc(f(),[g])},0,null,Ns(a),null,null,b);b.codecs=a.M.codecs;b.mimeType=a.M.mimeType;return b}
|
|
891
894
|
function ft(a,b,c,d,e,f,g,h,k,l){Uk.call(this,[]);this.h=a;this.H=b;this.F=c;this.G=d;this.j=e;this.l=f;this.u=g;this.A=k;this.I=l;h&>(this)}pa(ft,Uk);p=ft.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){Uk.prototype.release.call(this);this.h=null};
|
|
892
895
|
p.Va=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
|
|
893
|
-
function et(a,b,c,d,e,f){ht(a,f);if(a.h){c=a.h.timeline;a.h.kc!==b.kc&&(a.h.kc=b.kc);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.
|
|
896
|
+
function et(a,b,c,d,e,f){ht(a,f);if(a.h){c=a.h.timeline;a.h.kc!==b.kc&&(a.h.kc=b.kc);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;e&>(a)}function ht(a,b){if(a.u!==b){a.u=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Oi(c,b)}}
|
|
894
897
|
function gt(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Va(a.j)}}p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
|
|
895
898
|
p.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.ik,f=this.h.Vg+d.Wg;c=this.j-this.h.$b;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=[],n=(d.end-d.start)/d.Qb,q={},r=0;r<d.Qb;q={$e:void 0,gi:void 0},r++){var u=d.start+n*r,v=u+n;q.gi=r+1;q.$e=null;q=new Li(this.j+u,this.j+v,function(w){return function(){if(!b.h)return[];
|
|
896
899
|
null==w.$e&&(w.$e=it(b.h.kc,b.H,e,b.F,f,w.gi,b.G));return w.$e}}(q),0,null,this.u,c,this.j,this.l,[],"",null,null,Mi,this.A);q.codecs=k;q.mimeType=l;0==this.I?0<r&&q.ye():0!=r%this.I&&q.ye();m.push(q)}c=new Li(this.j+d.start,h,function(){return 0<d.Qb||!b.h?[]:it(b.h.kc,b.H,e,b.F,f,null,b.G)},0,null,this.u,c,this.j,this.l,m,"",null,null,Mi,this.A,0<d.Qb);c.codecs=k;c.mimeType=l;c.j=g;this.g[a]=c}return c};
|
|
897
|
-
function it(a,b,c,d,e,f,g){a=vs(a,b,c,f,d||null,e);return Lc(g(),[a]).map(function(h){return h.toString()})};function jt(a){var b=Ge(a),c=b.split("/")[0];a=He(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,
|
|
898
|
-
function kt(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var C=B.
|
|
899
|
-
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(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,q=null,r=null,u=null,v=null,w;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).X("mdhd",function(z){l=dj(z.reader,z.version).language}).box("minf",Ug).box("stbl",Ug).X("stsd",Wg).box("mp4a",function(z){var B=fj(z.reader);q=B.channelCount;r=B.sampleRate;z.reader.
|
|
900
|
-
"mp4a",C,I;z.
|
|
900
|
+
function it(a,b,c,d,e,f,g){a=vs(a,b,c,f,d||null,e);return Lc(g(),[a]).map(function(h){return h.toString()})};function jt(a){var b=Ge(a),c=b.split("/")[0];a=He(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Ud:null,colorGamut:null}}
|
|
901
|
+
function kt(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var C=B.za(),I=B.za();B.skip(50);n=String(C);m=String(I);z.reader.Da()&&Ug(z)}function d(z){var B=fj(z.reader);q=B.channelCount;r=B.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
|
|
902
|
+
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(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,q=null,r=null,u=null,v=null,w;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).X("mdhd",function(z){l=dj(z.reader,z.version).language}).box("minf",Ug).box("stbl",Ug).X("stsd",Wg).box("mp4a",function(z){var B=fj(z.reader);q=B.channelCount;r=B.sampleRate;z.reader.Da()?Ug(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
|
|
903
|
+
"mp4a",C,I;z.Da();){C=z.$();for(var E=z.$();E&128;)E=z.$();if(3==C)z.za(),E=z.$(),E&128&&z.za(),E&64&&z.skip(z.$()),E&32&&z.za();else if(4==C)I=z.$(),z.skip(12);else if(5==C)break}I&&(B+="."+ij(I),5==C&&z.Da()&&(C=z.$(),I=(C&248)>>3,31===I&&z.Da()&&(I=32+((C&7)<<3)+((z.$()&224)>>5)),B+="."+I));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",
|
|
901
904
|
c).box("av01",c).box("avcC",function(z){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}z=z.reader;z.skip(1);z=B+"."+ij(z.$())+ij(z.$())+ij(z.$());g.push(z);k=!0}).box("hvcC",function(z){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var C=z.reader;C.skip(1);z=C.$();var I=["","A","B","C"][z>>6],E=z&31,J=C.T(),K=(z&32)>>5?"H":"L";z=[C.$(),C.$(),C.$(),C.$(),C.$(),C.$()];C=C.$();for(var H=0,M=0;32>M;M++){H|=J&1;if(31==M)break;H<<=1;J>>=1}B=B+("."+I+E)+("."+
|
|
902
905
|
ij(H,!0));B+="."+K+C;I="";for(E=z.length;E--;)if((K=z[E])||I)I="."+K.toString(16).toUpperCase()+I;B+=I;g.push(B);k=!0}).box("dvcC",function(z){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var C=z.reader;C.skip(2);z=C.$();C=C.$();g.push(B+"."+jj(z>>1&127)+"."+jj(z<<5&32|C>>3&31));k=!0}).X("vpcC",function(z){var B=w||"",C=z.reader;z=C.$();var I=C.$();C=C.$()>>4&15;g.push(B+"."+jj(z)+"."+jj(I)+"."+jj(C));k=!0}).box("av1C",
|
|
903
|
-
function(z){var B=w||"",C=z.reader;C.skip(1);z=C.$();C=C.$();var I=z>>>5,E=(C&64)>>6;g.push(B+"."+I+"."+jj(z&31)+(C>>>7?"H":"M")+"."+jj(2===I&&E?(C&32)>>5?12:10:E?10:8)+"."+((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+jj(1)+"."+jj(1)+"."+jj(1)+".0");k=!0}).box("enca",Yg).box("encv",Xg).box("sinf",Ug).box("frma",function(z){z=gj(z.reader).codec;e(z)}).box("colr",function(z){g=g.map(function(I){if(I.startsWith("av01.")){var E=z.reader,J=E.Ja(),K=E.
|
|
904
|
-
H+=String.fromCharCode(K[2]);H+=String.fromCharCode(K[3]);if("nclx"===H){K=E.
|
|
905
|
-
mimeType:A?"audio/mp4":"video/mp4",codecs:lt(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:q,sampleRate:r,closedCaptions:y,
|
|
906
|
-
function mt(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?sd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function nt(a){var b=null;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).box("minf",Ug).box("stbl",Ug).X("stsd",Wg).box("encv",Xg).box("enca",Yg).box("sinf",Ug).box("schi",Ug).X("tenc",function(c){c=c.reader;c.$();c.$();c.$();c.$();b=Jc(c.
|
|
906
|
+
function(z){var B=w||"",C=z.reader;C.skip(1);z=C.$();C=C.$();var I=z>>>5,E=(C&64)>>6;g.push(B+"."+I+"."+jj(z&31)+(C>>>7?"H":"M")+"."+jj(2===I&&E?(C&32)>>5?12:10:E?10:8)+"."+((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+jj(1)+"."+jj(1)+"."+jj(1)+".0");k=!0}).box("enca",Yg).box("encv",Xg).box("sinf",Ug).box("frma",function(z){z=gj(z.reader).codec;e(z)}).box("colr",function(z){g=g.map(function(I){if(I.startsWith("av01.")){var E=z.reader,J=E.Ja(),K=E.Hb(4);var H=String.fromCharCode(K[0]);H+=String.fromCharCode(K[1]);
|
|
907
|
+
H+=String.fromCharCode(K[2]);H+=String.fromCharCode(K[3]);if("nclx"===H){K=E.za();H=E.za();var M=E.za(),N=E.$()>>7,L=I.split(".");10==L.length&&(L[6]=jj(K),L[7]=jj(H),L[8]=jj(M),L[9]=String(N),I=L.join("."))}E.seek(J)}return I});var B=hj(z.reader),C=B.colorGamut;u=B.Ud;v=C}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var D=new Dd("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,y.set(b,b);D.g()}return{type:A?"audio":"video",
|
|
908
|
+
mimeType:A?"audio/mp4":"video/mp4",codecs:lt(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:q,sampleRate:r,closedCaptions:y,Ud:u,colorGamut:v}}function lt(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Ee(d);b.has(e)||(c.push(d),b.add(e))}b=Sc("audio",c);d=Sc("video",c);a=Sc(Rc,c);d=mt(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
909
|
+
function mt(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?sd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function nt(a){var b=null;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).box("minf",Ug).box("stbl",Ug).X("stsd",Wg).box("encv",Xg).box("enca",Yg).box("sinf",Ug).box("schi",Ug).X("tenc",function(c){c=c.reader;c.$();c.$();c.$();c.$();b=Jc(c.Hb(16))}).parse(a,!0);return b};function ot(a){this.o=null;this.A=a;this.I=new tg;this.i=[];this.h=null;this.m=[];this.F=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}ot.prototype.configure=function(a){this.o=a};ot.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};ot.prototype.setManifestType=function(a){this.u=a};
|
|
907
910
|
function pt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Lc(a.i,[qt(a,b)]),d=Ag(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),ug(a.I,e),va(l,2),F(l,e.promise,4);if(2!=l.g)return f=l.h,g=wc(f.data),h=JSON.parse(g),1==h.VERSION&&rt(a,h,f.uri),xa(l,0);if((k=ya(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Ub(function(){pt(a,b)});a.g.V(a.G);G(l)})}
|
|
908
911
|
function qt(a,b){if(!a.m.length)return b;b=new mb(b);var c=a.F||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Cb(e)&&qb(b,e);return b.toString()}function rt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Ub(function(){pt(a,d)});if(c=b.TTL)a.G=c;a.g.V(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
909
912
|
function st(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}ot.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
910
913
|
function tt(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={fd:void 0},f=e.next())if(g.fd=f.value,f=b.get(g.fd))d.push({yg:g.fd,location:f});else if(f=a.H.find(function(k){return function(l){return l.Sk==k.fd}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].ti?(h=new mb(h),ob(h,f["URI-REPLACEMENT"].ti),d.push({yg:g.fd,location:h.toString()})):d.push({yg:g.fd,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
911
|
-
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 mb(k.location)).Tb))return!1;return!0});d.length&&(a.F=d[0].yg);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.F=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:Lc(a.i,d)};function ut(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.o=!1;this.m=new Set}p=ut.prototype;p.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=[]};p.sj=function(){return this.l};p.Yf=function(){return this.j.slice()};p.Xi=function(){return this.i};
|
|
914
|
+
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 mb(k.location)).Tb))return!1;return!0});d.length&&(a.F=d[0].yg);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.F=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:Lc(a.i,d)};function ut(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.o=!1;this.m=new Set}p=ut.prototype;p.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.o=!1;this.m.clear()};p.sj=function(){return this.l};p.Yf=function(){return this.j.slice()};p.Xi=function(){return this.i};
|
|
912
915
|
p.mh=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==Rc)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
|
|
913
916
|
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)}};
|
|
914
917
|
function vt(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[wt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[xt(n),n]})),l=new Map(h.textStreams.map(function(n){return[yt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[zt(n),n]}));if(b){var m=At(Rc);l.set(yt(m),m);m=At("image");h.set(zt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{eh:c,pi:d,ji:e,Ah:f}}
|
|
915
|
-
p.Af=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R;return O(function(
|
|
916
|
-
return F(
|
|
917
|
-
allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,C=t(B),I=C.next();!I.done;I=C.next())E=I.value,J=D++,z.push({id:J,language:E.language,disabledUntilTime:0,primary:E.primary,audio:E.type==e.ba?E:null,video:E.type==e.ua?E:null,bandwidth:E.bandwidth||0,drmInfos:E.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=z;G(
|
|
918
|
+
p.Af=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R;return O(function(ha){if(1==ha.g){e=Tc;if(!b&&1==a.length)return f=vt(a,!1),g=f.eh,h=f.pi,k=f.ji,l=f.Ah,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()),ha.B(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)r=a[q],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=q));if(-1==n)return ha.return();u=vt(a,!0);v=u.eh;w=u.pi;A=u.ji;y=u.Ah;
|
|
919
|
+
return F(ha,Promise.all([Bt(d,d.h,v,n,Ct,Dt,m),Bt(d,d.g,w,n,Ct,Dt,m),Bt(d,d.j,A,n,Ct,Dt,m),Bt(d,d.i,y,n,Ct,Dt,m)]),2)}D=0;z=[];if(d.g.length&&d.h.length)for(K=t(d.h),H=K.next();!H.done;H=K.next())for(M=H.value,N=t(d.g),L=N.next();!L.done;L=N.next())P=L.value,S=Pb(M.drmInfos,P.drmInfos),M.drmInfos.length&&P.drmInfos.length&&!S.length||(R=D++,z.push({id:R,language:M.language,disabledUntilTime:0,primary:M.primary,audio:M,video:P,bandwidth:(M.bandwidth||0)+(P.bandwidth||0),drmInfos:S,allowedByApplication:!0,
|
|
920
|
+
allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,C=t(B),I=C.next();!I.done;I=C.next())E=I.value,J=D++,z.push({id:J,language:E.language,disabledUntilTime:0,primary:E.primary,audio:E.type==e.ba?E:null,video:E.type==e.ua?E:null,bandwidth:E.bandwidth||0,drmInfos:E.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=z;G(ha)})};
|
|
918
921
|
function Et(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L;return O(function(P){switch(P.g){case 1:b=Tc;if(1==a.length)return P.return(a[0]);c=a.map(function(S){return new Map(S.filter(function(R){return R.type===b.ba}).map(function(R){return[wt(R),R]}))});d=a.map(function(S){return new Map(S.filter(function(R){return R.type===b.ua}).map(function(R){return[xt(R),R]}))});e=a.map(function(S){return new Map(S.filter(function(R){return R.type===b.Ha}).map(function(R){return[yt(R),
|
|
919
922
|
R]}))});f=a.map(function(S){return new Map(S.filter(function(R){return R.type===b.rf}).map(function(R){return[zt(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Ft(b.Ha),k.set(yt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,r=Ft(b.rf),q.set(zt(r),r);u=new ut;return F(P,Bt(u,[],c,0,Gt,Ht,0),2);case 2:return v=P.h,F(P,Bt(u,[],d,0,Gt,Ht,0),3);case 3:return w=P.h,F(P,Bt(u,[],e,0,Gt,Ht,0),4);case 4:return A=P.h,F(P,Bt(u,[],f,0,Gt,Ht,0),5);case 5:y=P.h;D=0;if(w.length&&v.length)for(E=
|
|
920
923
|
t(v),J=E.next();!J.done;J=E.next())for(K=J.value,H=t(w),M=H.next();!M.done;M=H.next())N=M.value,L=D++,N.variantIds.push(L),K.variantIds.push(L);else for(z=w.concat(v),B=t(z),C=B.next();!C.done;C=B.next())I=C.value,I.variantIds=[D++];return P.return(w.concat(v).concat(A).concat(y))}})}
|
|
@@ -943,92 +946,93 @@ function Yt(a,b,c){if(b==a&&a!=c)return $t;if(c==a&&a!=b)return Zt;if(b>a){if(c<
|
|
|
943
946
|
function xt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,Xt(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function wt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,Xt(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function yt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
944
947
|
function zt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Xt(a){if(!cu.has(a)){var b=Ce(a);cu.set(a,b)}return cu.get(a)}Q("shaka.util.PeriodCombiner",ut);ut.prototype.setUseStreamOnce=ut.prototype.bi;ut.prototype.setAllowMultiTypeVariants=ut.prototype.Uh;ut.prototype.combinePeriods=ut.prototype.Af;ut.prototype.deleteStream=ut.prototype.mh;ut.prototype.getImageStreams=ut.prototype.Xi;ut.prototype.getTextStreams=ut.prototype.Yf;ut.prototype.getVariants=ut.prototype.sj;
|
|
945
948
|
var Zt=1,bu=0,$t=-1,cu=new Map;function du(a,b){var c=new DOMParser,d=eu.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 fu(a,b){try{var c=zc(a);return du(c,b)}catch(d){return null}}
|
|
946
|
-
var eu=new Nb(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 gu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.Z=1;this.H=[];this.l={Ce:"",type:"",profiles:[],Xb:null,gb:0,cb:null,
|
|
949
|
+
var eu=new Nb(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 gu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.Z=1;this.H=[];this.l={Ce:"",type:"",profiles:[],Xb:null,gb:0,cb:null,Pd:0};this.u=new Map;this.o={};this.F={};this.W={};this.m=new ut;this.J=0;this.Y=new kd(5);this.K=new Ub(function(){hu(a)});this.O=new tg;this.L=null;this.G=[];this.N=Infinity;this.I=!1;this.h=null;this.P=!1;this.S=[]}p=gu.prototype;
|
|
947
950
|
p.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.U()&&this.K.Pa();this.h&&this.h.configure(this.g);this.m&&(this.m.Uh(this.g.dash.multiTypeVariantsAllowed&&ud()),this.m.bi(this.g.dash.useStreamOnceInPeriodFlattening))};p.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.I=b.isLowLatencyMode(),c.A=[a],c.j=b,F(e,iu(c),2);d=e.h;c.j&&ju(c,d);if(!c.j)throw new U(2,7,7001);return e.return(c.i)})};
|
|
948
|
-
p.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.F={};this.u.clear();this.l={Ce:"",type:"",profiles:[],Xb:null,gb:0,cb:null,
|
|
951
|
+
p.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.F={};this.u.clear();this.l={Ce:"",type:"",profiles:[],Xb:null,gb:0,cb:null,Pd:0};this.m=null;null!=this.K&&(this.K.stop(),this.K=null);this.h&&this.h.destroy();return this.O.destroy()};
|
|
949
952
|
p.update=function(){var a=this,b;return O(function(c){if(1==c.g)return va(c,2),F(c,iu(a),4);if(2!=c.g)return xa(c,0);b=ya(c);if(!a.j||!b)return c.return();a.j.onError(b);G(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.fc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.J=b.endTime-a,ju(this,0))}}};
|
|
950
953
|
p.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
951
954
|
function iu(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=ku(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=tt(a.h,"Location",!0),e.length&&(d=e)),f=Ag(d,a.g.retryParameters),g=Date.now(),F(m,lu(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.j)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return F(m,mu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.Y.sample(1,l);return m.return(l)})}
|
|
952
955
|
function mu(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=um;if(f!=g){wd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=fu(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=Ac(h.outerHTML)}k=bh(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=vm;l!=m&&l(k);if("Patch"===d)return v.return(nu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(ou(a,k,c));
|
|
953
956
|
q=a.g.dash.xlinkFailGracefully;r=Bs(k,a.g.retryParameters,q,c,a.j.networkingEngine);ug(a.O,r);return F(v,r.promise,2)}u=v.h;return v.return(ou(a,u,c))})}
|
|
954
|
-
function ou(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R,
|
|
955
|
-
"";a.l.
|
|
956
|
-
M=H.attributes.serviceLocation,N=nh(H),M&&N&&(st(a.h,"BaseURL",M,N),E=!0);a.
|
|
957
|
-
yh));
|
|
958
|
-
ua.U())&&!isNaN(a.g.availabilityWindowOverride)&&(ta=a.g.availabilityWindowOverride);null==ta&&(ta=Infinity);ua.Te(ta);
|
|
959
|
-
a.I?ua.Vh(a.N):a.N&&Za("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");ua.rg(Qa||1);return F(
|
|
960
|
-
minBufferTime:
|
|
957
|
+
function ou(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R,ha,ka,ta,Va,Ba,Ha,Qa,Wa,ua,gb,tb,Ed,Ff,Fd,ad,Gd,Be,Hd,Gf,pj,qj,eh,rj,fh;return O(function(ec){switch(ec.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=lh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=nh(l))q=Lc(d,[n])[0],m&&(a.h?st(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(r=tt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Ce=b.attributes.id||
|
|
958
|
+
"";a.l.Pd=uh(b,"publishTime",xh)||0;a.H=lh(b,"PatchLocation");u=Promise.resolve();if((v=ph(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new ot(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=nh(v))(y=uh(v,"queryBeforeStart",Eh,!1))?u=pt(a.h,A):pt(a.h,A);D=t(f.keys());for(z=D.next();!z.done;z=D.next())B=z.value,C=f.get(B),st(a.h,"Location",B,C)}I=lh(b,"BaseURL");E=!1;if(a.h)for(J=t(I),K=J.next();!K.done;K=J.next())H=K.value,
|
|
959
|
+
M=H.attributes.serviceLocation,N=nh(H),M&&N&&(st(a.h,"BaseURL",M,N),E=!0);a.S=null;E&&a.h||(L=I.map(nh),a.S=Lc(d,L));P=function(){return a.h&&E?tt(a.h,"BaseURL"):a.S?a.S:[]};a.l.cb=P;S=0;I&&I.length&&(S=uh(I[0],"availabilityTimeOffset",Dh)||0);a.l.gb=S;R=a.g.dash.ignoreMinBufferTime;ha=0;R||(ha=uh(b,"minBufferTime",yh)||0);a.J=uh(b,"minimumUpdatePeriod",yh,-1);ka=uh(b,"availabilityStartTime",xh);ta=uh(b,"timeShiftBufferDepth",yh);Va=a.g.dash.ignoreSuggestedPresentationDelay;Ba=null;Va||(Ba=uh(b,"suggestedPresentationDelay",
|
|
960
|
+
yh));Ha=a.g.dash.ignoreMaxSegmentDuration;Qa=null;Ha||(Qa=uh(b,"maxSegmentDuration",yh));Wa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.P=a.i.presentationTimeline.U()&&"static"==Wa);a.l.type=Wa;pu(a);if(a.i)for(ua=a.i.presentationTimeline,gb=t(Object.values(a.o)),tb=gb.next();!tb.done;tb=gb.next())Ed=tb.value,Ed.segmentIndex&&Ed.segmentIndex.Va(ua.Cb());else Ff=a.g.defaultPresentationDelay||1.5*ha,Fd=null!=Ba?Ba:Ff,ua=new yk(ka,Fd,a.g.dash.autoCorrectDrift);ua.Kc("static"==Wa);(ad=
|
|
961
|
+
ua.U())&&!isNaN(a.g.availabilityWindowOverride)&&(ta=a.g.availabilityWindowOverride);null==ta&&(ta=Infinity);ua.Te(ta);Gd=b.attributes.profiles||"";a.l.profiles=Gd.split(",");Be={Kb:"static"!=Wa,presentationTimeline:ua,ya:null,oa:null,xa:null,M:null,bandwidth:0,eg:!1,gb:S,Xb:null,profiles:Gd.split(",")};Hd=qu(a,Be,P,b,!1);Gf=Hd.duration;pj=Hd.periods;("static"!=Wa||a.P)&&Hd.oh||ua.qb(Gf||Infinity);a.N&&!a.I&&(qj=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.I=a.j.isLowLatencyMode());
|
|
962
|
+
a.I?ua.Vh(a.N):a.N&&Za("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");ua.rg(Qa||1);return F(ec,u,2);case 2:return a.I&&(ha=0,eh=null!=Ba?Ba:a.g.defaultPresentationDelay,ua.Hg(eh)),a.i?F(ec,ru(a,Hd.periods,!1),4):F(ec,a.m.Af(pj,Be.Kb),6);case 6:a.i={presentationTimeline:ua,variants:a.m.l,textStreams:a.m.Yf(),imageStreams:a.m.i,offlineSessionIds:[],
|
|
963
|
+
minBufferTime:ha||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:su(b),nextUrl:tu(b)};if(!ua.mi()){ec.B(7);break}rj=lh(b,"UTCTiming");return F(ec,uu(a,P,rj),8);case 8:fh=ec.h;if(!a.j)return ec.return();ua.Wh(fh);case 7:ua.xe();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),G(ec)}})}
|
|
961
964
|
function ru(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,a.m.Af(b,!0,c),2);a.i.variants=a.m.l;d=a.m.Yf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);G(e)})}
|
|
962
|
-
function nu(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M;return O(function(N){if(1==N.g){c=b.attributes.mpdId;d=uh(b,"originalPublishTime",xh);if(!c||c!==a.l.Ce||d!==a.l.
|
|
963
|
-
L}}else if("type"===n.cc){a.i.presentationTimeline.Kc("static"==q);a.l.type=q;L=t(a.u.values());for(P=L.next();!P.done;P=L.next())P.value.
|
|
964
|
-
"";for(var R=t(P),
|
|
965
|
-
xu(a,E);J=t(f);for(K=J.next();!K.done;K=J.next())H=K.value,e.push.apply(e,x(qu(a,{
|
|
965
|
+
function nu(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M;return O(function(N){if(1==N.g){c=b.attributes.mpdId;d=uh(b,"originalPublishTime",xh);if(!c||c!==a.l.Ce||d!==a.l.Pd)throw a.H=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(kh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Gh(l.attributes.sel||""),n=m[m.length-1],q=nh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.cc){r=nh(l)||"";var L=yh(r);if(null!=L){a.l.Xb=L;for(var P=t(a.u.values()),S=P.next();!S.done;S=P.next())S.value.Xb=
|
|
966
|
+
L}}else if("type"===n.cc){a.i.presentationTimeline.Kc("static"==q);a.l.type=q;L=t(a.u.values());for(P=L.next();!P.done;P=L.next())P.value.Kb="dynamic"==q;"static"==q&&(a.J=-1)}else"publishTime"===n.cc?a.l.Pd=xh(q)||0:null===n.cc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Hh(a.H,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&vu(a,n.id);else if("SegmentTemplate"===n.name){P=Gh(l.attributes.sel||"");L=P[P.length-1];if(L.cc){P=wu(a,P);S=nh(l)||
|
|
967
|
+
"";for(var R=t(P),ha=R.next();!ha.done;ha=R.next())ha=a.u.get(ha.value),Jh(ha.M.mc,l.tagName,L.cc,S);L=P}else L=[];u=L;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){L=Gh(l.attributes.sel||"");L=wu(a,L);P=t(L);for(S=P.next();!S.done;S=P.next())S=a.u.get(S.value),S=ys(S,$s,"SegmentTimeline"),R=lh(S,"S"),Hh(R,l),S.children=R;y=L;D=t(y);for(z=D.next();!z.done;z=D.next())B=z.value,g.add(B)}C=t(g);for(I=C.next();!I.done;I=C.next())E=I.value,
|
|
968
|
+
xu(a,E);J=t(f);for(K=J.next();!K.done;K=J.next())H=K.value,e.push.apply(e,x(qu(a,{Kb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,ya:null,oa:null,xa:null,M:null,bandwidth:0,eg:!1,gb:a.l.gb,profiles:a.l.profiles,Xb:a.l.Xb},a.l.cb,H,!0).periods));return e.length?F(N,ru(a,e,!0),2):N.B(2)}"static"==a.l.type&&(M=a.l.Xb,a.i.presentationTimeline.qb(M||Infinity));G(N)})}
|
|
966
969
|
function vu(a,b){for(var c=t(a.u.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.u.get(d);ys(e,$s,"SegmentTimeline").children=[];xu(a,d);a.u.delete(d)}a.G=a.G.filter(function(f){return f!==b})}
|
|
967
|
-
function wu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.u.values()),a=e.next();!a.done;a=e.next())a=a.value,a.
|
|
968
|
-
","+a.M.id);return b}function xu(a,b){var c=a.u.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Va(a.i.presentationTimeline.
|
|
970
|
+
function wu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.u.values()),a=e.next();!a.done;a=e.next())a=a.value,a.ya.id===c&&a.xa.id===d&&a.M.id&&b.push(c+","+a.M.id);else if(-1<e)for(d=t(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.ya.id===c&&a.xa.position===e&&a.M.id&&b.push(c+
|
|
971
|
+
","+a.M.id);return b}function xu(a,b){var c=a.u.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Va(a.i.presentationTimeline.Cb());try{var e=Zs(c,function(f,g,h,k){return yu(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.W,c.M.aesKey,null,!0);d.createSegmentIndex=function(){return O(function(f){if(1==f.g)return d.segmentIndex?f.B(0):F(f,e.wc(),3);d.segmentIndex=f.h;G(f)})}}catch(f){if(b=c.M.contentType,b!=Rc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
969
972
|
function su(a){var b=ph(a,"ServiceDescription");if(!b)return null;a=ph(b,"Latency");b=ph(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)));
|
|
970
973
|
return c}function tu(a){a=lh(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}
|
|
971
|
-
function qu(a,b,c,d,e){var f=b.Xb;f||(f=uh(d,"mediaPresentationDuration",yh),a.l.Xb=f);var g=0;a.i&&a.i.presentationTimeline&&a.
|
|
972
|
-
(a.L=q);k=zu(a,b,c,{start:q,duration:v,node:m,hg:null==v||!n});h.push(k);b.
|
|
974
|
+
function qu(a,b,c,d,e){var f=b.Xb;f||(f=uh(d,"mediaPresentationDuration",yh),a.l.Xb=f);var g=0;a.i&&a.i.presentationTimeline&&a.P&&(g=a.i.presentationTimeline.Vb());var h=[],k=g;d=lh(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],q=uh(m,"start",yh,k),r=m.attributes.id,u=uh(m,"duration",yh);q=0==l&&0==q&&a.P?g:q;var v=null;if(n){var w=uh(n,"start",yh);null!=w&&(v=w-q+g)}else null!=f&&(v=f-q+g);null==v&&(v=u);if(!(null!==a.L&&null!==r&&null!==q&&q<a.L)||a.G.includes(r)||l+1==d.length){null!==
|
|
975
|
+
q&&(null===a.L||q>a.L)&&(a.L=q);k=zu(a,b,c,{start:q,duration:v,node:m,hg:null==v||!n});h.push(k);b.ya.id&&v&&(a.W[b.ya.id]=v);if(null==v){k=null;break}k=q+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(A){return A.id});return null!=f?{periods:h,duration:f+g,oh:!1}:{periods:h,duration:k,oh:!0}}
|
|
973
976
|
function pu(a){var b=Object.keys(a.F).filter(function(f){return!a.G.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.F[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.mh(a.o[e],c),delete a.o[e];delete a.F[c]}}
|
|
974
|
-
function zu(a,b,c,d){b.
|
|
977
|
+
function zu(a,b,c,d){b.ya=Au(a,d.node,null,c);b.oa=d;b.ya.gb=b.gb;b.ya.id||(b.ya.id="__shaka_period_"+d.start);var e=lh(d.node,"EventStream");c=b.presentationTimeline.Cb();e=t(e);for(var f=e.next();!f.done;f=e.next())Bu(a,d.start,d.duration,f.value,c);c=lh(d.node,"AdaptationSet").map(function(m,n){return Cu(a,b,n,m)}).filter(Te);if(b.Kb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.bk);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new U(2,
|
|
975
978
|
4,4018);}d=c.filter(function(m){return!m.Ug});c=c.filter(function(m){return m.Ug});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ug.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={Og:void 0},k=h.next())l.Og=k.value,l.Og.trickModeVideo=e.streams.find(function(m){return function(n){return Ce(m.Og.codecs)==Ce(n.codecs)}}(l))}}c=Du(a.g.disableAudio,d,"audio");e=Du(a.g.disableVideo,d,"video");f=Du(a.g.disableText,
|
|
976
|
-
d,Rc);d=Du(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.
|
|
977
|
-
function Cu(a,b,c,d){function e(H){switch(H){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(H){switch(H){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.
|
|
979
|
+
d,Rc);d=Du(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.ya.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Du(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},[])}
|
|
980
|
+
function Cu(a,b,c,d){function e(H){switch(H){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(H){switch(H){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.xa=Au(a,d,b.ya,null);b.xa.position=c;var g=!1;c=lh(d,"Role");var h=c.map(function(H){return H.attributes.value}).filter(Te),k=void 0,l=b.xa.contentType==Rc;l&&(k="subtitle");c=t(c);for(var m=c.next();!m.done;m=c.next()){m=m.value;var n=m.attributes.schemeIdUri;
|
|
978
981
|
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 q,r;n=lh(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?q=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?r=e(parseInt(v.attributes.value,10)):
|
|
979
982
|
"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=lh(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?q=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(r=e(parseInt(v.attributes.value,10)));n=lh(d,"Accessibility");
|
|
980
983
|
var y=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)if(v=1,null!=w){w=w.split(";");for(var z=t(w),B=z.next();!B.done;B=z.next()){var C=B.value,I=B=void 0;C.includes("=")?(C=C.split("="),B=C[0].startsWith("CC")?C[0]:"CC"+C[0],I=C[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,I=C);y.set(B,Wc(I))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==v)if(v=1,null!=w)for(w=t(w.split(";")),z=w.next();!z.done;z=
|
|
981
|
-
w.next())B=z.value,C=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],C=B[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,C=B),y.set(z,Wc(C));else y.set("svc1","und");else"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"));if(m)return null;m=lh(d,"ContentProtection");var E=ks(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=Wc(b.
|
|
982
|
-
(m=lh(d,"Label"))&&m.length&&(m=mh(m[0]))&&(K=m);m=lh(d,"Representation");d=m.map(function(H){if(H=Eu(a,b,E,k,J,K,g,h,y,H,D,A))H.hdr=H.hdr||q,H.colorGamut=H.colorGamut||r,H.fastSwitching=u;return H}).filter(function(H){return!!H});if(0==d.length){c="image"==b.
|
|
983
|
-
b.
|
|
984
|
-
function Eu(a,b,c,d,e,f,g,h,k,l,m,n){b.M=Au(a,l,b.
|
|
985
|
-
16!=M.data.byteLength)throw new U(2,4,4049);N={name:"AES-CBC"};L=w;return F(P,window.crypto.subtle.importKey("raw",M.data,N,!0,["decrypt"]),3)}L.cryptoKey=P.h;w.fetchKey=void 0;G(P)})}}}b.M.aesKey=w;A=function(M,N,L,P){return yu(a,M,N,L,P)};if(b.M.ld)var z=Os(b,A,w);else if(b.M.ac)z=Us(b,a.o,w);else if(b.M.mc)z=Zs(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.W,w,n,!1);else{var B=b.
|
|
984
|
+
w.next())B=z.value,C=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],C=B[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,C=B),y.set(z,Wc(C));else y.set("svc1","und");else"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"));if(m)return null;m=lh(d,"ContentProtection");var E=ks(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=Wc(b.xa.language||"und"),K=d.attributes.label;
|
|
985
|
+
(m=lh(d,"Label"))&&m.length&&(m=mh(m[0]))&&(K=m);m=lh(d,"Representation");d=m.map(function(H){if(H=Eu(a,b,E,k,J,K,g,h,y,H,D,A))H.hdr=H.hdr||q,H.colorGamut=H.colorGamut||r,H.fastSwitching=u;return H}).filter(function(H){return!!H});if(0==d.length){c="image"==b.xa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new U(2,4,4003);}if(!b.xa.contentType||"application"==b.xa.contentType)for(b.xa.contentType=Fu(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=
|
|
986
|
+
b.xa.contentType;l=b.xa.id||"__fake__"+a.Z++;n=t(d);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(E.drmInfos);for(z=w.next();!z.done;z=w.next())z=z.value,z.keyIds=z.keyIds&&v.keyIds?new Set([].concat(x(z.keyIds),x(v.keyIds))):z.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(H){return H.attributes.id}).filter(Te);return{id:l,contentType:b.xa.contentType,language:J,Jl:g,streams:d,drmInfos:E.drmInfos,Ug:c,bk:m}}
|
|
987
|
+
function Eu(a,b,c,d,e,f,g,h,k,l,m,n){b.M=Au(a,l,b.xa,null);var q=b.M.id;a.N=Math.min(a.N,b.M.gb);if(!Gu(b.M))return null;var r=b.oa.start;b.bandwidth=uh(l,"bandwidth",Bh)||0;var u=b.M.contentType,v=u==Rc||"application"==u;u="image"==u;try{var w=void 0;if(c.uf){var A=b.M.cb,y=Lc(A(),[c.uf.Hj]),D=Ag(y,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.uf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var M,N,L;return O(function(P){if(1==P.g)return F(P,lu(a,D,6),2);if(3!=P.g){M=P.h;if(!M.data||
|
|
988
|
+
16!=M.data.byteLength)throw new U(2,4,4049);N={name:"AES-CBC"};L=w;return F(P,window.crypto.subtle.importKey("raw",M.data,N,!0,["decrypt"]),3)}L.cryptoKey=P.h;w.fetchKey=void 0;G(P)})}}}b.M.aesKey=w;A=function(M,N,L,P){return yu(a,M,N,L,P)};if(b.M.ld)var z=Os(b,A,w);else if(b.M.ac)z=Us(b,a.o,w);else if(b.M.mc)z=Zs(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.W,w,n,!1);else{var B=b.oa.duration||0,C=b.M.cb,I=b.M.mimeType,E=b.M.codecs;z={wc:function(){var M=Wk(r,B,C());M.uc(function(N){N.mimeType=I;
|
|
986
989
|
N.codecs=E});return Promise.resolve(M)}}}}catch(M){if((v||u)&&4002==M.code)return null;throw M;}n=lh(l,"ContentProtection");n=os(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;lh(l,"SupplementalProperty").some(function(M){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==M.attributes.schemeIdUri&&"JOC"==M.attributes.value})&&(A=!0);y=!1;v&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var J;if(u&&((l=lh(l,"EssentialProperty").find(function(M){return["http://dashif.org/thumbnail_tile",
|
|
987
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(M.attributes.schemeIdUri)}))&&(J=l.attributes.value),!J))return null;var K;v=b.M.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.M.id?b.
|
|
988
|
-
(H.segmentIndex.release(),H.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,codecs:v,frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.
|
|
989
|
-
closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([ue(b.M.mimeType,b.M.codecs)])};H.createSegmentIndex=function(){var M;return O(function(N){if(1==N.g){if(H.segmentIndex)return N.B(0);M=H;return F(N,z.wc(),3)}M.segmentIndex=N.h;G(N)})};l&&b.
|
|
990
|
-
function Hu(a){function b(c){if(!c)return null;c=Ve(c);c.ld=null;c.ac=null;c.mc=Lh(c.mc);return c}a=Ve(a);a.
|
|
990
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(M.attributes.schemeIdUri)}))&&(J=l.attributes.value),!J))return null;var K;v=b.M.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.M.id?b.ya.id+","+b.M.id:"";a.H.length&&q&&a.u.set(b.ya.id+","+q,Hu(b));var H=l&&a.o[l]?a.o[l]:{id:a.Z++,originalId:b.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){H.segmentIndex&&
|
|
991
|
+
(H.segmentIndex.release(),H.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,codecs:v,frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.xa.language,label:f,type:b.xa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.M.Ee,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:A,
|
|
992
|
+
closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([ue(b.M.mimeType,b.M.codecs)])};H.createSegmentIndex=function(){var M;return O(function(N){if(1==N.g){if(H.segmentIndex)return N.B(0);M=H;return F(N,z.wc(),3)}M.segmentIndex=N.h;G(N)})};l&&b.Kb&&!a.o[l]&&(b=b.ya.id||"",a.F[b]||(a.F[b]=[]),a.o[l]=H,a.F[b].push(l));return H}
|
|
993
|
+
function Hu(a){function b(c){if(!c)return null;c=Ve(c);c.ld=null;c.ac=null;c.mc=Lh(c.mc);return c}a=Ve(a);a.ya=b(a.ya);a.xa=b(a.xa);a.M=b(a.M);a.oa&&(a.oa=Ve(a.oa),a.oa.node=null);return a}
|
|
991
994
|
function hu(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,va(d,2),F(d,iu(a),4);case 4:b=d.h;xa(d,3);break;case 2:if(c=ya(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();ju(a,b);G(d)}})}function ju(a,b){if(!(0>a.J)){var c=a.J;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.K.V(Math.max(c-b,ld(a.Y)))}}
|
|
992
995
|
function Au(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ee:null,audioSamplingRate:null,gb:0,Dg:0};d=d||c.cb;var e=b.attributes.id,f=lh(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=nh(m);l&&m&&(st(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(nh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=vh(b,
|
|
993
996
|
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=lt(m).join(",");n=uh(b,"frameRate",Fh)||c.frameRate;var q=b.attributes.sar||c.pixelAspectRatio,r=Iu(lh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=lh(b,"AudioChannelConfiguration");u=Ju(u)||c.Ee;var v=uh(b,"audioSamplingRate",Ch)||c.audioSamplingRate;k||(k=Fu(l,m));var w=ph(b,"SegmentBase"),A=ph(b,"SegmentTemplate"),y=w?uh(w,"availabilityTimeOffset",Dh)||0:0,D=A?uh(A,"availabilityTimeOffset",Dh)||0:0,z=f&&f.length?uh(f[0],"availabilityTimeOffset",
|
|
994
997
|
Dh)||0:0;y=c.gb+z+y+D;D=null;(z=ph(b,"SegmentSequenceProperties"))&&(z=ph(z,"SAP"))&&(D=uh(z,"cadence",Ah));return{cb:function(){return Lc(d(),f.length?a.h&&h?tt(a.h,e):g?g:[]:[])},ld:w||c.ld,ac:ph(b,"SegmentList")||c.ac,mc:A||c.mc,width:uh(b,"width",Ch)||c.width,height:uh(b,"height",Ch)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,Ee:u,audioSamplingRate:v,gb:y,re:null,Dg:D||c.Dg}}
|
|
995
998
|
function Iu(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}
|
|
996
|
-
function Ju(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){
|
|
997
|
-
|
|
999
|
+
function Ju(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
|
|
1000
|
+
16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&0<b&&b<c.length)return c[b]}}return null}
|
|
1001
|
+
function Gu(a){var b=a.ld?1:0;b+=a.ac?1:0;b+=a.mc?1:0;if(0==b)return a.contentType==Rc||"application"==a.contentType?!0:!1;1!=b&&(a.ld&&(a.ac=null),a.mc=null);return!0}
|
|
998
1002
|
function Ku(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dc(c)],f=Lc(b(),e),g=Ag(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),ug(a.O,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=wc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
999
1003
|
function uu(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(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;va(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
|
|
1000
1004
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Za("NTP UTCTiming scheme is not supported");break;default:Za("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return F(n,Ku(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return F(n,Ku(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:xa(n,
|
|
1001
1005
|
3);break;case 5:ya(n);case 3:g=f.next();n.B(2);break;case 4:return Za("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
1002
1006
|
function Bu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=uh(d,"timescale",Ch)||1,k=uh(d,"presentationTimeOffset",Ch)||0;d=t(lh(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=uh(l,"presentationTime",Ch)||0,n=uh(l,"duration",Ch)||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:Kh(l),eventNode:Lh(l)},a.j.onTimelineRegionAdded(l))}}
|
|
1003
1007
|
function yu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=Gg,g=e?0:1,h=yl(b,c,d,a.g.retryParameters),F(l,lu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Fu(a,b){b=ue(a,b);return Ke(b)?Rc:a.split("/")[0]}function lu(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);ug(a.O,b);return b.promise}
|
|
1004
|
-
function ku(a){var b=a.l.
|
|
1008
|
+
function ku(a){var b=a.l.Pd;if(!a.l.Ce||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=Ch(e.attributes.ttl);return!e||b+e>c}).map(nh).filter(Te);return d.length?Lc(a.A,d):[]}Q("shaka.dash.DashParser",gu);Ei["application/dash+xml"]=function(){return new gu};Ei["video/vnd.mpeg.dash.mpd"]=function(){return new gu};function Lu(){}Q("shaka.dependencies",Lu);Lu.has=function(a){return Mu.has(a)};Lu.add=function(a,b){if(!Nu[a])throw Error(a+" is not supported");a==Ou?wd("mux.js","mux.js is no longer used in Shaka Player."):Mu.set(a,function(){return b})};var Ou="muxjs",Nu={Kl:Ou,ISOBoxer:"ISOBoxer"};Lu.Allowed=Nu;var Mu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Pu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Qu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Qu.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};
|
|
1005
1009
|
function Ru(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 Su(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Y(a,b,c){return(a=Su(a,b))?a.value:c||null}function Tu(a,b){a=Su(a,b);if(!a)throw new U(2,4,4023,b);return a.value}function Uu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Qb=c}function Vu(a,b){this.name=a;this.value=b};function Wu(a,b){return a.filter(function(c){return c.name==b})}function Xu(a,b){return a.filter(function(c){return Tu(c,"TYPE")==b})}function Yu(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 Zu(a,b,c){c=void 0===c?0:c;return(a=Yu(a,b))?Number(a.value):c}function $u(a,b,c){return b?av(a,[b],c):[]}
|
|
1006
1010
|
function av(a,b,c){if(!b.length)return[];b=Lc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new U(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function bv(){this.g=0}
|
|
1007
1011
|
function cv(a,b){b=wc(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 U(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=dv(a,f),--a.g,ev.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=dv(a,g);if(fv.includes(g.name)){if(1!=b)throw new U(2,4,4017);g=
|
|
1008
1012
|
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=dv(a,k),ev.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"==Y(k,"TYPE")?f.push(k):"MAP"==Y(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 Uu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Uu("",d,f)));return new Pu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
1009
1013
|
g.name&&(g.attributes.push(new Vu("URI",h)),d=!0)}}return new Pu(b,e)}function dv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new U(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Kp(d);var f;(f=Mp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Mp(d,g);)c.push(new Vu(f[1],f[2]||f[3])),Lp(d)}return new Qu(a,b,c,e)}
|
|
1010
1014
|
var ev="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),fv="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 gv(){}function hv(a){try{var b=iv(a);return pg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return ng(c)}}
|
|
1011
|
-
function iv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(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=Hc(a):e=Ac(a);return{data:e,contentType:c}}Q("shaka.net.DataUriPlugin",gv);gv.parse=hv;wg("data",hv);function jv(){var a=this;this.g=this.h=null;this.F=1;this.u=new Map;this.J=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(Rc,new Map);this.O.set("image",new Map);this.Ga=new Set;this.i=new Map;this.l=null;this.N="";this.
|
|
1015
|
+
function iv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(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=Hc(a):e=Ac(a);return{data:e,contentType:c}}Q("shaka.net.DataUriPlugin",gv);gv.parse=hv;wg("data",hv);function jv(){var a=this;this.g=this.h=null;this.F=1;this.u=new Map;this.J=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(Rc,new Map);this.O.set("image",new Map);this.Ga=new Set;this.i=new Map;this.l=null;this.N="";this.Ea=new bv;this.K=-1;this.Y=Infinity;this.W=this.jb=this.vb=!1;this.A=new Ub(function(){kv(a)});this.na=lv;this.o=null;this.Ia=0;this.m=Infinity;this.wa=this.qa=this.P=0;this.S=new tg;this.H=new Map;this.I=new Map;this.Z=new Map;this.ha=new Map;
|
|
1012
1016
|
this.L=new Map;this.Ca=new Map;this.ma=new Map;this.Ya=this.G=!1;this.Ma=new kd(5);this.j=null;this.ea=!0}p=jv.prototype;p.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};p.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.G=b.isLowLatencyMode(),F(e,mv(c,[a]),2)):3!=e.g?(d=e.h,c.N=d.uri,F(e,nv(c,d.data,a),3)):e.return(c.o)})};
|
|
1013
1017
|
p.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.S&&(a.push(this.S.destroy()),this.S=null);this.g=this.h=null;this.Ga.clear();this.o=null;this.i.clear();this.J.clear();this.I.clear();this.u.clear();this.Z.clear();this.ha.clear();this.L.clear();this.Ca.clear();this.ma.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
1014
|
-
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!ov(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(pv(a,g));return F(m,Promise.all(b),2)}qv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.
|
|
1018
|
+
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!ov(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(pv(a,g));return F(m,Promise.all(b),2)}qv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Bd});d.length&&!h&&(k=rv,sv(a,k.wi),l=d.map(function(n){return n.Wb}),a.l.qb(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
1015
1019
|
h&&tv(a);G(m)})};function uv(a,b){return ov(a)?a.O.get(b.type):b.ze}
|
|
1016
|
-
function pv(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P;return O(function(S){if(1==S.g){c=[];d=t(b.R());for(e=d.next();!e.done;e=d.next())f=e.value,g=new mb(f),h=g.g,b
|
|
1017
|
-
b.R().includes(m)||b.Qh.push(m);n=Wu(l.g,"EXT-X-DEFINE");q=vv(a,n,m);r=b.stream;u=uv(a,b);return F(S,wv(a,l,r.mimeType,b.R,q),3)}v=S.h;w=v.keyIds;A=v.drmInfos;y=function(R,
|
|
1018
|
-
0,J=yv(C,z),K=J.
|
|
1020
|
+
function pv(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P;return O(function(S){if(1==S.g){c=[];d=t(b.R());for(e=d.next();!e.done;e=d.next())f=e.value,g=new mb(f),h=g.g,b.$d&&(0<=b.Fb&&h.add("_HLS_msn",String(b.Fb)),0<=b.Gb&&h.add("_HLS_part",String(b.Gb))),b.ae&&h.add("_HLS_skip","YES"),Cb(h)&&qb(g,h),c.push(g.toString());return F(S,mv(a,c,!0),2)}if(3!=S.g){k=S.h;if(!b.stream.segmentIndex)return S.return();l=cv(a.Ea,k.data);if(1!=l.type)throw new U(2,4,4017);m=k.uri;m==k.originalUri||
|
|
1021
|
+
b.R().includes(m)||b.Qh.push(m);n=Wu(l.g,"EXT-X-DEFINE");q=vv(a,n,m);r=b.stream;u=uv(a,b);return F(S,wv(a,l,r.mimeType,b.R,q),3)}v=S.h;w=v.keyIds;A=v.drmInfos;y=function(R,ha){return R.size===ha.size&&[].concat(x(R)).every(function(ka){return ha.has(ka)})};y(r.keyIds,w)||(r.keyIds=w,r.drmInfos=A,a.h.newDrmInfo(r));D=xv(a,l,u,q,b.R,b.type);z=D.segments;if(B=D.bandwidth)r.bandwidth=B;r.segmentIndex.Kd(z,a.l.Cb());z.length&&(C=Zu(l.g,"EXT-X-MEDIA-SEQUENCE",0),E=(I=Yu(l.g,"EXT-X-SKIP"))?Number(Y(I,"SKIPPED-SEGMENTS")):
|
|
1022
|
+
0,J=yv(C,z),K=J.Fb,H=J.Gb,b.Fb=K+E,b.Gb=H,M=u.get(C),r.segmentIndex.Va(M));N=r.segmentIndex.g[0]||null;b.Gc=N.startTime;L=z[z.length-1];b.Wb=L.endTime;if(P=Yu(l.g,"EXT-X-ENDLIST"))b.Bd=!0;zv(a,l);G(S)})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
1019
1023
|
function Av(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.K,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=uv(a,f);if(g=g.g[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.K=Math.max(a.K,l));f.Ff=l;break}}}}if(!(0>a.K))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Bv(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.Ff,0<f&&(e.g.splice(0,f),e=e.g[0]||null))e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
1020
1024
|
Cv(a,d,e)}
|
|
1021
1025
|
function Dv(a,b){if(Infinity==a.Y){b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.stream.segmentIndex.g[0]||null,null!=c&&null!=c.h&&(a.Y=Math.min(a.Y,c.h))}b=a.Y;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Bv(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(f)if(null==f.h)Ya("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.R(),"Expect AV sync issues!");else for(Cv(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Rg(b)}}}}
|
|
1022
1026
|
function Cv(a,b,c){b.Gc+=c;b.Wb+=c;a=uv(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.R()}
|
|
1023
|
-
function nv(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R,
|
|
1024
|
-
u=Wu(d.g,"EXT-X-SESSION-DATA");v=Wu(d.g,"EXT-X-CONTENT-STEERING");Gv(a,u);return F(ua,Hv(a,v),4);case 4:return Iv(a,m),Jv(a,l),F(ua,Kv(a,m,r,l,k,a.u),5);case 5:return f=ua.h,g=Lv(a,l),F(ua,Mv(a,n,q),6);case 6:h=ua.h;ua.B(3);break;case 7:return y=ua.h,D=y.type,z=y.mimeType,B=y.codecs,C=y.language,I=y.height,E=y.width,J=y.channelCount,K=y.sampleRate,H=y.closedCaptions,M=y.
|
|
1027
|
+
function nv(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R,ha,ka,ta,Va,Ba,Ha,Qa,Wa;return O(function(ua){switch(ua.g){case 1:d=cv(a.Ea,b);e=Wu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new yk(null,0);a.l.Kc(!0);k=function(){return[c]};if(1==d.type)return a.ea=!1,w=Wu(d.g,"EXT-X-DEFINE"),A=vv(a,w,a.N),F(ua,Ev(a,d,k,A),7);Fv(a,e);l=Wu(d.g,"EXT-X-MEDIA");m=Wu(d.g,"EXT-X-STREAM-INF");n=Wu(d.g,"EXT-X-IMAGE-STREAM-INF");q=Wu(d.g,"EXT-X-I-FRAME-STREAM-INF");r=Wu(d.g,"EXT-X-SESSION-KEY");
|
|
1028
|
+
u=Wu(d.g,"EXT-X-SESSION-DATA");v=Wu(d.g,"EXT-X-CONTENT-STEERING");Gv(a,u);return F(ua,Hv(a,v),4);case 4:return Iv(a,m),Jv(a,l),F(ua,Kv(a,m,r,l,k,a.u),5);case 5:return f=ua.h,g=Lv(a,l),F(ua,Mv(a,n,q),6);case 6:h=ua.h;ua.B(3);break;case 7:return y=ua.h,D=y.type,z=y.mimeType,B=y.codecs,C=y.language,I=y.height,E=y.width,J=y.channelCount,K=y.sampleRate,H=y.closedCaptions,M=y.Ud,N=y.colorGamut,F(ua,Nv(a,a.F++,A,d,k,B,D,C,!0,"Media Playlist",J,H,null,!1,K,!1,z),8);case 8:L=ua.h,a.i.set(c,L),"video"==D&&
|
|
1025
1029
|
Ov(L.stream,E,I,null,M,null,N),f.push({id:0,language:Wc(C||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==D?L.stream:null,video:"video"==D?L.stream:null,bandwidth:L.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);1==d.type&&(ov(a)&&(Pv(a,d),P=a.m,a.A.V(P)),S=Array.from(a.i.values()),Qv(a,S),tv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
1026
|
-
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.W||!a.g.hls.disableCodecGuessing){ua.B(9);break}R=[];
|
|
1027
|
-
[];Ba=f[0];
|
|
1028
|
-
function Ev(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E;return O(function(J){switch(J.g){case 1:e=jt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return J.return(e);f=b.segments[0];g=$u(c(),f.h,d);h=g[0];k=new mb(h);l=k.fb.split(".").pop();if(m=Rv[l])return J.return(jt(m));n=Gg;q=null;r=Sv(a,b,f.g,c,d);a.Z.clear();if(!r){J.B(2);break}u=yl(r.R(),r.
|
|
1030
|
+
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.W||!a.g.hls.disableCodecGuessing){ua.B(9);break}R=[];ha=t(a.o.variants);for(ka=ha.next();!ka.done;ka=ha.next())ta=ka.value,ta.audio&&""===ta.audio.codecs&&R.push(ta.audio.createSegmentIndex()),ta.video&&""===ta.video.codecs&&R.push(ta.video.createSegmentIndex());return F(ua,Promise.all(R),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){Va=
|
|
1031
|
+
[];Ba=f[0];Ha=t([Ba.video,Ba.audio]);for(Qa=Ha.next();!Qa.done;Qa=Ha.next())(Wa=Qa.value)&&!Wa.segmentIndex&&Va.push(Wa.createSegmentIndex());if(0<Va.length)return F(ua,Promise.all(Va),0)}ua.B(0)}})}
|
|
1032
|
+
function Ev(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E;return O(function(J){switch(J.g){case 1:e=jt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return J.return(e);f=b.segments[0];g=$u(c(),f.h,d);h=g[0];k=new mb(h);l=k.fb.split(".").pop();if(m=Rv[l])return J.return(jt(m));n=Gg;q=null;r=Sv(a,b,f.g,c,d);a.Z.clear();if(!r){J.B(2);break}u=yl(r.R(),r.Ob(),r.Mb(),a.g.retryParameters);return F(J,Tv(a,u,n,{type:0}),3);case 3:v=J.h,q=v.data;case 2:w=0;A=null;if(y=Yu(f.g,"EXT-X-BYTERANGE"))D=
|
|
1029
1033
|
t(Uv(null,y.value)),w=D.next().value,A=D.next().value;z=yl(g,w,A,a.g.retryParameters);return F(J,Tv(a,z,n,{type:1}),4);case 4:B=J.h;(C=B.headers["content-type"])&&(C=C.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==C){var K=B.data;var H=Gb(K);H=(new yj).parse(H);var M=H.ud();H=H.$f();var N=[],L=!1,P=!1;switch(M.audio){case "aac":case "aac-loas":N.push("mp4a.40.2");L=!0;break;case "mp3":N.push("mp4a.40.34");L=!0;break;case "ac3":N.push("ac-3");L=!0;break;case "ec3":N.push("ec-3");L=!0;break;
|
|
1030
|
-
case "opus":N.push("opus"),L=!0}switch(M.video){case "avc":H.codec?N.push(H.codec):N.push("avc1.42E01E");P=!0;break;case "hvc":H.codec?N.push(H.codec):N.push("hvc1.1.6.L93.90");P=!0;break;case "av1":N.push("av01.0.01M.08"),P=!0}if(N.length){M=L&&!P;L=new Map;if(P){P=new
|
|
1031
|
-
sampleRate:null,closedCaptions:L,
|
|
1034
|
+
case "opus":N.push("opus"),L=!0}switch(M.video){case "avc":H.codec?N.push(H.codec):N.push("avc1.42E01E");P=!0;break;case "hvc":H.codec?N.push(H.codec):N.push("hvc1.1.6.L93.90");P=!0;break;case "av1":N.push("av01.0.01M.08"),P=!0}if(N.length){M=L&&!P;L=new Map;if(P){P=new Dd("video/mp2t");P.i(K);K=t(P.j());for(var S=K.next();!S.done;S=K.next())S=S.value,L.set(S,S);P.g()}H={type:M?"audio":"video",mimeType:"video/mp2t",codecs:N.join(", "),language:null,height:H.height,width:H.width,channelCount:null,
|
|
1035
|
+
sampleRate:null,closedCaptions:L,Ud:null,colorGamut:null}}else H=null;if(I=H)return J.return(I)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==C||"audio/mp4"==C||"video/iso.segment"==C)if(E=kt(q,B.data))return J.return(E);return J.return(e)}})}
|
|
1032
1036
|
function tv(a){if(ov(a)){if(a.na==Vv){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.Wb),c=Math.min(c,e.Gc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.u);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Te(b)}}else a.l.qb(Wv(a));if(!a.l.o)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))&&
|
|
1033
1037
|
c.h&&a.l.Yh(c.h);a.l.xe()}function Fv(a,b){var c=(new mb(a.N)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Y(e,"NAME");var f=Y(e,"VALUE");e=Y(e,"QUERYPARAM");d&&f&&(a.u.has(d)||a.u.set(d,f));e&&(d=c.get(e)[0])&&!a.u.has(d)&&a.u.set(e,d)}}
|
|
1034
1038
|
function vv(a,b,c){c=(new mb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Y(f,"NAME"),h=Y(f,"VALUE");e=Y(f,"QUERYPARAM");f=Y(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.u.get(f))&&d.set(f,e)}return d}
|
|
@@ -1040,9 +1044,9 @@ function aw(a){var b=new Set([ue(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmen
|
|
|
1040
1044
|
function Mv(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);va(m,2);return F(m,bw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=ya(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=Tu(g,"URI"),k=Y(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Y(g,"LANGUAGE"),n=Y(g,"NAME"),
|
|
1041
1045
|
q=Y(g,"CHARACTERISTICS"),r=cw(a,a.F++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Y(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 y=Y(g,"BANDWIDTH");y&&(r.stream.bandwidth=Number(y));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}))})}
|
|
1042
1046
|
function dw(a,b,c){b=b.filter(function(h){var k=Y(h,"URI")||"";return"SUBTITLES"!=Y(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Ru(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Yv(a,d[g],c)}
|
|
1043
|
-
function Kv(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R,
|
|
1044
|
-
y(m,""):null;Wa.B(6);break}return F(Wa,gw(a,m,"",e,null,f),9);case 9:r=Wa.h;case 6:if(r){if(r.keyIds)for(D=t(r.keyIds),z=D.next();!z.done;z=D.next())B=z.value,h.add(B);g.push(r)}case 4:l=k.next();Wa.B(3);break;case 2:C={};I=t(b);for(E=I.next();!E.done;E=I.next())J=E.value,K=Ru(J,!a.j),C[K]?C[K].push(J):C[K]=[J];H=[];for(M in C)N=C[M],L=N[0],P=Y(L,"FRAME-RATE"),S=Number(Y(L,"AVERAGE-BANDWIDTH"))||Number(Tu(L,"BANDWIDTH")),R=Y(L,"RESOLUTION"),
|
|
1045
|
-
Va=Y(L,"VIDEO-RANGE"),(Ba=Y(L,"REQ-VIDEO-LAYOUT"))&&Ba.includes(",")&&(
|
|
1047
|
+
function Kv(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R,ha,ka,ta,Va,Ba,Ha,Qa;return O(function(Wa){switch(Wa.g){case 1:g=[];h=new Set;if(!(0<c.length)){Wa.B(2);break}k=t(c);l=k.next();case 3:if(l.done){Wa.B(2);break}m=l.value;n=Tu(m,"METHOD");q=Y(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){Wa.B(4);break}if(ew(n)){u=$u(e(),Tu(m,"URI"),f);v=u.sort().join("");a.L.has(v)||(w=Ag(u,a.g.retryParameters),A=Tv(a,w,6),a.L.set(v,A));Wa.B(4);break}if("identity"!=q){r=(y=fw[q])?
|
|
1048
|
+
y(m,""):null;Wa.B(6);break}return F(Wa,gw(a,m,"",e,null,f),9);case 9:r=Wa.h;case 6:if(r){if(r.keyIds)for(D=t(r.keyIds),z=D.next();!z.done;z=D.next())B=z.value,h.add(B);g.push(r)}case 4:l=k.next();Wa.B(3);break;case 2:C={};I=t(b);for(E=I.next();!E.done;E=I.next())J=E.value,K=Ru(J,!a.j),C[K]?C[K].push(J):C[K]=[J];H=[];for(M in C)N=C[M],L=N[0],P=Y(L,"FRAME-RATE"),S=Number(Y(L,"AVERAGE-BANDWIDTH"))||Number(Tu(L,"BANDWIDTH")),R=Y(L,"RESOLUTION"),ha=t(R?R.split("x"):[null,null]),ka=ha.next().value,ta=ha.next().value,
|
|
1049
|
+
Va=Y(L,"VIDEO-RANGE"),(Ba=Y(L,"REQ-VIDEO-LAYOUT"))&&Ba.includes(",")&&(Ha=Ba.split(",").filter(function(ua){return"CH-STEREO"==ua||"CH-MONO"==ua}),Ba=Ha[0]),Ba=Ba||"CH-MONO",Qa=hw(a,N,d),H.push.apply(H,x(iw(a,Qa.audio,Qa.video,S,ka,ta,P,Va,Ba,g,h)));return Wa.return(H.filter(function(ua){return null!=ua}))}})}
|
|
1046
1050
|
function hw(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=Y(m,"AUDIO");var n=Y(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Y(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(Tu(v,"GROUP-ID"))}),dw(a,k,e));k=(e=f.sort().join(","))&&a.J.has(e)?a.J.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 Tu(v,
|
|
1047
1051
|
"URI")});h=d.audio.find(function(v){return v&&v.R().find(function(w){return r.includes(w)})});g=Xv(a,b[0]);n=Pc("video",g);(q=Pc("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&q&&n?(h="video",g=[[n,q].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=q=n=l=null;!k.length&&(c=c.find(function(v){var w=Y(v,"URI")||"",A=Y(v,"TYPE");v=Tu(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Y(c,"LANGUAGE"),
|
|
1048
1052
|
n=Y(c,"NAME"),q=jw(c),kw(c),m=Y(c,"CHARACTERISTICS"),u=lw(c));a=mw(a,b,g,h,l,n,q,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
@@ -1056,16 +1060,16 @@ m=n.next().value;n=n.next().value;(m=c.get(m))&&st(a.j,l,m,n)}}c=Y(h,"LANGUAGE")
|
|
|
1056
1060
|
function bw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(q){if(1==q.g){c=Tu(b,"URI");d=Y(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=Y(b,"LANGUAGE");f=Y(b,"NAME");g=Y(b,"CHARACTERISTICS");h=cw(a,a.F++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Y(b,"RESOLUTION"))?F(q,h.stream.createSegmentIndex(),3):q.B(2)}2!=q.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])*
|
|
1057
1061
|
Number(m.split("x")[1]));if(n=Y(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return q.return(h)})}
|
|
1058
1062
|
function mw(a,b,c,d,e,f,g,h,k){for(var l=a.F++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var r=q.value;q=Tu(r,"URI");r=Y(r,"PATHWAY-ID");a.j&&r&&st(a.j,l,r,q);m.push(q)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Y(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.H.get(b);break a}a.ea=!1}else if(!b&&a.H.size)for(b=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}b=null}c=Oc(d,c);d=cw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
1059
|
-
function cw(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function u(B){var C,I,E,J,K,H,M,N,L,P,S,R,
|
|
1060
|
-
break}if(P=0<K.segments.length)S=K.segments[0],Yu(S.g,"EXT-X-GAP")&&(P=!1);if(!P){tb.B(3);break}a.ea=!1;return F(tb,Ev(a,K,v,M),5);case 5:R=tb.h,!R.closedCaptions.size||l&&l.size==R.closedCaptions.size||(l=R.closedCaptions,L=!0),!a.W&&a.g.hls.disableCodecGuessing&&(N=R.mimeType,d=R.codecs);case 3:return
|
|
1061
|
-
y.
|
|
1062
|
-
aw(
|
|
1063
|
+
function cw(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function u(B){var C,I,E,J,K,H,M,N,L,P,S,R,ha,ka,ta,Va,Ba,Ha,Qa,Wa,ua,gb;return O(function(tb){switch(tb.g){case 1:return C=Tc,I=y.R(),F(tb,mv(a,y.R(),!0),2);case 2:E=tb.h;if(B.aborted)return tb.return();J=E.uri;J==E.originalUri||I.includes(J)||A.push(J);K=cv(a.Ea,E.data);if(1!=K.type)throw new U(2,4,4017);H=Wu(K.g,"EXT-X-DEFINE");M=vv(a,H,J);N=void 0;L=!1;if(!(!a.W&&a.g.hls.disableCodecGuessing||a.ea&&e==C.ua&&!a.g.hls.disableClosedCaptionsDetection)){tb.B(3);
|
|
1064
|
+
break}if(P=0<K.segments.length)S=K.segments[0],Yu(S.g,"EXT-X-GAP")&&(P=!1);if(!P){tb.B(3);break}a.ea=!1;return F(tb,Ev(a,K,v,M),5);case 5:R=tb.h,!R.closedCaptions.size||l&&l.size==R.closedCaptions.size||(l=R.closedCaptions,L=!0),!a.W&&a.g.hls.disableCodecGuessing&&(N=R.mimeType,d=R.codecs);case 3:return ha=ov(a),F(tb,Nv(a,0,M,K,v,d,e,f,g,h,k,l,m,n,q,r,N),6);case 6:ka=tb.h;if(B.aborted)return tb.return();ta=ka.stream;ov(a)&&!ha&&Pv(a,K);y.Gc=ka.Gc;y.Wb=ka.Wb;y.ae=ka.ae;y.$d=ka.$d;y.Bd=ka.Bd;y.ze=ka.ze;
|
|
1065
|
+
y.Fb=ka.Fb;y.Gb=ka.Gb;y.og=!0;w.segmentIndex=ta.segmentIndex;w.encrypted=ta.encrypted;w.drmInfos=ta.drmInfos;w.keyIds=ta.keyIds;w.mimeType=ta.mimeType;w.bandwidth=w.bandwidth||ta.bandwidth;w.codecs=w.codecs||ta.codecs;w.closedCaptions=w.closedCaptions||ta.closedCaptions;aw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&L&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==C.ua||e==C.ba)for(Va=t(a.i.values()),Ba=Va.next();!Ba.done;Ba=Va.next())Ha=Ba.value,Ha.og||Ha.type!=e||(Ha.stream.mimeType=ta.mimeType,
|
|
1066
|
+
aw(Ha.stream));e==C.Ha&&(Qa=ta.segmentIndex.get(0))&&Qa.ra&&(w.mimeType="application/mp4",aw(w));nw(a)&&(a.jb?Qv(a,[y]):(a.jb=!0,Wa=Array.from(a.i.values()),ua=Wa.filter(function(Ed){return Ed.stream.segmentIndex}),Qv(a,ua),tv(a),gb=a.m,0<gb&&a.A.V(gb)));G(tb)}})}function v(){return a.j&&1<c.length?tt(a.j,b):A.concat(av([a.N],c,a.u))}var w=ow(a,d,e,f,g,h,k,l,m,n,q,r),A=[],y={stream:w,type:e,Qh:A,R:v,Gc:0,Wb:0,ze:new Map,ae:!1,$d:!1,Bd:!1,Ff:-1,Fb:-1,Gb:-1,og:!1},D=null,z=new AbortController;w.createSegmentIndex=
|
|
1063
1067
|
function(){if(D)return D;z=new AbortController;return D=new Promise(function(B){B(u(z.signal))})};w.closeSegmentIndex=function(){D&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);D=null};return y}function Wv(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.Wb));return b}
|
|
1064
|
-
function qv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.uc(function(e){c.push(e)});a.l.
|
|
1068
|
+
function qv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.uc(function(e){c.push(e)});a.l.Md(c)}function Qv(a,b){if(!ov(a))for(var c=Wv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Vc(0,c);qv(a,b.map(function(f){return f.stream}));c=ov(a)&&!a.vb;a.g.hls.ignoreManifestProgramDateTime||c?Av(a,b,c):(Dv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Av(a,b))}
|
|
1065
1069
|
function Bv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function nw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.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}
|
|
1066
|
-
function Nv(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w){var A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R,
|
|
1067
|
-
C=B.drmInfos;I=B.keyIds;E=B.encrypted;J=B.Bi;if(E&&!C.length&&!J)throw new U(2,4,4026);K=ow(a,f,g,h,k,l,m,n,q,r,u,v);K.encrypted=E;K.drmInfos=C;K.keyIds=I;K.mimeType=w;z&&(K.bandwidth=z);aw(K);ov(a)&&zv(a,d);H=D[0].startTime;M=D[D.length-1];N=M.endTime;L=new Uk(D);K.segmentIndex=L;S=(P=Yu(d.g,"EXT-X-SERVER-CONTROL"))?null!=Su(P,"CAN-SKIP-UNTIL"):!1;R=P?null!=Su(P,"CAN-BLOCK-RELOAD"):!1;
|
|
1068
|
-
Wb:N,$d:
|
|
1070
|
+
function Nv(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w){var A,y,D,z,B,C,I,E,J,K,H,M,N,L,P,S,R,ha,ka,ta,Va;return O(function(Ba){switch(Ba.g){case 1:var Ha=Yu(d.g,"EXT-X-PLAYLIST-TYPE"),Qa=Yu(d.g,"EXT-X-ENDLIST");Qa=Ha&&"VOD"==Ha.value||Qa;Ha=Ha&&"EVENT"==Ha.value&&!Qa;Ha=!Qa&&!Ha;Qa?sv(a,lv):Ha?sv(a,Vv):sv(a,pw);ov(a)&&zv(a,d);A=ov(a)?a.O.get(g):new Map;y=xv(a,d,A,c,e,g);D=y.segments;z=y.bandwidth;if(w){Ba.B(2);break}return F(Ba,qw(a,g,f,D),3);case 3:w=Ba.h;case 2:return F(Ba,wv(a,d,w,e,c),4);case 4:B=Ba.h;
|
|
1071
|
+
C=B.drmInfos;I=B.keyIds;E=B.encrypted;J=B.Bi;if(E&&!C.length&&!J)throw new U(2,4,4026);K=ow(a,f,g,h,k,l,m,n,q,r,u,v);K.encrypted=E;K.drmInfos=C;K.keyIds=I;K.mimeType=w;z&&(K.bandwidth=z);aw(K);ov(a)&&zv(a,d);H=D[0].startTime;M=D[D.length-1];N=M.endTime;L=new Uk(D);K.segmentIndex=L;S=(P=Yu(d.g,"EXT-X-SERVER-CONTROL"))?null!=Su(P,"CAN-SKIP-UNTIL"):!1;R=P?null!=Su(P,"CAN-BLOCK-RELOAD"):!1;ha=Zu(d.g,"EXT-X-MEDIA-SEQUENCE",0);ka=yv(ha,D);ta=ka.Fb;Va=ka.Gb;return Ba.return({stream:K,type:g,Qh:[],R:e,Gc:H,
|
|
1072
|
+
Wb:N,ae:S,$d:R,Bd:!1,Ff:-1,Fb:ta,Gb:Va,ze:A,og:!1})}})}function yv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Fb:a,Gb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Fb:a,Gb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{Fb:a,Gb:c}}
|
|
1069
1073
|
function ow(a,b,c,d,e,f,g,h,k,l,m,n){var q=Zv(c,b)||$v(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==Rc?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.F++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1070
1074
|
segmentIndex:null,mimeType:q,codecs:b,kind:c==Rc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Wc(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,
|
|
1071
1075
|
fullMimeTypes:new Set};aw(a);return a}
|
|
@@ -1074,18 +1078,18 @@ function wv(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P
|
|
|
1074
1078
|
function rw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Za("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var f=0,g=Y(b,"IV","");if(g){var h=Ic(g.substr(2));if(16!=h.byteLength)throw new U(2,4,4048);}else f=Zu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ha.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Tu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1075
1079
|
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,q,r,u;return O(function(v){if(1==v.g)return l=$u(d(),Tu(b,"URI"),e),m=l.sort().join(""),a.L.has(m)||(n=Ag(l,a.g.retryParameters),q=Tv(a,n,6),a.L.set(m,q)),F(v,a.L.get(m),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new U(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;G(v)})};
|
|
1076
1080
|
a.ha.set(c,k)}return a.ha.get(c)}
|
|
1077
|
-
function zv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Yu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Yu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Yu(b.g,"EXT-X-PART-INF"))a.P=Number(Tu(e,"PART-TARGET"));b=Yu(b.g,"EXT-X-SERVER-CONTROL");a.G&&a.P?(a.m=a.Ya?5*a.P<=c?Math.min(a.P,a.m):Math.min(c,a.m):Math.min(a.P,a.m),a.
|
|
1078
|
-
Su(b,"HOLD-BACK"):null,a.
|
|
1081
|
+
function zv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Yu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Yu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Yu(b.g,"EXT-X-PART-INF"))a.P=Number(Tu(e,"PART-TARGET"));b=Yu(b.g,"EXT-X-SERVER-CONTROL");a.G&&a.P?(a.m=a.Ya?5*a.P<=c?Math.min(a.P,a.m):Math.min(c,a.m):Math.min(a.P,a.m),a.wa=b?Number(Tu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1082
|
+
Su(b,"HOLD-BACK"):null,a.qa=c?Number(c.value):0);a.Ia=Math.max(d,a.Ia)}function Pv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.wa)b=a.wa;else if(a.qa)b=a.qa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Ia*c}a.l.$h(0);a.l.Hg(b);a.l.Kc(!1)}
|
|
1079
1083
|
function Sv(a,b,c,d,e){var f=Yu(c,"EXT-X-MAP");if(!f)return null;var g=Tu(f,"URI"),h=$u(d(),g,e);g=[h.toString(),Y(f,"BYTERANGE","")].join("-");if(!a.Z.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?ew(Tu(m,"METHOD"))&&m.id<f.id&&(k=rw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=sw(h,f,l,k);a.Z.set(g,b)}return a.Z.get(g)}
|
|
1080
1084
|
function sw(a,b,c,d){var e=0,f=null;b=Y(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 Ji(function(){return a},e,f,null,null,null,d)}
|
|
1081
|
-
function tw(a,b,c,d,e,f,g,h,k){function l(
|
|
1082
|
-
a.
|
|
1083
|
-
"BYTERANGE-LENGTH"))?P=L+Number(K)-1:L&&(P=Number.MAX_SAFE_INTEGER)):(L=Y(J,"BYTERANGE"),P=t(Uv(K,L)),L=P.next().value,P=P.next().value);I.Ie=Y(J,"URI");if(I.Ie){K=Mi;"YES"==Y(J,"GAP")&&(K=2,z=!0);I.bf=null;var S=function(
|
|
1085
|
+
function tw(a,b,c,d,e,f,g,h,k){function l(ha){ha=(new mb(ha)).fb.split(".").pop();var ka=uw[g][ha];ka||(ka=Rv[ha]);return ka}var m=d.g,n=Yu(m,"EXTINF"),q=0,r=0,u=null;d.Qb.length&&!a.G&&Za("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Yu(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=xh(w.value),
|
|
1086
|
+
a.vb=!0)}var A=Mi;Yu(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.Qb.length)throw new U(2,4,4024,"EXTINF");if(!a.G)return null}var y=[];w=!1;var D=null,z=!1,B=!1;if(a.G&&d.Qb.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=v,I={},E=0;E<d.Qb.length;I={bf:void 0,Ie:void 0},E++){var J=d.Qb[E],K=0==E?c:y[y.length-1],H=0==E?e:K.endTime,M=Number(Y(J,"DURATION"))||a.P;if(M){var N=H+M,L=0,P=null;"EXT-X-PRELOAD-HINT"==J.name?(L=(L=Y(J,"BYTERANGE-START"))?Number(L):0,(K=Y(J,
|
|
1087
|
+
"BYTERANGE-LENGTH"))?P=L+Number(K)-1:L&&(P=Number.MAX_SAFE_INTEGER)):(L=Y(J,"BYTERANGE"),P=t(Uv(K,L)),L=P.next().value,P=P.next().value);I.Ie=Y(J,"URI");if(I.Ie){K=Mi;"YES"==Y(J,"GAP")&&(K=2,z=!0);I.bf=null;var S=function(ha){return function(){null==ha.bf&&(ha.bf=$u(h(),ha.Ie,f));return ha.bf}}(I);q&&0<=L&&null!=P&&(D=S,w=!0);H=new Li(H,N,S,L,P,b,0,0,Infinity,[],"",null,C,K,k);"EXT-X-PRELOAD-HINT"==J.name&&(H.pg(),B=!0);"YES"!=Y(J,"INDEPENDENT")&&0<E&&H.ye();if(I=l(I.Ie))H.mimeType=I,vw.has(I)&&(H.ra=
|
|
1084
1088
|
null);y.push(H);C&&(C+=M)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;q=e+n}else if(y.length)q=y[y.length-1].endTime;else return null;w&&(z||0!=y[0].Wa?(w=!1,D=null):y=[]);(n=Yu(m,"EXT-X-BYTERANGE"))?(u=t(Uv(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].Wa,u=y[y.length-1].Fa);c="";n=null;"image"==g&&(c="1x1",m=Yu(m,"EXT-X-TILES"))&&(c=Tu(m,"LAYOUT"),(m=Y(m,"DURATION"))&&(n=Number(m)));var R=null;b=new Li(e,q,function(){if(D)return D();null==R&&(R=$u(h(),d.h,f));
|
|
1085
|
-
return R||[]},r,u,b,0,0,Infinity,y,c,n,v,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,vw.has(e)&&(b.
|
|
1086
|
-
function xv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Zu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Zu(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Yu(b.g,"EXT-X-SKIP"),n=m?Number(Y(m,"SKIPPED-SEGMENTS")):0,q=l+n,r=0;ov(a)&&c.has(q)&&(r=c.get(q));0===r&&a.na==Vv&&0<c.size&&!c.has(q)&&(r=a.l.
|
|
1089
|
+
return R||[]},r,u,b,0,0,Infinity,y,c,n,v,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,vw.has(e)&&(b.ra=null);w&&(a.Ya=!0,b.Fh(),B&&b.pg());return b}function Uv(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Fa+1,d=c+b-1);return[c,d]}
|
|
1090
|
+
function xv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Zu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Zu(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Yu(b.g,"EXT-X-SKIP"),n=m?Number(Y(m,"SKIPPED-SEGMENTS")):0,q=l+n,r=0;ov(a)&&c.has(q)&&(r=c.get(q));0===r&&a.na==Vv&&0<c.size&&!c.has(q)&&(r=a.l.Cb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],y=0==w?r:v.endTime;q=l+n+w;Yu(A.g,"EXT-X-DISCONTINUITY")&&k++;var D=t(A.g);for(var z=D.next();!z.done;z=D.next())z=z.value,"EXT-X-KEY"==z.name&&(ew(Tu(z,"METHOD"))?
|
|
1087
1091
|
h=rw(a,z,b,e,d):h=void 0);c.set(q,y);D=Sv(a,b,A.g,e,d);!a.G&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.G=a.h.isLowLatencyMode());if(y=tw(a,D,v,A,y,d,f,e,h))(v=Zu(A.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.i=k,Bv(a,f)&&null!=a.K&&q<a.K||u.push(y)}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)/
|
|
1088
|
-
b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={
|
|
1092
|
+
b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={ge:void 0,fe:void 0,Xd:void 0,Ic:void 0,Wd:void 0},d++)if(c.Ic=u[d],null==c.Ic.h)for(c.fe=0,c.ge=d,e=function(B){return function(){var C=u[B.ge];if(C){if(null!=C.h)return C.h+B.fe;B.fe-=C.endTime-C.startTime;B.ge+=1}return null}}(c),c.Wd=0,c.Xd=d,g=function(B){return function(){var C=u[B.Xd];if(C){C!=B.Ic&&(B.Wd+=C.endTime-C.startTime);if(null!=C.h)return C.h+B.Wd;--B.Xd}return null}}(c);null==c.Ic.h;)c.Ic.h=g(),null==c.Ic.h&&
|
|
1089
1093
|
(c.Ic.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.Y;if(m&&Infinity!=c&&!Bv(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Rg(c);return{segments:u,bandwidth:b}}
|
|
1090
1094
|
function Zv(a,b){if(a==Rc){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 $v(a){return a==Rc?"text/vtt":uw[a].mp4}
|
|
1091
1095
|
function qw(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,A;return O(function(y){switch(y.g){case 1:e=Gg;f=Math.trunc((d.length-1)/2);for(g=d[f];2==g.status&&f<d.length;)f++,g=d[f];if(2==g.status)return y.return($v(b));h=g.R();k=new mb(h[0]);l=k.fb.split(".").pop();m=uw[b];if((n=m[l])||(n=Rv[l])||(n=Zv(b,c)))return y.return(n);r=1;u=Ag(h,a.g.retryParameters);va(y,2);u.method="HEAD";return F(y,Tv(a,u,e,{type:r}),4);case 4:v=y.h;q=v.headers["content-type"];xa(y,3);break;case 2:w=ya(y);if(!w||1002!=w.code&&
|
|
@@ -1093,7 +1097,7 @@ function qw(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,v,w,A;return O(function(y){switch
|
|
|
1093
1097
|
function kv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();va(h,2);b=Date.now();return F(h,a.update(),4);case 4:c=Date.now();ov(a)&&(d=(c-b)/1E3,a.Ma.sample(1,d),e=a.m,f=Math.max(0,e-ld(a.Ma)),a.A.V(f));xa(h,3);break;case 2:g=ya(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.V(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();G(h)}})}
|
|
1094
1098
|
function ov(a){return a.na!=lv}function sv(a,b){a.na=b;a.l&&a.l.Kc(!ov(a));ov(a)||a.A.stop()}function Tv(a,b,c,d){if(!a.S)throw new U(2,7,7001);b=a.h.networkingEngine.request(c,b,d);ug(a.S,b);return b.promise}function ew(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1095
1099
|
function gw(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w,A,y,D,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new U(2,4,4040);if(tc())throw new U(2,4,4041);g=Tu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=$u(d(),Tu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Jc(Hc(k[0].split("data:text/plain;base64,").pop()));B.B(2);break}m=k.sort().join("");a.Ca.has(m)||(n=Ag(k,a.g.retryParameters),q=Tv(a,n,6),a.Ca.set(m,q));return F(B,a.Ca.get(m),
|
|
1096
|
-
3);case 3:r=B.h,l=Jc(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.B(4);break}if(a.ma.has(e)){v=a.ma.get(e);B.B(5);break}w=yl(e.R(),e.
|
|
1100
|
+
3);case 3:r=B.h,l=Jc(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.B(4);break}if(a.ma.has(e)){v=a.ma.get(e);B.B(5);break}w=yl(e.R(),e.Ob(),e.Mb(),a.g.retryParameters);A=Gg;return F(B,Tv(a,w,A,{type:0}),6);case 6:y=B.h,v=nt(y.data),a.ma.set(e,v);case 5:v&&(u=v);case 4:return D=new Map,D.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Nc(D,z))}})}Q("shaka.hls.HlsParser",jv);
|
|
1097
1101
|
var Rv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},uw={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",
|
|
1098
1102
|
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"}},vw=new Set(["video/mp2t"].concat(x(ve))),fw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new U(2,4,4040);if(tc())throw new U(2,4,4041);a=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Mc("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
1099
1103
|
keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Tu(a,"URI");b=iv(b.split("?")[0]);b=Gb(b.data);c=Mc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
@@ -1106,14 +1110,14 @@ case "audio":g=Ew("minf",Ew("smhd",Ow),Gw,Nw(g));break a}g=new Uint8Array([])}g=
|
|
|
1106
1110
|
a.byteLength);b.set(Dw);b.set(a,Dw.byteLength);return b}
|
|
1107
1111
|
function Nw(a){var b=Ew,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.La.byteLength)var e=Ew("avcC",a.La);else{e=Ew;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.rb.length;n++){var q=Pw(a.rb[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.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=
|
|
1108
1112
|
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(Jw(c,2)),x(Jw(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=Qw(a);g=new Uint8Array([]);
|
|
1109
|
-
a.encrypted&&(g=
|
|
1110
|
-
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Ew(".mp3",dx(a));else if(a.codecs.includes("ac-3"))c=Ew("dac3",a.Aa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=
|
|
1111
|
-
a.Aa);else{c=Ew;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Oc("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(Jw(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=
|
|
1113
|
+
a.encrypted&&(g=Rw(a),d="encv");c=Ew(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.La.byteLength&&(c=Ew("hvcC",a.La)),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(Jw(d,2)),x(Jw(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=Qw(a),g=new Uint8Array([]),a.encrypted&&(g=Rw(a),e="encv"),c=Ew(e,d,
|
|
1114
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Ew(".mp3",dx(a));else if(a.codecs.includes("ac-3"))c=Ew("dac3",a.Aa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Rw(a),d="enca"),a=Ew(d,dx(a),c,e);else if(a.codecs.includes("ec-3"))c=Ew("dec3",a.Aa),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Rw(a),d="enca"),a=Ew(d,dx(a),c,e);else if(a.codecs.includes("opus"))c=Ew("dOps",a.Aa),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Rw(a),d="enca"),a=Ew(d,dx(a),c,e);else{if(0<a.Aa.byteLength)c=Ew("esds",
|
|
1115
|
+
a.Aa);else{c=Ew;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Oc("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(Jw(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=Rw(a),d="enca");
|
|
1112
1116
|
a=Ew(d,dx(a),c,e)}c=a}a=Ew("stsd",ex,c);return b("stbl",a,Ew("stts",fx),Ew("stsc",gx),Ew("stsz",hx),Ew("stco",ix))}function Qw(a){if(!a.Sa&&!a.Ua)return new Uint8Array([]);var b=a.Ua;a=new Uint8Array([].concat(x(Jw(a.Sa,4)),x(Jw(b,4))));return Ew("pasp",a)}function dx(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(Jw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1113
|
-
function
|
|
1117
|
+
function Rw(a){var b=Ew;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(Jw(d,4))));c=Ew("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Ew("schm",d);e=Ew;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=Pw(h.value)}a=new Uint8Array([0,
|
|
1114
1118
|
0,0,0,0,0,1,8]);f=Ew("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1115
|
-
function jx(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=Ew;var g=new Uint8Array([0,0,0,0].concat(x(Jw(c.data?c.data.
|
|
1116
|
-
0;var q=Math.floor(m%(Iw+1));m=new Uint8Array([1,0,0,0].concat(x(Jw(Math.floor(m/(Iw+1)),4)),x(Jw(q,4))));m=Ew("tfdt",m);var r=n;n=c.data?c.data.pb:[];q=n.length;var u=12+16*q,v=new Uint8Array(u);r+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Jw(q,4)),x(Jw(r,4))),0);for(r=0;r<q;r++){var w=n[r];u=Jw(w.duration,4);var A=Jw(w.size,4),y=w.flags;w=Jw(w.ub,4);v.set([].concat(x(u),x(A),[y.
|
|
1119
|
+
function jx(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=Ew;var g=new Uint8Array([0,0,0,0].concat(x(Jw(c.data?c.data.Ib:0,4))));g=Ew("mfhd",g);var h;var k=c.data?c.data.pb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.ib<<4|m.mb<<2|m.kb}k=Ew("sdtp",l);var n=k.length+92;l=Ew;h=new Uint8Array([0,0,0,58].concat(x(Jw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Ew("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1120
|
+
0;var q=Math.floor(m%(Iw+1));m=new Uint8Array([1,0,0,0].concat(x(Jw(Math.floor(m/(Iw+1)),4)),x(Jw(q,4))));m=Ew("tfdt",m);var r=n;n=c.data?c.data.pb:[];q=n.length;var u=12+16*q,v=new Uint8Array(u);r+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Jw(q,4)),x(Jw(r,4))),0);for(r=0;r<q;r++){var w=n[r];u=Jw(w.duration,4);var A=Jw(w.size,4),y=w.flags;w=Jw(w.ub,4);v.set([].concat(x(u),x(A),[y.wb<<2|y.ib,y.mb<<6|y.kb<<4|y.xb,y.hb&61440,y.hb&15],x(w)),12+16*r)}n=Ew("trun",v);k=l("traf",h,m,n,k);f=f("moof",
|
|
1117
1121
|
g,k);e.call(d,b,[f,kx(c)])}return Kc.apply(Ec,x(b))}function kx(a){a=(a.data?a.data.pb:[]).map(function(b){return b.data});a=Kc.apply(Ec,x(a));return Ew("mdat",a)}function Jw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Pw(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}
|
|
1118
1122
|
function Ew(a){var b=Ja.apply(1,arguments),c=lx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],lx[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}
|
|
1119
1123
|
var Cw=!1,Iw=Math.pow(2,32)-1,lx={},Kw=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]),Lw=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]),fx=new Uint8Array([0,0,0,0,0,0,0,0]),gx=new Uint8Array([0,0,0,0,0,0,0,0]),ix=new Uint8Array([0,0,0,0,0,0,0,0]),hx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Mw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ow=new Uint8Array([0,
|
|
@@ -1153,7 +1157,7 @@ function ay(a){return Promise.reject(new U(2,9,9011,"Cannot add new value to "+a
|
|
|
1153
1157
|
function by(a,b,c,d){a=Yx(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={jg:void 0},e=c.next())f.jg=e.value,b.delete(f.jg).onsuccess=function(g){return function(){return d(g.jg)}}(f);return a.promise()}
|
|
1154
1158
|
function cy(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Zx(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={Ne:void 0,ve:void 0},k=h.next())l.ve=k.value,l.Ne=e.get(l.ve),l.Ne.onsuccess=function(n){return function(){void 0==n.Ne.result&&g.push(n.ve);f[n.ve]=n.Ne.result}}(l);return F(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function ey(a){this.g=new Xx(a)}ey.prototype.destroy=function(){return this.g.destroy()};ey.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Zx(a.g,"session-ids","readonly"),c=[],F(d,Wx(b,function(e,f){c.push(f)}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};ey.prototype.add=function(a){var b=Yx(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()};
|
|
1155
1159
|
ey.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Yx(b.g,"session-ids"),F(d,Wx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function fy(){this.g=new Map}fy.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)};fy.prototype.init=function(){var a=this;gy.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)};
|
|
1156
|
-
function hy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{
|
|
1160
|
+
function hy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Eb:d,Za:f},Za:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function iy(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Eb:d,Za:f},e)})})}
|
|
1157
1161
|
function jy(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function ky(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ly(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1158
1162
|
function my(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=gy,d.forEach(function(f){(f=f())&&b.push(f)})),F(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):F(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ny(a,b){gy.set(a,b)}Q("shaka.offline.StorageMuxer",fy);fy.unregister=function(a){gy.delete(a)};fy.register=ny;fy.prototype.destroy=fy.prototype.destroy;var gy=new Map;function oy(){$x.apply(this,arguments)}pa(oy,$x);oy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=Yx(c.h,c.g);e=d.store();f=new lg;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new U(2,9,9012,"Could not find values for "+a))};return F(g,Promise.all([d.promise(),f]),0)})};
|
|
1159
1163
|
oy.prototype.rd=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=py(a.periods[c],e),b.push(f);return F(h,Et(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})})};
|
|
@@ -1172,31 +1176,31 @@ new ty(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contain
|
|
|
1172
1176
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};p.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return F(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return F(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),G(b)}})};
|
|
1173
1177
|
p.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};p.getEmeSessionCell=function(){return this.m};
|
|
1174
1178
|
p.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return F(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),F(b,xy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,F(b,a.init(),0)}})};
|
|
1175
|
-
function xy(){var a=new lg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new U(2,9,9001,b.error));c.preventDefault()};return a}ny("idb",function(){return hc()||Zb()||!window.indexedDB?null:new wy});function yy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}yy.prototype.
|
|
1179
|
+
function xy(){var a=new lg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new U(2,9,9001,b.error));c.preventDefault()};return a}ny("idb",function(){return hc()||Zb()||!window.indexedDB?null:new wy});function yy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}yy.prototype.Eb=function(){return this.i};yy.prototype.Za=function(){return this.h};yy.prototype.key=function(){return this.l};yy.prototype.toString=function(){return this.j};
|
|
1176
1180
|
function zy(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 yy(b,c,d,Number(a[4])):null};function Ay(a,b){this.h=a;this.g=b}
|
|
1177
1181
|
function By(a,b){var c=new yk(null,0);c.qb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Cy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Rc}).map(function(l){return Dy(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Dy(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=
|
|
1178
1182
|
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}}
|
|
1179
1183
|
function Cy(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=
|
|
1180
1184
|
b.next())for(g=e.value,e=Dy(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=Dy(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}
|
|
1181
|
-
function Dy(a,b,c){var d=b.segments.map(function(e){return Ey(a,e,b)});c.
|
|
1185
|
+
function Dy(a,b,c){var d=b.segments.map(function(e){return Ey(a,e,b)});c.Md(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Uk(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||
|
|
1182
1186
|
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([ue(b.mimeType,b.codecs)])}}
|
|
1183
1187
|
function Ey(a,b,c){var d=new yy("segment",a.h,a.g,b.dataKey);a=new Li(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Fy(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 Fy(a,b){var c=new yy("segment",a.h,a.g,b);return new Ji(function(){return[c.toString()]},0,null)};function Gy(){this.g=null}p=Gy.prototype;p.configure=function(){};
|
|
1184
|
-
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=zy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new U(2,1,9004,a);e=new fy;wa(m,2);return F(m,e.init(),4);case 4:return F(m,jy(e,d.
|
|
1188
|
+
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=zy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new U(2,1,9004,a);e=new fy;wa(m,2);return F(m,e.init(),4);case 4:return F(m,jy(e,d.Eb(),d.Za()),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 Ay(d.Eb(),d.Za()),l=By(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return za(m),F(m,e.destroy(),7);case 7:Aa(m,0)}})};p.stop=function(){return Promise.resolve()};
|
|
1185
1189
|
p.update=function(){};
|
|
1186
|
-
p.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 fy,va(m,2,3),F(m,e.init(),5);case 5:return F(m,jy(e,d.
|
|
1190
|
+
p.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 fy,va(m,2,3),F(m,e.init(),5);case 5:return F(m,jy(e,d.Eb(),d.Za()),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.B(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return za(m),F(m,e.destroy(),10);case 10:Aa(m,0);break;case 2:ya(m),m.B(3)}})};
|
|
1187
1191
|
p.onInitialVariantChosen=function(){};p.banLocation=function(){};Ei["application/x-offline-manifest"]=function(){return new Gy};function Hy(){}function Iy(a){var b=zy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=pg(a)):a=b&&"segment"==b.g?Jy(b.key(),b):ng(new U(2,1,9004,a));return a}
|
|
1188
|
-
function Jy(a,b){var c=new fy;return pg(void 0).Qa(function(){return c.init()}).Qa(function(){return jy(c,b.
|
|
1192
|
+
function Jy(a,b){var c=new fy;return pg(void 0).Qa(function(){return c.init()}).Qa(function(){return jy(c,b.Eb(),b.Za())}).Qa(function(d){return d.getSegments([b.key()])}).Qa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}Q("shaka.offline.OfflineScheme",Hy);Hy.plugin=Iy;wg("offline",Iy);function Ky(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),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Ly(v.info,q)){v.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=My(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
|
|
1189
1193
|
function My(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Mh({Yb:b,onError:function(){},Fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),va(f,2),d.configure(a),F(f,Uh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:xa(f,3);break;case 2:return ya(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==
|
|
1190
|
-
h.g)return va(h,2),F(h,fi(d,g),4);if(2!=h.g)return e.push(g),xa(h,0);ya(h);G(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function Ly(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Qd(a.audioCapabilities,b.audioCapabilities,c)&&Qd(a.videoCapabilities,b.videoCapabilities,c)};function Ny(a,b,c){var d=b.presentationTimeline.getDuration();b=Oy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Py(a,b){var c=By(new Ay(a.
|
|
1194
|
+
h.g)return va(h,2),F(h,fi(d,g),4);if(2!=h.g)return e.push(g),xa(h,0);ya(h);G(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function Ly(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Qd(a.audioCapabilities,b.audioCapabilities,c)&&Qd(a.videoCapabilities,b.videoCapabilities,c)};function Ny(a,b,c){var d=b.presentationTimeline.getDuration();b=Oy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Py(a,b){var c=By(new Ay(a.Eb(),a.Za()),b),d=b.appMetadata||{};c=Oy(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}}
|
|
1191
1195
|
function Oy(a){var b=[],c=Df(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(uf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(vf(c.value));return b};function Qy(){this.g={}}function Ry(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 Sy(a,b){a.g[b.id]=b.bandwidth||2048}function Ty(a,b){a=a.g[b];null==a&&(a=0);return a};function Uy(a){var b=this;if(a&&a.constructor!=X)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.ec()):(this.h=tm(),this.g=new vg);this.i=[];this.j=[];var c=!a;this.l=new Ig(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 Qx(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.B(4);break}return F(k,b.g.destroy(),4);
|
|
1192
1196
|
case 4:b.h=null,b.g=null,G(k)}})})}function Vy(){if(Vb())a:{var a=t(gy.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=Uy.prototype;p.destroy=function(){return this.l.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=km(a,b));return xm(this.h,a)};p.getConfiguration=function(){var a=tm();xm(a,this.h,tm());return a};p.ec=function(){return this.g};
|
|
1193
1197
|
p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Px(this.g);this.j.push(f);b=Wy(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.B(2):F(h,Sm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Di(a,c||null);return h.return(g())})},e,f);b=new mg(b,function(){return Qx(f)});b.finally(function(){Pd(d.j,f)});return Xy(this,b)};
|
|
1194
1198
|
function Wy(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:return Yy(),h=g=null,k=new fy,n=m=l=null,va(z,2,3),F(z,d(),5);case 5:return g=z.h,F(z,Zy(a,b,g,e),6);case 6:q=z.h;$y(a);r=!q.presentationTimeline.U()&&!q.presentationTimeline.Cc();if(!r)throw new U(2,9,9005,b);return F(z,a.Sc(q,function(B){n=n||B},e),7);case 7:h=z.h;$y(a);if(n)throw n;return F(z,az(q,h,e),8);case 8:return F(z,k.init(),9);case 9:return $y(a),F(z,hy(k),10);case 10:return l=z.h,$y(a),u=bz(h,
|
|
1195
|
-
q,b,c,e,f),v=u.Jj,w=u.Tg,F(z,l.Za.addManifests([v]),11);case 11:A=z.h;$y(a);m=A[0];$y(a);if(n)throw n;return F(z,cz(a,w,m,v,f,e,l.Za,q,h),12);case 12:return $y(a),dz(q,v,h,e),F(z,l.Za.updateManifest(m,v),13);case 13:return $y(a),y=new yy("manifest",l.path.
|
|
1199
|
+
q,b,c,e,f),v=u.Jj,w=u.Tg,F(z,l.Za.addManifests([v]),11);case 11:A=z.h;$y(a);m=A[0];$y(a);if(n)throw n;return F(z,cz(a,w,m,v,f,e,l.Za,q,h),12);case 12:return $y(a),dz(q,v,h,e),F(z,l.Za.updateManifest(m,v),13);case 13:return $y(a),y=new yy("manifest",l.path.Eb,l.path.Za,m),z.return(Py(y,v));case 3:return za(z),F(z,k.destroy(),14);case 14:if(!g){z.B(15);break}return F(z,g.stop(),15);case 15:if(!h){z.B(17);break}return F(z,h.destroy(),17);case 17:Aa(z,0);break;case 2:D=ya(z);if(null==m){z.B(19);break}return F(z,
|
|
1196
1200
|
ez(m),19);case 19:throw n||D;}})}
|
|
1197
|
-
function cz(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,v,w,A,y;return O(function(D){switch(D.g){case 1:l={};m=0;n=function(z,B){var C,I,E,J,K,H,M;return O(function(N){if(1==N.g){C=t(z);I=C.next();for(E={};!I.done;E={Uc:void 0},I=C.next())E.Uc=I.value,J=Mx(E.Uc,f),K=E.Uc.i,H=E.Uc.h,M=function(L){return function(P){var S,R,
|
|
1201
|
+
function cz(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,v,w,A,y;return O(function(D){switch(D.g){case 1:l={};m=0;n=function(z,B){var C,I,E,J,K,H,M;return O(function(N){if(1==N.g){C=t(z);I=C.next();for(E={};!I.done;E={Uc:void 0},I=C.next())E.Uc=I.value,J=Mx(E.Uc,f),K=E.Uc.i,H=E.Uc.h,M=function(L){return function(P){var S,R,ha;return O(function(ka){if(1==ka.g)return F(ka,g.addSegments([{data:P}]),2);S=ka.h;$y(a);R=L.Uc.g;ha=Lx(R);l[ha]=S[0];m+=P.byteLength;G(ka)})}}(E),Sx(e,E.Uc.groupId,J,K,H,M);return F(N,
|
|
1198
1202
|
Ux(e),2)}if(!B)return N.B(0);$y(a);dz(h,d,k,f);return F(N,g.updateManifest(c,d),0)})};q=!1;va(D,2);if(!fz(h)||!q||gz(h)){D.B(4);break}return F(D,n(b.filter(function(z){return z.h}),!0),5);case 5:return $y(a),b=b.filter(function(z){return!z.h}),r=l,u=m,l={},m=0,F(D,hz(g,c,d,r,u,function(){return $y(a)}),6);case 6:$y(a);case 4:if(q){D.B(7);break}return F(D,n(b,!1),8);case 8:return $y(a),v=l,w=m,l={},m=0,F(D,hz(g,c,d,v,w,function(){return $y(a)}),9);case 9:$y(a);case 7:xa(D,0);break;case 2:return A=
|
|
1199
|
-
ya(D),y=Object.values(l),F(D,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function ez(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new fy,F(f,b.init(),2);case 2:return F(f,hy(b),3);case 3:return c=f.h,d=new yy("manifest",c.path.
|
|
1203
|
+
ya(D),y=Object.values(l),F(D,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function ez(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new fy,F(f,b.init(),2);case 2:return F(f,hy(b),3);case 3:return c=f.h,d=new yy("manifest",c.path.Eb,c.path.Za,a),F(f,b.destroy(),4);case 4:return e=new Uy,F(f,e.remove(d.toString()),0)}})}
|
|
1200
1204
|
function hz(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;va(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),q=n.next();!q.done;q=n.next())r=q.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&&
|
|
1201
1205
|
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return F(A,a.updateManifest(b,c),4);case 4:g=!0;f();xa(A,0);break;case 2:return v=ya(A),F(A,ez(b),5);case 5:if(g){A.B(6);break}w=Object.values(d);return F(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
|
|
1202
1206
|
function az(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B,C,I,E,J,K,H,M,N,L,P;return O(function(S){switch(S.g){case 1:return d={width:Infinity,height:Infinity},Ze(a,c.restrictions,d),F(S,cf(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Xe(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(uf(m));n=t(a.textStreams);for(q=n.next();!q.done;q=n.next())r=q.value,
|
|
@@ -1205,16 +1209,16 @@ N.next())P=L.value,"variant"==P.type&&K.add(P.id),"text"==P.type&&H.add(P.id),"i
|
|
|
1205
1209
|
function bz(a,b,c,d,e,f){var g=Ny(c,b,d),h=e.offline.progressCallback;Rx(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&bi(a,"cenc",r)});var k=fz(b)&&!gz(b),l=null;k&&(l=jz.get(a.g.keySystem));for(var m=new Qy,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())Sy(m,q.value);n=t(b.variants);for(q=n.next();!q.done;q=n.next())Ry(m,q.value);m=kz(f,m,b,e);f=m.streams;m=m.Tg;n=a.g;q=e.offline.usePersistentLicense;
|
|
1206
1210
|
n&&q&&(n.initData=[]);return{Jj:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.vd(),streams:f,sessionIds:q?ki(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Tg:m}}function fz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1207
1211
|
function gz(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 dz(a,b,c,d){b.expiration=c.vd();c=ki(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(fz(a)&&d.offline.usePersistentLicense&&!c.length)throw new U(2,9,9007);}p.remove=function(a){return lz(this,mz(this,a))};
|
|
1208
|
-
function mz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Yy();c=zy(b);if(null==c||"manifest"!=c.g)throw new U(2,9,9004,b);d=c;e=new fy;wa(k,2);return F(k,e.init(),4);case 4:return F(k,jy(e,d.
|
|
1212
|
+
function mz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Yy();c=zy(b);if(null==c||"manifest"!=c.g)throw new U(2,9,9004,b);d=c;e=new fy;wa(k,2);return F(k,e.init(),4);case 4:return F(k,jy(e,d.Eb(),d.Za()),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([nz(a,h,e),oz(f,d,h)]),2);case 2:return za(k),F(k,e.destroy(),8);case 8:Aa(k,0)}})}
|
|
1209
1213
|
function pz(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:ue(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ue(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function nz(a,b,c){return O(function(d){return F(d,qz(a.g,a.h.drm,c,b),0)})}
|
|
1210
1214
|
function oz(a,b,c){function d(){}var e=rz(c);Py(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.$j=function(){return lz(this,sz(this))};
|
|
1211
1215
|
function sz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return Yy(),b=a.g,c=a.h.drm,d=new fy,e=!1,wa(n,2),F(n,d.init(),4);case 4:f=[],ky(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,Ky(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.B(5);break;case 2:return za(n),F(n,d.destroy(),11);case 11:Aa(n,3);break;case 3:return n.return(!e)}})}
|
|
1212
|
-
p.list=function(){return lz(this,tz())};function tz(){var a,b,c;return O(function(d){switch(d.g){case 1:return Yy(),a=[],b=new fy,wa(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),iy(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=Py(new yy("manifest",e.
|
|
1216
|
+
p.list=function(){return lz(this,tz())};function tz(){var a,b,c;return O(function(d){switch(d.g){case 1:return Yy(),a=[],b=new fy,wa(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),iy(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=Py(new yy("manifest",e.Eb,e.Za,l),k);a.push(k)});G(h)})})}),F(d,c,2);case 2:return za(d),F(d,b.destroy(),6);case 6:Aa(d,3);break;case 3:return d.return(a)}})}
|
|
1213
1217
|
function Zy(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}},
|
|
1214
1218
|
c.configure(d.manifest),$y(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,$y(a),k=uz(h),F(l,Promise.all(hb(k,function(m){return m.createSegmentIndex()})),3);$y(a);if(e)throw e;return l.return(h)})}p.Sc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Mh({Yb:d.g,onError:b,Fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),F(f,Rh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?F(f,di(e),3):f.return(e)})};
|
|
1215
1219
|
function kz(a,b,c,d){var e=new Map,f=uz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=vz(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()),Tg:Array.from(e.values())}}
|
|
1216
1220
|
function vz(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,
|
|
1217
|
-
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;wz(d,c.presentationTimeline.
|
|
1221
|
+
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;wz(d,c.presentationTimeline.Cb(),function(l){var m=Lx(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=Ty(b,d.id)*q;q=Ox(a.g,q);f.set(m,new Kx(l,q,k,!1))}l.ra&&(n=Lx(l.ra),f.has(n)||(q=.5*Ty(b,d.id),q=Ox(a.g,q),f.set(n,new Kx(l.ra,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
1218
1222
|
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 wz(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 $y(a){if(a.l.g)throw new U(2,9,7001);}
|
|
1219
1223
|
function Yy(){if(!Vy())throw new U(2,9,9E3);}function lz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),wa(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);za(c);Pd(a.i,b);return Aa(c,0)})}function Xy(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Pd(a.i,c)})}
|
|
1220
1224
|
function rz(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)}
|
|
@@ -1224,21 +1228,22 @@ function iz(a){a.variants.map(function(f){return f.video});var b=new Set(a.varia
|
|
|
1224
1228
|
Uy.prototype.list=Uy.prototype.list;Uy.prototype.removeEmeSessions=Uy.prototype.$j;Uy.prototype.remove=Uy.prototype.remove;Uy.prototype.store=Uy.prototype.store;Uy.prototype.getNetworkingEngine=Uy.prototype.ec;Uy.prototype.getConfiguration=Uy.prototype.getConfiguration;Uy.prototype.configure=Uy.prototype.configure;Uy.prototype.destroy=Uy.prototype.destroy;Uy.support=Vy;
|
|
1225
1229
|
var jz=(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");zp.offline=Vy;function xz(){}function yz(){for(var a=t(zz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Za("Error installing polyfill!",c)}}}function Az(a,b){a={priority:b||0,callback:a};for(b=0;b<zz.length;b++)if(zz[b].priority<a.priority){zz.splice(b,0,a);return}zz.push(a)}Q("shaka.polyfill",xz);xz.register=Az;xz.installAll=yz;var zz=[];function Bz(){this.g=new Cz}function Dz(){window.AbortController||(window.AbortController=Bz,window.AbortSignal=Cz)}Bz.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 T("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(Bz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});xz.AbortController=Bz;Bz.install=Dz;
|
|
1226
1230
|
function Cz(){this.h=!1;this.g=void 0;this.onabort=null;this.i=new fb}Cz.prototype.addEventListener=function(a,b,c){return this.i.addEventListener(a,b,c)};Cz.prototype.removeEventListener=function(a,b,c){return this.i.removeEventListener(a,b,c)};Cz.prototype.dispatchEvent=function(a){return this.i.dispatchEvent(a)};Cz.prototype.throwIfAborted=function(){if(this.h)throw this.g;};
|
|
1227
|
-
da.Object.defineProperties(Cz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Az(Dz);function Ez(){}function Fz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Gz(b.value)}function Gz(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)}})}xz.Aria=Ez;Ez.install=Fz;Az(Fz);function Hz(){}function Iz(){Jz()}xz.EncryptionScheme=Hz;Hz.install=Iz;Az(Iz,-2);function Kz(){}
|
|
1231
|
+
da.Object.defineProperties(Cz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Az(Dz);function Ez(){}function Fz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Gz(b.value)}function Gz(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)}})}xz.Aria=Ez;Ez.install=Fz;Az(Fz);function Hz(){}function Iz(){kc()||$b("Sky_STB")||Jz()}xz.EncryptionScheme=Hz;Hz.install=Iz;Az(Iz,-2);function Kz(){}
|
|
1228
1232
|
function Lz(){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}}),
|
|
1229
1233
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Mz);document.addEventListener("webkitfullscreenerror",Mz);document.addEventListener("mozfullscreenchange",Mz);document.addEventListener("mozfullscreenerror",Mz);document.addEventListener("MSFullscreenChange",Mz);document.addEventListener("MSFullscreenError",Mz)}}
|
|
1230
|
-
function Mz(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)}xz.Fullscreen=Kz;Kz.install=Lz;Az(Lz);function Nz(){}function Oz(){var a=!0;!hc()||hc()&&pc()||hc()&&$b("Fuchsia")||(a=!1);if(ic()||lc()||kc()||
|
|
1234
|
+
function Mz(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)}xz.Fullscreen=Kz;Kz.install=Lz;Az(Lz);function Nz(){}function Oz(){var a=!0;!hc()||hc()&&pc()||hc()&&$b("Fuchsia")||(a=!1);if(ic()||lc()||kc()||dc()||ac()||$b("PC=EOS")||mc())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Pz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Qz)}
|
|
1231
1235
|
function Qz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(q){switch(q.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=Wb(e),!f)||d&&(g=d.contentType,h=Wb(g),!h))return q.return(b)}else return q.return(b);q.B(2);break}if(!Vb())return q.return(b);if(!c){q.B(3);break}return F(q,Rz(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var r=d.contentType;hc()&&d.spatialRendering&&
|
|
1232
1236
|
(r+="; spatialRendering=true");l=sd(r);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return F(q,Sz(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}
|
|
1233
1237
|
function Rz(a){var b,c;return O(function(d){return 1==d.g?hc()?F(d,Tz(a),3):ac()?(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(sd(b))):d.B(2):2!=d.g?(c=d.h,d.return(c)):d.return(sd(a.contentType))})}
|
|
1234
|
-
function Sz(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(
|
|
1235
|
-
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;
|
|
1238
|
+
function Sz(a,b,c){var d,e,f,g,h,k,l,m,n,q,r;return O(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},ac()&&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=
|
|
1239
|
+
{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=Ge(k)+";"+Ee(k);n=Ge(l)+";"+Ee(l);q=c.keySystem;r=null;va(u,2);if(Sb.has(m+"#"+n+"#"+q)){r=Sb.get(m+"#"+n+"#"+q)||null;u.B(4);break}return F(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=u.h,Sb.set(m+"#"+n+"#"+q,r);case 4:xa(u,
|
|
1240
|
+
3);break;case 2:ya(u);case 3:return u.return(r)}})}
|
|
1236
1241
|
function Tz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(sd(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 Uz?(c=Uz[b],d.B(2)):F(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Uz[b]=c);return d.return(c)})}xz.MediaCapabilities=Nz;Nz.install=Oz;
|
|
1237
1242
|
var Pz=null;Nz.originalMcap=Pz;var Uz={};Nz.memoizedCanDisplayTypeRequests_=Uz;Az(Oz,-1);function Vz(){}function Wz(){var a=nc();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(Xz(),Yz()):15>=a&&Xz():$b("DT_STB_BCM")?(Xz(),Yz()):(cc()||bc()||$b("Tizen 4"))&&Zz();(window.MediaSource||window.ManagedMediaSource)&&$z();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&aA()}
|
|
1238
1243
|
function Xz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}function Yz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1239
|
-
function $z(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=
|
|
1240
|
-
function Zz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=
|
|
1241
|
-
function aA(){var a=MediaSource.isTypeSupported;
|
|
1244
|
+
function $z(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Ae(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Ae(c)&&b(c)}}}
|
|
1245
|
+
function Zz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Ee(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Ee(c)&&b(c)}}}
|
|
1246
|
+
function aA(){var a=MediaSource.isTypeSupported;dc()||(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)})}xz.MediaSource=Vz;Vz.install=Wz;Az(Wz);function bA(){}function cA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?dA():void 0!=window.orientation&&eA())}function dA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1242
1247
|
function eA(){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 fA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}xz.Orientation=bA;bA.install=cA;function fA(){fb.call(this);this.type="";this.angle=0}pa(fA,fb);
|
|
1243
1248
|
fA.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)};
|
|
1244
1249
|
fA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Az(cA);function gA(){}var hA,iA,jA,kA,lA,mA;function nA(a,b){try{var c=new oA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function pA(a){var b=this.mediaKeys;b&&b!=a&&qA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?qA(a,this):Promise.resolve()}
|
|
@@ -1303,21 +1308,21 @@ bC.prototype.parseMedia=function(a,b){a=wc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm
|
|
|
1303
1308
|
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 Kp(e);var f=new Ld;Np(e);Lp(e);for(var g=Np(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=
|
|
1304
1309
|
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");Lp(e);g=Np(e)}b.push(f)}d=new Map;dC(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=
|
|
1305
1310
|
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 Sd(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var r=q[2].trim().replace(";","");switch(q[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;
|
|
1306
|
-
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=
|
|
1311
|
+
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=ae;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,
|
|
1307
1312
|
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 Kp(l[0]),g=cC(h),n=Mp(h,/[ \t]+--\x3e[ \t]+/g),k=cC(h),null==g||null==n||null==k)Za("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;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 Sd(g,k,"");Lp(h);for(g=Np(h);g;)eC(m,g,b),Lp(h),g=Np(h);
|
|
1308
1313
|
fC(l,m,d);null!=f&&(m.id=f);f=m}f&&e.push(f)}return e};function dC(a){for(var b=t(Object.entries(ie)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Sd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(je));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Sd(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1309
1314
|
function fC(a,b,c){if(a.includes("<")){0===c.size&&dC(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(gC)&&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===
|
|
1310
1315
|
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=hC(a);try{var m=ch("<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=
|
|
1311
1316
|
m.next())iC(a.value,b,c);else b.payload=Dc(a);else b.payload=Dc(a)}else b.payload=Dc(a)}function hC(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 jC(a,b){return a&&0<a.length?a:b}
|
|
1312
1317
|
function iC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ld;d.position=null;d.size=0;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=jC(g.backgroundColor,h.backgroundColor),h.color=jC(g.color,h.color),h.fontFamily=jC(g.fontFamily,h.fontFamily),h.fontSize=
|
|
1313
|
-
jC(g.fontSize,h.fontSize),h.textShadow=jC(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=
|
|
1314
|
-
if(!f)break;if(f=cC(new Kp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(jh(a)||1==e.length&&jh(e[0]))for(c=mh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=
|
|
1318
|
+
jC(g.fontSize,h.fontSize),h.textShadow=jC(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=be(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;
|
|
1319
|
+
if(!f)break;if(f=cC(new Kp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(jh(a)||1==e.length&&jh(e[0]))for(c=mh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=be(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())iC(a.value,d,c)}
|
|
1315
1320
|
function eC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ud:a.textAlign=fe[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"==
|
|
1316
1321
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Td);else if(d=/^region:(.*)$/.exec(b)){if(b=kC(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=he[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Xd,a.line=Number(c[1]),c[2]&&(a.lineAlign=he[c[2].toUpperCase()])}
|
|
1317
1322
|
function kC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function cC(a){a=Mp(a,gC);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)}Q("shaka.text.VttTextParser",bC);bC.prototype.parseMedia=bC.prototype.parseMedia;bC.prototype.setManifestType=bC.prototype.setManifestType;bC.prototype.setSequenceMode=bC.prototype.setSequenceMode;bC.prototype.parseInit=bC.prototype.parseInit;var gC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1318
1323
|
Le["text/vtt"]=function(){return new bC};Le['text/vtt; codecs="vtt"']=function(){return new bC};Le['text/vtt; codecs="wvtt"']=function(){return new bC};function lC(){this.g=null}lC.prototype.parseInit=function(a){var b=this,c=!1;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).X("mdhd",function(d){d=dj(d.reader,d.version);b.g=d.timescale}).box("minf",Ug).box("stbl",Ug).X("stsd",Wg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new U(2,2,2008);if(!c)throw new U(2,2,2008);};lC.prototype.setSequenceMode=function(){};lC.prototype.setManifestType=function(){};
|
|
1319
1324
|
lC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new U(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Pg).box("moof",Ug).box("traf",Ug).X("tfdt",function(D){g=!0;c=cj(D.reader,D.version).baseMediaDecodeTime}).X("tfhd",function(D){l=bj(D.reader,D.flags).td}).X("trun",function(D){h=!0;d=ej(D.reader,D.version,D.flags).Th}).box("mdat",Zg(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new U(2,2,2008);a=c;for(var m=new Mg(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
|
|
1320
|
-
q.value;var r=q.Cg||l,u=q.Pe?c+q.Pe:a;a=u+(r||0);var v=0;do{var w=m.T();v+=w;var A=m.T(),y=null;"vttc"==Tg(A)?8<w&&(y=m.
|
|
1325
|
+
q.value;var r=q.Cg||l,u=q.Pe?c+q.Pe:a;a=u+(r||0);var v=0;do{var w=m.T();v+=w;var A=m.T(),y=null;"vttc"==Tg(A)?8<w&&(y=m.Hb(w-8)):m.skip(w-8);r&&y&&(w=mC(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Te)};function mC(a,b,c){var d,e,f;(new Pg).box("payl",Zg(function(g){d=wc(g)})).box("iden",Zg(function(g){e=wc(g)})).box("sttg",Zg(function(g){f=wc(g)})).parse(a);return d?nC(d,e,f,b,c):null}
|
|
1321
1326
|
function nC(a,b,c,d,e){d=new Sd(d,e,"");fC(a,d,new Map);b&&(d.id=b);if(c)for(a=new Kp(c),b=Np(a);b;)eC(d,b,[]),Lp(a),b=Np(a);return d}Q("shaka.text.Mp4VttParser",lC);lC.prototype.parseMedia=lC.prototype.parseMedia;lC.prototype.setManifestType=lC.prototype.setManifestType;lC.prototype.setSequenceMode=lC.prototype.setSequenceMode;lC.prototype.parseInit=lC.prototype.parseInit;Le['application/mp4; codecs="wvtt"']=function(){return new lC};function oC(){}oC.prototype.parseInit=function(){};oC.prototype.setSequenceMode=function(){};oC.prototype.setManifestType=function(){};oC.prototype.parseMedia=function(a){var b=wc(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 Kp(c[0]),e=pC(d),f=Mp(d,/,/g);d=pC(d);if(null==e||null==f||null==d)throw new U(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Sd(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1322
1327
|
function pC(a){a=Mp(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)}Q("shaka.text.SbvTextParser",oC);oC.prototype.parseMedia=oC.prototype.parseMedia;oC.prototype.setManifestType=oC.prototype.setManifestType;oC.prototype.setSequenceMode=oC.prototype.setSequenceMode;oC.prototype.parseInit=oC.prototype.parseInit;Le["text/x-subviewer"]=function(){return new oC};function qC(){this.g=new bC}qC.prototype.parseInit=function(){};qC.prototype.setSequenceMode=function(){};qC.prototype.setManifestType=function(){};qC.prototype.parseMedia=function(a,b,c){a=wc(a);a=rC(a);a=Gb(Ac(a));return this.g.parseMedia(a,b,c)};
|
|
1323
1328
|
function rC(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}Q("shaka.text.SrtTextParser",qC);qC.srt2webvtt=rC;qC.prototype.parseMedia=qC.prototype.parseMedia;
|
|
@@ -1333,32 +1338,32 @@ function CC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1
|
|
|
1333
1338
|
function DC(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,
|
|
1334
1339
|
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 EC(a){this.i=a;this.h=0;this.g=new Map}p=EC.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?sd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(He(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1335
1340
|
p.transmux=function(a,b,c,d){for(var e=Gb(a),f=aj(e),g=f.length;g<e.length&&!CC(e,g);g++);a=1E3*c.endTime;f=$i(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=BC(e,g);if(!f)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=AC(e,g);if(!k)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));var l=k.pe+k.ka;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1336
|
-
k.pe,g+l),size:k.ka,duration:1024,ub:0,flags:{
|
|
1341
|
+
k.pe,g+l),size:k.ka,duration:1024,ub:0,flags:{wb:0,mb:0,kb:0,hb:0,ib:2,xb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,rb:[],Aa:new Uint8Array([]),La:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:a,pb:h},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=jx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};
|
|
1337
1342
|
Q("shaka.transmuxer.AacTransmuxer",EC);EC.prototype.transmux=EC.prototype.transmux;EC.prototype.getOriginalMimeType=EC.prototype.getOriginalMimeType;EC.prototype.convertCodecs=EC.prototype.convertCodecs;EC.prototype.isSupported=EC.prototype.isSupported;EC.prototype.destroy=EC.prototype.destroy;me("audio/aac",function(){return new EC("audio/aac")},se);function FC(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,
|
|
1338
1343
|
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,Aa:a,ka:e}}
|
|
1339
1344
|
function GC(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 HC(a){this.i=a;this.h=0;this.g=new Map}p=HC.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?sd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1340
1345
|
p.transmux=function(a,b,c,d){a=Gb(a);for(var e=aj(a),f=e.length;f<a.length&&!GC(a,f);f++);var g=1E3*c.endTime;e=$i(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=FC(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Aa;k.push({data:a.subarray(f,f+l.ka),size:l.ka,duration:1536,
|
|
1341
|
-
ub:0,flags:{
|
|
1346
|
+
ub:0,flags:{wb:0,mb:0,kb:0,hb:0,ib:2,xb:0}});f+=l.ka}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,rb:[],Aa:h,La:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:a,pb:k},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=jx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};Q("shaka.transmuxer.Ac3Transmuxer",HC);HC.prototype.transmux=HC.prototype.transmux;
|
|
1342
1347
|
HC.prototype.getOriginalMimeType=HC.prototype.getOriginalMimeType;HC.prototype.convertCodecs=HC.prototype.convertCodecs;HC.prototype.isSupported=HC.prototype.isSupported;HC.prototype.destroy=HC.prototype.destroy;me("audio/ac3",function(){return new HC("audio/ac3")},se);function IC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new kj(a.subarray(b+2));mj(c,2);mj(c,3);var d=nj(c,11)+1<<1,e=nj(c,2);if(3==e){e=nj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=nj(c,2);var g=nj(c,3),h=nj(c,1);c=nj(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,Aa:a,ka:d}};function JC(a){this.i=a;this.h=0;this.g=new Map}p=JC.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?sd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1343
1348
|
p.transmux=function(a,b,c,d){a=Gb(a);for(var e=aj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=$i(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=IC(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Aa;k.push({data:a.subarray(f,f+l.ka),
|
|
1344
|
-
size:l.ka,duration:1536,ub:0,flags:{
|
|
1345
|
-
JC.prototype.getOriginalMimeType=JC.prototype.getOriginalMimeType;JC.prototype.convertCodecs=JC.prototype.convertCodecs;JC.prototype.isSupported=JC.prototype.isSupported;JC.prototype.destroy=JC.prototype.destroy;me("audio/ec3",function(){return new JC("audio/ec3")},se);function KC(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 kj(b.data),d=vj(c);vj(c);vj(c);
|
|
1349
|
+
size:l.ka,duration:1536,ub:0,flags:{wb:0,mb:0,kb:0,hb:0,ib:2,xb:0}});f+=l.ka}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,rb:[],Aa:h,La:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:a,pb:k},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=jx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};Q("shaka.transmuxer.Ec3Transmuxer",JC);JC.prototype.transmux=JC.prototype.transmux;
|
|
1350
|
+
JC.prototype.getOriginalMimeType=JC.prototype.getOriginalMimeType;JC.prototype.convertCodecs=JC.prototype.convertCodecs;JC.prototype.isSupported=JC.prototype.isSupported;JC.prototype.destroy=JC.prototype.destroy;me("audio/ec3",function(){return new JC("audio/ec3")},se);function KC(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 kj(b.data),d=vj(c);vj(c);vj(c);sj(c);if(LC.includes(d)&&(d=V(c),3===d&&mj(c,1),sj(c),sj(c),mj(c,1),uj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)uj(c)&&(6>e?wj(c,16):wj(c,64))}sj(c);d=V(c);if(0===d)V(c);else if(1===d)for(mj(c,1),sj(c),sj(c),d=V(c),e=0;e<d;e++)sj(c);sj(c);mj(c,1);var f=V(c),g=V(c),h=nj(c,1);0===h&&mj(c,1);mj(c,1);var k=0,l=0,m=0,n=0;
|
|
1346
1351
|
uj(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(uj(c)&&uj(c)){var q=vj(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<q&&16>=q?(d=r[q-1],e=u[q-1]):255===q&&(d=nj(c,16),e=nj(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],
|
|
1347
1352
|
k[5],255,225].concat(k,[1],b));return{height:c,width:f,La:a,Sa:d,Ua:e}}
|
|
1348
1353
|
function MC(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=xj(new kj(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?
|
|
1349
|
-
{data:Kc.apply(Ec,x(c)),
|
|
1354
|
+
{data:Kc.apply(Ec,x(c)),Gd:b}:null}var LC=[100,110,122,244,44,83,86,118,128,138,139,134];function NC(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=OC(b.fullData);a=PC(c.fullData);var f=QC(d.fullData);b=RC(b.fullData,c.fullData,d.fullData,{sg:e.sg,Sg:e.Sg,Sf:a.Sf,Tf:a.Tf,Mf:a.Mf,Rf:a.Rf,Nf:a.Nf,Of:a.Of,Pf:a.Pf,Qf:a.Qf,Gf:a.Gf,Hf:a.Hf,If:a.If,Jf:a.Jf,Kf:a.Kf,Lf:a.Lf,Bf:a.Bf,Be:a.Be,zf:a.zf,wf:a.wf,vf:a.vf,wg:f.wg});return{height:a.height,width:a.width,
|
|
1350
1355
|
La:b,Sa:a.hk,Ua:a.gk}}function OC(a){var b=new kj(a,!0);vj(b);vj(b);nj(b,4);nj(b,2);nj(b,6);a=nj(b,3);b=uj(b);return{sg:a+1,Sg:b}}
|
|
1351
1356
|
function PC(a){a=new kj(a,!0);vj(a);vj(a);var b=0,c=0,d=0,e=0;nj(a,4);var f=nj(a,3);uj(a);for(var g=nj(a,2),h=nj(a,1),k=nj(a,5),l=vj(a),m=vj(a),n=vj(a),q=vj(a),r=vj(a),u=vj(a),v=vj(a),w=vj(a),A=vj(a),y=vj(a),D=vj(a),z=[],B=[],C=0;C<f;C++)z.push(uj(a)),B.push(uj(a));if(0<f)for(C=f;8>C;C++)nj(a,2);for(C=0;C<f;C++)z[C]&&nj(a,88),B[C]&&vj(a);V(a);z=V(a);3==z&&nj(a,1);B=V(a);C=V(a);uj(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var I=V(a),E=V(a),J=V(a);if(uj(a))for(var K=0;K<=f;K++)V(a),V(a),V(a);else V(a),
|
|
1352
1357
|
V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(uj(a)&&uj(a))for(K=0;4>K;K++)for(var H=0;H<(3===K?2:6);H++)if(uj(a)){var M=Math.min(64,1<<4+(K<<1));1<K&&tj(a);for(var N=0;N<M;N++)tj(a)}else V(a);uj(a);uj(a);uj(a)&&(vj(a),V(a),V(a),uj(a));K=V(a);for(M=H=0;M<K;M++)if(N=!1,0!==M&&(N=uj(a)),N){M===K&&V(a);uj(a);V(a);for(var L=N=0;L<=H;L++){var P=uj(a),S=!1;P||(S=uj(a));(P||S)&&N++}H=N}else{L=V(a);N=V(a);H=L+N;for(P=0;P<L;P++)V(a),uj(a);for(L=0;L<N;L++)V(a),uj(a)}if(uj(a))for(K=V(a),H=0;H<K;H++){for(M=0;M<
|
|
1353
1358
|
J+4;M++)nj(a,1);nj(a,1)}K=J=1;H=0;uj(a);uj(a);if(uj(a)){uj(a)&&(M=vj(a),N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(J=N[M-1],K=L[M-1]):255===M&&(J=nj(a,16),K=nj(a,16)));uj(a)&&uj(a);uj(a)&&(nj(a,3),uj(a),uj(a)&&(vj(a),vj(a),vj(a)));uj(a)&&(V(a),V(a));uj(a);uj(a);uj(a);if(M=uj(a))V(a),V(a),V(a),V(a);if(uj(a)&&(nj(a,32),nj(a,32),uj(a)&&V(a),uj(a))){L=!1;M=uj(a);N=uj(a);if(M||N){if(L=uj(a))vj(a),nj(a,5),uj(a),nj(a,5);nj(a,4);nj(a,4);L&&
|
|
1354
|
-
nj(a,4);nj(a,5);nj(a,5);nj(a,5)}for(P=0;P<=f;P++){var R=!0;S=1;uj(a)||(R=uj(a));var
|
|
1359
|
+
nj(a,4);nj(a,5);nj(a,5);nj(a,5)}for(P=0;P<=f;P++){var R=!0;S=1;uj(a)||(R=uj(a));var ha=!1;R?V(a):ha=uj(a);ha||(S=V(a)+1);if(M){for(R=0;R<S;R++)V(a),V(a),L&&(V(a),V(a));uj(a)}if(N){for(R=0;R<S;R++)V(a),V(a),L&&(V(a),V(a));uj(a)}}}uj(a)&&(uj(a),uj(a),uj(a),H=V(a),V(a),V(a),V(a),V(a))}return{Mf:D,Sf:g,Tf:h,Rf:k,Nf:l,Of:m,Pf:n,Qf:q,Gf:r,Hf:u,If:v,Jf:w,Kf:A,Lf:y,Be:H,Bf:0,zf:z,wf:I,vf:E,width:B-(b+c)*(1===z||2===z?2:1),height:C-(d+e)*(1===z?2:1),hk:J,gk:K}}
|
|
1355
1360
|
function QC(a){var b=new kj(a,!0);vj(b);vj(b);V(b);V(b);uj(b);uj(b);nj(b,3);uj(b);uj(b);V(b);V(b);tj(b);uj(b);uj(b);uj(b)&&V(b);tj(b);tj(b);uj(b);uj(b);uj(b);uj(b);a=uj(b);b=uj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{wg:c}}
|
|
1356
1361
|
function RC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Sf&3)<<6|(d.Tf?1:0)<<5|d.Rf&31;e[2]=d.Nf;e[3]=d.Of;e[4]=d.Pf;e[5]=d.Qf;e[6]=d.Gf;e[7]=d.Hf;e[8]=d.If;e[9]=d.Jf;e[10]=d.Kf;e[11]=d.Lf;e[12]=d.Mf;e[13]=240|(d.Be&3840)>>8;e[14]=d.Be&255;e[15]=252|d.wg&3;e[16]=252|d.zf&3;e[17]=248|d.wf&7;e[18]=248|d.vf&7;e[19]=0;e[20]=0;e[21]=(d.Bf&3)<<6|(d.sg&7)<<3|(d.Sg?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&
|
|
1357
1362
|
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 SC(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*TC[14*(3===c?3-d:3===d?3:4)+e-1];f=UC[3*(3===c?0:2===c?1:2)+f];c=VC[c][d];var h=WC[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,ka:k,fk:8*c*h}}return null}
|
|
1358
1363
|
function XC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function YC(a,b){if(b+1<a.length&&XC(a,b)){var c=SC(a,b),d=4;c&&c.ka&&(d=c.ka);b+=d;return b===a.length||b+1<a.length&&XC(a,b)}return!1}
|
|
1359
1364
|
var TC=[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],UC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],VC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],WC=[0,1,1,4];function ZC(a){this.i=a;this.h=0;this.g=new Map}p=ZC.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?sd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1360
|
-
p.transmux=function(a,b,c,d){for(var e=Gb(a),f=aj(e).length;f<e.length&&!YC(e,f);f++);var g;for(a=[];f<e.length;){var h=SC(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));g||(g=h);f+h.ka<=e.length&&a.push({data:e.subarray(f,f+h.ka),size:h.ka,duration:1152,ub:0,flags:{
|
|
1361
|
-
duration:d,rb:[],Aa:new Uint8Array([]),La:new Uint8Array([]),Sa:0,Ua:0,data:{
|
|
1365
|
+
p.transmux=function(a,b,c,d){for(var e=Gb(a),f=aj(e).length;f<e.length&&!YC(e,f);f++);var g;for(a=[];f<e.length;){var h=SC(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));g||(g=h);f+h.ka<=e.length&&a.push({data:e.subarray(f,f+h.ka),size:h.ka,duration:1152,ub:0,flags:{wb:0,mb:0,kb:0,hb:0,ib:2,xb:0}});f+=h.ka}if(!g)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));e=9E4*g.fk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1366
|
+
duration:d,rb:[],Aa:new Uint8Array([]),La:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:e,pb:a},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=jx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};Q("shaka.transmuxer.Mp3Transmuxer",ZC);ZC.prototype.transmux=ZC.prototype.transmux;ZC.prototype.getOriginalMimeType=ZC.prototype.getOriginalMimeType;ZC.prototype.convertCodecs=ZC.prototype.convertCodecs;ZC.prototype.isSupported=ZC.prototype.isSupported;
|
|
1362
1367
|
ZC.prototype.destroy=ZC.prototype.destroy;me("audio/mpeg",function(){return new ZC("audio/mpeg")},se);function $C(a){this.h=a;this.g=null}p=$C.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=He(a).split(","),c=Pc("audio",b);b=Pc("video",b);return!c||b||"mp3"!=Ce(c)?!1:sd(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
|
|
1363
1368
|
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new yj;a=Gb(a);a=this.g.parse(a);if("mp3"!=a.ud().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));c=new Uint8Array([]);e=t(a.dc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=SC(a,b))?(b+d.ka<=a.length&&(c=Kc(c,a.subarray(b,b+d.ka))),b+=d.ka):b++;return Promise.resolve(c)};Q("shaka.transmuxer.MpegTsTransmuxer",$C);$C.prototype.transmux=$C.prototype.transmux;
|
|
1364
1369
|
$C.prototype.getOriginalMimeType=$C.prototype.getOriginalMimeType;$C.prototype.convertCodecs=$C.prototype.convertCodecs;$C.prototype.isSupported=$C.prototype.isSupported;$C.prototype.destroy=$C.prototype.destroy;me("video/mp2t",function(){return new $C("video/mp2t")},re);/*
|
|
@@ -1379,21 +1384,21 @@ aD.prototype.getOriginalMimeType=aD.prototype.getOriginalMimeType;aD.prototype.c
|
|
|
1379
1384
|
p.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=He(c).split(",");c=Pc("audio",d);d=Pc("video",d);if(c&&(c=Ce(c),!fD.includes(c))||d&&(c=Ce(d),!gD.includes(c)))return!1;if(b)return sd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return sd(b)||sd(a)};
|
|
1380
1385
|
p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=He(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return lf(c,"audio/mp4")}).map(kf).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.getOriginalMimeType=function(){return this.l};
|
|
1381
1386
|
p.transmux=function(a,b,c,d,e){var f=Gb(a);if("audio"==e&&!Fj(f)){for(var g=aj(f),h=g.length;h<f.length;h++)if(YC(f,h))return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));for(h=g.length;h<f.length;h++)if(CC(f,h))return this.h||(this.h=new EC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.R()[0]:null))}this.j?this.j.clearData():this.j=new yj;var k=this.j.parse(f),l=[],m=k.ud();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],r=null,u=[],v=k.Zc();
|
|
1382
|
-
if(!v.length)throw new U(2,3,3023,c?c.R()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var D=MC(y);if(D){null==r&&(r=A.dts);var z=void 0;z=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);q.push({data:D.data,size:D.data.byteLength,duration:z,ub:Math.round((A.pts||0)-(A.dts||0)),flags:{
|
|
1383
|
-
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,rb:[],Aa:new Uint8Array([]),La:B.La,Sa:B.Sa,Ua:B.Ua,data:{
|
|
1384
|
-
P=!0;break;case 19:case 20:case 21:N=ka=P=!0;break;case 32:ka=!0;break;case 33:ka=!0;break;case 34:ka=!0;break;case 35:P=ka=!0;break;case 39:case 40:ka=!0;break;default:ka=!1}if(P&&ka){var ta=
|
|
1385
|
-
1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:Ba.data,size:Ba.data.byteLength,duration:
|
|
1386
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Wa=[],ua,gb=null,tb=t(k.dc()),
|
|
1387
|
-
mb:0,kb:0,hb:0,ib:2,
|
|
1388
|
-
duration:1024,ub:0,flags:{
|
|
1389
|
-
|
|
1390
|
-
Sa:0,Ua:0,data:{
|
|
1391
|
-
Pf++}}if(0==
|
|
1392
|
-
|
|
1393
|
-
[],
|
|
1394
|
-
0,1,2,3,4];break;case 134:Ib=[1,1,6,0,1,2,3,4,5];break;case 135:Ib=[1,1,7,0,1,2,3,4,5,6];break;case 136:Ib=[1,1,8,0,1,2,3,4,5,6,7]}var
|
|
1395
|
-
|
|
1396
|
-
Ua:0,data:{
|
|
1387
|
+
if(!v.length)throw new U(2,3,3023,c?c.R()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var D=MC(y);if(D){null==r&&(r=A.dts);var z=void 0;z=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);q.push({data:D.data,size:D.data.byteLength,duration:z,ub:Math.round((A.pts||0)-(A.dts||0)),flags:{wb:0,mb:0,kb:0,hb:0,ib:D.Gd?2:1,xb:D.Gd?0:1}})}}var B=KC(u);if(!B||null==r)throw new U(2,3,3018,c?c.R()[0]:null);b.height=B.height;
|
|
1388
|
+
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,rb:[],Aa:new Uint8Array([]),La:B.La,Sa:B.Sa,Ua:B.Ua,data:{Ib:this.g,baseMediaDecodeTime:r,pb:q},stream:b};break;case "hvc":var C=[],I=null,E=[],J=k.Zc();if(!J.length)throw new U(2,3,3023,c?c.R()[0]:null);for(var K=0;K<J.length;K++){var H=J[K],M=H.nalus;E.push.apply(E,x(M));for(var N=!1,L=[],P=!1,S=t(M),R=S.next();!R.done;R=S.next()){var ha=R.value;switch(ha.type){case 1:case 0:var ka=
|
|
1389
|
+
P=!0;break;case 19:case 20:case 21:N=ka=P=!0;break;case 32:ka=!0;break;case 33:ka=!0;break;case 34:ka=!0;break;case 35:P=ka=!0;break;case 39:case 40:ka=!0;break;default:ka=!1}if(P&&ka){var ta=ha.fullData.byteLength,Va=new Uint8Array(4);Va[0]=ta>>24&255;Va[1]=ta>>16&255;Va[2]=ta>>8&255;Va[3]=ta&255;L.push(Va);L.push(ha.fullData)}}var Ba=L.length?{data:Kc.apply(Ec,x(L)),Gd:N}:null;if(Ba){null==I&&null!=H.dts&&(I=H.dts);var Ha=void 0;Ha=K+1<J.length?(J[K+1].dts||0)-(H.dts||0):1<J.length?(H.dts||0)-(J[K-
|
|
1390
|
+
1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:Ba.data,size:Ba.data.byteLength,duration:Ha,ub:Math.round((H.pts||0)-(H.dts||0)),flags:{wb:0,mb:0,kb:0,hb:0,ib:Ba.Gd?2:1,xb:Ba.Gd?0:1}})}}var Qa=NC(E);if(!Qa||null==I)throw new U(2,3,3018,c?c.R()[0]:null);b.height=Qa.height;b.width=Qa.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,rb:[],Aa:new Uint8Array([]),La:Qa.La,Sa:Qa.Sa,Ua:Qa.Ua,data:{Ib:this.g,baseMediaDecodeTime:I,pb:C},stream:b}}n&&
|
|
1391
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Wa=[],ua,gb=null,tb=t(k.dc()),Ed=tb.next();!Ed.done;Ed=tb.next()){var Ff=Ed.value,Fd=Ff.data;if(Fd){var ad=0;ua=BC(Fd,ad);if(!ua)throw new U(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=ua.sampleRate;b.channelsCount=ua.channelCount;null==gb&&null!==Ff.pts&&(gb=Ff.pts);for(;ad<Fd.length;){var Gd=AC(Fd,ad);if(Gd){var Be=Gd.pe+Gd.ka;ad+Be<=Fd.length&&Wa.push({data:Fd.subarray(ad+Gd.pe,ad+Be),size:Gd.ka,duration:1024,ub:0,flags:{wb:0,
|
|
1392
|
+
mb:0,kb:0,hb:0,ib:2,xb:0}});ad+=Be}else ad++}}}if(!ua||null==gb){if(!k.Zc().length)throw new U(2,3,3018,c?c.R()[0]:null);gb=9E4*c.startTime;var Hd=Pc("audio",b.codecs.split(","));if(!Hd||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.R()[0]:null);ua={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Hd};var Gf=DC(Hd,b.channelsCount);if(!Gf)throw new U(2,3,3018,c?c.R()[0]:null);for(var pj=gb+9E4*(c.endTime-c.startTime),qj=gb;qj<pj;)Wa.push({data:Gf,size:Gf.byteLength,
|
|
1393
|
+
duration:1024,ub:0,flags:{wb:0,mb:0,kb:0,hb:0,ib:2,xb:0}}),qj+=1024/ua.sampleRate*9E4}var eh=ua.sampleRate,rj=gb/9E4*eh;n={id:b.id,type:"audio",codecs:ua.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:eh,duration:d,rb:[],Aa:new Uint8Array([]),La:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:rj,pb:Wa},stream:b};break;case "ac3":for(var fh=[],ec=0,Rn=new Uint8Array([]),ak=null,Sw=t(k.dc()),Sn=Sw.next();!Sn.done;Sn=Sw.next()){var Tn=Sn.value,Un=Tn.data;null==ak&&null!==
|
|
1394
|
+
Tn.pts&&(ak=Tn.pts);for(var Of=0;Of<Un.length;){var ce=FC(Un,Of);ce?(b.audioSamplingRate=ce.sampleRate,b.channelsCount=ce.channelCount,ec=ce.sampleRate,Rn=ce.Aa,fh.push({data:Un.subarray(Of,Of+ce.ka),size:ce.ka,duration:1536,ub:0,flags:{wb:0,mb:0,kb:0,hb:0,ib:2,xb:0}}),Of+=ce.ka):Of++}}if(0==ec||0==Rn.byteLength||null==ak)throw new U(2,3,3018,c?c.R()[0]:null);var zG=ak/9E4*ec;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ec,duration:d,rb:[],Aa:Rn,La:new Uint8Array([]),
|
|
1395
|
+
Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:zG,pb:fh},stream:b};break;case "ec3":for(var Tw=[],bk=0,Vn=new Uint8Array([]),ck=null,Uw=t(k.dc()),Wn=Uw.next();!Wn.done;Wn=Uw.next()){var Xn=Wn.value,Yn=Xn.data;null==ck&&null!==Xn.pts&&(ck=Xn.pts);for(var Pf=0;Pf<Yn.length;){var de=IC(Yn,Pf);de?(b.audioSamplingRate=de.sampleRate,b.channelsCount=de.channelCount,bk=de.sampleRate,Vn=de.Aa,Tw.push({data:Yn.subarray(Pf,Pf+de.ka),size:de.ka,duration:1536,ub:0,flags:{wb:0,mb:0,kb:0,hb:0,ib:2,xb:0}}),Pf+=de.ka):
|
|
1396
|
+
Pf++}}if(0==bk||0==Vn.byteLength||null==ck)throw new U(2,3,3018,c?c.R()[0]:null);var AG=ck/9E4*bk;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:bk,duration:d,rb:[],Aa:Vn,La:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:AG,pb:Tw},stream:b};break;case "mp3":for(var Vw=[],dk,ek=null,Ww=t(k.dc()),Zn=Ww.next();!Zn.done;Zn=Ww.next()){var $n=Zn.value,sh=$n.data;if(sh){null==ek&&null!==$n.pts&&(ek=$n.pts);for(var Fe=0;Fe<sh.length;){var Qf=SC(sh,
|
|
1397
|
+
Fe);Qf?(dk||(dk=Qf),Fe+Qf.ka<=sh.length&&Vw.push({data:sh.subarray(Fe,Fe+Qf.ka),size:Qf.ka,duration:1152,ub:0,flags:{wb:0,mb:0,kb:0,hb:0,ib:2,xb:0}}),Fe+=Qf.ka):Fe++}}}if(!dk||null==ek)throw new U(2,3,3018,c?c.R()[0]:null);var Xw=dk.sampleRate,BG=ek/9E4*Xw;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Xw,duration:d,rb:[],Aa:new Uint8Array([]),La:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:BG,pb:Vw},stream:b};break;case "opus":var Yw=
|
|
1398
|
+
[],fk=null,cd=k.H;if(!cd)throw new U(2,3,3018,c?c.R()[0]:null);var Ib=[];switch(cd.Fi){case 1:case 2:Ib=[0];break;case 0:Ib=[255,1,1,0,1];break;case 128:Ib=[255,2,0,0,1];break;case 3:Ib=[1,2,1,0,2,1];break;case 4:Ib=[1,2,2,0,1,2,3];break;case 5:Ib=[1,3,2,0,4,1,2,3];break;case 6:Ib=[1,4,2,0,4,1,2,3,5];break;case 7:Ib=[1,4,2,0,4,1,2,3,5,6];break;case 8:Ib=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Ib=[1,1,2,0,1];break;case 131:Ib=[1,1,3,0,1,2];break;case 132:Ib=[1,1,4,0,1,2,3];break;case 133:Ib=[1,1,5,
|
|
1399
|
+
0,1,2,3,4];break;case 134:Ib=[1,1,6,0,1,2,3,4,5];break;case 135:Ib=[1,1,7,0,1,2,3,4,5,6];break;case 136:Ib=[1,1,8,0,1,2,3,4,5,6,7]}var Zw=new Uint8Array([0,cd.channelCount,0,0,cd.sampleRate>>>24&255,cd.sampleRate>>>17&255,cd.sampleRate>>>8&255,cd.sampleRate>>>0&255,0,0].concat(x(Ib)));for(var $w=cd.sampleRate,ax=t(k.dc()),ao=ax.next();!ao.done;ao=ax.next()){var bo=ao.value,Rf=bo.data;null==fk&&null!==bo.pts&&(fk=bo.pts);for(var th=0;th<Rf.length;){for(var CG=0!==(Rf[th+1]&16),DG=0!==(Rf[th+1]&8),
|
|
1400
|
+
Jd=th+2,gk=0;255===Rf[Jd];)gk+=255,Jd+=1;gk+=Rf[Jd];Jd+=1;Jd+=CG?2:0;Jd+=DG?2:0;var bx=Rf.slice(Jd,Jd+gk);Yw.push({data:bx,size:bx.byteLength,duration:960,ub:0,flags:{wb:0,mb:0,kb:0,hb:0,ib:2,xb:0}});th=Jd+gk}}if(0==Zw.byteLength||null==fk)throw new U(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=cd.sampleRate;b.channelsCount=cd.channelCount;var EG=fk/9E4*$w;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:$w,duration:d,rb:[],Aa:Zw,La:new Uint8Array([]),Sa:0,
|
|
1401
|
+
Ua:0,data:{Ib:this.g,baseMediaDecodeTime:EG,pb:Yw},stream:b}}n&&(l.push(n),n=null)}}catch(co){return co&&3023==co.code?Promise.resolve(new Uint8Array([])):Promise.reject(co)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.R()[0]:null));var cx=new Bw(l),eo=b.id+"_"+c.i;if(this.i.has(eo))var fo=this.i.get(eo);else fo=Hw(cx),this.i.set(eo,fo);var FG=jx(cx);this.g++;var GG=Kc(fo,FG);return Promise.resolve(GG)};Q("shaka.transmuxer.TsTransmuxer",eD);eD.prototype.transmux=eD.prototype.transmux;
|
|
1397
1402
|
eD.prototype.getOriginalMimeType=eD.prototype.getOriginalMimeType;eD.prototype.convertCodecs=eD.prototype.convertCodecs;eD.prototype.isSupported=eD.prototype.isSupported;eD.prototype.destroy=eD.prototype.destroy;var fD=["aac","ac-3","ec-3","mp3","opus"],gD=["avc","hevc"];me("video/mp2t",function(){return new eD("video/mp2t")},qe);/*
|
|
1398
1403
|
@license
|
|
1399
1404
|
EME Encryption Scheme Polyfill
|
|
@@ -1461,7 +1466,7 @@ sw:{C:"Kiswahili",D:"Swahili"},"sw-KE":{C:"Kiswahili",D:"Swahili (Kenya)"},ta:{C
|
|
|
1461
1466
|
D:"Thai"},"th-TH":{C:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",D:"Thai (Thailand)"},tl:{C:"Filipino",D:"Filipino"},"tl-PH":{C:"Filipino",D:"Filipino"},tlh:{C:"tlhIngan-Hol",D:"Klingon"},tr:{C:"T\u00fcrk\u00e7e",D:"Turkish"},"tr-TR":{C:"T\u00fcrk\u00e7e",D:"Turkish"},"tt-RU":{C:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",D:"Tatar"},uk:{C:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",D:"Ukrainian"},"uk-UA":{C:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
1462
1467
|
D:"Ukrainian"},ur:{C:"\u0627\u0631\u062f\u0648",D:"Urdu"},"ur-PK":{C:"\u0627\u0631\u062f\u0648",D:"Urdu"},uz:{C:"O'zbek",D:"Uzbek"},"uz-UZ":{C:"O'zbek",D:"Uzbek"},vi:{C:"Ti\u1ebfng Vi\u1ec7t",D:"Vietnamese"},"vi-VN":{C:"Ti\u1ebfng Vi\u1ec7t",D:"Vietnamese"},"xh-ZA":{C:"isiXhosa",D:"Xhosa"},yi:{C:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",D:"Yiddish"},"yi-DE":{C:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",D:"Yiddish (German)"},zh:{C:"\u4e2d\u6587",D:"Chinese"},"zh-HANS":{C:"\u4e2d\u6587\u7b80\u4f53",
|
|
1463
1468
|
D:"Chinese Simplified"},"zh-HANT":{C:"\u4e2d\u6587\u7e41\u9ad4",D:"Chinese Traditional"},"zh-CN":{C:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",D:"Chinese Simplified (China)"},"zh-HK":{C:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",D:"Chinese Traditional (Hong Kong)"},"zh-SG":{C:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",D:"Chinese Simplified (Singapore)"},"zh-TW":{C:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",D:"Chinese Traditional (Taiwan)"},"zu-ZA":{C:"isiZulu",D:"Zulu"}},BD=t(Object.keys(AD)),CD=BD.next();!CD.done;CD=
|
|
1464
|
-
BD.next()){var DD=CD.value;AD[DD.toLowerCase()]=AD[DD]};function ED(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new nd;this.localization=this.controls.
|
|
1469
|
+
BD.next()){var DD=CD.value;AD[DD.toLowerCase()]=AD[DD]};function ED(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new nd;this.localization=this.controls.qa;this.player=this.controls.Yc();this.video=this.controls.ic();this.adManager=this.player.ie();this.ad=b.getAd();this.eventManager.s(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.s(this.adManager,"ad-stopped",function(){c.ad=null})}
|
|
1465
1470
|
ED.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};Q("shaka.ui.Element",ED);ED.prototype.release=ED.prototype.release;function FD(a){return GD(a,"shaka-back-to-overflow-button")}function GD(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function HD(a){a&&(a=GD(a,"shaka-chosen-item"))&&a.parentElement.focus()}function ID(){var a=W("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function JD(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
1466
1471
|
function KD(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function LD(a,b){ED.call(this,a,b);var c=this;this.i=W("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Ub(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=KD(e-d,!1)+" / "+KD(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
|
|
1467
1472
|
""))});this.eventManager.s(this.localization,"locale-updated",function(){});this.eventManager.s(this.localization,"locale-changed",function(){});this.eventManager.s(this.adManager,"ad-started",function(){c.g.Pa();c.g.Ba(.5)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Pa(),this.g.Ba(.5))}pa(LD,ED);LD.prototype.release=function(){this.g.stop();this.g=null;ED.prototype.release.call(this)};Q("shaka.ui.AdCounter",LD);function MD(a,b){ED.call(this,a,b);var c=this;this.g=W("div");this.g.classList.add("shaka-ad-position");JD(this.g,!1);this.parent.appendChild(this.g);this.h=W("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.s(this.localization,"locale-updated",function(){c.ad&&ND(c)});this.eventManager.s(this.localization,"locale-changed",function(){c.ad&&ND(c)});this.eventManager.s(this.adManager,"ad-started",function(){ND(c)});this.eventManager.s(this.adManager,
|
|
@@ -1477,19 +1482,19 @@ p.release=function(){this.G&&(this.G.stop(),this.G=null);ED.prototype.release.ca
|
|
|
1477
1482
|
p.setValue=function(a){this.h||(this.bar.value=a)};function $D(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}Q("shaka.ui.RangeElement",ZD);ZD.prototype.setValue=ZD.prototype.setValue;ZD.prototype.getValue=ZD.prototype.getValue;ZD.prototype.changeTo=ZD.prototype.changeTo;ZD.prototype.onChangeEnd=ZD.prototype.onChangeEnd;
|
|
1478
1483
|
ZD.prototype.onChange=ZD.prototype.onChange;ZD.prototype.onChangeStart=ZD.prototype.onChangeStart;ZD.prototype.setRange=ZD.prototype.setRange;function aE(a,b){ZD.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.F=W("div");this.F.classList.add("shaka-ad-markers");this.container.insertBefore(this.F,this.container.childNodes[0]);this.H=this.controls.g;this.o=new Ub(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.I=new Ub(function(){bE(c)});this.K=!1;this.i=W("div");this.i.id="shaka-player-ui-thumbnail-container";
|
|
1479
1484
|
this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.u=W("div");this.u.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.u);this.container.appendChild(this.i);this.j=this.l=null;this.J=!1;this.m=new Ub(function(){cE(c)});this.A=[];this.eventManager.s(this.localization,"locale-updated",function(){return dE(c)});this.eventManager.s(this.localization,"locale-changed",function(){return dE(c)});this.eventManager.s(this.adManager,"ad-started",
|
|
1480
|
-
function(){eE(c)||JD(c.container,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){eE(c)&&JD(c.container,!0)});this.eventManager.s(this.adManager,"ad-cue-points-changed",function(d){c.A=d.cuepoints;fE(c)});this.eventManager.s(this.player,"unloading",function(){c.A=[];fE(c);c.j&&(c.j.abort(),c.j=null);c.l=null;cE(c)});this.eventManager.s(this.bar,"mousemove",function(d){if(c.player.
|
|
1485
|
+
function(){eE(c)||JD(c.container,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){eE(c)&&JD(c.container,!0)});this.eventManager.s(this.adManager,"ad-cue-points-changed",function(d){c.A=d.cuepoints;fE(c)});this.eventManager.s(this.player,"unloading",function(){c.A=[];fE(c);c.j&&(c.j.abort(),c.j=null);c.l=null;cE(c)});this.eventManager.s(this.bar,"mousemove",function(d){if(c.player.je().length){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;gE(c,d,Math.round(f+
|
|
1481
1486
|
(parseFloat(c.bar.max)-f)/e.width*d))}else cE(c)});this.eventManager.s(this.container,"mouseleave",function(){c.m.stop();c.m.V(.25)});this.setValue(this.video.currentTime);this.update();dE(this);this.ad&&JD(this.container,!1)}pa(aE,ZD);p=aE.prototype;p.release=function(){this.o&&(this.o.stop(),this.o=null,this.I.stop(),this.I=null);ZD.prototype.release.call(this)};p.onChangeStart=function(){this.K=!this.video.paused;this.controls.Mg(!0);this.video.pause();this.m.stop();this.J=!0};
|
|
1482
|
-
p.onChange=function(){if(this.video.duration)if(this.update(),this.o.V(.125),this.player.
|
|
1487
|
+
p.onChange=function(){if(this.video.duration)if(this.update(),this.o.V(.125),this.player.je().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());gE(this,(d-a)/((b-a)/c.width),d)}else cE(this)};p.onChangeEnd=function(){this.o.Pa();this.controls.Mg(!1);this.K&&this.video.play();this.J&&(this.J=!1,this.m.stop(),this.m.V(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1483
1488
|
p.update=function(){var a=this.H.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ta(),g=f.end-f.start;this.setRange(f.start,f.end);eE(this)?(JD(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.H.showUnbufferedStart?
|
|
1484
1489
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):JD(this.container,!1)};
|
|
1485
1490
|
function bE(a){if(a.A.length){for(var b=a.player.Ta(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=t(a.A),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=t(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
1486
1491
|
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent"}function fE(a){bE(a);var b=a.player.Ta();b=b.end-b.start;a.player.U()&&5<b&&a.I.Ba(1)}function eE(a){var b=a.player.Ta();b=b.end-b.start;return a.player.U()&&(5>b||!isFinite(b))?!1:null==a.ad||!a.ad.isLinear()}function dE(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1487
1492
|
function gE(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z;O(function(B){switch(B.g){case 1:d=hE(a);if(!d)return cE(a),B.return();0>c&&(c=0);e=a.player.Ta();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return F(B,a.player.Zf(d.id,f),2);case 2:g=B.h;if(!g||!g.uris.length)return cE(a),B.return();a.player.U()?(h=e.end-c,a.u.textContent=1>h?a.localization.resolve("LIVE"):"-"+iE(h)):a.u.textContent=iE(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1488
|
-
-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";q=g.uris[0].split("#xywh=")[0];if(a.l&&q===a.l.uris[0].split("#xywh=")[0]&&g.segment.
|
|
1493
|
+
-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";q=g.uris[0].split("#xywh=")[0];if(a.l&&q===a.l.uris[0].split("#xywh=")[0]&&g.segment.Ob()==a.l.segment.Ob()&&g.segment.Mb()==a.l.segment.Mb()){B.B(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!q.startsWith("offline:")){B.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';va(B,5);r=Gg;u=yl(g.segment.R(),g.segment.Ob(),g.segment.Mb(),a.player.getConfiguration().streaming.retryParameters);
|
|
1489
1494
|
a.j=a.player.ec().request(r,u,{type:1});return F(B,a.j.promise,7);case 7:v=B.h;a.j=null;"mjpg"==d.codecs?(w=(new Pg).box("mdat",Zg(function(C){q=URL.createObjectURL(new Blob([C],{type:"image/jpeg"}))})),w.parse(v.data,!1)):(A=d.mimeType||"image/jpeg",y=new Blob([v.data],{type:A}),q=URL.createObjectURL(y));xa(B,4);break;case 5:D=ya(B);if(7001==D.code)return B.return();throw D;case 4:try{a.i.removeChild(a.g)}catch(C){}a.g=W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=q;
|
|
1490
1495
|
a.g.onload=function(){q.startsWith("blob:")&&URL.revokeObjectURL(q)};a.i.insertBefore(a.g,a.i.firstChild);case 3:z=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+z*g.positionX+"px",a.g.style.top="-"+z*g.positionY+"px",a.g.style.transform="scale("+z+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
1491
1496
|
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",G(B)}})}
|
|
1492
|
-
function hE(a){var b=a.player.
|
|
1497
|
+
function hE(a){var b=a.player.je();if(!b.length)return null;for(var c=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),d=c.next(),e={};!d.done;e={Ih:void 0,estimatedBandwidth:void 0},d=c.next())if(e.Ih=d.value,e.estimatedBandwidth=a.player.getStats().estimatedBandwidth,(d=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Ih&&g.bandwidth<.01*f.estimatedBandwidth}}(e)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&d.length)return d[0];return b.find(function(f){return"application/mp4"==
|
|
1493
1498
|
f.mimeType&&"mjpg"==f.codecs})||b[0]}function cE(a){a.i.style.visibility="hidden";a.u.textContent=""}function iE(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}Q("shaka.ui.SeekBar",aE);function jE(){}jE.prototype.create=function(a,b){return new aE(a,b)};aE.Factory=jE;function kE(a,b){ED.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");JD(this.h,!1);this.j.appendChild(this.h);this.g=cn();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;JD(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);lE(this);this.i=new Ub(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1494
1499
|
d:(c.i.stop(),JD(c.h,!1))});this.eventManager.s(this.localization,"locale-updated",function(){lE(c)});this.eventManager.s(this.localization,"locale-changed",function(){lE(c)});this.eventManager.s(this.adManager,"ad-started",function(){mE(c)});this.eventManager.s(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),JD(c.h,!1))});this.eventManager.s(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;JD(c.g,!1);JD(c.h,!1)});this.eventManager.s(this.g,
|
|
1495
1500
|
"click",function(){c.ad.skip()});this.ad&&mE(this)}pa(kE,ED);kE.prototype.release=function(){this.i.stop();this.i=null;ED.prototype.release.call(this)};function lE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function mE(a){a.ad.isSkippable()&&(JD(a.g,!0),JD(a.h,!0),a.h.textContent="",a.i.Pa(),a.i.Ba(.5))}Q("shaka.ui.SkipAdButton",kE);/*
|
|
@@ -1502,9 +1507,9 @@ function nE(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}
|
|
|
1502
1507
|
function pE(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],q=b[9],r=b[10],u=b[11],v=b[12],w=b[13],A=b[14];b=b[15];var y=c[0],D=c[1],z=c[2],B=c[3];a[0]=y*d+D*h+z*n+B*v;a[1]=y*e+D*k+z*q+B*w;a[2]=y*f+D*l+z*r+B*A;a[3]=y*g+D*m+z*u+B*b;y=c[4];D=c[5];z=c[6];B=c[7];a[4]=y*d+D*h+z*n+B*v;a[5]=y*e+D*k+z*q+B*w;a[6]=y*f+D*l+z*r+B*A;a[7]=y*g+D*m+z*u+B*b;y=c[8];D=c[9];z=c[10];B=c[11];a[8]=y*d+D*h+z*n+B*v;a[9]=y*e+D*k+z*q+B*w;a[10]=y*f+D*l+z*r+B*A;a[11]=y*g+D*m+z*u+B*b;y=c[12];D=c[13];
|
|
1503
1508
|
z=c[14];B=c[15];a[12]=y*d+D*h+z*n+B*v;a[13]=y*e+D*k+z*q+B*w;a[14]=y*f+D*l+z*r+B*A;a[15]=y*g+D*m+z*u+B*b}
|
|
1504
1509
|
function qE(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;0<m?(b=2*Math.sqrt(m+1),a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k-
|
|
1505
|
-
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function rE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function sE(){var a=new Float32Array(4);a[3]=1;return a}function tE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function uE(a,b,c,d,e){this.m=a;this.ma=b;this.l=c;this.g=d;this.o=new nd;this.L=sE();this.h=sE();this.ha=this.Ca=this.ea=this.j=null;this.G=nE();this.I=nE();this.N=nE();this.Y=nE();this.A=null;this.O=!1;this.J=this.u=null;this.na=this.
|
|
1510
|
+
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function rE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function sE(){var a=new Float32Array(4);a[3]=1;return a}function tE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function uE(a,b,c,d,e){this.m=a;this.ma=b;this.l=c;this.g=d;this.o=new nd;this.L=sE();this.h=sE();this.ha=this.Ca=this.ea=this.j=null;this.G=nE();this.I=nE();this.N=nE();this.Y=nE();this.A=null;this.O=!1;this.J=this.u=null;this.na=this.qa=0;this.Z=this.P=this.S=this.K=null;this.H=0;this.i=75;this.W=0;this.F=e;vE(this)}uE.prototype.release=function(){this.o&&(this.o.release(),this.o=null);this.u&&(this.u.stop(),this.u=null);this.J&&(this.J.stop(),this.J=null)};
|
|
1506
1511
|
uE.prototype.nd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.l.width,this.l.height);wE(this,!1)};
|
|
1507
|
-
function vE(a){xE(a);yE(a);zE(a);AE(a);BE(a);a.o.
|
|
1512
|
+
function vE(a){xE(a);yE(a);zE(a);AE(a);BE(a);a.o.sa(a.m,"loadeddata",function(){var b;a.o.s(a.m,"canplaythrough",function(){wE(a)});a.o.s(a.m,"playing",function(){a.u&&a.u.stop();if(!b){var c=a.ma.Db();c=t(c);for(var d=c.next();!d.done;d=c.next())(d=d.value.frameRate)&&(!b||b<d)&&(b=d)}b||(b=60);wE(a);a.u=(new Ub(function(){wE(a)})).Pa().Ba(1/b)});a.o.s(a.m,"pause",function(){a.u&&a.u.stop();a.u=null;wE(a)});a.o.s(a.m,"seeked",function(){wE(a)});a.o.s(document,"visibilitychange",function(){wE(a)})})}
|
|
1508
1513
|
function xE(a){var b=a.G,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(1E-6>Math.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?1:0;else{d=f-m;e=g-e;m=c-n;var q=1/Math.sqrt(d*d+e*e+m*m);d*=q;e*=q;m*=q;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(q=Math.sqrt(n*n+l*l+h*h))?(q=1/q,n*=q,l*=q,h*=q):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var u=d*l-e*n;(q=Math.sqrt(k*k+r*r+u*u))?(q=1/q,k*=q,r*=q,u*=q):u=r=k=0;b[0]=n;b[1]=k;b[2]=
|
|
1509
1514
|
d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}qE(a.L,a.G);a=b=a.Y;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
|
|
1510
1515
|
function yE(a){CE(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)}
|
|
@@ -1519,7 +1524,7 @@ function BE(a){a.Z=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.Z);a.g.t
|
|
|
1519
1524
|
function wE(a,b){b=void 0===b?!0:b;var c=a.ma.wd()==To;!a.m||2>a.m.readyState||!c&&0==a.m.playbackRate||(oE(a.I,a.i*Math.PI/180,1.5625),"cubemap"==a.F?oE(a.I,a.i*Math.PI/180,2.5):oE(a.I,a.i*Math.PI/180,1.5625),a.g.useProgram(a.j),a.g.clear(a.g.COLOR_BUFFER_BIT),CE(a),b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.Z),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.m)),"equirectangular"==a.F&&(pE(a.N,a.G,
|
|
1520
1525
|
a.Y),pE(a.N,a.I,a.N)),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ea),a.g.vertexAttribPointer(a.S,3,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.S),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.Ca),a.g.vertexAttribPointer(a.P,2,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.P),a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ha),"cubemap"==a.F?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uModelViewMatrix"),!1,a.N)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,
|
|
1521
1526
|
"u_VPMatrix"),!1,a.N),a.g.uniform1i(a.g.getUniformLocation(a.j,"uSampler"),0),a.O&&a.g.viewport(0,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0),a.O&&(a.g.viewport(a.l.width/2,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0)))}
|
|
1522
|
-
function CE(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.
|
|
1527
|
+
function CE(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.qa!==b||a.na!==c){a.l.width=b;a.l.height=c;a.qa=b;a.na=c;var d=b/c,e=a.I,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.I=e;a.g.viewport(0,0,b,c)}}
|
|
1523
1528
|
function EE(a,b,c,d){var e=90*Math.PI/180;var f="cubemap"==a.F?a.N:a.G;var g=Math.sin(b);b=Math.cos(b);var h=f[0],k=f[1],l=f[2],m=f[3],n=f[8],q=f[9],r=f[10],u=f[11];f!==f&&(f[4]=f[4],f[5]=f[5],f[6]=f[6],f[7]=f[7],f[12]=f[12],f[13]=f[13],f[14]=f[14],f[15]=f[15]);f[0]=h*b-n*g;f[1]=k*b-q*g;f[2]=l*b-r*g;f[3]=m*b-u*g;f[8]=h*g+n*b;f[9]=k*g+q*b;f[10]=l*g+r*b;f[11]=m*g+u*b;a.H+=c;a.H<e&&a.H>-e?(e=nE(),g=nE(),b=-1*c,c=Math.sin(b),b=Math.cos(b),h=g[4],k=g[5],l=g[6],m=g[7],n=g[8],q=g[9],r=g[10],u=g[11],g!==
|
|
1524
1529
|
e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=h*b+n*c,e[5]=k*b+q*c,e[6]=l*b+r*c,e[7]=m*b+u*c,e[8]=n*b-h*c,e[9]=q*b-k*c,e[10]=r*b-l*c,e[11]=u*b-m*c,pE(f,e,f)):a.H-=c;c=nE();e=nE();g=Math.sin(d);d=Math.cos(d);b=e[0];h=e[1];k=e[2];l=e[3];m=e[4];n=e[5];q=e[6];r=e[7];e!==c&&(c[8]=e[8],c[9]=e[9],c[10]=e[10],c[11]=e[11],c[12]=e[12],c[13]=e[13],c[14]=e[14],c[15]=e[15]);c[0]=b*d+m*g;c[1]=h*d+n*g;c[2]=k*d+q*g;c[3]=l*d+r*g;c[4]=m*d-b*g;c[5]=n*d-h*g;c[6]=q*
|
|
1525
1530
|
d-k*g;c[7]=r*d-l*g;pE(f,c,f);wE(a,!1)}function FE(a,b){if(void 0===b||b)qE(a.h,a.G),a.W=0,a.A=sE(),a.A[0]=(a.h[0]-a.L[0])/20,a.A[1]=(a.h[1]-a.L[1])/20,a.A[2]=(a.h[2]-a.L[2])/20,a.A[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.A[0];a.h[1]-=a.A[1];a.h[2]-=a.A[2];a.h[3]-=a.A[3];b=nE();tE(a.h,a.h);rE(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.W?a.J=(new Ub(function(){FE(a,!1);a.H=0;a.W++;wE(a,!1)})).V(.025):(rE(b,a.L),a.G=b)};function GE(a,b,c,d,e){fb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.o=new nd;this.h=new nd;this.G=HE(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.F=this.A=0;this.l=null;this.o.s(d,"loading",function(){f.g&&FE(f.g);IE(f)});this.o.s(d,"spatialvideoinfo",function(g){switch(g.detail.projection){case "hequ":f.l="equirectangular";break;case "fish":f.l="equirectangular";break;default:f.l=null}IE(f)});this.o.s(d,"nospatialvideoinfo",function(){f.l=null;IE(f)});this.o.s(d,
|
|
@@ -1529,35 +1534,35 @@ function IE(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProje
|
|
|
1529
1534
|
function HE(a){if(!a.m||qc())return null;for(var b=t(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null}
|
|
1530
1535
|
function LE(a){a.h.s(a.i,"mousedown",function(d){if(!a.j){var e=d.clientX;d=d.clientY;a.j=!0;a.A=e;a.F=d}});0<navigator.maxTouchPoints&&a.h.s(a.i,"touchstart",function(d){if(!a.j){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.j=!0;a.A=e;a.F=d}});a.h.s(a.i,"wheel",function(d){if(!a.j){var e=a.g,f=d.deltaY;f/=50;20<=e.i&&100>=e.i&&(e.i+=f);20>e.i?e.i=20:100<e.i&&(e.i=100);wE(e,!1);d.preventDefault();d.stopPropagation()}});a.h.s(a.i,"mousemove",function(d){a.j&&ME(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
|
|
1531
1536
|
a.h.s(a.i,"touchmove",function(d){a.j&&ME(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.s(a.i,"mouseleave",function(){a.j=!1});a.h.s(a.i,"mouseup",function(){a.j=!1});0<navigator.maxTouchPoints&&a.h.s(a.i,"touchend",function(){a.j=!1});var b=!1;if(window.DeviceOrientationEvent)if("function"==typeof DeviceMotionEvent.requestPermission){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){"granted"!==d||b||(b=!0,NE(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Xa(a.i,
|
|
1532
|
-
"click",c);a.h.Xa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Xa(a.i,"touchend",c);"granted"!==d?(a.h.
|
|
1533
|
-
function NE(a){a.h.s(window,"deviceorientation",function(b){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(10<Math.abs(c)||10<Math.abs(d)||5<Math.abs(e))d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;90==b||-90==b?EE(a.g,c*JE*-1,e*JE*-1,0):EE(a.g,c*JE*-1,d*JE,0)})}function ME(a,b,c){var d=-.6*Math.PI/180;EE(a.g,(b-a.A)*d,-1*(c-a.F)*d,0);a.A=b;a.F=c}var JE=Math.PI/180;function Z(a,b,c,d,e){fb.call(this);var f=this;this.W=!0;this.g=e;this.F=new Hq(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.na=!0;this.A=this.F.ic();this.o=c;this.H=this.F.Yc();this.ma=a;this.j=b;this.Ec=d;this.
|
|
1534
|
-
g.next())JD(h.value,!1)});this.
|
|
1535
|
-
p.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.o){b.B(2);break}return F(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.S&&(a.S.stop(),a.S=null);a.ea&&(a.ea.stop(),a.ea=null);a.O&&(a.O.stop(),a.O=null);a.
|
|
1536
|
-
null);a.I&&(a.j.removeChild(a.I),a.I=null);if(!a.ma){b.B(6);break}return F(b,a.ma.destroy(),7);case 7:a.ma=null;case 6:a.H=null,a.o=null,a.A=null,a.
|
|
1537
|
+
"click",c);a.h.Xa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Xa(a.i,"touchend",c);"granted"!==d?(a.h.sa(a.i,"click",c),a.h.sa(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.sa(a.i,"touchend",c)):(b=!0,NE(a))}).catch(function(){a.h.Xa(a.i,"click",c);a.h.Xa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Xa(a.i,"touchend",c);a.h.sa(a.i,"click",c);a.h.sa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.sa(a.i,"touchend",c)})}else b=!0,NE(a)}
|
|
1538
|
+
function NE(a){a.h.s(window,"deviceorientation",function(b){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(10<Math.abs(c)||10<Math.abs(d)||5<Math.abs(e))d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;90==b||-90==b?EE(a.g,c*JE*-1,e*JE*-1,0):EE(a.g,c*JE*-1,d*JE,0)})}function ME(a,b,c){var d=-.6*Math.PI/180;EE(a.g,(b-a.A)*d,-1*(c-a.F)*d,0);a.A=b;a.F=c}var JE=Math.PI/180;function Z(a,b,c,d,e){fb.call(this);var f=this;this.W=!0;this.g=e;this.F=new Hq(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.na=!0;this.A=this.F.ic();this.o=c;this.H=this.F.Yc();this.ma=a;this.j=b;this.Ec=d;this.Ea=this.H.ie();this.l=this.m=null;this.Z=!1;this.K=[];this.jb=[];this.Ya=!1;this.S=new Ub(function(){f.j.style.cursor="none";f.Ya=!1;OE(f)});this.ea=new Ub(function(){f.h.removeAttribute("shown");f.O.V(2)});this.O=new Ub(function(){for(var g=t(f.K),h=g.next();!h.done;h=
|
|
1539
|
+
g.next())JD(h.value,!1)});this.wa=new Ub(function(){f.jc()&&PE(f)});this.J=null;this.G=[];this.qa=QE();this.i=new nd;this.u=null;this.configure(this.g);RE(this);this.ha=new Set;SE(this);this.wa.Ba(this.g.refreshTickInSeconds);this.i.s(this.qa,"locale-changed",function(g){f.Ea.setLocale(g.locales[0])})}pa(Z,fb);p=Z.prototype;
|
|
1540
|
+
p.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.o){b.B(2);break}return F(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.S&&(a.S.stop(),a.S=null);a.ea&&(a.ea.stop(),a.ea=null);a.O&&(a.O.stop(),a.O=null);a.wa&&(a.wa.stop(),a.wa=null);a.u&&(a.u.release(),a.u=null);TE(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.F){b.B(4);break}return F(b,a.F.destroy(),5);case 5:a.F=null;case 4:a.L&&(a.j.removeChild(a.L),a.L=
|
|
1541
|
+
null);a.I&&(a.j.removeChild(a.I),a.I=null);if(!a.ma){b.B(6);break}return F(b,a.ma.destroy(),7);case 7:a.ma=null;case 6:a.H=null,a.o=null,a.A=null,a.qa=null,a.ha.clear(),fb.prototype.release.call(a),G(b)}})};function TE(a){for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.release();a.G=[]}function UE(a,b){VE.set(a,b)}p.Ci=function(a){this.na=a;SE(this)};p.Ij=function(){OE(this)};
|
|
1537
1542
|
p.configure=function(a){this.g=a;this.F.ih(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Ma&&(this.Ma=null);this.Ia&&(this.Ia=null);this.u&&this.u.configure(a);this.h?(dn(this.h),TE(this)):(WE(this),XE(this),this.u=new GE(this.h,this.Ec,this.o,this.H,this.g));this.j.classList.add("shaka-video-container");this.o.classList.add("shaka-video");YE(this);this.g.addBigPlayButton&&ZE(this);this.g.customContextMenu&&(this.Ia=new SD(this.Y,this),this.G.push(this.Ia));this.L||
|
|
1538
1543
|
$E(this);this.g.seekOnTaps&&(aF(this),bF(this));this.Ga=W("div");this.Ga.classList.add("shaka-server-side-ad-container");this.h.appendChild(this.Ga);cF(this);this.K=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.K.push.apply(this.K,x(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));dF(this);this.jb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));OE(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=
|
|
1539
|
-
a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.s(b,"click",c);this.i.s(b,"dblclick",c)}};p.Ig=function(a){(this.W=a)?(this.j.setAttribute("shaka-controls","true"),this.o.tabIndex=-1,this.o.controls=!1):this.j.removeAttribute("shaka-controls");OE(this)};p.Xh=function(a){this.o.controls=a;this.o.tabIndex=a?0:-1;a&&this.Ig(!1)};p.getAd=function(){return this.m};p.Oi=function(){return this.F};p.bj=function(){return this.
|
|
1544
|
+
a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.s(b,"click",c);this.i.s(b,"dblclick",c)}};p.Ig=function(a){(this.W=a)?(this.j.setAttribute("shaka-controls","true"),this.o.tabIndex=-1,this.o.controls=!1):this.j.removeAttribute("shaka-controls");OE(this)};p.Xh=function(a){this.o.controls=a;this.o.tabIndex=a?0:-1;a&&this.Ig(!1)};p.getAd=function(){return this.m};p.Oi=function(){return this.F};p.bj=function(){return this.qa};p.tj=function(){return this.j};p.ic=function(){return this.A};
|
|
1540
1545
|
p.aj=function(){return this.o};p.Yc=function(){return this.H};p.$i=function(){return this.ma};p.Ti=function(){return this.h};p.kj=function(){return this.Ga};p.Qi=function(){return this.I};p.Ri=function(){return this.g};p.Fj=function(){return this.Z};p.Mg=function(a){this.Z=a};p.zj=function(){return this.na};p.Vf=function(){return this.l?this.l.getValue():this.A.currentTime};p.Zh=function(a){this.J=a};p.od=function(){return this.K.some(function(a){return!a.classList.contains("shaka-hidden")})};
|
|
1541
|
-
p.zc=function(){this.O.Pa()};p.
|
|
1546
|
+
p.zc=function(){this.O.Pa()};p.Fd=function(){return document.fullscreenEnabled||this.o.webkitSupportsFullscreen?!0:!1};p.cd=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.o;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1542
1547
|
function eF(a){var b,c,d;return O(function(e){switch(e.g){case 1:va(e,2);if(!document.fullscreenEnabled){b=a.o;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!document.pictureInPictureElement){e.B(5);break}return F(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,F(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}va(e,9);return F(e,screen.orientation.lock("landscape"),11);case 11:xa(e,
|
|
1543
1548
|
4,2);break;case 9:ya(e,2);case 4:xa(e,0);break;case 2:d=ya(e),a.dispatchEvent(new T("error",(new Map).set("detail",d))),G(e)}})}function fF(a){var b;return O(function(c){if(!document.fullscreenEnabled)return b=a.o,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return F(c,document.exitFullscreen(),0)})}p.We=function(){var a=this;return O(function(b){return a.cd()?F(b,fF(a),0):F(b,eF(a),0)})};
|
|
1544
1549
|
p.se=function(){return this.F.Oa()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.o.disablePictureInPicture:!1};p.ue=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
|
|
1545
|
-
p.
|
|
1550
|
+
p.Td=function(){var a=this,b,c;return O(function(d){if(1==d.g)return va(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?F(d,gF(a),5):document.pictureInPictureElement?F(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.o,F(d,b.requestPictureInPicture(),5));if(2!=d.g)return xa(d,0);c=ya(d);a.dispatchEvent(new T("error",(new Map).set("detail",c)));G(d)})};
|
|
1546
1551
|
function gF(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.j;c=b.getBoundingClientRect();return F(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;hF(d);e=b.parentNode||document.body;f=a.j.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
|
|
1547
|
-
d.document.head.append(g);d.document.body.append(b);a.i.
|
|
1552
|
+
d.document.head.append(g);d.document.body.append(b);a.i.sa(d,"pagehide",function(){f.replaceWith(b)});G(h)})}
|
|
1548
1553
|
function hF(a){var b=[].concat(x(document.styleSheets)).map(function(d){try{return[].concat(x(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}p.di=function(){JD(this.N,!0);JD(this.I,!0);this.h.setAttribute("ad-active","true")};
|
|
1549
1554
|
p.xh=function(){JD(this.N,!1);JD(this.I,!1);this.h.removeAttribute("ad-active")};function QD(a){a.W&&a.A.duration&&(a.H.Qc(),a.A.paused&&!a.Z?a.A.play():a.A.pause())}function PD(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
1550
|
-
function WE(a){a.h=W("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.s(a.h,"touchstart",function(b){a.A.duration&&(a.jc()?a.J=Date.now():(iF(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.s(a.h,"click",function(){jF(a)});a.i.s(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.
|
|
1555
|
+
function WE(a){a.h=W("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.s(a.h,"touchstart",function(b){a.A.duration&&(a.jc()?a.J=Date.now():(iF(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.s(a.h,"click",function(){jF(a)});a.i.s(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.Fd()&&a.We()})}
|
|
1551
1556
|
function ZE(a){var b=W("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Ma=new RD(b,a);a.G.push(a.Ma)}function YE(a){var b=W("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function kF(a){a.N=W("div");a.N.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();JD(a.N,b);a.P.appendChild(a.N);b=new MD(a.N,a);a.G.push(b);b=new LD(a.N,a);a.G.push(b);b=new kE(a.N,a);a.G.push(b)}
|
|
1552
1557
|
function $E(a){a.L=W("div");a.L.classList.add("shaka-spinner-container");a.j.appendChild(a.L);var b=W("div");b.classList.add("shaka-spinner");a.L.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");b.setAttribute("fill",
|
|
1553
|
-
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function aF(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.
|
|
1558
|
+
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function aF(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.vb=new XD(b,a);a.G.push(a.vb)}function bF(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.Ac=new YD(b,a);a.G.push(a.Ac)}
|
|
1554
1559
|
function cF(a){a.P=W("div");a.P.classList.add("shaka-bottom-controls");a.P.classList.add("shaka-no-propagation");a.h.appendChild(a.P);a.i.s(a.P,"click",function(d){d.target.closest(".shaka-overflow-button")||a.zc()});kF(a);a.Y=W("div");a.Y.classList.add("shaka-controls-button-panel");a.Y.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.Y.classList.add("shaka-tooltips-on");a.P.appendChild(a.Y);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,VE.get(c)?
|
|
1555
1560
|
(c=VE.get(c).create(a.Y,a),a.G.push(c)):Za("Unrecognized control panel element requested:",c)}function dF(a){if(a.g.addSeekBar)a.l=lF.create(a.P,a),a.G.push(a.l);else{a=t(a.K);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function XE(a){a.I=W("div");a.I.classList.add("shaka-client-side-ad-container");JD(a.I,!1);a.i.s(a.I,"click",function(){jF(a)});a.j.appendChild(a.I)}
|
|
1556
|
-
function RE(a){a.i.s(a.H,"buffering",function(){a.W&&JD(a.L,a.H.
|
|
1561
|
+
function RE(a){a.i.s(a.H,"buffering",function(){a.W&&JD(a.L,a.H.Ed())});a.W&&JD(a.L,a.H.Ed());a.i.s(window,"keydown",function(b){mF(a,b)});a.i.s(window,"click",function(){return a.zc()});a.i.s(a,"submenuopen",function(){a.zc()});a.i.s(a.A,"play",function(){OE(a)});a.i.s(a.A,"pause",function(){OE(a)});a.i.s(a.j,"mousemove",function(b){iF(a,b)});a.i.s(a.j,"touchmove",function(b){iF(a,b)},{passive:!0});a.i.s(a.j,"touchend",function(b){iF(a,b)},{passive:!0});a.i.s(a.j,"mouseleave",function(){a.J||a.S.Pa()});
|
|
1557
1562
|
a.i.s(a.F,"caststatuschanged",function(){SE(a)});a.i.s(a.u,"vrstatuschanged",function(){a.dispatchEvent(new T("vrstatuschanged"))});a.i.s(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&iF(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&e&&!d&&0<c&&(b.preventDefault(),
|
|
1558
|
-
nF(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&e&&!d&&0<c&&(b.preventDefault(),nF(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),nF(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),nF(a,a.l.getValue()+f));break;case "Home":a.l&&nF(a,a.H.Ta().start);break;case "End":a.l&&nF(a,a.H.Ta().end);break;case "f":a.
|
|
1559
|
-
case " ":e&&oF(a)}}});a.i.s(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.s(a.
|
|
1560
|
-
function pF(a){return O(function(b){return a.A&&0!=a.A.readyState&&!a.F.Oa()&&a.g.enableFullscreenOnRotation&&a.
|
|
1563
|
+
nF(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&e&&!d&&0<c&&(b.preventDefault(),nF(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),nF(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),nF(a,a.l.getValue()+f));break;case "Home":a.l&&nF(a,a.H.Ta().start);break;case "End":a.l&&nF(a,a.H.Ta().end);break;case "f":a.Fd()&&a.We();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.o.muted=!a.o.muted;break;case "p":a.se()&&a.Td();break;
|
|
1564
|
+
case " ":e&&oF(a)}}});a.i.s(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.s(a.Ea,"ad-started",function(b){a.m=b.ad;a.di()});a.i.s(a.Ea,"ad-stopped",function(){a.m=null;a.xh()});screen.orientation&&a.i.s(screen.orientation,"change",function(){return O(function(b){return F(b,pF(a),0)})})}
|
|
1565
|
+
function pF(a){return O(function(b){return a.A&&0!=a.A.readyState&&!a.F.Oa()&&a.g.enableFullscreenOnRotation&&a.Fd()?screen.orientation.type.includes("landscape")&&!a.cd()?F(b,eF(a),0):screen.orientation.type.includes("portrait")&&a.cd()?F(b,fF(a),0):b.B(0):b.return()})}
|
|
1561
1566
|
function iF(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),OE(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.Ya=!0,a.O.stop(),a.jc()||(PE(a),OE(a)),a.S.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.S.V(3))}function qF(a){return window.matchMedia("hover: hover").matches?a.jb.some(function(b){return b.matches(":hover")}):!1}
|
|
1562
1567
|
function OE(a){var b=a.m?a.m.isPaused():!1,c=a.A.paused&&!a.Z,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Ya||d||qF(a)?(PE(a),a.h.setAttribute("shown","true"),a.ea.stop()):a.ea.V(a.g.fadeDelay)}function jF(a){a.W&&!a.Pb()&&(a.od()?a.O.Pa():a.g.singleClickForPlayAndPause&&oF(a))}function oF(a){a.m&&a.m.isLinear()?PD(a):QD(a)}
|
|
1563
1568
|
function SE(a){var b=a.F.Oa();a.dispatchEvent(new T("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}p.jc=function(){return this.W?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function nF(a,b){a.l.changeTo(b);a.jc()&&PE(a)}
|
|
@@ -1629,8 +1634,8 @@ a.Ka("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1629
1634
|
"\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN",
|
|
1630
1635
|
"\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u89e3\u6790\u5ea6"],
|
|
1631
1636
|
["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.hh(navigator.languages||[]);return a}Q("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.cg;Z.prototype.incrementPitch=Z.prototype.ag;Z.prototype.incrementYaw=Z.prototype.dg;
|
|
1632
|
-
Z.prototype.toggleStereoscopicMode=Z.prototype.nd;Z.prototype.setVRFieldOfView=Z.prototype.vk;Z.prototype.getVRFieldOfView=Z.prototype.qj;Z.prototype.getVRNorth=Z.prototype.rj;Z.prototype.isPlayingVR=Z.prototype.Pb;Z.prototype.canPlayVR=Z.prototype.yf;Z.prototype.hideUI=Z.prototype.yj;Z.prototype.showUI=Z.prototype.wk;Z.prototype.isOpaque=Z.prototype.jc;Z.prototype.hideAdUI=Z.prototype.xh;Z.prototype.showAdUI=Z.prototype.di;Z.prototype.togglePiP=Z.prototype.
|
|
1633
|
-
Z.prototype.isPiPAllowed=Z.prototype.se;Z.prototype.toggleFullScreen=Z.prototype.We;Z.prototype.isFullScreenEnabled=Z.prototype.cd;Z.prototype.isFullScreenSupported=Z.prototype.
|
|
1637
|
+
Z.prototype.toggleStereoscopicMode=Z.prototype.nd;Z.prototype.setVRFieldOfView=Z.prototype.vk;Z.prototype.getVRFieldOfView=Z.prototype.qj;Z.prototype.getVRNorth=Z.prototype.rj;Z.prototype.isPlayingVR=Z.prototype.Pb;Z.prototype.canPlayVR=Z.prototype.yf;Z.prototype.hideUI=Z.prototype.yj;Z.prototype.showUI=Z.prototype.wk;Z.prototype.isOpaque=Z.prototype.jc;Z.prototype.hideAdUI=Z.prototype.xh;Z.prototype.showAdUI=Z.prototype.di;Z.prototype.togglePiP=Z.prototype.Td;Z.prototype.isPiPEnabled=Z.prototype.ue;
|
|
1638
|
+
Z.prototype.isPiPAllowed=Z.prototype.se;Z.prototype.toggleFullScreen=Z.prototype.We;Z.prototype.isFullScreenEnabled=Z.prototype.cd;Z.prototype.isFullScreenSupported=Z.prototype.Fd;Z.prototype.hideSettingsMenus=Z.prototype.zc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.od;Z.prototype.setLastTouchEventTime=Z.prototype.Zh;Z.prototype.getDisplayTime=Z.prototype.Vf;Z.prototype.isCastAllowed=Z.prototype.zj;Z.prototype.setSeeking=Z.prototype.Mg;Z.prototype.isSeeking=Z.prototype.Fj;
|
|
1634
1639
|
Z.prototype.getConfig=Z.prototype.Ri;Z.prototype.getClientSideAdContainer=Z.prototype.Qi;Z.prototype.getServerSideAdContainer=Z.prototype.kj;Z.prototype.getControlsContainer=Z.prototype.Ti;Z.prototype.getLocalPlayer=Z.prototype.$i;Z.prototype.getPlayer=Z.prototype.Yc;Z.prototype.getLocalVideo=Z.prototype.aj;Z.prototype.getVideo=Z.prototype.ic;Z.prototype.getVideoContainer=Z.prototype.tj;Z.prototype.getLocalization=Z.prototype.bj;Z.prototype.getCastProxy=Z.prototype.Oi;Z.prototype.getAd=Z.prototype.getAd;
|
|
1635
1640
|
Z.prototype.setEnabledNativeControls=Z.prototype.Xh;Z.prototype.setEnabledShakaControls=Z.prototype.Ig;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ij;Z.prototype.allowCast=Z.prototype.Ci;Z.registerSeekBar=function(a){lF=a};Z.registerElement=UE;Z.prototype.destroy=Z.prototype.destroy;var VE=new Map,lF=new jE;function sF(a,b){ED.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=cn();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=W("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
|
|
1636
1641
|
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);tF(this);this.eventManager.s(this.localization,"locale-updated",function(){uF(c)});this.eventManager.s(this.localization,"locale-changed",function(){uF(c)});this.eventManager.s(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&JD(c.g,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){JD(c.g,!0)});this.eventManager.s(this.controls,"submenuopen",function(){JD(c.h,!1)});this.eventManager.s(this.h,"touchstart",function(d){c.controls.Zh(Date.now());
|
|
@@ -1644,13 +1649,13 @@ p.ig=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!
|
|
|
1644
1649
|
p.qk=function(a){this.g.Ig(a)};
|
|
1645
1650
|
function EF(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate recenter_vr toggle_stereoscopic".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent bytesDownloaded".split(" "),contextMenuElements:["loop",
|
|
1646
1651
|
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
|
|
1647
|
-
trackLabelFormat:FF,textTrackLabelFormat:FF,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps
|
|
1648
|
-
b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.ig()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1652
|
+
trackLabelFormat:FF,textTrackLabelFormat:FF,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:0<navigator.maxTouchPoints,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular"};
|
|
1653
|
+
"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.ig()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));b.overflowMenuButtons.push("save_video_frame");return b}
|
|
1649
1654
|
function GF(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,v,w,A,y,D,z,B;return O(function(C){switch(C.g){case 1:yz();if(!ro())return HF("shaka-ui-load-failed",IF),C.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){C.B(2);break}if(b.length&&!a.length){e=t(b);for(f=e.next();!f.done;f=e.next())g=f.value,
|
|
1650
1655
|
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=JF(h,c,d),m=l.Eh,n=l.ri,KF(h,g,m,n));C.B(2);break}q=t(a);r=q.next();case 4:if(r.done){C.B(2);break}u=r.value;if(u.ui){C.B(5);break}v=null;w=t(b);for(A=w.next();!A.done;A=w.next())if(y=A.value,y.parentElement==u){v=y;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));D=JF(u,c,d);z=D.Eh;B=D.ri;va(C,7);return F(C,KF(u,v,z,B),9);case 9:xa(C,5);break;case 7:return ya(C),
|
|
1651
1656
|
HF("shaka-ui-load-failed",LF),C.return();case 5:r=q.next();C.B(4);break;case 2:HF("shaka-ui-loaded"),G(C)}})}function HF(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1652
1657
|
function KF(a,b,c,d){var e,f,g,h,k,l,m,n,q;return O(function(r){switch(r.g){case 1:e=new X;f=new DF(e,a,b,d);e.bh(c);g="";h=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(g=a.dataset.shakaPlayerCastReceiverId,h="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(g=b.dataset.shakaPlayerCastReceiverId,h="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);g.length&&f.configure({castReceiverAppId:g,castAndroidReceiverCompatible:h});
|
|
1653
|
-
b.controls&&f.g.Xh(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");m=t(b.querySelectorAll("source"))
|
|
1658
|
+
b.controls&&f.g.Xh(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");return F(r,e.rc(b),2);case 2:m=t(b.querySelectorAll("source")),n=m.next();case 3:if(n.done){r.B(0);break}q=n.value;va(r,6);return F(r,f.g.Yc().load(q.getAttribute("src")),8);case 8:r.B(0);break;case 6:ya(r);case 4:n=m.next(),r.B(3)}})}
|
|
1654
1659
|
function JF(a,b,c){var d=null;b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.parentElement==a){d=e;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));b=null;c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.parentElement==a){b=e;break}b||(b=document.createElement("canvas"),b.classList.add("shaka-vr-canvas-container"),a.appendChild(b));return{Eh:d,ri:b}}Q("shaka.ui.Overlay",DF);DF.prototype.setEnabled=DF.prototype.qk;
|
|
1655
1660
|
DF.prototype.getControls=DF.prototype.Si;DF.prototype.configure=DF.prototype.configure;DF.prototype.getConfiguration=DF.prototype.getConfiguration;DF.prototype.isMobile=DF.prototype.ig;DF.prototype.destroy=DF.prototype.destroy;var FF=0;DF.TrackLabelFormat={LANGUAGE:FF,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var IF=0,LF=1;DF.FailReasonCode={NO_BROWSER_SUPPORT:IF,PLAYER_FAILED_TO_LOAD:LF};
|
|
1656
1661
|
"complete"==document.readyState?O(function(a){if(1==a.g)return F(a,Promise.resolve(),2);GF();G(a)}):window.addEventListener("load",GF);function MF(a,b,c,d,e,f,g,h){function k(I){var E="";5<=I&&(E=" "+f.resolve("SURROUND"));return E}function l(I,E,J,K){I=[I,E];h&&null!=K&&I.push(K);J&&3==g&&I.push(J);return I.join(": ")}function m(I){return"variant"==I.type?I.audioRoles?I.audioRoles.join(", "):void 0:I.roles.join(", ")}var n=a.find(function(I){return 1==I.active}),q=FD(b);dn(b);b.appendChild(q);q=new Map;for(var r=t(a),u=r.next();!u.done;u=r.next())u=u.value,q.has(u.language)||q.set(u.language,new Set),q.get(u.language).add(m(u));
|
|
@@ -1661,22 +1666,22 @@ function PF(a,b){a.button=cn();a.button.classList.add("shaka-overflow-button");a
|
|
|
1661
1666
|
function QF(a){a.menu=W("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=cn();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.s(a.backButton,"click",function(){a.controls.zc()});var b=W("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1662
1667
|
W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function RF(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.s(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}JD(a.parent,!0);jb(a.parent.childNodes,b)&&kb(a.parent.childNodes,b)[0].focus();OE(a.controls)}))}Q("shaka.ui.SettingsMenu",OF);function SF(a,b){OF.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.s(this.localization,"locale-updated",function(){TF(c)});this.eventManager.s(this.localization,"locale-changed",function(){TF(c)});this.eventManager.s(this.player,"loading",function(){UF(c)});this.eventManager.s(this.player,"trackschanged",function(){UF(c)});this.eventManager.s(this.player,
|
|
1663
1668
|
"variantchanged",function(){VF(c)});TF(this);VF(this)}pa(SF,OF);
|
|
1664
|
-
function VF(a){var b=a.player.
|
|
1665
|
-
function UF(a){var b=0<a.player.
|
|
1669
|
+
function VF(a){var b=a.player.Db();MF(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.Re(c.language,c.roles[0],c.channelsCount):a.player.Re(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);HD(a.menu);a.controls.dispatchEvent(new T("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);JD(a.button,2<a.menu.getElementsByTagName("button").length)}
|
|
1670
|
+
function UF(a){var b=0<a.player.Db().length;JD(a.button,b);VF(a)}function TF(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}Q("shaka.ui.AudioLanguageSelection",SF);function WF(){}WF.prototype.create=function(a,b){return new SF(a,b)};wF("language",new WF);UE("language",new WF);function XF(a,b){ED.call(this,a,b);var c=this;this.h=this.controls.F;this.g=cn();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
|
|
1666
1671
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);YF(this);ZF(this);this.eventManager.s(this.localization,"locale-updated",function(){YF(c)});this.eventManager.s(this.localization,"locale-changed",function(){YF(c)});this.eventManager.s(this.g,"click",function(){$F(c)});this.eventManager.s(this.controls,"caststatuschanged",function(){ZF(c)})}pa(XF,ED);
|
|
1667
1672
|
function $F(a){var b;O(function(c){if(1==c.g){if(a.h.Oa())return a.h.ii(),c.B(0);va(c,3);a.g.disabled=!0;return F(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,xa(c,0);b=ya(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new T("error",(new Map).set("detail",b)));G(c)})}function ZF(a){var b=a.h.xf()&&a.controls.na,c=a.h.Oa();JD(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");aG(a)}
|
|
1668
1673
|
function aG(a){a.j.textContent=a.h.Oa()?a.h.Me():a.localization.resolve("OFF")}function YF(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");aG(a)}Q("shaka.ui.CastButton",XF);function bG(){}bG.prototype.create=function(a,b){return new XF(a,b)};wF("cast",new bG);UE("cast",new bG);function cG(a,b){ED.call(this,a,b);var c=this;this.g=cn();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);dG(this);this.h=this.controls.g.fastForwardRates;this.eventManager.s(this.localization,"locale-updated",function(){dG(c)});this.eventManager.s(this.localization,"locale-changed",function(){dG(c)});
|
|
1669
1674
|
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Lc(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(cG,ED);function dG(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}Q("shaka.ui.FastForwardButton",cG);function eG(){}eG.prototype.create=function(a,b){return new cG(a,b)};UE("fast_forward",new eG);function fG(a,b){ED.call(this,a,b);var c=this;this.h=this.controls.o;this.g=cn();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");gG(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);hG(this);this.eventManager.s(this.localization,"locale-updated",function(){hG(c)});this.eventManager.s(this.localization,"locale-changed",function(){hG(c)});this.eventManager.s(this.g,"click",function(){return O(function(d){return F(d,
|
|
1670
|
-
c.controls.We(),0)})});this.eventManager.s(document,"fullscreenchange",function(){c.g.textContent=c.controls.cd()?"fullscreen_exit":"fullscreen";hG(c)});this.eventManager.s(this.h,"loadedmetadata",function(){gG(c)});this.eventManager.s(this.h,"loadeddata",function(){gG(c)})}pa(fG,ED);function gG(a){a.controls.
|
|
1675
|
+
c.controls.We(),0)})});this.eventManager.s(document,"fullscreenchange",function(){c.g.textContent=c.controls.cd()?"fullscreen_exit":"fullscreen";hG(c)});this.eventManager.s(this.h,"loadedmetadata",function(){gG(c)});this.eventManager.s(this.h,"loadeddata",function(){gG(c)})}pa(fG,ED);function gG(a){a.controls.Fd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function hG(a){a.g.ariaLabel=a.localization.resolve(a.controls.cd()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1671
1676
|
Q("shaka.ui.FullscreenButton",fG);function iG(){}iG.prototype.create=function(a,b){return new fG(a,b)};UE("fullscreen",new iG);function jG(a,b){ED.call(this,a,b);var c=this;this.g=cn();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=W("span");this.l.classList.add("shaka-current-selection-span");
|
|
1672
1677
|
a.appendChild(this.l);this.g.appendChild(a);kG(this);this.parent.appendChild(this.g);this.eventManager.s(this.localization,"locale-updated",function(){kG(c)});this.eventManager.s(this.localization,"locale-changed",function(){kG(c)});this.eventManager.s(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Pa();c.h.Ba(1)});this.m=this.video.loop;this.h=new Ub(function(){c.m!=c.video.loop&&(kG(c),c.m=c.video.loop)});this.h.Ba(1)}pa(jG,ED);
|
|
1673
1678
|
jG.prototype.release=function(){this.h.stop();this.h=null;ED.prototype.release.call(this)};function kG(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}Q("shaka.ui.LoopButton",jG);function lG(){}lG.prototype.create=function(a,b){return new jG(a,b)};wF("loop",new lG);UE("loop",new lG);UD("loop",new lG);function mG(a,b){ED.call(this,a,b);var c=this;this.g=cn();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);nG(this);oG(this);this.eventManager.s(this.localization,"locale-updated",function(){nG(c)});this.eventManager.s(this.localization,"locale-changed",function(){nG(c)});this.eventManager.s(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
|
|
1674
1679
|
this.eventManager.s(this.video,"volumechange",function(){nG(c);oG(c)});this.eventManager.s(this.adManager,"ad-volume-changed",function(){nG(c);oG(c)});this.eventManager.s(this.adManager,"ad-muted",function(){nG(c);oG(c)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.ad=null;nG(c);oG(c)})}pa(mG,ED);function nG(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1675
1680
|
function oG(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}Q("shaka.ui.MuteButton",mG);function pG(){}pG.prototype.create=function(a,b){return new mG(a,b)};UE("mute",new pG);function qG(a,b){ED.call(this,a,b);var c=this;this.l=this.controls.o;this.g=cn();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
|
|
1676
|
-
W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);rG(this);this.parent.appendChild(this.g);this.controls.se()||JD(this.g,!1);this.eventManager.s(this.localization,"locale-updated",function(){rG(c)});this.eventManager.s(this.localization,"locale-changed",function(){rG(c)});this.eventManager.s(this.g,"click",function(){c.controls.
|
|
1677
|
-
function(){tG(c)});this.eventManager.s(this.controls,"caststatuschanged",function(){uG(c)});this.eventManager.s(this.player,"trackschanged",function(){uG(c)});"documentPictureInPicture"in window&&this.eventManager.s(window.documentPictureInPicture,"enter",function(d){sG(c);c.eventManager.
|
|
1681
|
+
W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);rG(this);this.parent.appendChild(this.g);this.controls.se()||JD(this.g,!1);this.eventManager.s(this.localization,"locale-updated",function(){rG(c)});this.eventManager.s(this.localization,"locale-changed",function(){rG(c)});this.eventManager.s(this.g,"click",function(){c.controls.Td()});this.eventManager.s(this.l,"enterpictureinpicture",function(){sG(c)});this.eventManager.s(this.l,"leavepictureinpicture",
|
|
1682
|
+
function(){tG(c)});this.eventManager.s(this.controls,"caststatuschanged",function(){uG(c)});this.eventManager.s(this.player,"trackschanged",function(){uG(c)});"documentPictureInPicture"in window&&this.eventManager.s(window.documentPictureInPicture,"enter",function(d){sG(c);c.eventManager.sa(d.window,"pagehide",function(){tG(c)})})}pa(qG,ED);
|
|
1678
1683
|
function sG(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function tG(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
|
|
1679
|
-
function rG(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.ue();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function uG(a){O(function(b){if(!a.controls.se())return JD(a.g,!1),a.controls.ue()?F(b,a.controls.
|
|
1684
|
+
function rG(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.ue();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function uG(a){O(function(b){if(!a.controls.se())return JD(a.g,!1),a.controls.ue()?F(b,a.controls.Td(),0):b.B(0);if(!a.player||!a.player.bd())return JD(a.g,!0),b.B(0);JD(a.g,!1);return a.controls.ue()?F(b,a.controls.Td(),0):b.B(0)})}Q("shaka.ui.PipButton",qG);
|
|
1680
1685
|
function vG(){}vG.prototype.create=function(a,b){return new qG(a,b)};wF("picture_in_picture",new vG);UE("picture_in_picture",new vG);UD("picture_in_picture",new vG);function wG(a,b){OF.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.s(this.localization,"locale-updated",function(){xG(c)});this.eventManager.s(this.localization,"locale-changed",function(){xG(c)});this.eventManager.s(this.player,"loaded",function(){yG(c,c.player.Ra())});this.eventManager.s(this.player,"ratechange",function(){yG(c,
|
|
1681
1686
|
c.player.Ra())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));xG(this);HG(this);yG(this,this.player.Ra())}pa(wG,OF);function xG(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
|
|
1682
1687
|
function yG(a,b){var c=GD(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(ID()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
@@ -1685,14 +1690,14 @@ e)),g=3600<=g,1<=e||d?(KG(c,"- "+KD(e,g)),c.g.disabled=!1):(KG(c,c.localization.
|
|
|
1685
1690
|
function(){JD(c.g,!0)})}pa(JG,ED);function KG(a,b){b!=a.g.textContent&&(a.g.textContent=b)}Q("shaka.ui.PresentationTimeTracker",JG);function LG(){}LG.prototype.create=function(a,b){return new JG(a,b)};UE("time_and_duration",new LG);function MG(a,b){ED.call(this,a,b);var c=this;this.g=cn();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
|
|
1686
1691
|
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);NG(this);this.eventManager.s(this.localization,"locale-updated",function(){NG(c)});this.eventManager.s(this.localization,"locale-changed",function(){NG(c)});var d=this.controls.u;this.eventManager.s(this.g,"click",function(){d.g?FE(d.g):Za("Not playing VR content")});this.eventManager.s(d,"vrstatuschanged",function(){JD(c.g,c.controls.Pb())});JD(this.g,this.controls.Pb())}pa(MG,ED);
|
|
1687
1692
|
function NG(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}Q("shaka.ui.RecenterVRButton",MG);function OG(){}OG.prototype.create=function(a,b){return new MG(a,b)};wF("recenter_vr",new OG);UE("recenter_vr",new OG);function PG(a,b){ED.call(this,a,b);var c=this;this.g=cn();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");a="cast";(b=nc())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
|
|
1688
|
-
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;QG(this);JD(this.g,!1)
|
|
1689
|
-
"
|
|
1690
|
-
function RG(a){var b,c;O(function(d){switch(d.g){case 1:if(a.controls.F.xf()&&a.controls.na){JD(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.B(0);break}if("disconnected"==a.video.remote.state){b=function(e){a.player
|
|
1691
|
-
case 9:xa(d,8);break;case 7:ya(d);case 8:return va(d,11),F(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;xa(d,0);break;case 11:ya(d),b(!0),G(d)}})}function QG(a){var b=a.localization.resolve("CAST"),c=nc();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}Q("shaka.ui.RemoteButton",PG);function SG(){}SG.prototype.create=function(a,b){return new PG(a,b)};wF("remote",new SG);UE("remote",new SG);function TG(a,b){OF.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.s(this.localization,"locale-updated",function(){UG(c)});this.eventManager.s(this.localization,"locale-changed",function(){UG(c)});this.eventManager.s(this.player,"loading",function(){VG(c)});this.eventManager.s(this.player,"variantchanged",function(){VG(c)});this.eventManager.s(this.player,
|
|
1693
|
+
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;QG(this);JD(this.g,!1);this.video.remote?(this.eventManager.s(this.localization,"locale-updated",function(){QG(c)}),this.eventManager.s(this.localization,"locale-changed",function(){QG(c)}),this.eventManager.s(this.controls,"caststatuschanged",function(){RG(c)}),this.eventManager.s(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.s(this.video.remote,"connect",function(){RG(c)}),this.eventManager.s(this.video.remote,
|
|
1694
|
+
"connecting",function(){RG(c)}),this.eventManager.s(this.video.remote,"disconnect",function(){RG(c)}),this.eventManager.s(this.player,"loaded",function(){RG(c)}),RG(this)):this.g.classList.add("shaka-hidden")}pa(PG,ED);PG.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});ED.prototype.release.call(this)};
|
|
1695
|
+
function RG(a){var b,c;O(function(d){switch(d.g){case 1:if(a.controls.F.xf()&&a.controls.na){JD(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.B(0);break}if("disconnected"==a.video.remote.state){b=function(e){if(a.player){var f=a.video.disableRemotePlayback;JD(a.g,a.player.wd()==fp&&e&&!f)}else JD(a.g,!1)};va(d,7);if(-1==a.h){d.B(9);break}return F(d,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){d.B(0);break}return F(d,a.video.remote.cancelWatchAvailability(a.h),
|
|
1696
|
+
6);case 6:a.h=-1;d.B(0);break;case 10:a.h=-1;case 9:xa(d,8);break;case 7:ya(d);case 8:return va(d,11),F(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;xa(d,0);break;case 11:ya(d),b(!0),G(d)}})}function QG(a){var b=a.localization.resolve("CAST"),c=nc();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}Q("shaka.ui.RemoteButton",PG);function SG(){}SG.prototype.create=function(a,b){return new PG(a,b)};wF("remote",new SG);UE("remote",new SG);function TG(a,b){OF.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.s(this.localization,"locale-updated",function(){UG(c)});this.eventManager.s(this.localization,"locale-changed",function(){UG(c)});this.eventManager.s(this.player,"loading",function(){VG(c)});this.eventManager.s(this.player,"variantchanged",function(){VG(c)});this.eventManager.s(this.player,
|
|
1692
1697
|
"trackschanged",function(){VG(c)});this.eventManager.s(this.player,"abrstatuschanged",function(){VG(c)});VG(this)}pa(TG,OF);
|
|
1693
|
-
function VG(a){var b=[];a.player.wd()!=fp&&(b=a.player.
|
|
1694
|
-
1<[].concat(x(new Set(b.map(function(k){return k.audioId})))).length?b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l}):b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.bandwidth==k.bandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l});a.player.bd()?b.sort(function(k,
|
|
1695
|
-
b.sort(function(k,l){return l.height==k.height||null==k.height||null==l.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=FD(a.menu);dn(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e=t(b),f=e.next(),g={};!f.done;g={pc:void 0},f=e.next()){g.pc=f.value;f=cn();f.classList.add("explicit-resolution");a.eventManager.s(f,"click",function(k){return function(){var l=k.pc;a.player.configure({abr:{enabled:!1}});a.player.Se(l,a.controls.g.clearBufferOnQualityChange)}}(g));
|
|
1698
|
+
function VG(a){var b=[];a.player.wd()!=fp&&(b=a.player.Db());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount&&c.channelsCount&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=a.player.bd()?b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==
|
|
1699
|
+
k.bandwidth})==l}):1<[].concat(x(new Set(b.map(function(k){return k.audioId})))).filter(Te).length?b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l}):b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.bandwidth==k.bandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l});a.player.bd()?b.sort(function(k,
|
|
1700
|
+
l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height==k.height||null==k.height||null==l.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=FD(a.menu);dn(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e=t(b),f=e.next(),g={};!f.done;g={pc:void 0},f=e.next()){g.pc=f.value;f=cn();f.classList.add("explicit-resolution");a.eventManager.s(f,"click",function(k){return function(){var l=k.pc;a.player.configure({abr:{enabled:!1}});a.player.Se(l,a.controls.g.clearBufferOnQualityChange)}}(g));
|
|
1696
1701
|
var h=W("span");h.textContent=!a.player.bd()&&g.pc.height&&g.pc.width?WG(g.pc,b):g.pc.bandwidth?Math.round(g.pc.bandwidth/1E3)+" kbits/s":"Unknown";f.appendChild(h);d||g.pc!=c||(f.ariaSelected="true",f.appendChild(ID()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}e=cn();e.classList.add("shaka-enable-abr-button");a.eventManager.s(e,"click",function(){a.player.configure({abr:{enabled:!0}});VG(a)});a.g=W("span");a.g.classList.add("shaka-auto-span");
|
|
1697
1702
|
a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(ID()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);HD(a.menu);a.controls.dispatchEvent(new T("resolutionselectionupdated"));UG(a);JD(a.button,1<b.length)}
|
|
1698
1703
|
function WG(a,b){var c=a.height||0,d=a.width||0,e=c;d/c>16/9&&(e=Math.round(9*d/16));c=e+"p";2160==e&&(c="4K");e=new Set;d=t(b);for(var f=d.next();!f.done;f=d.next())f=f.value,f.frameRate&&e.add(Math.round(f.frameRate));1<e.size&&(e=a.frameRate)&&(50<=e||20>=e)&&(c+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)c+=" (HDR)";"CH-STEREO"==a.videoLayout&&(c+=" (3D)");b.some(function(g){return g!=a&&g.height==a.height})&&(c+=" ("+Math.round((a.videoBandwidth||a.bandwidth)/1E3)+" kbits/s)");return c}
|