shaka-player 4.10.25 → 4.10.26
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/AUTHORS +1 -0
- package/CONTRIBUTORS +1 -0
- package/dist/locales.js +37 -37
- package/dist/shaka-player.compiled.debug.js +31 -32
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +781 -781
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +49 -49
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +872 -871
- package/dist/shaka-player.ui.map +3 -3
- package/lib/ads/interstitial_ad_manager.js +23 -3
- package/lib/dash/segment_template.js +6 -2
- package/lib/media/adaptation_set_criteria.js +22 -47
- package/lib/media/preload_manager.js +2 -1
- package/lib/media/streaming_engine.js +1 -2
- package/lib/player.js +5 -3
- package/lib/polyfill/media_capabilities.js +2 -1
- package/lib/polyfill/mediasource.js +12 -0
- package/lib/util/mp4_generator.js +1 -1
- package/lib/util/platform.js +3 -3
- package/package.json +1 -1
- package/ui/language_utils.js +3 -1
- package/ui/remote_button.js +42 -17
- package/ui/seek_bar.js +3 -0
|
@@ -16,7 +16,7 @@ ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(v
|
|
|
16
16
|
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];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 ha="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ia;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ia=Object.setPrototypeOf;else{var ja;a:{var ka={a:!0},la={};try{la.__proto__=ka;ja=la.a;break a}catch(a){}ja=!1}ia=ja?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ma=ia;
|
|
18
18
|
function na(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(ma)ma(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.kk=b.prototype}function oa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function pa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}oa.prototype.s=function(a){this.h=a};
|
|
19
|
-
function qa(a,b){a.i={ug:b,Hg:!0};a.g=a.m||a.j}oa.prototype.return=function(a){this.i={return:a};this.g=this.j};function F(a,b,c){a.g=c;return{value:b}}oa.prototype.u=function(a){this.g=a};function G(a){a.g=0}function ra(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a,b){a.m=0;a.j=b||0}function ta(a,b,c){a.g=b;a.m=c||0}function ua(a,b){a.m=b||0;b=a.i.ug;a.i=null;return b}function
|
|
19
|
+
function qa(a,b){a.i={ug:b,Hg:!0};a.g=a.m||a.j}oa.prototype.return=function(a){this.i={return:a};this.g=this.j};function F(a,b,c){a.g=c;return{value:b}}oa.prototype.u=function(a){this.g=a};function G(a){a.g=0}function ra(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a,b){a.m=0;a.j=b||0}function ta(a,b,c){a.g=b;a.m=c||0}function ua(a,b){a.m=b||0;b=a.i.ug;a.i=null;return b}function va(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function ya(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Hg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new oa;this.h=a}function Ba(a,b){pa(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
|
|
21
21
|
function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,qa(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,qa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Hg)throw b.ug;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Ea(a){this.next=function(b){pa(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Da(a));return b};this.throw=function(b){pa(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.s):(qa(a.g,b),b=Da(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Ga(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
@@ -79,9 +79,9 @@ var sc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
79
79
|
Copyright 2006 The Closure Library Authors
|
|
80
80
|
SPDX-License-Identifier: Apache-2.0
|
|
81
81
|
*/
|
|
82
|
-
function tc(a){var b;a instanceof tc?(uc(this,a.Cb),this.
|
|
83
|
-
q.toString=function(){var a=[],b=this.Cb;b&&a.push(Ac(b,Bc,!0),":");if(b=this.Fb){a.push("//");var c=this.
|
|
84
|
-
q.resolve=function(a){var b=this.clone();"data"===b.Cb&&(b=new tc);var c=!!a.Cb;c?uc(b,a.Cb):c=!!a.
|
|
82
|
+
function tc(a){var b;a instanceof tc?(uc(this,a.Cb),this.wc=a.wc,vc(this,a.Fb),wc(this,a.Pc),this.Pa=a.Pa,xc(this,a.g.clone()),this.ic=a.ic):a&&(b=String(a).match(sc))?(uc(this,b[1]||"",!0),this.wc=yc(b[2]||""),vc(this,b[3]||"",!0),wc(this,b[4]),this.Pa=yc(b[5]||"",!0),xc(this,b[6]||"",!0),this.ic=yc(b[7]||"")):this.g=new zc(null)}q=tc.prototype;q.Cb="";q.wc="";q.Fb="";q.Pc=null;q.Pa="";q.ic="";
|
|
83
|
+
q.toString=function(){var a=[],b=this.Cb;b&&a.push(Ac(b,Bc,!0),":");if(b=this.Fb){a.push("//");var c=this.wc;c&&a.push(Ac(c,Bc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Pc;null!=b&&a.push(":",String(b))}if(b=this.Pa)this.Fb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ac(b,"/"==b.charAt(0)?Cc:Dc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.ic)&&a.push("#",Ac(b,Ec));return a.join("")};
|
|
84
|
+
q.resolve=function(a){var b=this.clone();"data"===b.Cb&&(b=new tc);var c=!!a.Cb;c?uc(b,a.Cb):c=!!a.wc;c?b.wc=a.wc:c=!!a.Fb;c?vc(b,a.Fb):c=null!=a.Pc;var d=a.Pa;if(c)wc(b,a.Pc);else if(c=!!a.Pa){if("/"!=d.charAt(0))if(this.Fb&&!this.Pa)d="/"+d;else{var e=b.Pa.lastIndexOf("/");-1!=e&&(d=b.Pa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
85
85
|
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Pa=d:c=""!==a.g.toString();c?xc(b,a.g.clone()):c=!!a.ic;c&&(b.ic=a.ic);return b};q.clone=function(){return new tc(this)};function uc(a,b,c){a.Cb=c?yc(b,!0):b;a.Cb&&(a.Cb=a.Cb.replace(/:$/,""))}function vc(a,b,c){a.Fb=c?yc(b,!0):b}function wc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Pc=b}else a.Pc=null}
|
|
86
86
|
function xc(a,b,c){b instanceof zc?a.g=b:(c||(b=Ac(b,Fc)),a.g=new zc(b))}function yc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ac(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Gc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Gc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Bc=/[#\/\?@]/g,Dc=/[#\?:]/g,Cc=/[#\?]/g,Fc=/[#\?@]/g,Ec=/#/g;function zc(a){this.g=a||null}
|
|
87
87
|
function Hc(a){if(!a.Ja&&(a.Ja={},a.$c=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=zc.prototype;q.Ja=null;q.$c=null;function Ic(a){Hc(a);return a.$c}q.add=function(a,b){Hc(this);this.g=null;var c=this.Ja.hasOwnProperty(a)?this.Ja[a]:null;c||(this.Ja[a]=c=[]);c.push(b);this.$c++;return this};
|
|
@@ -98,8 +98,8 @@ CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:90
|
|
|
98
98
|
CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Kc(a){this.h=a;this.g=void 0}Kc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a,b){return a.length&&b.length&&a!==b?0<Mc(a,b).length:!0}
|
|
99
99
|
function Mc(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
100
100
|
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
|
|
101
|
-
function Nc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Oc=new Kc(function(){return Ab(new Uint8Array([0]))}),Pc=new Map;function Qc(a){this.h=a;this.g=null}Qc.prototype.Z=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Qc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Rc(a){this.h=a;this.g=null}Rc.prototype.
|
|
102
|
-
Rc.prototype.tickAfter=Rc.prototype.Z;Rc.prototype.tickNow=Rc.prototype.
|
|
101
|
+
function Nc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Oc=new Kc(function(){return Ab(new Uint8Array([0]))}),Pc=new Map;function Qc(a){this.h=a;this.g=null}Qc.prototype.Z=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Qc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Rc(a){this.h=a;this.g=null}Rc.prototype.vc=function(){this.stop();this.h();return this};Rc.prototype.Z=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.h()})).Z(a);return this};Rc.prototype.Ra=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.g.Z(a);b.h()})).Z(a);return this};Rc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Rc);Rc.prototype.stop=Rc.prototype.stop;Rc.prototype.tickEvery=Rc.prototype.Ra;
|
|
102
|
+
Rc.prototype.tickAfter=Rc.prototype.Z;Rc.prototype.tickNow=Rc.prototype.vc;function Sc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Tc(a){return""!=Uc().canPlayType(a)}function Wc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Yc(){return Zc("Xbox One")}function $c(){return Zc("Tizen")}function ad(){return Zc("Tizen 3")}function bd(){return Zc("Tizen 2")}function cd(){return Zc("Web0S")}function dd(){return cd()&&38===ed()}function fd(){return Zc("CrKey")}
|
|
103
103
|
function ed(){if(!Zc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function gd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!$c()&&!Zc("PC=EOS")&&!Zc("PC=APL")&&!Zc("VirginMedia")&&!hd()&&!id()&&!Zc("AFT")&&!Zc("WPE")&&!Zc("DT_STB_BCM")&&!Zc("Sky_STB")}function jd(){return Zc("PlayStation 5")}function id(){return Zc("PlayStation 4")}function kd(){return Zc("Hisense")||Zc("VIDAA")}
|
|
104
104
|
function hd(){return Zc("SOPOpenBrowser")}function ld(){if(!gd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function md(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function nd(){return Zc("Android")}
|
|
105
105
|
function od(){return $c()||cd()||Yc()||id()||jd()||Zc("AFT")||Zc("PC=EOS")||Zc("PC=APL")||Zc("VirginMedia")||hd()||Zc("WPE")||fd()||kd()||Zc("DT_STB_BCM")?!0:!1}function Zc(a){return(navigator.userAgent||"").includes(a)}function Uc(){if(pd)return pd;qd||(qd=new Rc(function(){pd=null}));(pd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(pd=document.createElement("video"));qd.Z(1);return pd}
|
|
@@ -117,11 +117,11 @@ function zd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)r
|
|
|
117
117
|
function Ad(a){if(window.TextEncoder&&!id()){var b=new TextEncoder;return Ab(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Ab(b)}function Bd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function yd(a){return Cd.value()(a)}
|
|
118
118
|
function Dd(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",td);td.resetFromCharCode=function(){Cd.g=void 0};
|
|
119
119
|
td.toUTF16=Bd;td.toUTF8=Ad;td.fromBytesAutoDetect=zd;td.fromUTF16=wd;td.fromUTF8=ud;var Cd=new Kc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={cc:65536};0<b.cc;b={cc:b.cc},b.cc/=2)if(a(b.cc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.cc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.cc));return e}}(b);return null});function Ed(){}function Fd(a){a=yd(zb(a));return btoa(a)}function Gd(a,b){b=void 0==b?!0:b;a=Fd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Hd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Id(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
120
|
-
function Jd(a){var b=zb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Kd(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(zb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Ed);Ed.concat=Kd;Ed.toHex=Jd;Ed.fromHex=Id;Ed.fromBase64=Hd;Ed.toBase64=Gd;Ed.toStandardBase64=Fd;function
|
|
120
|
+
function Jd(a){var b=zb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Kd(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(zb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Ed);Ed.concat=Kd;Ed.toHex=Jd;Ed.fromHex=Id;Ed.fromBase64=Hd;Ed.toBase64=Gd;Ed.toStandardBase64=Fd;function Md(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new tc(a[0]);b=new tc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new tc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new tc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
121
121
|
function Nd(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
|
|
122
|
-
function
|
|
122
|
+
function Qd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Gd(Id(h),!1));var l=g;22!=l.length&&(l=Gd(Id(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:zb(Ad(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
123
123
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Rd(a,b){if(1==b.length)return b[0];a=Sd(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Sd(a,b){for(var c=t(Td[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ud?"":null}
|
|
124
|
-
function Vd(a,b){var c=[];a=t(Td[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Ud="text",Wd={
|
|
124
|
+
function Vd(a,b){var c=[];a=t(Td[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Ud="text",Wd={ja:"video",X:"audio",ua:Ud,De:"image",jj:"application"},Xd=1/15,Td={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Yd(){}function Zd(a,b){var c=a;b&&!$d.includes(a)&&(c+='; codecs="'+b+'"');return c}function ae(a,b){b&&(a+='; codecs="'+b+'"');return a}function be(a,b,c){var d=Zd(a,b);b=ae(a,b);nc(b)?(a=nc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
125
125
|
function ce(a,b,c){var d=[b];de.forEach(function(e,f){var g=a[f];"codecs"==f?$d.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function ee(a){return a.split(";")[0].split("/")[1]}
|
|
126
126
|
function fe(a){var b=ge(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
127
127
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a}
|
|
@@ -155,7 +155,7 @@ function Xe(a,b){var c=Yc(),d=Zc("Firefox")&&nd(),e=a.video,f=e&&e.width||0,g=e&
|
|
|
155
155
|
if(e){d=$e(e.codecs,e.mimeType);c=be(e.mimeType,d,"audio");if(!lb(c))return!1;e.codecs=d}return a.decodingInfos.some(function(h){return!h.supported||b&&(h=h.keySystemAccess)&&h.keySystem!=b?!1:!0})}function af(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=af(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
156
156
|
function bf(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Ke(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,Cd:void 0},g=f.next())k=g.value,h.Cd=af(k),h.cache=cf,h.cache[h.Cd]?d=c(d,h.cache[h.Cd]):e.push(df(k).then(function(m){return function(n){var p=
|
|
157
157
|
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.cache[m.Cd]=p,d=c(d,p))}}(h)));return F(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);G(l)})}
|
|
158
|
-
function df(a){var b=[""];a.video&&(b=je(a.video.contentType).split(","));var c=[""];a.audio&&(c=je(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={
|
|
158
|
+
function df(a){var b=[""];a.video&&(b=je(a.video.contentType).split(","));var c=[""];a.audio&&(c=je(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={zc:void 0},g=f.next())g=g.value,h.zc=Je(a),a.video&&(h.zc.video.contentType=Zd(ie(h.zc.video.contentType),e)),a.audio&&(h.zc.audio.contentType=Zd(ie(h.zc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.zc).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
159
159
|
return null})}
|
|
160
160
|
function We(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B;return O(function(E){switch(E.g){case 1:if(e=a.some(function(I){return I.decodingInfos.length}))return E.return();f=t(d);g=f.next();h={};case 2:if(g.done){E.u(4);break}h.Tg=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){E.u(7);break}n=m.value;p=ef(n,b,c).filter(function(I){return function(L){L=L[0];return(L.keySystemConfiguration&&L.keySystemConfiguration.keySystem)===I.Tg}}(h));r=t(p);u=r.next();case 8:if(u.done){E.u(10);break}v=u.value;
|
|
161
161
|
return F(E,bf(n,v),9);case 9:u=r.next();E.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();E.u(5);break;case 7:if(k)return E.return();h={Tg:void 0};g=f.next();E.u(2);break;case 4:w=t(a),A=w.next();case 12:if(A.done){E.u(0);break}y=A.value;D=ef(y,b,c).filter(function(I){I=I[0];I=I.keySystemConfiguration&&I.keySystemConfiguration.keySystem;return!I||!d.includes(I)});z=t(D);C=z.next();case 15:if(C.done){A=w.next();E.u(12);break}B=C.value;return F(E,bf(y,B),16);case 16:C=z.next(),E.u(15)}})}
|
|
@@ -190,147 +190,147 @@ q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(
|
|
|
190
190
|
q.playbackRateChanged=function(a){this.B=a};q.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.Z(Ef)}),this.h.observe(this.o))};q.setCmsdManager=function(a){this.m=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
191
191
|
function Df(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Bf(a,b,c,d,e){if(a.m){var f=a.m.Bg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Pe(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
192
192
|
function Cf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",wf);wf.prototype.configure=wf.prototype.configure;wf.prototype.setCmsdManager=wf.prototype.setCmsdManager;wf.prototype.setMediaElement=wf.prototype.setMediaElement;wf.prototype.playbackRateChanged=wf.prototype.playbackRateChanged;wf.prototype.setVariants=wf.prototype.setVariants;
|
|
193
|
-
wf.prototype.getBandwidthEstimate=wf.prototype.getBandwidthEstimate;wf.prototype.trySuggestStreams=wf.prototype.trySuggestStreams;wf.prototype.segmentDownloaded=wf.prototype.segmentDownloaded;wf.prototype.disable=wf.prototype.disable;wf.prototype.enable=wf.prototype.enable;wf.prototype.chooseVariant=wf.prototype.chooseVariant;wf.prototype.init=wf.prototype.init;wf.prototype.release=wf.prototype.release;wf.prototype.stop=wf.prototype.stop;var Ef=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ff(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}
|
|
194
|
-
function
|
|
195
|
-
function
|
|
196
|
-
function
|
|
197
|
-
|
|
198
|
-
function
|
|
199
|
-
function
|
|
200
|
-
function
|
|
201
|
-
function
|
|
202
|
-
function
|
|
203
|
-
|
|
204
|
-
function
|
|
205
|
-
function
|
|
206
|
-
var
|
|
207
|
-
Qj:"spatialvideoinfo",Rj:"stalldetected",Sj:"started",Tj:"statechanged",Uj:"streaming",Vj:"textchanged",Wj:"texttrackvisibility",Xj:"thirdquartile",Yj:"timelineregionadded",Zj:"timelineregionenter",$j:"timelineregionexit",ak:"trackschanged",ck:"unloading",ek:"variantchanged"};function
|
|
208
|
-
|
|
209
|
-
function
|
|
210
|
-
function
|
|
211
|
-
q.request=function(a,b,c){var d=this,e=new
|
|
212
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.za(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.li||!d.l||u.fromCache||"HEAD"==b.method||a!=
|
|
213
|
-
function
|
|
214
|
-
function
|
|
215
|
-
var D=n(c.uris[f],c,b,function(B,E,I){r&&r.stop();u&&u.Z(C/1E3);a.l&&b==
|
|
216
|
-
li: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 T&&(D=y,1001==y.code&&(z=y.data[1]));a.A(c,D,z,v)}if(a.i)return
|
|
217
|
-
function
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
q.Vg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw
|
|
222
|
-
q.skip=function(a){if(this.g+a>this.h.byteLength)throw
|
|
223
|
-
|
|
224
|
-
q.Mc=function(a,b,c,d){var e=b.wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.R(),g=b.R(),h=
|
|
225
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function
|
|
226
|
-
function
|
|
227
|
-
function
|
|
228
|
-
function
|
|
193
|
+
wf.prototype.getBandwidthEstimate=wf.prototype.getBandwidthEstimate;wf.prototype.trySuggestStreams=wf.prototype.trySuggestStreams;wf.prototype.segmentDownloaded=wf.prototype.segmentDownloaded;wf.prototype.disable=wf.prototype.disable;wf.prototype.enable=wf.prototype.enable;wf.prototype.chooseVariant=wf.prototype.chooseVariant;wf.prototype.init=wf.prototype.init;wf.prototype.release=wf.prototype.release;wf.prototype.stop=wf.prototype.stop;var Ef=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ff(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}
|
|
194
|
+
Ff.prototype.add=function(a,b,c){var d=this.h;b=void 0===b?!0:b;c=void 0===c?!1:c;var e;if(!(e=!!d.audio!=!!a.audio||!!d.video!=!!a.video||d.language!=a.language)&&(e=d.audio&&a.audio)){e=d.audio;var f=a.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||b&&!Gf(e,f)||!Hf(e.roles,f.roles)||c&&e.groupId!==f.groupId)}!(c=e)&&(c=d.video&&a.video)&&(d=d.video,c=a.video,c=!((!b||Gf(d,c))&&Hf(d.roles,c.roles)));
|
|
195
|
+
return c?!1:(this.g.add(a),!0)};Ff.prototype.values=function(){return this.g.values()};function Gf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return he(d)});b=b.codecs.split(",").map(function(d){return he(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}
|
|
196
|
+
function Hf(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 If(a,b,c){this.g=new Jf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,a.video&&a.video.hdr?a.video.hdr:"",a.audio&&a.audio.spatialAudio?a.audio.spatialAudio:!1,a.video&&a.video.videoLayout?a.video.videoLayout:"","","",b,c,a.audio&&a.audio.codecs?a.audio.codecs:"")}If.prototype.create=function(a){return this.g.create(a)};function Jf(a,b,c,d,e,f,g,h,k,l,m){this.A=a;this.B=b;this.i=c;this.j=d;this.C=e;this.m=f;this.h=g;this.l=h;this.o=k;this.s=l;this.g=m}
|
|
197
|
+
Jf.prototype.create=function(a){var b=[];b=Kf(a,this.A);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Lf(b,this.B);a.length&&(b=a);this.m&&(a=Mf(b,this.m),a.length&&(b=a));this.j&&(a=Nf(b,this.j),a.length&&(b=a));this.i&&(a=Of(b,this.i),a.length&&(b=a));this.h&&(a=Pf(b,this.h),a.length&&(b=a));this.l&&(a=Qf(b,this.l),a.length&&(b=a));a=Rf(b,this.C);a.length&&(b=a);this.g&&(a=Sf(b,this.g),a.length&&(b=a));return new Ff(b[0],b,!("smooth"==this.o&&ob()),this.s)};
|
|
198
|
+
function Kf(a,b){b=Be(b);var c=Ie(b,a.map(function(d){return He(d)}));return c?a.filter(function(d){return c==He(d)}):[]}function Lf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Pf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Qf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
199
|
+
function Of(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Nf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?a.some(function(c){return c.video&&c.video.hdr&&"HLG"==c.video.hdr?!0:!1})?"HLG":"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Mf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}
|
|
200
|
+
function Rf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Sf(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Tf(){this.g=Uf;this.i=(new Map).set(Uf,2).set(Vf,1);this.h=0}function Wf(a,b,c){a.i.set(Uf,c).set(Vf,b)}var Vf=0,Uf=1;function Xf(a,b){var c=Yf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
201
|
+
function Zf(a){var b,c;return O(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return F(d,new Promise(function(e){(new Rc(e)).Z(c/1E3)}),2)}a.h*=a.m;G(d)})}function Yf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function $f(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}$f.prototype.resolve=function(){};$f.prototype.reject=function(){};function ag(a,b){this.promise=a;this.i=b;this.g=!1}function bg(a){return new ag(Promise.reject(a),function(){return Promise.resolve()})}function cg(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new ag(a,function(){return Promise.resolve()})}function dg(a){return new ag(Promise.resolve(a),function(){return Promise.resolve()})}function eg(a){return new ag(a,function(){return a.catch(function(){})})}ag.prototype.abort=function(){this.g=!0;return this.i()};
|
|
202
|
+
function fg(a){return new ag(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}ag.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
203
|
+
ag.prototype.za=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=gg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new $f,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new ag(f,function(){return d()})};
|
|
204
|
+
function gg(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}S("shaka.util.AbortableOperation",ag);ag.prototype.chain=ag.prototype.za;ag.prototype["finally"]=ag.prototype.finally;ag.all=fg;ag.prototype.abort=ag.prototype.abort;ag.notAbortable=eg;ag.completed=dg;ag.aborted=cg;ag.failed=bg;function U(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
205
|
+
function hg(a){var b=new U(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}U.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};U.prototype.stopImmediatePropagation=function(){this.g=!0};U.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",U);
|
|
206
|
+
var ig={lj:"abrstatuschanged",mj:"adaptation",nj:"audiotrackchanged",oj:"buffering",pj:"complete",qj:"downloadfailed",rj:"downloadheadersreceived",sj:"drmsessionupdate",uj:"emsg",Lj:"prft",Error:"error",vj:"expirationupdated",wj:"firstquartile",xj:"gapjumped",Aj:"keystatuschanged",Cj:"loaded",Dj:"loading",Fj:"manifestparsed",Gj:"manifestupdated",Hj:"mediaqualitychanged",Metadata:"metadata",Ij:"midpoint",Jj:"nospatialvideoinfo",Kj:"onstatechange",Mj:"ratechange",Oj:"segmentappended",Pj:"sessiondata",
|
|
207
|
+
Qj:"spatialvideoinfo",Rj:"stalldetected",Sj:"started",Tj:"statechanged",Uj:"streaming",Vj:"textchanged",Wj:"texttrackvisibility",Xj:"thirdquartile",Yj:"timelineregionadded",Zj:"timelineregionenter",$j:"timelineregionexit",ak:"trackschanged",ck:"unloading",ek:"variantchanged"};function jg(){this.ya=new fb;this.me=this}jg.prototype.addEventListener=function(a,b){this.ya&&this.ya.push(a,b)};jg.prototype.removeEventListener=function(a,b){this.ya&&this.ya.remove(a,b)};jg.prototype.dispatchEvent=function(a){if(!this.ya)return!0;var b=this.ya.get(a.type)||[],c=this.ya.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.me;a.currentTarget=this.me;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
208
|
+
jg.prototype.release=function(){this.ya=null};function kg(){this.g=[]}function lg(a,b){a.g.push(b.finally(function(){Nb(a.g,b)}))}kg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function mg(a,b,c,d,e,f){jg.call(this);this.i=!1;this.m=new kg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.F=e||null;this.C=f||null;this.o=this.s=!1}na(mg,jg);q=mg.prototype;q.Qf=function(a){this.s=a};q.Rf=function(a){this.o=a};function ng(a,b,c,d){c=c||og;var e=pg[a];if(!e||c>=e.priority)pg[a]={priority:c,ie:b,Gi:void 0===d?!1:d}}
|
|
209
|
+
function qg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.Ji=function(a){this.g.add(a)};q.ej=function(a){this.g.delete(a)};q.ng=function(){this.g.clear()};q.Ki=function(a){this.h.add(a)};q.fj=function(a){this.h.delete(a)};q.og=function(){this.h.clear()};
|
|
210
|
+
function rg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();jg.prototype.release.call(this);return this.m.destroy()};
|
|
211
|
+
q.request=function(a,b,c){var d=this,e=new sg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new tg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Je(b.retryParameters):Yf();b.uris=Je(b.uris);f=ug(this,a,b,c);var g=f.za(function(){return vg(d,a,b,c,new Xf(b.retryParameters,!1),0,null,e)}),h=g.za(function(p){return wg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
212
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.za(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.li||!d.l||u.fromCache||"HEAD"==b.method||a!=xg||d.l(u.timeMs,u.data.byteLength,yg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new tg(n.promise,function(){return n.abort()},e);lg(this.m,f);return f};
|
|
213
|
+
function ug(a,b,c,d){function e(h){f=f.za(function(){c.body&&(c.body=Ab(c.body));return h(b,c,d)})}var f=dg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.za(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
214
|
+
function vg(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new tc(c.uris[f]),l=k.Cb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),uc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=pg[l])?l.ie:null;if(!n)return bg(new T(2,1,1E3,k));var p=l.Gi,r=null,u=null,v=!1,w=!1,A;return eg(Zf(e)).za(function(){if(a.i)return cg();A=Date.now();var y=0;c.requestStartTime=Date.now();
|
|
215
|
+
var D=n(c.uris[f],c,b,function(B,E,I){r&&r.stop();u&&u.Z(C/1E3);a.l&&b==xg&&(y++,c.packetNumber=y,a.l(B,E,yg(d),c),m=!0,h.g=I)},function(B){a.j&&a.j(B,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return D;var z=c.retryParameters.connectionTimeout;z&&(r=new Rc(function(){v=!0;D.abort()}),r.Z(z/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Rc(function(){v=!0;D.abort()}));return D}).za(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var D={response:y,
|
|
216
|
+
li: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 T&&(D=y,1001==y.code&&(z=y.data[1]));a.A(c,D,z,v)}if(a.i)return cg();v&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return D=(new Map).set("error",y),D=new U("retry",D),a.dispatchEvent(D),f=(f+1)%c.uris.length,vg(a,b,c,d,e,f,y,h)}throw y;})}
|
|
217
|
+
function wg(a,b,c,d){var e=dg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Yg:void 0},f=a.next())g.Yg=f.value,e=e.za(function(h){return function(){var k=c.response;k.data&&(k.data=Ab(k.data));return(0,h.Yg)(b,k,d)}}(g));return e.za(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function yg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.o)return!1}return!0}S("shaka.net.NetworkingEngine",mg);
|
|
218
|
+
mg.prototype.request=mg.prototype.request;mg.prototype.destroy=mg.prototype.destroy;mg.makeRequest=rg;mg.defaultRetryParameters=function(){return Yf()};mg.prototype.clearAllResponseFilters=mg.prototype.og;mg.prototype.unregisterResponseFilter=mg.prototype.fj;mg.prototype.registerResponseFilter=mg.prototype.Ki;mg.prototype.clearAllRequestFilters=mg.prototype.ng;mg.prototype.unregisterRequestFilter=mg.prototype.ej;mg.prototype.registerRequestFilter=mg.prototype.Ji;mg.unregisterScheme=function(a){delete pg[a]};
|
|
219
|
+
mg.registerScheme=ng;mg.prototype.setForceHTTPS=mg.prototype.Rf;mg.prototype.setForceHTTP=mg.prototype.Qf;function sg(){this.g=0}mg.NumBytesRemainingClass=sg;function tg(a,b,c){ag.call(this,a,b);this.h=c}na(tg,ag);mg.PendingRequest=tg;var xg=1;mg.RequestType={MANIFEST:0,SEGMENT:xg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};mg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6};var og=3;
|
|
220
|
+
mg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:og};var pg={};function zg(a){this.g=!1;this.h=new $f;this.i=a}zg.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 Ag(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Bg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Cg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Dg(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 Eg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Fg(a,b){this.h=Eb(a);this.i=b==Gg;this.g=0}q=Fg.prototype;q.qa=function(){return this.g<this.h.byteLength};q.wa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.U=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Jg();}};q.oa=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Jg();}};q.R=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Jg();}};
|
|
221
|
+
q.Vg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Jg();}};q.Qc=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 Jg();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.rb=function(a){if(this.g+a>this.h.byteLength)throw Jg();var b=zb(this.h,this.g,a);this.g+=a;return b};
|
|
222
|
+
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Jg();this.g+=a};q.Ri=function(a){if(this.g<a)throw Jg();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Jg();this.g=a};q.rc=function(){for(var a=this.g;this.qa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=zb(this.h,a,this.g-a);this.g+=1;return ud(a)};function Jg(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Fg);Fg.prototype.readTerminatedString=Fg.prototype.rc;Fg.prototype.seek=Fg.prototype.seek;Fg.prototype.rewind=Fg.prototype.Ri;
|
|
223
|
+
Fg.prototype.skip=Fg.prototype.skip;Fg.prototype.readBytes=Fg.prototype.rb;Fg.prototype.readUint64=Fg.prototype.Qc;Fg.prototype.readInt32=Fg.prototype.Vg;Fg.prototype.readUint32=Fg.prototype.R;Fg.prototype.readUint16=Fg.prototype.oa;Fg.prototype.readUint8=Fg.prototype.U;Fg.prototype.getLength=Fg.prototype.getLength;Fg.prototype.getPosition=Fg.prototype.wa;Fg.prototype.hasMoreData=Fg.prototype.qa;var Gg=1;Fg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Gg};function Kg(){this.i=[];this.h=[];this.g=!1}q=Kg.prototype;q.box=function(a,b){a=Lg(a);this.i[a]=Mg;this.h[a]=b;return this};q.S=function(a,b){a=Lg(a);this.i[a]=Ng;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Fg(a,0);for(this.g=!1;a.qa()&&!this.g;)this.Mc(0,a,b,c)};
|
|
224
|
+
q.Mc=function(a,b,c,d){var e=b.wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.R(),g=b.R(),h=Og(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.wa()+8>b.getLength()){this.g=!0;return}f=b.Qc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Ng){if(d&&b.wa()+4>b.getLength()){this.g=!0;return}n=b.R();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.wa(),b=0<d?b.rb(d):new Uint8Array(0),b=new Fg(b,0),l({name:h,parser:this,
|
|
225
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function Pg(a){for(var b=Qg(a);a.reader.qa()&&!a.parser.g;)a.parser.Mc(a.start+b,a.reader,a.partialOkay)}function Rg(a){for(var b=Qg(a),c=a.reader.R(),d=0;d<c&&(a.parser.Mc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Sg(a){var b=Qg(a);for(a.reader.skip(78);a.reader.qa()&&!a.parser.g;)a.parser.Mc(a.start+b,a.reader,a.partialOkay)}
|
|
226
|
+
function Tg(a){var b=Qg(a);a.reader.skip(8);var c=a.reader.oa();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.qa()&&!a.parser.g;)a.parser.Mc(a.start+b,a.reader,a.partialOkay)}function Ug(a){return function(b){a(b.reader.rb(b.reader.getLength()-b.reader.wa()))}}function Lg(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 Og(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
227
|
+
function Qg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Kg);Kg.headerSize=Qg;Kg.typeToString=Og;Kg.allData=Ug;Kg.audioSampleEntry=Tg;Kg.visualSampleEntry=Sg;Kg.sampleDescription=Rg;Kg.children=Pg;Kg.prototype.parseNext=Kg.prototype.Mc;Kg.prototype.parse=Kg.prototype.parse;Kg.prototype.stop=Kg.prototype.stop;Kg.prototype.fullBox=Kg.prototype.S;Kg.prototype.box=Kg.prototype.box;var Mg=0,Ng=1;function Vg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Kg).box("moov",Pg).box("moof",Pg).S("pssh",function(c){if(!(1<c.version)){var d=zb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Jd(c.reader.rb(16)));if(0<c.version){d=c.reader.R();for(var e=0;e<d;e++){var f=Jd(c.reader.rb(16));b.h.push(f)}}}}).parse(a)}
|
|
228
|
+
function Yg(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Eb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Id(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
229
229
|
@license
|
|
230
230
|
tXml
|
|
231
231
|
Copyright 2015 Tobias Nickel
|
|
232
232
|
SPDX-License-Identifier: MIT
|
|
233
233
|
*/
|
|
234
|
-
function
|
|
235
|
-
function
|
|
234
|
+
function Zg(a,b){var c=void 0===c?!1:c;a=zd(a);return $g(a,b,c)}function $g(a,b,c){a=ah(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return d.tagName===b}))?a:null}function bh(a){return ch.has(a)?ch.get(a):""}
|
|
235
|
+
function ah(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)||
|
|
236
236
|
45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var p=a.charCodeAt(e);if(64<p&&91>p||96<p&&123>p){p=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123>
|
|
237
|
-
r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(p.startsWith("xmlns:")){r=u;var v=p.split(":")[1];
|
|
237
|
+
r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(p.startsWith("xmlns:")){r=u;var v=p.split(":")[1];ch.set(r,v);dh.set(v,r)}"tt"===m&&"xml:space"===p&&"preserve"===u&&(l=!0);n[p]=u}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n=
|
|
238
238
|
0;n<m;n++)p=k[n],"string"!==typeof p?b&&(p.parent=l):n==m-1&&"\n"==p&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,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("")}
|
|
239
|
-
function
|
|
240
|
-
function
|
|
241
|
-
function
|
|
242
|
-
function
|
|
243
|
-
function
|
|
244
|
-
function
|
|
245
|
-
function
|
|
239
|
+
function eh(a){return"string"===typeof a}function fh(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 gh(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 hh(a){if("string"===typeof a)return Dd(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Dd(a)}
|
|
240
|
+
function ih(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=hh(a))&&(a=a.trim());return a}function jh(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())jh(d.value,b,c)}return c}function kh(a,b){a=gh(a,b);return 1!=a.length?null:a[0]}function lh(a,b,c){a=mh(a,b,c);return 1!=a.length?null:a[0]}
|
|
241
|
+
function nh(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 oh(a,b,c){b=bh(b);return a.attributes[b+":"+c]||null}function mh(a,b,c){b=bh(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 ph(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=oh(a,d.value,c))return d;return null}
|
|
242
|
+
function qh(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 rh(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}
|
|
243
|
+
function sh(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 th(a){a=Number(a);return 0===a%1?a:null}function uh(a){a=Number(a);return 0===a%1&&0<a?a:null}function vh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function wh(a){a=Number(a);return isNaN(a)?null:a}function xh(a){return a?"true"===a.toLowerCase():!1}
|
|
244
|
+
function yh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
245
|
+
function zh(a){var b=[];a=Dd(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Tb:c.split("/@")[1]||
|
|
246
246
|
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Tb=c.slice(1))}return b}
|
|
247
|
-
function
|
|
248
|
-
function
|
|
249
|
-
function
|
|
250
|
-
function
|
|
251
|
-
function
|
|
252
|
-
function
|
|
253
|
-
function
|
|
254
|
-
function
|
|
255
|
-
w.next())y=A.value,
|
|
256
|
-
function
|
|
257
|
-
q.Sb=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.A)return b.o.ka(a,"encrypted",function(){b.s(new T(2,6,6010))}),c.return();b.l=a;b.o.ka(b.l,"play",function(){for(var d=t(b.
|
|
258
|
-
function(){return
|
|
259
|
-
function
|
|
260
|
-
ra(g,6);return F(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new T(2,6,6004,f.message);}})}function
|
|
261
|
-
function
|
|
262
|
-
function
|
|
263
|
-
q.ff=function(){var a=this,b=this.i.keys();b=
|
|
264
|
-
function
|
|
247
|
+
function Ah(a,b){var c=zh(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Bh(a,"t",d.t)),null!==d.n&&(c=Bh(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Tb)&&a[c]?Ch(a[c],e,d,ih(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
|
|
248
|
+
function Bh(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Ch(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
249
|
+
function Dh(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=dh.has(b)?dh.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Dh(d),b.appendChild(c);return b}
|
|
250
|
+
function Eh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ke(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Eh(c),c.parent=b,b.children.push(c));return b}var ch=new Map,dh=new Map;function Fh(a){var b=this;this.C=a;this.l=this.A=null;this.ea=this.ba=!1;this.H=0;this.g=null;this.o=new gb;this.i=new Map;this.B=new Map;this.m=new $f;this.h=null;this.s=function(c){2==c.severity&&b.m.reject(c);a.onError(c)};this.T=new Map;this.da=new Map;this.K=new Rc(function(){return Gh(b)});this.N=!1;this.L=[];this.O=!1;this.I=new Rc(function(){Hh(b)});this.m.catch(function(){});this.j=new zg(function(){return Ih(b)});this.Y=!1;this.F=this.G=null}q=Fh.prototype;q.destroy=function(){return this.j.destroy()};
|
|
251
|
+
function Ih(a){return O(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.m.reject(),a.I.stop(),a.I=null,a.K.stop(),a.K=null,F(b,Jh(a),2);case 2:if(!a.l){b.u(3);break}ra(b,4);return F(b,a.l.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:ua(b);case 5:a.l=null;case 3:a.g=null,a.A=null,a.B=new Map,a.h=null,a.s=function(){},a.C=null,a.Y=!1,a.G=null,G(b)}})}q.configure=function(a){this.h=a;this.I&&this.I.Ra(this.h.updateExpirationTime)};
|
|
252
|
+
function Kh(a,b,c){a.ea=!0;a.B=new Map;a.N=c;return Lh(a,b)}function Mh(a,b,c){a.B=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.B.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.B.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.N=0<a.B.size;return Lh(a,b)}
|
|
253
|
+
function Nh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Oh(a,g,[])}
|
|
254
|
+
function Lh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z;return O(function(C){if(1==C.g){if(c=Ph(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(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=Dg(a.h.servers),Qh(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=Rh(n),r=t(p),u=r.next();!u.done;u=r.next())v=u.value,k.add(v);w=t(k);for(A=w.next();!A.done;A=
|
|
255
|
+
w.next())y=A.value,Sh(y,Dg(a.h.servers),Dg(a.h.advanced||{}),a.h.keySystemsMapping);return F(C,We(b,a.N,a.Y,a.h.preferredKeySystems),2)}Ag(a.j);D=g||Object.keys(a.h.servers).length;if(!D)return a.ba=!0,C.return(Promise.resolve());z=Oh(a,void 0,b);return C.return(g?z:z.catch(function(){}))})}
|
|
256
|
+
function Th(a){var b;return O(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.G){c.u(2);break}return F(c,a.G,3);case 3:return Ag(a.j),c.return();case 2:return ra(c,4),a.G=a.l.setMediaKeys(a.A),F(c,a.G,6);case 6:ta(c,5);break;case 4:b=ua(c),a.s(new T(2,6,6003,b.message));case 5:Ag(a.j),G(c)}})}function Uh(a,b){return O(function(c){if(1==c.g)return F(c,Th(a),2);Vh(a,b.initDataType,zb(b.initData));G(c)})}
|
|
257
|
+
q.Sb=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.A)return b.o.ka(a,"encrypted",function(){b.s(new T(2,6,6010))}),c.return();b.l=a;b.o.ka(b.l,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())Wh(b,e.value);b.O=!0;b.L=[]});b.l.remote?(b.o.D(b.l.remote,"connect",function(){return Jh(b)}),b.o.D(b.l.remote,"connecting",function(){return Jh(b)}),b.o.D(b.l.remote,"disconnect",function(){return Jh(b)})):"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.D(b.l,"webkitcurrentplaybacktargetiswirelesschanged",
|
|
258
|
+
function(){return Jh(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||b.B.size?F(c,Th(b),2):c.u(2)}Xh(b).catch(function(){});b.F||b.B.size||b.h.parseInbandPsshEnabled||b.o.D(b.l,"encrypted",function(d){return Uh(b,d)});G(c)})};
|
|
259
|
+
function Yh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.A||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=rg([a.g.serverCertificateUri],a.h.retryParameters);ra(g,3);c=a.C.Mb.request(5,b);return F(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=zb(d.data);ta(g,4);break;case 3:throw e=ua(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
260
|
+
ra(g,6);return F(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new T(2,6,6004,f.message);}})}function Zh(a,b){var c,d,e;return O(function(f){if(1==f.g)return F(f,$h(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.lb=new $f,d.push(e.lb);d.push(c.remove());return F(f,Promise.all(d),3)}a.i.delete(c);G(f)})}
|
|
261
|
+
function Xh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.B.size)return g.u(2);a.B.forEach(function(h,k){$h(a,k,h)});return F(g,a.m,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&ai(a))return g.return(a.m);a.m=new $f;a.m.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Vh(a,f.initDataType,f.initData);bi(a)&&a.m.resolve();return g.return(a.m)})}
|
|
262
|
+
function Vh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(xb(c,e.value.initData))return;var f=!1;a.B.forEach(function(g){!f&&xb(c,g.initData)&&(f=!0)});if(f)return}0<a.i.size&&bi(a)&&(a.m.resolve(),a.m=new $f,a.m.catch(function(){}));ci(a,b,c,a.g.sessionType)}}function di(a){a=a.i.keys();a=Bg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
263
|
+
q.ff=function(){var a=this,b=this.i.keys();b=Bg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.cd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Kd=function(){return Eg(this.da)};
|
|
264
|
+
function Oh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=new Map;if(c.length){e=ei(a,c,d);m.u(2);break}return F(m,fi(a,b),3);case 3:e=m.h;case 2:f=e;if(!f)throw new T(2,6,6001);Ag(a.j);ra(m,4);f.getConfiguration();if(c.length){var n=f.keySystem;var p=d.get(f.keySystem);var r=[],u=[],v=[],w=[],A=[],y=new Set,D=new Set;gi(p,r,u,w,v,A,y,D);var z=a.N?"persistent-license":"temporary";n={keySystem:n,encryptionScheme:r[0],licenseServerUri:u[0],distinctiveIdentifierRequired:p[0].distinctiveIdentifierRequired,
|
|
265
265
|
persistentStateRequired:p[0].persistentStateRequired,sessionType:p[0].sessionType||z,audioRobustness:p[0].audioRobustness||"",videoRobustness:p[0].videoRobustness||"",serverCertificate:w[0],serverCertificateUri:v[0],initData:A,keyIds:y};0<D.size&&(n.keySystemUris=D);p=t(p);for(D=p.next();!D.done;D=p.next())D=D.value,D.distinctiveIdentifierRequired&&(n.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(n.persistentStateRequired=D.persistentStateRequired);p=n}else p=
|
|
266
|
-
f.keySystem,D=b.get(f.keySystem),n=[],r=[],u=[],v=[],w=[],A=new Set,
|
|
267
|
-
initData:w,keyIds:A};a.g=p;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return F(m,f.createMediaKeys(),6);case 6:g=m.h;
|
|
268
|
-
ta(m,0);break;case 4:l=ua(m);
|
|
269
|
-
function
|
|
266
|
+
f.keySystem,D=b.get(f.keySystem),n=[],r=[],u=[],v=[],w=[],A=new Set,gi(D.drmInfos,n,r,v,u,w,A),p={keySystem:p,encryptionScheme:n[0],licenseServerUri:r[0],distinctiveIdentifierRequired:"required"==D.distinctiveIdentifier,persistentStateRequired:"required"==D.persistentState,sessionType:D.sessionTypes[0]||"temporary",audioRobustness:(D.audioCapabilities?D.audioCapabilities[0].robustness:"")||"",videoRobustness:(D.videoCapabilities?D.videoCapabilities[0].robustness:"")||"",serverCertificate:v[0],serverCertificateUri:u[0],
|
|
267
|
+
initData:w,keyIds:A};a.g=p;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return F(m,f.createMediaKeys(),6);case 6:g=m.h;Ag(a.j);a.A=g;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.A)){m.u(7);break}ra(m,8);return F(m,a.A.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:h=m.h;if("usable"!=h)throw new T(2,6,6018);Ag(a.j);ta(m,7,4);break;case 8:k=ua(m,4);if(k instanceof T)throw k;throw new T(2,6,6019,k.message);case 7:return a.ba=!0,F(m,Yh(a),11);case 11:Ag(a.j);
|
|
268
|
+
ta(m,0);break;case 4:l=ua(m);Ag(a.j,l);a.g=null;if(l instanceof T)throw l;throw new T(2,6,6002,l.message);}})}
|
|
269
|
+
function ei(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Rh(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);a=t(a.h.preferredKeySystems);e=a.next();for(d={};!e.done;d={Ug:void 0},e=a.next())for(d.Ug=e.value,e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
270
270
|
l.Ug}}(d)))return f.keySystemAccess;a=t([!0,!1]);for(d=a.next();!d.done;d=a.next())for(d=d.value,e=t(b),f=e.next();!f.done;f=e.next()){f=t(f.value.decodingInfos);for(var g=f.next();!g.done;g=f.next())if(g=g.value,g.supported&&g.keySystemAccess){var h=c.get(g.keySystemAccess.keySystem);h=t(h);for(var k=h.next();!k.done;k=h.next())if(!!k.value.licenseServerUri==d)return g.keySystemAccess}}return null}
|
|
271
|
-
function
|
|
272
|
-
y.h,y.return(c);case 6:ua(y);case 7:
|
|
273
|
-
function
|
|
274
|
-
function
|
|
275
|
-
d.load(b),4);case 4:return g=m.h,
|
|
276
|
-
function
|
|
271
|
+
function fi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new T(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){y.u(4);break}k=h.value;if(!b.has(k)){y.u(3);break}l=b.get(k);ra(y,6);return F(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
272
|
+
y.h,y.return(c);case 6:ua(y);case 7:Ag(a.j);case 3:h=g.next();y.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.u(11);break}p=n.value;r=t(b.keys());u=r.next();case 12:if(u.done){n=m.next();y.u(9);break}v=u.value;w=b.get(v);A=w.drmInfos.some(function(D){return!!D.licenseServerUri});if(A!=p){y.u(13);break}ra(y,15);return F(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:ua(y);case 16:Ag(a.j);case 13:u=r.next();y.u(12);break;case 11:return y.return(c)}})}
|
|
273
|
+
function Ph(a){a=Dg(a.h.clearKeys);return 0==a.size?null:Qd(a)}function hi(a){bi(a)&&a.m.resolve()}function ii(a,b){(new Rc(function(){b.loaded=!0;hi(a)})).Z(ji)}
|
|
274
|
+
function $h(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.A.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.o.D(d,"message",function(n){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(n):Wh(a,n)});a.o.D(d,"keystatuseschange",function(n){return ki(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Af:Infinity,lb:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return F(m,
|
|
275
|
+
d.load(b),4);case 4:return g=m.h,Ag(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.s(new T(h,6,6013)),f.loaded=!0),ii(a,f),hi(a),m.return(d);case 2:k=ua(m),Ag(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.s(new T(l,6,6005,k.message)),f.loaded=!0,hi(a);case 3:return m.return(Promise.resolve())}})}
|
|
276
|
+
function ci(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.s(new T(2,6,6005,f.message));return}a.o.D(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(f):Wh(a,f)});a.o.D(e,"keystatuseschange",function(f){return ki(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Af:Infinity,lb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.s(b);return}a.h.logLicenseExchange&&Gd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
277
277
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.s(new T(2,6,6006,f.message,f,h))}})}
|
|
278
|
-
function
|
|
279
|
-
f.headers[h];if(Nc(a.g.keySystem)){var A=wd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A
|
|
280
|
-
p=new T(2,6,6007,n);1==a.i.size?(a.s(p),d&&d.lb&&d.lb.reject(p)):(d&&d.lb&&d.lb.reject(p),a.i.delete(c),
|
|
281
|
-
|
|
282
|
-
function
|
|
283
|
-
(a.m.resolve(),a.K.Z(
|
|
284
|
-
function
|
|
285
|
-
[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(M,N){var P,R,Q,W,Y,
|
|
286
|
-
(P=N.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,ad()&&(R=!1),Q=N.getConfiguration().videoCapabilities,W=N.getConfiguration().audioCapabilities,Y={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(M)&&k.get(M)?Y=k.get(M):k.set(M,Y),(
|
|
287
|
-
!Y.audioRobustnessLevels.includes(
|
|
288
|
-
return F(bb,navigator.requestMediaKeySystemAccess(M,Va),4);case 4:return Aa=bb.h,F(bb,l(M,Aa),5);case 5:ta(bb,0);break;case 2:ua(bb),G(bb)}})};n=function(M,N,P,R){var Q,W,Y;return O(function(
|
|
289
|
-
robustness:R}}},F(
|
|
290
|
-
L.next())J=H.value,v.push(m(I,null,J,"")),v.push(m(I,null,"",J)),v.push(n(I,null,J,"")),v.push(n(I,null,"",J));return F(K,Promise.all(v),2)}return K.return(
|
|
291
|
-
function
|
|
292
|
-
function
|
|
293
|
-
function
|
|
294
|
-
function
|
|
278
|
+
function Wh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Gd(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=rg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
|
|
279
|
+
f.headers[h];if(Nc(a.g.keySystem)){var A=wd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=$g(A,"PlayReadyKeyMessage");var y=jh(A,"HttpHeader");y=t(y);for(var D=y.next();!D.done;D=y.next()){var z=D.value;D=jh(z,"name")[0];z=jh(z,"value")[0];g.headers[hh(D)]=hh(z)}A=jh(A,"Challenge")[0];g.body=Hd(hh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();ra(w,2);m=a.C.Mb.request(2,g);return F(w,m.promise,4);case 4:l=w.h;ta(w,3);break;case 2:n=ua(w);if(a.j.g)return w.return();
|
|
280
|
+
p=new T(2,6,6007,n);1==a.i.size?(a.s(p),d&&d.lb&&d.lb.reject(p)):(d&&d.lb&&d.lb.reject(p),a.i.delete(c),bi(a)&&(a.m.resolve(),a.K.Z(.1)));return w.return();case 3:if(a.j.g)return w.return();a.H+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Gd(l.data);ra(w,5);return F(w,c.update(l.data),7);case 7:ta(w,6);break;case 5:return r=ua(w),u=new T(2,6,6008,r.message),a.s(u),d&&d.lb&&d.lb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.lb&&d.lb.resolve(),
|
|
281
|
+
ii(a,d));G(w)}})}
|
|
282
|
+
function ki(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Nc(a.g.keySystem)&&16==g.byteLength&&(Wc()||id())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Jd(g).slice(0,32);a.T.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.lb&&(a.i.delete(b),b.close().catch(function(){}));bi(a)&&
|
|
283
|
+
(a.m.resolve(),a.K.Z(li))}function Gh(a){var b=a.T,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.s(new T(2,6,6014));a.C.ee(Eg(c))}
|
|
284
|
+
function mi(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J;return O(function(K){if(1==K.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=
|
|
285
|
+
[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(M,N){var P,R,Q,W,Y,wa,Fa,xa;return O(function(Pa){switch(Pa.g){case 1:return ra(Pa,2),F(Pa,N.createMediaKeys(),4);case 4:ta(Pa,3);break;case 2:return ua(Pa),Pa.return();case 3:R=
|
|
286
|
+
(P=N.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,ad()&&(R=!1),Q=N.getConfiguration().videoCapabilities,W=N.getConfiguration().audioCapabilities,Y={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(M)&&k.get(M)?Y=k.get(M):k.set(M,Y),(wa=Q[0].encryptionScheme)&&!Y.encryptionSchemes.includes(wa)&&Y.encryptionSchemes.push(wa),(Fa=Q[0].robustness)&&!Y.videoRobustnessLevels.includes(Fa)&&Y.videoRobustnessLevels.push(Fa),(xa=W[0].robustness)&&
|
|
287
|
+
!Y.audioRobustnessLevels.includes(xa)&&Y.audioRobustnessLevels.push(xa),G(Pa)}})};m=function(M,N,P,R){var Q,W,Y,wa,Fa,xa,Pa,Za,Va,Aa;return O(function(bb){switch(bb.g){case 1:ra(bb,2);Q=Je(g);W=t(Q.videoCapabilities);for(Y=W.next();!Y.done;Y=W.next())wa=Y.value,wa.encryptionScheme=N,wa.robustness=P;Fa=t(Q.audioCapabilities);for(xa=Fa.next();!xa.done;xa=Fa.next())Pa=xa.value,Pa.encryptionScheme=N,Pa.robustness=R;Za=Je(Q);Za.persistentState="required";Za.sessionTypes=["persistent-license"];Va=[Za,Q];
|
|
288
|
+
return F(bb,navigator.requestMediaKeySystemAccess(M,Va),4);case 4:return Aa=bb.h,F(bb,l(M,Aa),5);case 5:ta(bb,0);break;case 2:ua(bb),G(bb)}})};n=function(M,N,P,R){var Q,W,Y;return O(function(wa){switch(wa.g){case 1:return ra(wa,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:M,video:{encryptionScheme:N,robustness:P},audio:{encryptionScheme:N,
|
|
289
|
+
robustness:R}}},F(wa,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return W=wa.h,Y=W.keySystemAccess,F(wa,l(M,Y),5);case 5:ta(wa,0);break;case 2:ua(wa),G(wa)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(y=A.value,D=t(a),z=D.next();!z.done;z=D.next())C=z.value,"org.w3.clearkey"===C&&ld()||(v.push(m(C,y,"","")),v.push(n(C,y,"","")));B=t(a);for(E=B.next();!E.done;E=B.next())for(I=E.value,L=t(d[I]||[]),H=L.next();!H.done;H=
|
|
290
|
+
L.next())J=H.value,v.push(m(I,null,J,"")),v.push(m(I,null,"",J)),v.push(n(I,null,J,"")),v.push(n(I,null,"",J));return F(K,Promise.all(v),2)}return K.return(Eg(k))})}function ni(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Rc(e)).Z(oi)}),ra(c,2),F(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);ua(c);G(c)})}
|
|
291
|
+
function Jh(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return F(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return ra(g,2),a.ea||a.B.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?F(g,ni(e),5):F(g,e.remove(),5);if(2!=g.g)return ta(g,0);ua(g);G(g)})})),0)})}function Rh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
292
|
+
function Hh(a){a.i.forEach(function(b,c){var d=b.Af,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Af=e)})}function bi(a){a=a.i.values();return Cg(a,function(b){return b.loaded})}function ai(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.T.get(c.value))return!1;return!0}
|
|
293
|
+
function Qh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
294
|
+
function gi(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={sa:void 0},l=a.next()){m.sa=l.value;b.includes(m.sa.encryptionScheme)||b.push(m.sa.encryptionScheme);"org.w3.clearkey"==m.sa.keySystem&&m.sa.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.sa.licenseServerUri)||k.push(m.sa.licenseServerUri):c.includes(m.sa.licenseServerUri)||c.push(m.sa.licenseServerUri);e.includes(m.sa.serverCertificateUri)||e.push(m.sa.serverCertificateUri);m.sa.serverCertificate&&
|
|
295
295
|
(d.some(function(r){return function(u){return xb(u,r.sa.serverCertificate)}}(m))||d.push(m.sa.serverCertificate));if(m.sa.initData){l=t(m.sa.initData);for(var n=l.next(),p={};!n.done;p={mf:void 0},n=l.next())p.mf=n.value,f.some(function(r){return function(u){var v=r.mf;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&xb(u.initData,v.initData)}}(p))||f.push(p.mf)}if(m.sa.keyIds)for(l=t(m.sa.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.sa.keySystemUris&&h)for(m=t(m.sa.keySystemUris),
|
|
296
296
|
l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0<k.length){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
|
|
297
|
-
function
|
|
298
|
-
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var
|
|
297
|
+
function Sh(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
298
|
+
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var oi=1,ji=5,li=.5;/*
|
|
299
299
|
@license
|
|
300
300
|
Shaka Player
|
|
301
301
|
Copyright 2023 Google LLC
|
|
302
302
|
SPDX-License-Identifier: Apache-2.0
|
|
303
303
|
*/
|
|
304
|
-
function
|
|
305
|
-
function
|
|
306
|
-
function
|
|
307
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var
|
|
304
|
+
function pi(a,b,c){this.h=a;this.i=b;this.g=c}function qi(a,b){return O(function(c){if(1==c.g)return F(c,Re(a.g,b,a.h.drm.preferredKeySystems),2);a.h.streaming.dontChooseCodecs||Me(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(sf))throw new T(2,4,4032);return c.return(ri(a,b))})}
|
|
305
|
+
function ri(a,b){var c=Qe(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.A)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,si(a,d.keySystem,f.video),si(a,d.keySystem,f.audio);ti(a,b)}return c}function si(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,Vh(a.g,e.initDataType,e.initData)}}}
|
|
306
|
+
function ti(a,b){a=a.g?a.g.Kd():{};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?ui.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
307
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var ui=["output-restricted","internal-error"];function vi(){}function wi(a,b){if(b){var c=xi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",vi);vi.unregisterParserByMime=function(a){delete xi[a]};vi.registerParserByMime=function(a,b){xi[a]=b};vi.registerParserByExtension=function(){qb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};vi.AccessibilityPurpose={dk:"visually impaired",yj:"hard of hearing"};var xi={};function yi(a,b){function c(){f=!0}function d(m){h.push(m);Pg(m)}var e=a=zb(a),f=!1,g,h=[],k=[];(new Kg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).S("stsd",function(m){g=m;h.push(m);Rg(m)}).S("encv",c).S("enca",c).S("dvav",function(m){k.push({box:m,Oa:1701733238})}).S("dva1",function(m){k.push({box:m,Oa:1701733238})}).S("dvh1",function(m){k.push({box:m,Oa:1701733238})}).S("dvhe",function(m){k.push({box:m,Oa:1701733238})}).S("dvc1",function(m){k.push({box:m,Oa:1701733238})}).S("dvi1",
|
|
308
308
|
function(m){k.push({box:m,Oa:1701733238})}).S("hev1",function(m){k.push({box:m,Oa:1701733238})}).S("hvc1",function(m){k.push({box:m,Oa:1701733238})}).S("avc1",function(m){k.push({box:m,Oa:1701733238})}).S("avc3",function(m){k.push({box:m,Oa:1701733238})}).S("ac-3",function(m){k.push({box:m,Oa:1701733217})}).S("ec-3",function(m){k.push({box:m,Oa:1701733217})}).S("ac-4",function(m){k.push({box:m,Oa:1701733217})}).S("mp4a",function(m){k.push({box:m,Oa:1701733217})}).parse(a);if(f)return a;if(0==k.length||
|
|
309
|
-
!g)throw eb(Jd(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,e=
|
|
310
|
-
function
|
|
311
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function
|
|
312
|
-
|
|
313
|
-
function
|
|
314
|
-
this.s&&this.g.length&&this.g[this.g.length-1].Lg();this.C=this.mimeType=this.codecs=null}q=
|
|
309
|
+
!g)throw eb(Jd(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,e=zi(e,g,l.box,h,l.Oa);return Wc()&&md()&&!Yc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
310
|
+
function zi(a,b,c,d,e){var f=Ai.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Bi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Yc()||Wc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Bi(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Qg(b);
|
|
311
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Bi(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Ai=new Kc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ci(a,b,c,d,e,f,g){this.M=a;this.Ha=b;this.ta=c;this.Kc=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}Ci.prototype.Yb=function(){return this.Ha};Ci.prototype.Wb=function(){return this.ta};Ci.prototype.lc=function(){return this.g};function Di(a,b){return a===b?!0:a&&b?a.Yb()==b.Yb()&&a.Wb()==b.Wb()&&Pb(a.M().sort(),b.M().sort())&&xb(a.lc(),b.lc()):a==b}S("shaka.media.InitSegmentReference",Ci);
|
|
312
|
+
Ci.prototype.getEndByte=Ci.prototype.Wb;Ci.prototype.getStartByte=Ci.prototype.Yb;
|
|
313
|
+
function Ei(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Fi:r;this.startTime=a;this.j=this.endTime=b;this.F=c;this.Ha=d;this.ta=e;this.$=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=0;this.s=void 0===v?!1:v;this.G=this.o=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Mg();
|
|
314
|
+
this.s&&this.g.length&&this.g[this.g.length-1].Lg();this.C=this.mimeType=this.codecs=null}q=Ei.prototype;q.M=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Ph=function(){return this.endTime};q.Yb=function(){return this.Ha};q.Wb=function(){return this.ta};q.gi=function(){return this.tilesLayout};q.fi=function(){return this.B};q.Zb=function(){return this.status};q.Ai=function(){this.status=Gi};q.xf=function(){this.preload=!0};q.ui=function(){return this.preload};
|
|
315
315
|
q.Wd=function(){this.l=!1};q.ri=function(){return this.l};q.Mg=function(){this.o=!0};q.ti=function(){return this.o};q.Lg=function(){this.G=!0};q.si=function(){return this.G};q.Kg=function(){this.m=!0};q.mi=function(){return this.m};q.ih=function(a){this.A=a};q.ei=function(){return this.A};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
316
|
-
q.Wf=function(a){null==this.h?Xa("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.bj=function(a){this.C=a};q.lc=function(){return this.C};function
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
function
|
|
316
|
+
q.Wf=function(a){null==this.h?Xa("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.bj=function(a){this.C=a};q.lc=function(){return this.C};function Hi(a,b){a.$=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Hi(c.value,b)}S("shaka.media.SegmentReference",Ei);Ei.prototype.getSegmentData=Ei.prototype.lc;Ei.prototype.setSegmentData=Ei.prototype.bj;Ei.prototype.syncAgainst=Ei.prototype.Wf;Ei.prototype.offset=Ei.prototype.offset;
|
|
317
|
+
Ei.prototype.getThumbnailSprite=Ei.prototype.ei;Ei.prototype.setThumbnailSprite=Ei.prototype.ih;Ei.prototype.hasByterangeOptimization=Ei.prototype.mi;Ei.prototype.markAsByterangeOptimization=Ei.prototype.Kg;Ei.prototype.isLastPartial=Ei.prototype.si;Ei.prototype.markAsLastPartial=Ei.prototype.Lg;Ei.prototype.isPartial=Ei.prototype.ti;Ei.prototype.markAsPartial=Ei.prototype.Mg;Ei.prototype.isIndependent=Ei.prototype.ri;Ei.prototype.markAsNonIndependent=Ei.prototype.Wd;Ei.prototype.isPreload=Ei.prototype.ui;
|
|
318
|
+
Ei.prototype.markAsPreload=Ei.prototype.xf;Ei.prototype.markAsUnavailable=Ei.prototype.Ai;Ei.prototype.getStatus=Ei.prototype.Zb;Ei.prototype.getTileDuration=Ei.prototype.fi;Ei.prototype.getTilesLayout=Ei.prototype.gi;Ei.prototype.getEndByte=Ei.prototype.Wb;Ei.prototype.getStartByte=Ei.prototype.Yb;Ei.prototype.getEndTime=Ei.prototype.Ph;Ei.prototype.getStartTime=Ei.prototype.getStartTime;Ei.prototype.getUris=Ei.prototype.M;var Fi=0,Gi=1;Ei.Status={kj:Fi,bk:Gi,Ej:2};function Ii(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ji(a){return!a||Ii(a)?null:a.length?a.end(a.length-1):null}function Ki(a,b){return!a||!a.length||Ii(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Li(a,b){if(!a||!a.length||Ii(a))return 0;var c=0;a=t(Oi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
319
|
+
function Pi(a,b,c){if(!a||!a.length||Ii(a))return null;a=Oi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Oi(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};/*
|
|
320
320
|
@license
|
|
321
321
|
Shaka Player
|
|
322
322
|
Copyright 2022 Google LLC
|
|
323
323
|
SPDX-License-Identifier: Apache-2.0
|
|
324
324
|
*/
|
|
325
|
-
function
|
|
326
|
-
function
|
|
325
|
+
function Qi(){}function Ri(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Si(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Ti(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
|
|
326
|
+
function Ui(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=ud(zb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=ud(zb(a.data,3+c,f)),h;"--\x3e"===d?h=ud(zb(a.data,4+c+f)):h=Ab(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
|
|
327
327
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=ud(zb(a.data,1,d));a=ud(zb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=ud(zb(a.data,1,d));a=ud(zb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=ud(zb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
328
328
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Ab(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=ud(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=ud(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ab(a.data),b):null}
|
|
329
|
-
function
|
|
330
|
-
|
|
331
|
-
function
|
|
332
|
-
function
|
|
333
|
-
function
|
|
329
|
+
function Vi(a){for(var b=0,c=[];Ri(a,b);){var d=Ti(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=Ti(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ui(e))&&c.push(f);b+=e.size+10}Si(a,b)&&(b+=10)}return c}function Wi(a,b){for(var c=b=void 0===b?0:b,d=0;Ri(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ti(a,b+6),Si(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Qi);Qi.getID3Data=Wi;
|
|
330
|
+
Qi.getID3Frames=Vi;function Xi(a,b){var c=null,d=null,e=null,f=a.R();b&1&&(e=a.Qc());b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:f,ad:c,Hd:d,fk:e}}function Yi(a,b){return 1==b?(b=a.R(),a=a.R(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.R()}}function Zi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.R();a.skip(4);a=a.oa();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
331
|
+
function $i(a,b,c){var d=a.R(),e=[],f=null;c&1&&(f=a.R());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Kf:null,sampleSize:null,ne:null};c&256&&(h.Kf=a.R());c&512&&(h.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(h.ne=0==b?a.R():a.Vg());e.push(h)}return{jk:d,Zg:e,Ih:f}}function aj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.oa();a.skip(2);a.skip(2);a.skip(2);a=a.oa()+a.oa()/65536;return{channelCount:b,sampleRate:a}}function bj(a){a=a.R();return{codec:Og(a)}}
|
|
332
|
+
function cj(a){var b=null,c=null,d=a.rb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.oa()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.oa();a.oa();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,xd:c}}
|
|
333
|
+
function dj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function ej(a){return(10>a?"0":"")+a};/*
|
|
334
334
|
|
|
335
335
|
Copyright Brightcove, Inc.
|
|
336
336
|
|
|
@@ -346,307 +346,307 @@ function ej(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
|
|
|
346
346
|
See the License for the specific language governing permissions and
|
|
347
347
|
limitations under the License.
|
|
348
348
|
*/
|
|
349
|
-
function
|
|
350
|
-
function
|
|
351
|
-
function
|
|
352
|
-
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,
|
|
349
|
+
function fj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=zb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function gj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Fg(c,0)).R(),a.g=8*d,a.i-=d)}function hj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;gj(a)}a.h<<=b;a.g-=b}
|
|
350
|
+
function ij(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&gj(a);c=b-c;return 0<c?d<<c|ij(a,c):d}function jj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;gj(a);return b+jj(a)}function kj(a){hj(a,1+jj(a))}function V(a){var b=jj(a);return ij(a,b+1)-1}function lj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function mj(a){return 1===ij(a,1)}function nj(a){return ij(a,8)}
|
|
351
|
+
function oj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=lj(a),d=(c+d+256)%256),c=0===d?c:d}function pj(a){nj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",fj);function qj(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}q=qj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
352
|
+
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,rj(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.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Pd:-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<
|
|
353
353
|
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=yd(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=
|
|
354
354
|
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,Fh:u,sampleRate:48E3}))}n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Pd&&(g.Pd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
|
|
355
355
|
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.I=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Pd&&(this.C=f.Pd);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.I:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
356
356
|
break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
357
|
-
function
|
|
357
|
+
function sj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=tj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=tj(d,
|
|
358
358
|
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.Fi=function(a){qb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Df(a)};
|
|
359
359
|
q.Df=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Kd(b.data,p),b.fullData=Kd(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Kd(b.data,k),b.fullData=Kd(b.fullData,k)));if(n>=e-f)return h;
|
|
360
|
-
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Kd(b.data,a),b.fullData=Kd(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Kd.apply(Ed,x(c.value)),(c=
|
|
361
|
-
q.Vb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Kd.apply(Ed,x(c.value)),e=
|
|
362
|
-
q.
|
|
363
|
-
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.Vb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.
|
|
364
|
-
q.Nd=function(){for(var a=[],b=t(this.
|
|
365
|
-
function
|
|
366
|
-
m=0,n=0;
|
|
367
|
-
function
|
|
368
|
-
0;
|
|
369
|
-
a&&(e+="."+a.toString(16).toUpperCase());b.codec=e;return b}function
|
|
370
|
-
|
|
371
|
-
a=!1):(this.h.SupportObject.SupportStatus||Ya(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function
|
|
372
|
-
|
|
373
|
-
function
|
|
374
|
-
function
|
|
375
|
-
ce(a,h,k),p=ae(h,k),!lb(n)&&!nc(p))return r.return(!1);return r.return(!0)})}q=
|
|
376
|
-
function
|
|
377
|
-
a.l={};a.T=null;a.I=null;a.ba=null;G(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Wd,F(m,e.K,2);case 2:e.B=b,e.Y=c,e.Ca=d,e.Da=!e.B&&"HLS"==e.Y&&!e.Ca,e.I=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return F(m,
|
|
378
|
-
function
|
|
379
|
-
|
|
360
|
+
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Kd(b.data,a),b.fullData=Kd(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Kd.apply(Ed,x(c.value)),(c=sj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Vi(c.data),dts:c.dts,pts:c.pts});return a};
|
|
361
|
+
q.Vb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Kd.apply(Ed,x(c.value)),e=sj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Kd(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
362
|
+
q.Hc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Kd.apply(Ed,x(d.value)),f=sj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Kd(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.Df(e,
|
|
363
|
+
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.Vb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Hc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.bd=function(){return{audio:this.A,video:this.m}};
|
|
364
|
+
q.Nd=function(){for(var a=[],b=t(this.Hc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.ji=function(){qb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.kf();return{height:a.height,width:a.width}};q.kf=function(){return"hvc"==this.m?uj(this):Cj(this)};
|
|
365
|
+
function Cj(a){var b={height:null,width:null,codec:null};a=a.Nd();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new fj(a.data);var c=nj(a),d=nj(a),e=nj(a);kj(a);if(Dj.includes(c)){var f=V(a);3===f&&hj(a,1);kj(a);kj(a);hj(a,1);if(mj(a)){f=3!==f?8:12;for(var g=0;g<f;g++)mj(a)&&(6>g?oj(a,16):oj(a,64))}}kj(a);f=V(a);if(0===f)V(a);else if(1===f)for(hj(a,1),kj(a),kj(a),f=V(a),g=0;g<f;g++)kj(a);kj(a);hj(a,1);f=V(a);g=V(a);var h=ij(a,1);0===h&&hj(a,1);hj(a,1);var k=0,l=0,
|
|
366
|
+
m=0,n=0;mj(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}
|
|
367
|
+
function uj(a){var b={height:null,width:null,codec:null};a=a.Nd();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new fj(a.fullData,!0);nj(c);nj(c);ij(c,4);var d=ij(c,3);mj(c);var e=ij(c,2),f=ij(c,1),g=ij(c,5),h=ij(c,32);a=nj(c);for(var k=nj(c),l=nj(c),m=nj(c),n=nj(c),p=nj(c),r=nj(c),u=[],v=[],w=0;w<d;w++)u.push(mj(c)),v.push(mj(c));if(0<d)for(w=d;8>w;w++)ij(c,2);for(w=0;w<d;w++)u[w]&&ij(c,88),v[w]&&nj(c);V(c);d=V(c);3==d&&ij(c,1);u=V(c);v=V(c);var A=w=0,y=0,D=
|
|
368
|
+
0;mj(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 C=0,B=0;32>B;B++)C|=(z>>B&1)<<31-B;return C>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+r;p&&(e+="."+p.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());
|
|
369
|
+
a&&(e+="."+a.toString(16).toUpperCase());b.codec=e;return b}function tj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Ej(a){return 0>rj(a)?!1:!0}function rj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",qj);qj.syncOffset=rj;qj.probe=Ej;qj.prototype.getVideoInfo=qj.prototype.kf;qj.prototype.getVideoResolution=qj.prototype.ji;qj.prototype.getVideoNalus=qj.prototype.Nd;
|
|
370
|
+
qj.prototype.getCodecs=qj.prototype.bd;qj.prototype.getStartTime=qj.prototype.getStartTime;qj.prototype.getVideoData=qj.prototype.Hc;qj.prototype.getAudioData=qj.prototype.Vb;qj.prototype.getMetadata=qj.prototype.getMetadata;qj.prototype.parseNalus=qj.prototype.Df;qj.prototype.parseAvcNalus=qj.prototype.Fi;qj.prototype.parse=qj.prototype.parse;qj.prototype.clearData=qj.prototype.clearData;qj.Timescale=9E4;var Dj=[100,110,122,244,44,83,86,118,128,138,139,134];function Fj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ya("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,qb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ya("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ya("Could not find LCEVC Library on this page"),
|
|
371
|
+
a=!1):(this.h.SupportObject.SupportStatus||Ya(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Gj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
372
|
+
Fj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Hj(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Fj);Fj.prototype.release=Fj.prototype.release;function Ij(a,b,c,d){var e=this;this.j=a;this.ba=c;this.A=null;this.C=b;this.h={};this.F={};this.Ea={};this.g=null;this.ia=!1;this.T=d||null;this.l={};this.s=new gb;this.i={};this.G=null;this.K=new $f;this.va="";this.Fa=!1;this.m=Jj(this,this.K);this.L=!1;this.H=new zg(function(){return Kj(e)});this.B=!1;this.Y="UNKNOWN";this.Da=this.Ca=!1;this.ra=new $f;this.o=!1;this.ea=!0;this.na=this.N=this.ya=this.O=this.I=this.da=null;this.ma=new $f}
|
|
373
|
+
function Jj(a,b){a.ea=!0;if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.ea=!0});a.s.D(c,"endstreaming",function(){a.ea=!1})}else c=new MediaSource;a.s.ka(c,"sourceopen",function(){URL.revokeObjectURL(a.va);b.resolve()});a.s.ka(a.j,"playing",function(){a.Fa=!0});a.va=Lj(c);a.j.src=a.va;return c}
|
|
374
|
+
function Mj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g)return a.createSegmentIndex?F(r,a.createSegmentIndex(),2):r.u(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Wd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ua){if(m=Zd(h,k),!oe(m))return r.return(!1)}else if(b==c.ja?k=Ze(k):b==c.X&&(k=$e(k,h)),n=
|
|
375
|
+
ce(a,h,k),p=ae(h,k),!lb(n)&&!nc(p))return r.return(!1);return r.return(!0)})}q=Ij.prototype;q.destroy=function(){return this.H.destroy()};
|
|
376
|
+
function Kj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(xe)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.C&&b.push(a.C.destroy());for(k in a.i)b.push(a.i[k].destroy());return F(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.A=null;a.m=null;a.g=null;a.C=null;a.h={};a.i={};a.G=null;
|
|
377
|
+
a.l={};a.T=null;a.I=null;a.ba=null;G(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Wd,F(m,e.K,2);case 2:e.B=b,e.Y=c,e.Ca=d,e.Da=!e.B&&"HLS"==e.Y&&!e.Ca,e.I=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return F(m,Nj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.X]=[],e.l[f.ja]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
|
|
378
|
+
function Nj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:return e=Wd,f=Oa,g=Qa,F(w,Mj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Zd(c.mimeType,d);if(b==e.ua){Oj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!lb(h)||!a.B&&$d.includes(h))k=!0;l=ae(c.mimeType,d);if(!k){w.u(4);break}m=Sd(e.X,(d||"").split(","));n=Sd(e.ja,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return F(w,Nj(a,e.X,c,m),6);case 6:return F(w,
|
|
379
|
+
Nj(a,e.ja,c,n),7);case 7:return w.return();case 5:if(p=nc(l))r=p(),a.i[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Ag(a.H);try{v=a.m.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.m.readyState+" expected 'open'",null);}a.B&&(v.mode=Pj);a.s.D(v,"error",function(){var A=a.l[b][0];A.p.reject(new T(2,3,3014,a.j.error?a.j.error.code:0,A.uri))});a.s.D(v,"updateend",function(){return Qj(a,b)});a.h[b]=v;a.F[b]=h;a.Ea[b]=!!c.drmInfos.length;
|
|
380
380
|
G(w)}})}q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
381
|
-
function
|
|
382
|
-
function
|
|
383
|
-
q.xb=function(){var a={total:this.
|
|
384
|
-
function
|
|
385
|
-
|
|
386
|
-
function
|
|
387
|
-
case 8:return H.return();case 6:if(!a.h[b])return H.return();p=a.h[b].timestampOffset;r=a.F[b];a.i[b]&&(r=a.i[b].getOriginalMimeType());if(d&&(u=
|
|
388
|
-
b)},null),
|
|
389
|
-
!h){H.u(11);break}I=d.startTime;if("HLS"!=a.Y||a.o||b!=m.X||!a.h[m.
|
|
390
|
-
q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Wd,a==e.ua?F(f,d.g.remove(b,c),0):F(f,
|
|
391
|
-
q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Wd,a==c.ua?d.return():F(d,
|
|
392
|
-
function
|
|
393
|
-
b)},null));a.o&&m.push(
|
|
394
|
-
function
|
|
395
|
-
q.Za=function(a){var b=this;return O(function(c){return F(c,
|
|
396
|
-
function
|
|
397
|
-
function
|
|
398
|
-
null);}})}function
|
|
399
|
-
function
|
|
400
|
-
function
|
|
401
|
-
Promise.all(g),4);case 4:return a.i={},a.h={},w=a.m.duration,a.K=new
|
|
402
|
-
H.u(6);break;case 2:
|
|
403
|
-
function
|
|
404
|
-
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&&ob())return F(z,
|
|
405
|
-
function
|
|
381
|
+
function Oj(a,b,c,d){a.g||(a.g=new le(a.C),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ia;a=a.Y;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,pe[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):qb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):qb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
382
|
+
function Rj(a){return a.L?!1:a.m?"ended"==a.m.readyState:!0}function Sj(a,b){Object.keys(a.h).length?b==Ud?a=a.g.g:(a=Tj(a,b),a=!a||Ii(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function Uj(a,b){return Object.keys(a.h).length?b==Ud?a.g.h:Ji(Tj(a,b)):null}function Vj(a,b,c){if(b==Ud)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Tj(a,b);return Li(a,c)}
|
|
383
|
+
q.xb=function(){var a={total:this.L?[]:Oi(this.j.buffered),audio:Oi(Tj(this,"audio")),video:Oi(Tj(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 Tj(a,b){if(a.L)return null;try{return a.h[b].buffered}catch(c){return null}}
|
|
384
|
+
function Wj(a,b,c,d,e){var f=null,g=[],h=zb(c);if($d.includes(e))b=Vi(h),b.length&&d&&((c=b.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&c.data&&(f=Math.round(c.data)/1E3),a.ba.onMetadata([{cueTime:d.startTime,data:h,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.$&&d.$.timescale){var k=d.$.timescale;if(!isNaN(k)){var l=0,m=!1;(new Kg).box("moof",Pg).box("traf",Pg).S("tfdt",function(n){l=
|
|
385
|
+
Yi(n.reader,n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(f=l)}}else e.includes("/mp4")||e.includes("/webm")||!Ej(h)||(a.I?a.I.clearData():a.I=new qj,a=a.I.parse(h),d=a.getStartTime(b),null!=d&&(f=d),g=a.getMetadata());return{timestamp:f,metadata:g}}
|
|
386
|
+
function Xj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L;return O(function(H){switch(H.g){case 1:m=Wd;if(b!=m.ua){H.u(2);break}if(!a.B){H.u(3);break}return F(H,a.ra,4);case 4:n=H.h,a.g.s=n;case 3:return F(H,qe(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return H.return();case 2:if(l||!a.o){H.u(6);break}return F(H,Xj(a,m.X,c,d,e,f,g,h,k,!0),7);case 7:return F(H,Xj(a,m.ja,c,d,e,f,g,h,k,!0),8);
|
|
387
|
+
case 8:return H.return();case 6:if(!a.h[b])return H.return();p=a.h[b].timestampOffset;r=a.F[b];a.i[b]&&(r=a.i[b].getOriginalMimeType());if(d&&(u=Wj(a,b,c,d,r),v=u.timestamp,w=u.metadata,null!=v&&(null==a.O&&b==m.ja&&(a.O=v,a.ya=d.startTime,null!=a.N&&(A=0,a.ya==a.na&&(A=a.O-a.N),a.ma.resolve(A))),null==a.N&&b==m.X&&(a.N=v,a.na=d.startTime,null!=a.O&&(y=0,a.ya==a.na&&(y=a.O-a.N),a.ma.resolve(y))),D=d.startTime-v,z=Math.abs(p-D),(.001<=z||g||h)&&(!k||0<D||!p)&&(p=D,a.Da&&(Yj(a,b,function(){return Zj(a,
|
|
388
|
+
b)},null),Yj(a,b,function(){return ak(a,b,p)},null))),C=b==m.ja||!(m.ja in a.h),a.B&&C&&a.ra.resolve(p)),w.length))a.ba.onMetadata(w,p,d?d.endTime:null);f&&b==m.ja&&(a.g||Oj(a,"application/cea-608",a.B,!1),a.G||(B=r.split(";",1)[0],a.G=new Gb(B)),d?(E=a.G.i(c),E.length&&ve(a.g,E,d.startTime,d.endTime,p)):a.G.init(c,h));if(!a.i[b]){H.u(9);break}return F(H,a.i[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=H.h;case 9:c=bk(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.ua){H.u(11);break}if(!g&&
|
|
389
|
+
!h){H.u(11);break}I=d.startTime;if("HLS"!=a.Y||a.o||b!=m.X||!a.h[m.ja]){H.u(13);break}return F(H,a.ma,14);case 14:L=H.h,.1<Math.abs(L)&&(I-=L);case 13:Yj(a,b,function(){return Zj(a,b)},null),Yj(a,b,function(){return ak(a,b,I)},null);case 11:return F(H,Yj(a,b,function(){var J=c;if("video"==b&&a.T){var K=a.T;K.g&&K.g.appendBuffer(J,"video",K.o,-p)}a.h[b].appendBuffer(J)},d?d.M()[0]:null),15);case 15:G(H)}})}function ck(a,b){var c=Uj(a,"video")||0;te(a.g,b,c)}function dk(a){a.g&&te(a.g,"",0)}
|
|
390
|
+
q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Wd,a==e.ua?F(f,d.g.remove(b,c),0):F(f,Yj(d,a,function(){return ek(d,a,b,c)},null),4)):d.o?F(f,Yj(d,e.X,function(){return ek(d,e.X,b,c)},null),0):f.u(0)})};function fk(a,b){var c;return O(function(d){return 1==d.g?(c=Wd,b==c.ua?a.g?F(d,a.g.remove(0,Infinity),0):d.return():F(d,Yj(a,b,function(){return ek(a,b,0,a.m.duration)},null),4)):a.o?F(d,Yj(a,c.X,function(){return ek(a,c.X,0,a.m.duration)},null),0):d.u(0)})}
|
|
391
|
+
q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Wd,a==c.ua?d.return():F(d,Yj(b,a,function(){b.j.currentTime-=.001;Qj(b,a)},null),2)):b.o?F(d,Yj(b,c.X,function(){var e=c.X;b.j.currentTime-=.001;Qj(b,e)},null),0):d.u(0)})};
|
|
392
|
+
function gk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Wd;if(b==l.ua)return f||(a.g.s=c),se(a.g,d,e),p.return();m=[];return F(p,hk(a,b,g,h,k),2)}n=p.h;n||(m.push(Yj(a,b,function(){return Zj(a,b)},null)),a.o&&m.push(Yj(a,l.X,function(){return Zj(a,l.X)},null)));f||(m.push(Yj(a,b,function(){return ak(a,b,c)},null)),a.o&&m.push(Yj(a,l.X,function(){return ak(a,l.X,c)},null)));m.push(Yj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Qj(a,
|
|
393
|
+
b)},null));a.o&&m.push(Yj(a,l.X,function(){var r=l.X;a.h[r].appendWindowStart=0;a.h[r].appendWindowEnd=e;a.h[r].appendWindowStart=d;Qj(a,r)},null));return F(p,Promise.all(m),0)})}
|
|
394
|
+
function ik(a,b,c){var d;return O(function(e){if(1==e.g){d=Wd;if(b==d.ua)return e.return();b==d.ja&&(a.ra=new $f);Yj(a,b,function(){return Zj(a,b)},null);a.o&&Yj(a,d.X,function(){return Zj(a,d.X)},null);return F(e,Yj(a,b,function(){return ak(a,b,c)},null),2)}return a.o?F(e,Yj(a,d.X,function(){return ak(a,d.X,c)},null),0):e.u(0)})}q.endOfStream=function(a){var b=this;return O(function(c){return F(c,jk(b,function(){Rj(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
|
|
395
|
+
q.Za=function(a){var b=this;return O(function(c){return F(c,jk(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new $f,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.da=a}),0)})};q.getDuration=function(){return this.m.duration};function ek(a,b,c,d){d<=c?Qj(a,b):a.h[b].remove(c,d)}function Zj(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;Qj(a,b)}
|
|
396
|
+
function ak(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Qj(a,b)}function Qj(a,b){if(!a.L){var c=a.l[b][0];c&&(c.p.resolve(),kk(a,b))}}function Yj(a,b,c,d){Ag(a.H);c={start:c,p:new $f,uri:d};a.l[b].push(c);1==a.l[b].length&&lk(a,b);return c.p}
|
|
397
|
+
function jk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Ag(a.H);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new $f,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();ra(l,2);return F(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=ua(l),g;case 3:return ra(l,5,6),F(l,b(),6);case 6:va(l);for(h in a.h)kk(a,h);ya(l,0);break;case 5:throw k=ua(l),new T(2,3,3015,k,a.j.error||"No error in the media element",
|
|
398
|
+
null);}})}function kk(a,b){a.l[b].shift();lk(a,b)}function lk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.j.error||"No error in the media element",c.uri)),kk(a,b)}}function bk(a,b,c,d,e){var f=null==c,g=a.Ea[d];c=a.ba.Th();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Nc(c),f=$c()||Yc()||hd()||Wc()&&md()&&c;f&&"mp4"==ee(a.F[d])&&(b=yi(b,e));return b}
|
|
399
|
+
function mk(a,b,c,d){return Yj(a,b,function(){b!==Ud&&(ob()&&(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.F[b]=c),Qj(a,b))},null)}
|
|
400
|
+
function nk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L;return O(function(H){switch(H.g){case 1:c=Wd;a.L=!0;a.o=!1;d=a.j.currentTime;e=a.j.autoplay;f=a.j.paused;a.Fa&&(a.j.autoplay=!1);sa(H,2);a.s.Qa();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(xe)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(J){}}return F(H,
|
|
401
|
+
Promise.all(g),4);case 4:return a.i={},a.h={},w=a.m.duration,a.K=new $f,a.m=Jj(a,a.K),F(H,a.K,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.da)&&a.da&&(a.m.duration=a.da),A=new $f,y=a.m.sourceBuffers,D=b.size,z=0,C=function(){z++;z===D&&(A.resolve(),a.s.kb(y,"addsourcebuffer",C))},a.s.D(y,"addsourcebuffer",C),B=t(b.keys()),E=B.next();case 6:if(E.done)return a.j.currentTime=d,F(H,A,2);I=E.value;L=b.get(I);return F(H,Nj(a,I,L,L.codecs),9);case 9:a.o?(a.l[c.X]=[],a.l[c.ja]=[]):a.l[I]=[];E=B.next();
|
|
402
|
+
H.u(6);break;case 2:va(H),a.L=!1,Ag(a.H),a.s.ka(a.j,"canplaythrough",function(){a.H.g||(a.j.autoplay=e,f||a.j.play())}),ya(H,0)}})}function ok(a,b){return jk(a,function(){return nk(a,b)})}
|
|
403
|
+
function hk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,D;return O(function(z){if(1==z.g){f=Wd;if(b==f.ua)return z.return(!1);g=fe(je(a.F[b]));h=ie(a.F[b]);l=!1;m=Zd(c,d);n=a.A.forceTransmux;if(!lb(m)||!a.B&&$d.includes(m))n=!0;n&&(p=ae(c,d),r=nc(p))&&(k=r(),u=Sd(f.X,(d||"").split(",")),v=Sd(f.ja,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.X&&(w=u),m=k.convertCodecs(b,ae(c,w))):m=k.convertCodecs(b,p));A=fe(je(m));y=ie(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]=
|
|
404
|
+
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&&ob())return F(z,mk(a,b,m,k),3);k&&k.destroy();return F(z,ok(a,e),3)}return z.return(!0)})}
|
|
405
|
+
function pk(a,b,c,d){if(b==Ud)var e=!1;else{e=fe(je(a.F[b]));var f=ie(a.F[b]),g=Zd(c,d),h=a.A.forceTransmux;if(!lb(g)||!a.B&&$d.includes(g))h=!0;c=ae(c,d);h&&(h=nc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=fe(je(g));g=ie(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.o:!1}var Lj=window.URL.createObjectURL,Pj="sequence";function qk(a,b,c){this.i=a;this.A=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.I=!1;this.H=0;this.F=void 0===c?!0:c;this.G=0;this.s=!1;this.m=a}q=qk.prototype;q.getDuration=function(){return this.l};q.Vh=function(){return this.h};q.gh=function(a){this.i=a};q.Za=function(a){this.l=a};q.$h=function(){return this.i};q.eh=function(a){this.B=a};q.uc=function(a){a&&!this.C&&(this.I=!0);this.C=a};q.pe=function(a){this.o=a};q.Md=function(){return this.o};
|
|
406
406
|
q.Pf=function(a){this.A=a};q.Oh=function(){return this.A};q.Qg=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.be(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.F&&!this.s&&(this.i=c-this.g-this.h)}}};
|
|
407
407
|
q.sd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.be(b);this.g=Math.max(this.g,c);null!=this.i&&this.F&&!this.s&&(this.i=d-this.g-this.h)}};q.Pg=function(a,b){this.be(a);Infinity==b||this.V()||(this.g=Math.max(this.g,b))};q.Wh=function(){return this.g};q.Vd=function(){this.s=!0};
|
|
408
408
|
q.vi=function(){return this.s};q.fh=function(a){this.m=a};q.Sh=function(){return this.m};q.be=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};q.yf=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.V=function(){return Infinity==this.l&&!this.C};q.oc=function(){return Infinity!=this.l&&!this.C};q.nb=function(){return Math.max(this.H,this.Xb()-this.o)};q.kh=function(a){this.H=a};
|
|
409
409
|
q.Xb=function(){return this.V()||this.oc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};q.ed=function(a){var b=Math.max(this.j,this.H);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Xb()-this.o+a,this.zb()))};q.Jb=function(){return this.ed(0)};q.zb=function(){return Math.max(0,this.Xb()-(this.V()||this.oc()?this.A:0))};q.qh=function(){return null==this.i||null!=this.g&&this.F?!1:!0};
|
|
410
|
-
q.dh=function(a){this.G=a};q.Mh=function(){return this.G};S("shaka.media.PresentationTimeline",
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
function
|
|
415
|
-
null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Yc()||$c())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.zb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function
|
|
416
|
-
function
|
|
417
|
-
function
|
|
410
|
+
q.dh=function(a){this.G=a};q.Mh=function(){return this.G};S("shaka.media.PresentationTimeline",qk);qk.prototype.getAvailabilityTimeOffset=qk.prototype.Mh;qk.prototype.setAvailabilityTimeOffset=qk.prototype.dh;qk.prototype.usingPresentationStartTime=qk.prototype.qh;qk.prototype.getSeekRangeEnd=qk.prototype.zb;qk.prototype.getSeekRangeStart=qk.prototype.Jb;qk.prototype.getSafeSeekRangeStart=qk.prototype.ed;qk.prototype.getSegmentAvailabilityEnd=qk.prototype.Xb;qk.prototype.setUserSeekStart=qk.prototype.kh;
|
|
411
|
+
qk.prototype.getSegmentAvailabilityStart=qk.prototype.nb;qk.prototype.isInProgress=qk.prototype.oc;qk.prototype.isLive=qk.prototype.V;qk.prototype.offset=qk.prototype.offset;qk.prototype.notifyMaxSegmentDuration=qk.prototype.yf;qk.prototype.notifyMinSegmentStartTime=qk.prototype.be;qk.prototype.getInitialProgramDateTime=qk.prototype.Sh;qk.prototype.setInitialProgramDateTime=qk.prototype.fh;qk.prototype.isStartTimeLocked=qk.prototype.vi;qk.prototype.lockStartTime=qk.prototype.Vd;
|
|
412
|
+
qk.prototype.getMaxSegmentEndTime=qk.prototype.Wh;qk.prototype.notifyPeriodDuration=qk.prototype.Pg;qk.prototype.notifySegments=qk.prototype.sd;qk.prototype.notifyTimeRange=qk.prototype.Qg;qk.prototype.getDelay=qk.prototype.Oh;qk.prototype.setDelay=qk.prototype.Pf;qk.prototype.getSegmentAvailabilityDuration=qk.prototype.Md;qk.prototype.setSegmentAvailabilityDuration=qk.prototype.pe;qk.prototype.setStatic=qk.prototype.uc;qk.prototype.setClockOffset=qk.prototype.eh;
|
|
413
|
+
qk.prototype.getPresentationStartTime=qk.prototype.$h;qk.prototype.setDuration=qk.prototype.Za;qk.prototype.setPresentationStartTime=qk.prototype.gh;qk.prototype.getMaxSegmentDuration=qk.prototype.Vh;qk.prototype.getDuration=qk.prototype.getDuration;function rk(a,b,c){this.j=c;this.l=a;this.s=sk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}rk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function tk(a,b){a.i=b}function uk(a){this.g=a}function sk(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(Oi(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 vk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.m=c;this.l=new gb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.s=!1;this.l.D(a,"waiting",function(){return wk(f)});this.o=(new Rc(function(){wk(f)})).Ra(this.m.gapJumpTimerTime)}vk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.o&&(this.o.stop(),this.o=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};vk.prototype.Bf=function(){this.s=!0;wk(this)};
|
|
414
|
+
function wk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=sk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Pi(c,b,a.m.gapDetectionThreshold),
|
|
415
|
+
null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Yc()||$c())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.zb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function xk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=yk.value().get(b),c.ka(a,b,d))}var yk=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function zk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new gb;this.i=new Ak(a);xk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Bk(e,e.j())})}zk.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 Ck(a){return a.o?a.g.currentTime:a.j()}
|
|
416
|
+
function Dk(a,b){0<a.g.readyState?Ek(a.i,b):xk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Bk(a,a.j())})}function Bk(a,b){.001>Math.abs(a.g.currentTime-b)?Fk(a):(a.h.ka(a.g,"seeking",function(){Fk(a)}),Ek(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Fk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
417
|
+
function Ak(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Rc(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Ak.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Ek(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ra(.1)};function Gk(a){this.h=a;this.j=!1;this.g=null;this.i=new gb}q=Gk.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.ka(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;xk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.Ee=function(a){this.g=this.j?this.g:a};
|
|
418
418
|
q.yd=function(){return(this.j?this.h.currentTime:this.g)||0};q.hg=function(){return 0};q.gg=function(){return 0};q.Og=function(){};
|
|
419
|
-
function
|
|
420
|
-
!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Jb():g.g.zb():0>h&&(h=g.g.zb()+h);return
|
|
421
|
-
q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};q.Ee=function(a){
|
|
422
|
-
function
|
|
423
|
-
function
|
|
419
|
+
function Hk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Ik(a,c,f);this.j=new vk(a,b.presentationTimeline,c,this.o,f);this.h=new zk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Ck(g.h);h=Jk(g,k);if(.001<Math.abs(h-k)){k=!1;if(!fd()||fd()&&nd())k=!0;else{var l=Date.now()/1E3,m=fd()&&Zc("Fuchsia")?3:1;if(!g.s||g.s<l-m)g.s=l,k=!0}if(k){Dk(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&
|
|
420
|
+
!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Jb():g.g.zb():0>h&&(h=g.g.zb()+h);return Kk(g,Lk(g,h))});this.m=new Rc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ck(g.h),k=g.g.Jb(),l=g.g.zb();3>l-k&&(k=l-3);h<k&&(h=Jk(g,h),g.i.currentTime=h)}})}q=Hk.prototype;q.ready=function(){this.m.Ra(.25)};
|
|
421
|
+
q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};q.Ee=function(a){Dk(this.h,a)};q.yd=function(){var a=Ck(this.h);return 0<this.i.readyState&&!this.i.paused?Lk(this,a):a};q.hg=function(){return this.o?this.o.o:0};q.gg=function(){return this.j.C};q.Og=function(){this.j.Bf()};function Kk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
422
|
+
function Jk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Jb(),f=a.g.zb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ed(c),k=a.g.ed(d);c=a.g.ed(c+d);return b>=g?Kk(a,b):b>f?f:b<e?Ki(a.i.buffered,k)?k:c:b>=h||Ki(a.i.buffered,b)?b:c}function Lk(a,b){var c=a.g.Jb();if(b<c)return c;a=a.g.zb();return b>a?a:b}
|
|
423
|
+
function Ik(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new rk(new uk(a),b.stallThreshold,c);tk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Mk(a){this.P=a;this.l=null;this.h=0;this.m=!1}q=Mk.prototype;q.getNumReferences=function(){return this.P.length};q.getNumEvicted=function(){return this.h};q.release=function(){this.m||(this.P=[],this.l&&this.l.stop(),this.l=null)};q.Bi=function(){this.m=!0};q.wb=function(a){for(var b=t(this.P),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
424
424
|
q.find=function(a){for(var b=this.P.length-1,c=b;0<=c;--c){var d=this.P[c],e=c<b?this.P[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.P.length&&a<this.P[0].startTime?this.h:null};q.get=function(a){if(0==this.P.length)return null;a-=this.h;return 0>a||a>=this.P.length?null:this.P[a]};q.offset=function(a){if(!this.m)for(var b=t(this.P),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
425
425
|
q.Yd=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.P=this.P.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.P.push.apply(this.P,x(a))}};q.rd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.P.length||d.endTime>c.P[0].startTime)});this.Yd(a);this.Ga(b)};q.Ga=function(a){if(!this.m){var b=this.P.length;this.P=this.P.filter(function(c){return c.endTime>a});this.h+=b-this.P.length}};
|
|
426
|
-
q.
|
|
427
|
-
q.ue=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Rc(function(){var d=b();d?c.P.push.apply(c.P,x(d)):(c.l.stop(),c.l=null)}),this.l.Ra(a))};
|
|
428
|
-
|
|
429
|
-
S("shaka.media.SegmentIndex",
|
|
430
|
-
|
|
426
|
+
q.Dc=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],b=new Ei(a.startTime,b,a.F,a.Ha,a.ta,a.$,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.P[this.P.length-1]=b)}};
|
|
427
|
+
q.ue=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Rc(function(){var d=b();d?c.P.push.apply(c.P,x(d)):(c.l.stop(),c.l=null)}),this.l.Ra(a))};Mk.prototype[Symbol.iterator]=function(){return this.Ib(0)};
|
|
428
|
+
Mk.prototype.Ib=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Xa("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Nk(this,d,f,c)};function Ok(a,b,c){a=new Ei(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Mk([a])}
|
|
429
|
+
S("shaka.media.SegmentIndex",Mk);Mk.forSingleSegment=Ok;Mk.prototype.getIteratorForTime=Mk.prototype.Ib;Mk.prototype.updateEvery=Mk.prototype.ue;Mk.prototype.fit=Mk.prototype.Dc;Mk.prototype.evict=Mk.prototype.Ga;Mk.prototype.mergeAndEvict=Mk.prototype.rd;Mk.prototype.offset=Mk.prototype.offset;Mk.prototype.get=Mk.prototype.get;Mk.prototype.find=Mk.prototype.find;Mk.prototype.markImmutable=Mk.prototype.Bi;Mk.prototype.release=Mk.prototype.release;Mk.prototype.getNumEvicted=Mk.prototype.getNumEvicted;
|
|
430
|
+
Mk.prototype.getNumReferences=Mk.prototype.getNumReferences;function Nk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}q=Nk.prototype;q.Vc=function(a){this.reverse=a};q.Hh=function(){return this.h};q.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.s&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
431
431
|
q.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.s&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};q.If=function(){var a=this.current();if(a.o&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
|
|
432
|
-
S("shaka.media.SegmentIterator",
|
|
432
|
+
S("shaka.media.SegmentIterator",Nk);Nk.prototype.resetToLastIndependent=Nk.prototype.If;Nk.prototype.next=Nk.prototype.next;Nk.prototype.current=Nk.prototype.current;Nk.prototype.currentPosition=Nk.prototype.Hh;Nk.prototype.setReverse=Nk.prototype.Vc;function Pk(){Mk.call(this,[]);this.g=[]}na(Pk,Mk);q=Pk.prototype;q.clone=function(){var a=new Pk;a.g=this.g.slice();a.h=this.h;return a};q.release=function(){for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};
|
|
433
433
|
q.wb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.wb(a)};q.find=function(a){for(var b=this.h,c=t(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.h,c=t(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Yd=function(){};
|
|
434
|
-
q.Ga=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.Ga(a);for(;1<this.g.length&&0==this.g[0].getNumReferences();)a=this.g.shift(),this.h+=a.getNumEvicted(),a.release()};q.rd=function(){};q.
|
|
435
|
-
|
|
436
|
-
function
|
|
437
|
-
function
|
|
438
|
-
function
|
|
439
|
-
function
|
|
440
|
-
|
|
441
|
-
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Pb(d.roles,e.roles);(g||h||d)&&
|
|
442
|
-
function
|
|
443
|
-
function
|
|
444
|
-
a.language);return b};function
|
|
445
|
-
function
|
|
446
|
-
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,p=null,r=null,u=null,v=null,w;(new
|
|
447
|
-
"mp4a",B,E;z.qa();){B=z.U();for(var I=z.U();I&128;)I=z.U();if(3==B)z.oa(),I=z.U(),I&128&&z.oa(),I&64&&z.skip(z.U()),I&32&&z.oa();else if(4==B)E=z.U(),z.skip(12);else if(5==B)break}E&&(C+="."+
|
|
448
|
-
c).box("av01",c).box("avcC",function(z){var C=w||"";switch(w){case "dvav":C="avc3";break;case "dva1":C="avc1"}z=z.reader;z.skip(1);z=C+"."+
|
|
449
|
-
|
|
450
|
-
"dva1";break;case "avc3":C="dvav";break;case "av01":C="dav1"}var B=z.reader;B.skip(2);z=B.U();B=B.U();g.push(C+"."+
|
|
451
|
-
((B&16)>>4)+"."+((B&8)>>3)+((B&4)>>2)+(B&3)+"."+
|
|
452
|
-
N[7]=
|
|
453
|
-
function
|
|
454
|
-
function
|
|
455
|
-
function
|
|
456
|
-
function
|
|
457
|
-
function
|
|
458
|
-
q.configure=function(a){this.h=a;this.
|
|
459
|
-
b.W&&(
|
|
460
|
-
q.start=function(a){var b=this;return O(function(c){if(1==c.g)return F(c,
|
|
461
|
-
function
|
|
462
|
-
function
|
|
463
|
-
function
|
|
464
|
-
d,g.Be=!0):(
|
|
465
|
-
function
|
|
434
|
+
q.Ga=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.Ga(a);for(;1<this.g.length&&0==this.g[0].getNumReferences();)a=this.g.shift(),this.h+=a.getNumEvicted(),a.release()};q.rd=function(){};q.Dc=function(){};q.ue=function(){};S("shaka.media.MetaSegmentIndex",Pk);Pk.prototype.updateEvery=Pk.prototype.ue;Pk.prototype.fit=Pk.prototype.Dc;Pk.prototype.mergeAndEvict=Pk.prototype.rd;Pk.prototype.evict=Pk.prototype.Ga;Pk.prototype.merge=Pk.prototype.Yd;Pk.prototype.offset=Pk.prototype.offset;
|
|
435
|
+
Pk.prototype.get=Pk.prototype.get;Pk.prototype.find=Pk.prototype.find;Pk.prototype.forEachTopLevelReference=Pk.prototype.wb;Pk.prototype.release=Pk.prototype.release;function Qk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ld();this.h=new Rc(function(){b.g.Ng(.25*b.i)})}Qk.prototype.release=function(){this.set(this.kc());this.h&&(this.h.stop(),this.h=null);this.g=null};Qk.prototype.set=function(a){this.i=a;Rk(this)};Qk.prototype.kc=function(){return this.g.kc()};function Rk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ld()!=b&&a.g.Sf(b);return}catch(c){}a.h.Ra(.25);0!=a.g.Ld()&&a.g.Sf(0)};function Sk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Rc(function(){Tk(b,!1)})).Ra(.25)}Sk.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 Tk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Uk(){this.g=null;this.h=[]}function Vk(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 Wk(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 Xk(){this.i=this.h=null;this.g=[]}function Yk(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 Zk(){this.fc=this.Jg=this.A=this.B=this.I=this.C=this.s=this.j=this.H=this.m=this.i=this.T=this.Y=this.L=this.N=this.O=this.l=this.o=NaN;this.K=0;this.F=this.G=NaN;this.g=new Uk;this.h=new Xk};function $k(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 al(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
436
|
+
function bl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ib(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.ta&&(c=!1);2==b.Zb()&&(c=!1);b.lc()&&(c=!1);c&&b.$&&cl(a,b.$);c&&!a.h.has(b)&&(c=new dl(a.l),el(c,b,a.i),a.h.set(b,c))}fl(a)}}function cl(a,b){if(a.i.segmentIndex&&!b.lc()&&!Array.from(a.j.keys()).some(function(d){return Di(d,b)})){var c=new dl(a.l);el(c,b,a.i);a.j.set(b,c)}}
|
|
437
|
+
function gl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&hl(a,c)}function il(a){gl(a,a.h);gl(a,a.j);a.g=null}$k.prototype.Ga=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&hl(this,d);b&&fl(this)};$k.prototype.Vc=function(a){this.o=a;this.g&&this.g.Vc(a)};
|
|
438
|
+
function fl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={nf:void 0},d=c.next())e.nf=d.value,b.some(function(f){return function(g){return Di(g.$,f.nf)}}(e))||hl(a,e.nf)}function jl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&hl(a,d)}fl(a)}function kl(a,b){b&&b!==a.i&&(il(a),a.i=b)}function hl(a,b){var c=a.h;b instanceof Ci&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function dl(a){this.g=a;this.fe=this.Vf=null}
|
|
439
|
+
function el(a,b,c){var d=new Uint8Array(0);a.fe=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Kd(d,e):d=e,a.Vf?F(f,a.Vf(d),3):f.u(0);d=new Uint8Array(0);G(f)})})}dl.prototype.abort=function(){this.fe&&this.fe.abort()};function ll(a){jg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Rc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ra(2)}na(ll,jg);ll.prototype.release=function(){this.g.clear();this.h.stop();jg.prototype.release.call(this)};function ml(a){jg.call(this);this.g=new Map;this.h=a}na(ml,jg);ml.prototype.release=function(){this.g.clear();jg.prototype.release.call(this)};function nl(a,b){var c=a.g.get(b);c||(c={ud:[],Pe:null,contentType:b},a.g.set(b,c));return c}function ol(a,b,c){var d=nl(a,b.contentType);pl(a,d);a={Kc:b,position:c};d=d.ud;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
440
|
+
ml.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Pe;a:{var e=c.ud;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.Kc;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
|
|
441
|
+
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Pb(d.roles,e.roles);(g||h||d)&&ql(this,a,e.contentType)&&(c.Pe=e,d=new U("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&ql(this,a,e.contentType)&&(c.Pe=e,JSON.stringify(e),c=new U("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
|
|
442
|
+
function ql(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function pl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.ud;b.ud=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.ud=[]}
|
|
443
|
+
function rl(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
|
|
444
|
+
a.language);return b};function sl(a){var b=ie(a),c=b.split("/")[0];a=je(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,xd:null,colorGamut:null}}
|
|
445
|
+
function tl(a,b){function c(z){w=z.name;var C=z.reader;C.skip(24);var B=C.oa(),E=C.oa();C.skip(50);n=String(B);m=String(E);z.reader.qa()&&Pg(z)}function d(z){var C=aj(z.reader);p=C.channelCount;r=C.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");
|
|
446
|
+
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,p=null,r=null,u=null,v=null,w;(new Kg).box("moov",Pg).box("trak",Pg).box("mdia",Pg).S("mdhd",function(z){l=Zi(z.reader,z.version).language}).box("minf",Pg).box("stbl",Pg).S("stsd",Rg).box("mp4a",function(z){var C=aj(z.reader);p=C.channelCount;r=C.sampleRate;z.reader.qa()?Pg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var C=
|
|
447
|
+
"mp4a",B,E;z.qa();){B=z.U();for(var I=z.U();I&128;)I=z.U();if(3==B)z.oa(),I=z.U(),I&128&&z.oa(),I&64&&z.skip(z.U()),I&32&&z.oa();else if(4==B)E=z.U(),z.skip(12);else if(5==B)break}E&&(C+="."+dj(E),5==B&&z.qa()&&(B=z.U(),E=(B&248)>>3,31===E&&z.qa()&&(E=32+((B&7)<<3)+((z.U()&224)>>5)),C+="."+E));f.push(C);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",
|
|
448
|
+
c).box("av01",c).box("avcC",function(z){var C=w||"";switch(w){case "dvav":C="avc3";break;case "dva1":C="avc1"}z=z.reader;z.skip(1);z=C+"."+dj(z.U())+dj(z.U())+dj(z.U());g.push(z);k=!0}).box("hvcC",function(z){var C=w||"";switch(w){case "dvh1":C="hvc1";break;case "dvhe":C="hev1"}var B=z.reader;B.skip(1);z=B.U();var E=["","A","B","C"][z>>6],I=z&31,L=B.R(),H=(z&32)>>5?"H":"L";z=[B.U(),B.U(),B.U(),B.U(),B.U(),B.U()];B=B.U();for(var J=0,K=0;32>K;K++){J|=L&1;if(31==K)break;J<<=1;L>>=1}C=C+("."+E+I)+("."+
|
|
449
|
+
dj(J,!0));C+="."+H+B;E="";for(I=z.length;I--;)if((H=z[I])||E)E="."+H.toString(16).toUpperCase()+E;C+=E;g.push(C);k=!0}).box("dvcC",function(z){var C=w||"";switch(w){case "hvc1":C="dvh1";break;case "hev1":C="dvhe";break;case "avc1":C="dva1";break;case "avc3":C="dvav";break;case "av01":C="dav1"}var B=z.reader;B.skip(2);z=B.U();B=B.U();g.push(C+"."+ej(z>>1&127)+"."+ej(z<<5&32|B>>3&31));k=!0}).box("dvvC",function(z){var C=w||"";switch(w){case "hvc1":C="dvh1";break;case "hev1":C="dvhe";break;case "avc1":C=
|
|
450
|
+
"dva1";break;case "avc3":C="dvav";break;case "av01":C="dav1"}var B=z.reader;B.skip(2);z=B.U();B=B.U();g.push(C+"."+ej(z>>1&127)+"."+ej(z<<5&32|B>>3&31));k=!0}).S("vpcC",function(z){var C=w||"",B=z.reader;z=B.U();var E=B.U();B=B.U()>>4&15;g.push(C+"."+ej(z)+"."+ej(E)+"."+ej(B));k=!0}).box("av1C",function(z){var C=w||"";switch(w){case "dav1":C="av01"}var B=z.reader;B.skip(1);z=B.U();B=B.U();var E=z>>>5,I=(B&64)>>6;g.push(C+"."+E+"."+ej(z&31)+(B>>>7?"H":"M")+"."+ej(2===E&&I?(B&32)>>5?12:10:I?10:8)+"."+
|
|
451
|
+
((B&16)>>4)+"."+((B&8)>>3)+((B&4)>>2)+(B&3)+"."+ej(1)+"."+ej(1)+"."+ej(1)+".0");k=!0}).box("enca",Tg).box("encv",Sg).box("sinf",Pg).box("frma",function(z){z=bj(z.reader).codec;e(z)}).box("colr",function(z){g=g.map(function(E){if(E.startsWith("av01.")){var I=z.reader,L=I.wa(),H=I.rb(4);var J=String.fromCharCode(H[0]);J+=String.fromCharCode(H[1]);J+=String.fromCharCode(H[2]);J+=String.fromCharCode(H[3]);if("nclx"===J){H=I.oa();J=I.oa();var K=I.oa(),M=I.U()>>7,N=E.split(".");10==N.length&&(N[6]=ej(H),
|
|
452
|
+
N[7]=ej(J),N[8]=ej(K),N[9]=String(M),E=N.join("."))}I.seek(L)}return E});var C=cj(z.reader),B=C.colorGamut;u=C.xd;v=B}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var D=new Gb("video/mp4");a&&D.init(a);D.i(b);a=t(D.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);D.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:ul(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:y,xd:u,colorGamut:v}}
|
|
453
|
+
function ul(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=he(d);b.has(e)||(c.push(d),b.add(e))}b=Vd("audio",c);d=Vd("video",c);a=Vd(Ud,c);d=vl(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
454
|
+
function vl(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?lb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
455
|
+
function wl(a){var b=null;(new Kg).box("moov",Pg).box("trak",Pg).box("mdia",Pg).box("minf",Pg).box("stbl",Pg).S("stsd",Rg).box("encv",Sg).box("enca",Tg).box("sinf",Pg).box("schi",Pg).S("tenc",function(c){c=c.reader;c.U();c.U();c.U();c.U();b=Jd(c.rb(16))}).parse(a,!0);return b}
|
|
456
|
+
function xl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=zb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function yl(a,b,c,d,e){a=rg(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.G=new Map;this.B=1;this.s=this.j=null;this.K=0;this.H=!1;this.i=new Map;this.F=!1;this.L=null;this.A=!1;this.m=new zg(function(){return Al(c)});this.N=Date.now()/1E3;this.o=new Map;this.I={projection:null,hfov:null};this.T=0;this.O=Infinity;this.C=null}q=zl.prototype;q.destroy=function(){return this.m.destroy()};
|
|
457
|
+
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.W&&(il(e.W),e.W=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,il(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)})}
|
|
458
|
+
q.configure=function(a){this.h=a;this.L=new Xf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.W&&(il(b.W),b.W=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,il(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Ud))&&
|
|
459
|
+
b.W&&(il(b.W),b.W=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.W&&(il(b.W),b.W=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.W?(jl(c.W,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(il(c.W),c.W=null)):0<a.segmentPrefetchLimit&&(c.W=Dl(this,c.stream));a.disableAudioPrefetch||El(this)};function Fl(a,b,c){a.l.presentationTimeline.V()||(a.T=b,a.O=c)}
|
|
460
|
+
q.start=function(a){var b=this;return O(function(c){if(1==c.g)return F(c,Gl(b,a||new Map),2);Ag(b.m);b.F=!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=Wd,a.K++,d=a.K,ra(l,2),F(l,fk(a.g.aa,c.ua),4);case 4:ta(l,3);break;case 2:if(e=ua(l),a.g)a.g.onError(e);case 3:f=Zd(b.mimeType,b.codecs),Oj(a.g.aa,f,a.l.sequenceMode,b.external),g=a.g.aa.C,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.K==d&&(k=Il(a,b),a.i.set(c.ua,k),Jl(a,k,0)),G(l)}})}
|
|
461
|
+
function Kl(a){var b=a.i.get(Ud);b&&(Bl(b),Cl(b).catch(function(){}),a.C=a.i.get(Ud),a.i.delete(Ud));a.s=null}function Ll(a,b){for(var c=0>a.g.fb(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.fa&&e.fa.Vc(c),e.W&&e.W.Vc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Vc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.ac&&(Ml(a,b,!1,0,!1),c.ac=d);else if(b=c.ac)c.ac=null,Ml(a,b,!0,0,!1)}
|
|
462
|
+
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.F&&(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.C=null,a.s=b,a.F?b.segmentIndex?c.u(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.G.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.G.delete(d))}}
|
|
463
|
+
function Ml(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ud?g&&(g.ac&&(b.trickModeVideo?(g.ac=b,b=b.trickModeVideo):g.ac=null),g.stream!=b||e)&&(a.o.has(b)?g.W=a.o.get(b):g.W&&kl(g.W,b),b.type==Ud&&(e=Zd(b.mimeType,b.codecs),Oj(a.g.aa,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ka?(e="("+g.type+":"+g.stream.id+")",a.G.has(e)||a.G.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.fa=null,g.ig=!!f,c?g.Yc?g.Be=!0:g.Ka?(g.ec=!0,g.Gd=
|
|
464
|
+
d,g.Be=!0):(Bl(g),Ql(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ka||g.ub||Jl(a,g,0),Rl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Hl(a,b)}
|
|
465
|
+
function Rl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.jb)return e.return();c=b.stream;d=b.jb;return c.segmentIndex?e.u(2):F(e,c.createSegmentIndex(),2)}if(b.jb!=d||b.stream!=c)return e.return();var f=a.g.dd();var g=Uj(a.g.aa,b.type),h=b.stream.segmentIndex.find(b.Na?b.Na.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ta?k.ta-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.$)&&(h+=(k.ta?k.ta-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
|
|
466
466
|
f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.jb.h.g>h?!0:!1):f=!1;f&&b.jb.abort();G(e)})}
|
|
467
|
-
q.Tc=function(){if(this.g)for(var a=this.g.dd(),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.aa;d==Ud?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=
|
|
468
|
-
function
|
|
469
|
-
function
|
|
470
|
-
b.get(l.id),
|
|
471
|
-
function
|
|
472
|
-
function
|
|
467
|
+
q.Tc=function(){if(this.g)for(var a=this.g.dd(),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.aa;d==Ud?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Tj(e,d),e=Ki(e,a));if(!e){c.W&&(c.W.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.fa=null;(null!=Uj(this.g.aa,d)||c.Ka)&&Sl(this,c);c.jb&&(c.jb.abort(),c.jb=null);d===Ud&&(d=this.g.aa,d.G&&d.G.g());c.Tc=!0}}};
|
|
468
|
+
function Sl(a,b){b.Yc||b.ec||(b.Ka?(b.ec=!0,b.Gd=0):null==Sj(a.g.aa,b.type)?null==b.ub&&Jl(a,b,0):(Bl(b),Ql(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
469
|
+
function Gl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Wd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.X,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ja,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ua,a.s),e.add(a.s));f=a.g.aa;return F(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Ag(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=
|
|
470
|
+
b.get(l.id),al(n,function(r,u,v){return Tl(r,u,v||null,a.h.retryParameters,a.g.Mb)}),m.W=n),a.i.set(k,m),Jl(a,m,0));G(p)})}function Il(a,b){return{stream:b,type:b.type,fa:null,W:Dl(a,b),Na:null,Jc:null,Ud:null,Td:null,Sd:null,ac:null,endOfStream:!1,Ka:!1,ub:null,ec:!1,Gd:0,Be:!1,Yc:!1,Tc:!0,Gf:!1,hd:!1,jb:null}}
|
|
471
|
+
function Dl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ud&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ud&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.W)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new $k(a.h.segmentPrefetchLimit,b,function(d,e,f){return Tl(d,e,f||null,a.h.retryParameters,a.g.Mb)},0>a.g.fb()):null}
|
|
472
|
+
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={mb:void 0},e=d.next())if(f.mb=e.value,f.mb.audio)if(a.o.has(f.mb.audio)){if(e=a.o.get(f.mb.audio),jl(e,b),!(0<b&&c.some(function(h){return function(k){return Ae(h.mb.audio.language,k)}}(f)))){var g=a.i.get(f.mb.audio.type);e!==(g&&g.W)&&il(e);a.o.delete(f.mb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Ae(h.mb.audio.language,k)}}(f))||!(e=Dl(a,f.mb.audio))||
|
|
473
473
|
(f.mb.audio.segmentIndex||f.mb.audio.createSegmentIndex(),a.o.set(f.mb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.aa.Za(a):this.g.aa.Za(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
474
|
-
function
|
|
475
|
-
|
|
476
|
-
function
|
|
477
|
-
!0,"video"==b.type&&(a=a.i.get(Ud))&&
|
|
478
|
-
e.startTime))
|
|
479
|
-
function
|
|
480
|
-
function
|
|
481
|
-
v=!0;
|
|
482
|
-
if(v){B.u(10);break}u=!0;
|
|
483
|
-
B.u(0);else{if(3017==C.code)return F(B,
|
|
484
|
-
function
|
|
485
|
-
function
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
function
|
|
490
|
-
function
|
|
491
|
-
if(0===A.version){var D=A.reader.
|
|
492
|
-
value:z,timescale:C,presentationTimeDelta:B,eventDuration:E,id:I,messageData:A}),C=new U("emsg",C),C.cancelable=!0,a.g.onEvent(C),!C.defaultPrevented&&("https://aomedia.org/emsg/ID3"==D||"https://developer.apple.com/streaming/emsg-id3"==D)&&(D=
|
|
493
|
-
32)+y);A=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+A)).getTime();y=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-y/e.$.timescale*1E3)});y=new U("prft",y);a.g.onEvent(y);a.H=!0}});u&&l.box("moof",
|
|
494
|
-
g);return F(w,
|
|
495
|
-
function
|
|
496
|
-
function
|
|
497
|
-
function
|
|
498
|
-
function
|
|
499
|
-
function
|
|
500
|
-
function
|
|
501
|
-
function
|
|
502
|
-
function
|
|
503
|
-
function
|
|
504
|
-
function
|
|
505
|
-
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&Ya("Unexpected number of arguments for "+m),a[l]=b[l]):(Xa("Invalid config, unrecognized key "+m),k=!1)}return k}function
|
|
506
|
-
function
|
|
507
|
-
m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",
|
|
508
|
-
function
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
function
|
|
513
|
-
(Yc()||id())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!ob()||bd()||ad()||Zc("Tizen 4")||Zc("Tizen 5")||Zc("Tizen 6")||dd()||cd()&&53===ed()||cd()&&68===ed()||id()||jd()||!(!fd()||fd()&&nd()||fd()&&Zc("Fuchsia"))||md()&&Wc()||(c="smooth",d=!0);d={retryParameters:
|
|
474
|
+
function Ul(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Ag(a.m);if(b.Ka||null==b.ub||b.Yc)return k.return();b.ub=null;if(!b.ec){k.u(2);break}return F(k,Ql(a,b,b.Be,b.Gd),3);case 3:return k.return();case 2:Pl(a,b);if(b.stream.segmentIndex){k.u(4);break}c=b.stream;ra(k,5);return F(k,b.stream.createSegmentIndex(),7);case 7:ta(k,6);break;case 5:return d=ua(k),F(k,Vl(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ka||b.ub||
|
|
475
|
+
Jl(a,b,0),k.return();case 4:ra(k,9);e=Wl(a,b);null!=e&&(Jl(a,b,e),b.hd=!1);ta(k,10);break;case 9:return f=ua(k),F(k,Vl(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.F||!g.every(function(l){return l.endOfStream})){k.u(0);break}return F(k,a.g.aa.endOfStream(),13);case 13:Ag(a.m),h=a.g.aa.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Za(h),G(k)}})}
|
|
476
|
+
function Wl(a,b){if(Xl(b))return ck(a.g.aa,b.stream.originalId||""),null;b.type==Ud&&dk(a.g.aa);if(!a.g.aa.ea&&b.type!=Ud)return a.h.updateIntervalSeconds/2;var c=a.g.dd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ga(c,!0),bl(e,c);d=b.Na?b.Na.endTime:c;var f=Vj(a.g.aa,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),h=a.l.presentationTimeline.getDuration()-d;e=Uj(a.g.aa,b.type);if(1E-6>h&&e)return b.endOfStream=
|
|
477
|
+
!0,"video"==b.type&&(a=a.i.get(Ud))&&Xl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.fa;e=Yl(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.ig&&(f=!0,b.ig=!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.fa&&!k.fa.current()||(g=Math.min(g,k.Na?k.Na.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.W&&b.fa&&!a.o.has(b.stream)&&(b.W.Ga(e.startTime),bl(b.W,
|
|
478
|
+
e.startTime));Zl(a,b,c,e,f).catch(function(){});return null}
|
|
479
|
+
function Yl(a,b,c,d){if(b.fa)return b.fa.current();if(b.Na||d)return c=b.Na?b.Na.endTime:d,a=0>a.g.fb(),b.stream.segmentIndex&&(b.fa=b.stream.segmentIndex.Ib(c,!1,a)),b.fa&&b.fa.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.fb();var f=null;d&&(b.stream.segmentIndex&&(b.fa=b.stream.segmentIndex.Ib(e,!1,a)),f=b.fa&&b.fa.next().value);f||(b.stream.segmentIndex&&(b.fa=b.stream.segmentIndex.Ib(c,!1,a)),f=b.fa&&b.fa.next().value);return f}
|
|
480
|
+
function Zl(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C;return O(function(B){switch(B.g){case 1:f=Wd;g=b.stream;h=b.fa;b.Ka=!0;ra(B,2);if(2==d.Zb())throw new T(1,1,1011);return F(B,$l(a,b,d,e),4);case 4:Ag(a.m);if(a.A)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.l.isLowLatency)&&l&&k&&("HLS"!=a.l.type||d.m))return r=new Uint8Array(0),v=u=!1,A=function(E){var I,L,H,J;return O(function(K){switch(K.g){case 1:if(u)return K.return();
|
|
481
|
+
v=!0;Ag(a.m);if(a.A)return K.return();ra(K,2);r=am(r,E);I=!1;L=0;(new Kg).box("mdat",function(M){L=M.size+M.start;I=!0}).parse(r,!1,!0);if(!I){K.u(4);break}H=r.subarray(0,L);r=r.subarray(L);return F(K,bm(a,b,c,g,d,H,!0,e),5);case 5:b.W&&b.fa&&bl(b.W,d.startTime,!0);case 4:ta(K,0);break;case 2:w=J=ua(K),G(K)}})},F(B,cm(a,b,d,A),9);n=cm(a,b,d);return F(B,n,7);case 7:p=B.h;Ag(a.m);if(a.A)return B.return();Ag(a.m);return b.ec?(b.Ka=!1,Jl(a,b,0),B.return()):F(B,bm(a,b,c,g,d,p,!1,e),6);case 9:y=B.h;if(w)throw w;
|
|
482
|
+
if(v){B.u(10);break}u=!0;Ag(a.m);return a.A?B.return():b.ec?(b.Ka=!1,Jl(a,b,0),B.return()):F(B,bm(a,b,c,g,d,y,!1,e),10);case 10:b.W&&b.fa&&bl(b.W,d.startTime,!0);case 6:Ag(a.m);if(a.A)return B.return();b.Na=d;h.next();b.Ka=!1;b.Gf=!1;D=a.g.aa.xb();z=D[b.type];db(JSON.stringify(z));b.ec||a.g.Bf(d,b.stream);Jl(a,b,0);ta(B,0);break;case 2:C=ua(B);Ag(a.m,C);if(a.A)return B.return();b.Ka=!1;if(7001==C.code)b.Ka=!1,Bl(b),Jl(a,b,0),B.u(0);else if(b.type==f.ua&&a.h.ignoreTextStreamFailures)a.i.delete(f.ua),
|
|
483
|
+
B.u(0);else{if(3017==C.code)return F(B,dm(a,b,C),0);b.hd=!0;1==C.category&&b.W&&hl(b.W,d);C.severity=2;return F(B,Vl(a,b,C),0)}}})}function am(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
484
|
+
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.Gf}))return l.u(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.B);if(20<h)a.B-=.2;else if(4<h)a.B-=.04;else return b.hd=!0,a.A=!0,a.g.onError(c),l.return();b.Gf=!0;k=a.g.dd();return F(l,em(a,b,k),2)}Jl(a,b,4);G(l)})}
|
|
485
|
+
function $l(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:e=Wd;f=null==b.Na;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.T)-.1);k=Math.min(c.appendWindowEnd,a.O)+.01;l=c.codecs||b.stream.codecs;m=he(l);n=ie(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.Ud&&h==b.Td&&k==b.Sd&&m==b.uf&&n==b.vf){z.u(2);break}r=b.uf&&b.vf&&pk(a.g.aa,b.type,n,l);if(!r){z.u(3);break}u=null;b.type===e.ja?u=a.i.get(e.X):b.type===e.X&&(u=a.i.get(e.ja));if(!u){z.u(3);break}return F(z,
|
|
486
|
+
Cl(u).catch(function(){}),5);case 5:u.Jc=null,Sl(a,u);case 3:return F(z,fm(a,b,p,h,k,c,m,n),2);case 2:return Di(c.$,b.Jc)||(b.Jc=c.$,c.l&&c.$&&(v=cm(a,b,c.$),w=function(){var C,B,E,I,L,H,J;return O(function(K){switch(K.g){case 1:return ra(K,2),F(K,v,4);case 4:return C=K.h,Ag(a.m),B=null,E=new Map,I={projection:null,hfov:null},L=new Kg,L.box("moov",Pg).box("trak",Pg).box("mdia",Pg).S("mdhd",function(M){B=Zi(M.reader,M.version).timescale}).box("hdlr",function(M){M=M.reader;M.skip(8);switch(M.rc()){case "soun":E.set(e.X,
|
|
487
|
+
B);break;case "vide":E.set(e.ja,B)}B=null}).box("minf",Pg).box("stbl",Pg).S("stsd",Rg).box("encv",Sg).box("avc1",Sg).box("avc3",Sg).box("hev1",Sg).box("hvc1",Sg).box("dvav",Sg).box("dva1",Sg).box("dvh1",Sg).box("dvhe",Sg).box("dvc1",Sg).box("dvi1",Sg).box("vexu",Pg).box("proj",Pg).S("prji",function(M){M=M.reader.rc();I.projection=M}).box("hfov",function(M){M=M.reader.R()/1E3;I.hfov=M}).parse(C),gm(a,I),E.has(b.type)?c.$.timescale=E.get(b.type):null!=B&&(c.$.timescale=B),H=b.stream.closedCaptions&&
|
|
488
|
+
0<b.stream.closedCaptions.size,F(K,a.g.lg(b.type,C),5);case 5:return F(K,Xj(a.g.aa,b.type,C,null,b.stream,H,b.Tc,d),6);case 6:ta(K,0);break;case 2:throw J=ua(K),b.Jc=null,J;}})},A=c.startTime,f&&(y=Uj(a.g.aa,b.type),null!=y&&(A=y)),a.g.Di(A,c.$),g.push(w()))),a.l.sequenceMode&&(D=b.Na?b.Na.i:null,c.i!=D&&g.push(ik(a.g.aa,b.type,c.startTime))),F(z,Promise.all(g),0)}})}
|
|
489
|
+
function fm(a,b,c,d,e,f,g,h){var k,l,m,n;return O(function(p){if(1==p.g)return k=Wd,l=new Map,a.j.audio&&l.set(k.X,a.j.audio),a.j.video&&l.set(k.ja,a.j.video),ra(p,2),b.Td=d,b.Sd=e,g&&(b.uf=g),h&&(b.vf=h),b.Ud=c,m=a.l.sequenceMode||"HLS"==a.l.type,F(p,gk(a.g.aa,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return ta(p,0);n=ua(p);b.Td=null;b.Sd=null;b.uf=null;b.vf=null;b.Ud=null;throw n;})}
|
|
490
|
+
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,p,r,u,v;return O(function(w){switch(w.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.H;p="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;r=null;e.$&&(r=e.$.timescale);u=p&&r&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(m||n||u)l=new Kg;m&&l.S("emsg",function(A){var y=d.emsgSchemeIdUris;
|
|
491
|
+
if(0===A.version){var D=A.reader.rc();var z=A.reader.rc();var C=A.reader.R();var B=A.reader.R();var E=A.reader.R();var I=A.reader.R();var L=e.startTime+B/C}else C=A.reader.R(),L=A.reader.Qc()/C+e.timestampOffset,B=L-e.startTime,E=A.reader.R(),I=A.reader.R(),D=A.reader.rc(),z=A.reader.rc();A=A.reader.rb(A.reader.getLength()-A.reader.wa());if(y&&y.includes(D)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==D)a.g.Ei();else if(y=L+E/C,C=(new Map).set("detail",{startTime:L,endTime:y,schemeIdUri:D,
|
|
492
|
+
value:z,timescale:C,presentationTimeDelta:B,eventDuration:E,id:I,messageData:A}),C=new U("emsg",C),C.cancelable=!0,a.g.onEvent(C),!C.defaultPrevented&&("https://aomedia.org/emsg/ID3"==D||"https://developer.apple.com/streaming/emsg-id3"==D)&&(D=Vi(A),D.length))a.g.onMetadata([{cueTime:L,data:A,frames:D,dts:L,pts:L}],0,y)});n&&l.S("prft",function(A){if(!a.H&&e.$.timescale){var y=A.reader,D=A.version;y.R();A=y.R();var z=y.R();A=1E3*A+z/Math.pow(2,32)*1E3;0===D?y=y.R():(D=y.R(),y=y.R(),y=D*Math.pow(2,
|
|
493
|
+
32)+y);A=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+A)).getTime();y=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-y/e.$.timescale*1E3)});y=new U("prft",y);a.g.onEvent(y);a.H=!0}});u&&l.box("moof",Pg).box("traf",Pg).S("tfdt",function(A){var y,D,z,C,B,E;return O(function(I){y=Yi(A.reader,A.version);D=y.baseMediaDecodeTime;if(!D)return I.return();z=-D/r;C=Number(b.Ud)||0;if(!(C<z))return I.u(0);B=b.Td;E=b.Sd;return F(I,fm(a,b,z,B,E,e),0)})});(m||n||u)&&l.parse(f,!1,
|
|
494
|
+
g);return F(w,em(a,b,c),2);case 2:return Ag(a.m),v=b.Tc,b.Tc=!1,F(w,a.g.lg(b.type,f),3);case 3:return F(w,Xj(a.g.aa,b.type,f,e,d,k,v,h,g),4);case 4:Ag(a.m),G(w)}})}
|
|
495
|
+
function em(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof Pk&&d.Ga(a.l.presentationTimeline.Jb());e=Math.max(a.h.bufferBehind*a.B,a.l.presentationTimeline.h);f=Sj(a.g.aa,b.type);if(null==f)return a.C==b&&(a.C=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():F(k,a.g.aa.remove(b.type,f,f+h),2)}if(4!=k.g)return Ag(a.m),a.C?F(k,em(a,a.C,c),4):k.u(0);Ag(a.m);G(k)})}
|
|
496
|
+
function Xl(a){return a&&a.type==Ud&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
497
|
+
function cm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.lc())return l.return(e);f=null;if(b.W){var m=b.W,n=m.h;c instanceof Ci&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Vf=d),f=m.fe):f=null}f||(f=Tl(c,b.stream,d||null,a.h.retryParameters,a.g.Mb));g=0;b.fa&&(g=b.fa.h);b.jb=f;return F(l,f.promise,2);case 2:h=l.h;b.jb=null;k=h.data;if(!c.aesKey){l.u(3);break}return F(l,xl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
498
|
+
function Tl(a,b,c,d,e){var f=a instanceof Ei?a:void 0,g=f?1:0;a=yl(a.M(),a.Ha,a.ta,d,c);a.contentType=b.type;return e.request(xg,a,{type:g,stream:b,segment:f})}
|
|
499
|
+
function Ql(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.ec=!1,b.Be=!1,b.Gd=0,b.Yc=!0,b.Na=null,b.fa=null,b.W&&!a.o.has(b.stream)&&il(b.W),d?(e=a.g.dd(),f=a.g.aa.getDuration(),F(g,a.g.aa.remove(b.type,e+d,f),3)):F(g,fk(a.g.aa,b.type),4);if(3!=g.g)return Ag(a.m),c?F(g,a.g.aa.flush(b.type),3):g.u(3);Ag(a.m);b.Yc=!1;b.endOfStream=!1;b.Ka||b.ub||Jl(a,b,0);G(g)})}
|
|
500
|
+
function Jl(a,b,c){var d=b.type;if(d!=Ud||a.i.has(d))b.ub=(new Qc(function(){var e;return O(function(f){if(1==f.g)return ra(f,2),F(f,Ul(a,b),4);if(2!=f.g)return ta(f,0);e=ua(f);if(a.g)a.g.onError(e);G(f)})})).Z(c)}function Bl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function Cl(a){return O(function(b){return a.jb?F(b,a.jb.abort(),0):b.u(0)})}
|
|
501
|
+
function Vl(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,Zf(a.L),2);Ag(a.m);if(1===c.category&&1003!=c.code){if(b.ac)return Ll(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);G(e)})}
|
|
502
|
+
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.N<c)return h.return(!1);a.N=b;d=Wd;if(e=a.i.get(d.X))e.Jc=null,Sl(a,e),Cl(e).catch(function(){}),e.fa&&e.fa.If();if(f=a.i.get(d.ja))f.Jc=null,Sl(a,f),Cl(f).catch(function(){}),f.fa&&f.fa.If();g=new Map;a.j.audio&&g.set(d.X,a.j.audio);a.j.video&&g.set(d.ja,a.j.video);return F(h,ok(a.g.aa,g),2)}return h.return(!0)})}
|
|
503
|
+
function gm(a,b){if(a.I.projection!=b.projection||a.I.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.I=b}};function im(){}
|
|
504
|
+
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]=Je(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Je(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?(Xa("Invalid config, wrong type for "+m),
|
|
505
|
+
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&Ya("Unexpected number of arguments for "+m),a[l]=b[l]):(Xa("Invalid config, unrecognized key "+m),k=!1)}return k}function 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}
|
|
506
|
+
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]=
|
|
507
|
+
m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",im);im.getDifferenceFromConfigObjects=mm;im.convertToConfigObject=km;im.mergeConfigObjects=jm;function nm(){}function om(a){a=zd(a);return(new tc(a)).Fb}function pm(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(zb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Bd(b,!0):e=b;a=zd(a);a=Bd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function qm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split("skd://").pop();return pm(a,c,b)}
|
|
508
|
+
function rm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",nm);nm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=ud(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Ab(Hd(c)))}};nm.expressplayFairPlayRequest=function(a,b){rm(a,b)};
|
|
509
|
+
nm.conaxFairPlayRequest=function(a,b){rm(a,b)};nm.ezdrmFairPlayRequest=function(a,b){rm(a,b)};nm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=zb(b.body),a=Gd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ad("spc="+a))};nm.expressplayInitDataTransform=function(a,b,c){return qm(a,b,c)};
|
|
510
|
+
nm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(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=zd(a).split(";").pop();return pm(a,c,b)};nm.verimatrixInitDataTransform=function(a,b,c){return qm(a,b,c)};nm.initDataTransform=pm;
|
|
511
|
+
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"'}]},ra(b,2),F(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);ua(b);return b.return(!1)})};function sm(){}
|
|
512
|
+
function tm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Yf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){rd()&&"skd"==n&&(n=p.serverCertificate,p=om(m),m=pm(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Yc(),minHdcpVersion:"",ignoreDuplicateInitData:!bd()};
|
|
513
|
+
(Yc()||id())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!ob()||bd()||ad()||Zc("Tizen 4")||Zc("Tizen 5")||Zc("Tizen 6")||dd()||cd()&&53===ed()||cd()&&68===ed()||id()||jd()||!(!fd()||fd()&&nd()||fd()&&Zc("Fuchsia"))||md()&&Wc()||(c="smooth",d=!0);d={retryParameters:Yf(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,
|
|
514
514
|
continueLoadingWhenPaused:!0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
515
|
-
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:
|
|
516
|
-
useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:ad()||bd()||dd()||id()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:
|
|
515
|
+
"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"',
|
|
516
|
+
useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:ad()||bd()||dd()||id()?!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:Yf(),failureCallback:function(m){return lm([m])},
|
|
517
517
|
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,
|
|
518
518
|
parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,
|
|
519
519
|
vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:id()||jd(),dontChooseCodecs:!1,shouldFixTimestampOffset:cd()||$c()};if(cd()||$c()||fd()||kd())e.stallSkip=0;$c()&&(e.gapPadding=2);var f={trackSelectionCallback:function(m){return O(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return O(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?F(p,navigator.storage.estimate(),3):p.return(!0);
|
|
520
|
-
n=p.h;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return
|
|
521
|
-
advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:gd()?.5:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return
|
|
520
|
+
n=p.h;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return lm([m,n])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},
|
|
521
|
+
advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:gd()?.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;od()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,
|
|
522
522
|
mediaSource:c,offline:f,abrFactory:function(){return new wf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
|
|
523
523
|
minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,
|
|
524
|
-
drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(
|
|
525
|
-
function
|
|
526
|
-
function
|
|
527
|
-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ud&&"image"!=c.type||b.push(c);return b}function
|
|
528
|
-
function
|
|
529
|
-
function
|
|
530
|
-
q.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return ra(c,3),F(c,
|
|
531
|
-
if(a.Ca){var d=a.g.abrFactory;a.B=d;a.i=d();a.i.configure(a.g.abr)}if(a.Fa){d=a.h.presentationTimeline.V();var e=tf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant())a.ma=e,e.video&&
|
|
532
|
-
q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function
|
|
533
|
-
function
|
|
534
|
-
function
|
|
535
|
-
Promise.resolve(),7);case 7:a.dispatchEvent(f),G(g)}})}q.configure=function(a,b){a=
|
|
536
|
-
function
|
|
537
|
-
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.
|
|
538
|
-
function
|
|
539
|
-
"regionremove",function(d){c.g.delete(d.region)})}na(
|
|
540
|
-
function
|
|
524
|
+
drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(wm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
525
|
+
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,"")}
|
|
526
|
+
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=Ie(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Be(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
527
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ud&&"image"!=c.type||b.push(c);return b}function um(a){return lm([a],a)}function vm(a){return lm([a],a)}S("shaka.util.PlayerConfiguration",sm);sm.mergeConfigObjects=xm;sm.createDefault=tm;function ym(a,b,c,d){jg.call(this);this.L=a;this.T=b;this.Da=d.networkingEngine;this.A=c;this.o=null;this.va=0;this.ab=d.Ac;this.C=d.yi;this.bb=d.zi;this.g=d.config;this.j=this.F=this.h=null;this.ia=!1;this.G=d.Ii;this.na=!1;this.l=null;this.da=!1;this.i=this.B=null;this.ba=!1;this.K=new Map;this.ra=!1;this.Ea=d.Hi;this.Y=new Zk;this.ea=new $f;this.m=new $f;this.N=null;this.s=!1;this.Fa=d.Bh;this.ma=null;this.Ca=d.Ah;this.O=!1;this.I=[];this.H=[]}na(ym,jg);
|
|
528
|
+
function zm(a,b,c){(a=b?a.H:a.I)?a.push(c):c()}function Am(a){if(a.H)for(var b=t(a.H),c=b.next();!c.done;c=b.next())c=c.value,c();a.H=null}function Bm(a,b){a.N=b;a.O=!0;if(a.I){b=t(a.I);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.I=null}q=ym.prototype;q.getStartTime=function(){return this.A};q.Fc=function(){return this.L};q.gf=function(){return this.h};function Cm(a){a.ba=!0;return a.i}function Dm(a){a.na=!0;return a.G}q.getStats=function(){return this.Y};
|
|
529
|
+
function Em(a){a.da=!0;return a.l}function Fm(a){a.ra=!0;return a.K}
|
|
530
|
+
q.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return ra(c,3),F(c,Gm(a),5);case 5:return Hm(a),F(c,Im(a),6);case 6:Hm(a);a.o||(a.o=new Jf(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,""));
|
|
531
|
+
if(a.Ca){var d=a.g.abrFactory;a.B=d;a.i=d();a.i.configure(a.g.abr)}if(a.Fa){d=a.h.presentationTimeline.V();var e=tf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant())a.ma=e,e.video&&Jm(a,e.video,d),e.audio&&Jm(a,e.audio,d)}return F(c,void 0,7);case 7:Hm(a);a.m.resolve();ta(c,0);break;case 3:b=ua(c),a.m.reject(b),G(c)}})})()};q.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):jg.prototype.dispatchEvent.call(this,a)};
|
|
532
|
+
q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Hm(a){if(a.s)throw new T(2,7,7003);}function Km(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
|
|
533
|
+
function Gm(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:Km(a,"manifest-parser");a.j||(a.F=wi(a.L,a.T),a.j=a.F(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Km(a,"manifest");if(a.h){f.u(2);break}return F(f,a.j.start(a.L,a.bb),3);case 3:a.h=f.h;case 2:return a.ea.resolve(),c=new U("manifestparsed",void 0),F(f,Promise.resolve(),4);case 4:a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);Lm(a.h);d=Date.now()/1E3;e=d-b;a.Y.H=e;G(f)}})}
|
|
534
|
+
function Im(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Km(a,"drm-engine");a.va=Date.now()/1E3;a.l=a.ab();a.C.g=a.l;a.l.configure(a.g.drm);var h=a.C;b=Qe(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return F(g,Promise.resolve(),3);case 3:Hm(a),a.dispatchEvent(c);case 2:return d=tf(a.h.variants),F(g,Mh(a.l,d,a.h.offlineSessionIds),4);case 4:return Hm(a),F(g,qi(a.C,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return F(g,
|
|
535
|
+
Promise.resolve(),7);case 7:a.dispatchEvent(f),G(g)}})}q.configure=function(a,b){a=km(a,b);xm(this.g,a)};q.getConfiguration=function(){return Je(this.g)};
|
|
536
|
+
function Jm(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 $k(d,b,function(l,m,n){return Tl(l,m,n||null,a.g.streaming.retryParameters,a.Da)},!1),a.K.set(b.id,e),F(k,b.createSegmentIndex(),2);f=a.A||0;(h=(g=b.segmentIndex.Ib(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.$&&cl(e,h.$):bl(e,h.startTime));G(k)})}q.ij=function(){return this.m};
|
|
537
|
+
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ia){e.u(2);break}return F(e,a.j.stop(),2);case 2:if(!a.i||a.ba){e.u(4);break}return F(e,a.i.stop(),4);case 4:a.G&&!a.na&&a.G.release();if(!a.l||a.da){e.u(6);break}return F(e,a.l.destroy(),6);case 6:if(0<a.K.size&&!a.ra)for(b=t(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,il(d);G(e)}})};
|
|
538
|
+
function Lm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",ym);ym.prototype.destroy=ym.prototype.destroy;ym.prototype.waitForFinish=ym.prototype.ij;function Mm(a,b){jg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{yc:null,xc:Nm,nc:function(d,e){return Om(c,"enter",d,e)}},{yc:Pm,xc:Nm,nc:function(d,e){return Om(c,"enter",d,e)}},{yc:Qm,xc:Nm,nc:function(d,e){return Om(c,"enter",d,e)}},{yc:Nm,xc:Pm,nc:function(d,e){return Om(c,"exit",d,e)}},{yc:Nm,xc:Qm,nc:function(d,e){return Om(c,"exit",d,e)}},{yc:Pm,xc:Qm,nc:function(d,e){return Om(c,"skip",d,e)}},{yc:Qm,xc:Pm,nc:function(d,e){return Om(c,"skip",d,e)}}];this.h=new gb;this.h.D(this.i,
|
|
539
|
+
"regionremove",function(d){c.g.delete(d.region)})}na(Mm,jg);Mm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;jg.prototype.release.call(this)};Mm.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?Pm:a>d.endTime?Qm:Nm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.yc==e&&h.xc==f&&h.nc(d,b)}}};
|
|
540
|
+
function Om(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Pm=1,Nm=2,Qm=3;function Rm(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new tc(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Sm[d])return m.return(e);f=0;g=rg([a],c);ra(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=ua(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return F(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
541
541
|
e.toLowerCase().split(";").shift():"")}})}
|
|
542
|
-
var
|
|
543
|
-
jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function
|
|
542
|
+
var Sm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa",
|
|
543
|
+
jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function Tm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Tm(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Um(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Um(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);
|
|
544
544
|
h=k.next().value;k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
545
|
-
function
|
|
546
|
-
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function
|
|
547
|
-
function
|
|
548
|
-
function
|
|
549
|
-
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function
|
|
550
|
-
q.append=function(a){var b=
|
|
551
|
-
c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(
|
|
552
|
-
function
|
|
553
|
-
|
|
554
|
-
q.append=function(a){var b=[].concat(x(this.h));a=t(
|
|
555
|
-
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});
|
|
556
|
-
function
|
|
557
|
-
r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.
|
|
558
|
-
function
|
|
545
|
+
function Um(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
546
|
+
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Vm(a,b){var c=[];a=t(Wm(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(Vm(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Tm(d,b);c.push(e)}return c}
|
|
547
|
+
function Wm(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Me:void 0},c=a.next())d.Me=c.value,b.some(function(e){return function(f){return dc(e.Me,f)}}(d))||b.push(d.Me);return b}
|
|
548
|
+
function Xm(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
|
|
549
|
+
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function Ym(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}q=Ym.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;on(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
550
|
+
q.append=function(a){var b=Vm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={Ic:void 0},d=b.next())e.Ic=d.value,!a.some(function(f){return function(g){return g.startTime==f.Ic.startTime&&g.endTime==f.Ic.endTime&&g.text==f.Ic.payload?!0:!1}}(e))&&e.Ic.payload&&(d=Xm(e.Ic))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):
|
|
551
|
+
c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(on(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
552
|
+
function on(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",Ym);Ym.prototype.setTextVisibility=Ym.prototype.setTextVisibility;Ym.prototype.isTextVisible=Ym.prototype.isTextVisible;Ym.prototype.destroy=Ym.prototype.destroy;Ym.prototype.append=Ym.prototype.append;Ym.prototype.remove=Ym.prototype.remove;Ym.prototype.configure=Ym.prototype.configure;function pn(){}q=pn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",pn);pn.prototype.setTextVisibility=pn.prototype.setTextVisibility;pn.prototype.isTextVisible=pn.prototype.isTextVisible;pn.prototype.destroy=pn.prototype.destroy;pn.prototype.append=pn.prototype.append;pn.prototype.remove=pn.prototype.remove;pn.prototype.configure=pn.prototype.configure;function qn(){}function rn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",qn);qn.removeAllChildren=rn;function sn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||qb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Rc(function(){d.A.paused||
|
|
553
|
+
tn(d)})).Ra(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new gb;this.j.D(document,"fullscreenchange",function(){tn(d,!0)});this.j.D(this.A,"seeking",function(){tn(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){tn(d,!0)}),this.o.observe(this.g));this.B=new Map}q=sn.prototype;q.configure=function(a){this.C&&this.C.Ra(a.captionsUpdatePeriod)};
|
|
554
|
+
q.append=function(a){var b=[].concat(x(this.h));a=t(Wm(a));for(var c=a.next(),d={};!c.done;d={Ne:void 0},c=a.next())d.Ne=c.value,b.some(function(e){return function(f){return dc(f,e.Ne)}}(d))||this.h.push(d.Ne);tn(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
555
|
+
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});tn(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function un(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
556
|
+
function vn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.th:null;l&&(g.push(l.Oe),l.tc&&g.push(l.tc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?un(a,n)||(f=!0):(wn(a,k,e),l=a.i.get(k),n=l.th,f=!0));0<k.nestedCues.length&&n&&vn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
|
|
557
|
+
r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.tc?(d.tc.contains(c)&&d.tc.removeChild(c),c.appendChild(d.tc),d.tc.appendChild(d.Oe)):c.appendChild(d.Oe)}}function tn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())rn(d.value);rn(a.g);a.i.clear();a.B.clear()}a.m&&vn(a,a.h,a.g,c,[])}}
|
|
558
|
+
function wn(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&xn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Kb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Kb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Kb?"%":"px",l=g.widthUnits==
|
|
559
559
|
Kb?"%":"px",m=g.viewportAnchorUnits==Kb?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.l===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
|
|
560
560
|
g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*p/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
|
|
561
|
-
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Oe:f,th:e,
|
|
562
|
-
function
|
|
563
|
-
function
|
|
564
|
-
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=
|
|
561
|
+
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Oe:f,th:e,tc:c})}
|
|
562
|
+
function yn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Rb?c:"left"===a||"start"===a&&b===Ub||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ub?"line-right":"center"}
|
|
563
|
+
function xn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=zn(c.linePadding,c,a.s);f.paddingRight=zn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
564
|
+
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=An(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-
|
|
565
565
|
1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;
|
|
566
|
-
f.fontSize=
|
|
567
|
-
a=
|
|
566
|
+
f.fontSize=zn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Wb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Vb?(f.width="100%",c.lineAlign==Xb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;
|
|
567
|
+
a=yn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=
|
|
568
568
|
c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Vb?f.width=c.size+"%":f.height=c.size+"%")}
|
|
569
|
-
function
|
|
570
|
-
|
|
571
|
-
break;case "right":g.push("align:right");break;case Sb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function
|
|
572
|
-
function
|
|
573
|
-
!0;var f=
|
|
574
|
-
function
|
|
575
|
-
function
|
|
576
|
-
function
|
|
577
|
-
function
|
|
578
|
-
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function
|
|
579
|
-
function
|
|
580
|
-
q.getBandwidthEstimate=function(a){var b=this.zg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function
|
|
581
|
-
|
|
582
|
-
this.ae=new
|
|
583
|
-
b(this);this.N=
|
|
584
|
-
f.g){c.eg.stop();if(c.ba)return f.u(0);c.Hb=c.h;c.Ce=c.h.ended;e=d.saveLivePosition||!1;return F(f,c.sg(!0,e),3)}c.ba=f.h;G(f)})}),this.bb.D(this.A,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.ba){var e=c.ba;e.A&&d&&(e.A+=d)}c.eg.Z(.1)}),this.bb.D(this.A,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Hb?d.u(0):F(d,c.Sb(c.Hb,!0),0)})}));this.qe.D(window,"online",function(){
|
|
585
|
-
h=g.next();!h.done;h=g.next())h=h.value,0<h.disabledUntilTime&&h.disabledUntilTime<=d&&(h.disabledUntilTime=0,e=!0),0<h.disabledUntilTime&&(f=!1);f&&c.je.stop();e&&
|
|
586
|
-
function
|
|
587
|
-
q.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.l==
|
|
588
|
-
|
|
589
|
-
q.Sb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==
|
|
590
|
-
}})};q.Ch=function(a){this.fg=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==
|
|
591
|
-
q.dc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:return c.l!=
|
|
569
|
+
function zn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function An(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",sn);sn.prototype.setTextVisibility=sn.prototype.setTextVisibility;
|
|
570
|
+
sn.prototype.isTextVisible=sn.prototype.isTextVisible;sn.prototype.remove=sn.prototype.remove;sn.prototype.destroy=sn.prototype.destroy;sn.prototype.append=sn.prototype.append;sn.prototype.configure=sn.prototype.configure;function Bn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Vm(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
571
|
+
break;case "right":g.push("align:right");break;case Sb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Cn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}Cn.prototype.configure=function(a){this.g=a};function Dn(a){a.i=!1;a.l=!0;a.j=!1}
|
|
572
|
+
function En(a,b,c){try{if(!a.g.enabled)return b;var d=Fn(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=Gn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=Hn;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=In;break a}e=void 0}d.ot=e;d.su=
|
|
573
|
+
!0;var f=Jn(d);return Kn(b,f)}catch(g){return $a("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Fn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
574
|
+
function Ln(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Fn(a));c.pr=a.h.fb();var e=c.ot===Mn||c.ot===Hn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Nn(a,c);if(d)d=On(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=Jn(a);f&&(b.uris=b.uris.map(function(g){return Kn(g,f)}))}}}function Nn(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}
|
|
575
|
+
function Pn(a){if(0===a.type)return Qn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?Hn:Mn;if("audio"==b)return Gn;if("text"==b)return"application/mp4"===a.mimeType?Rn:Sn}}function Tn(a,b){b=a.h.xb()[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}
|
|
576
|
+
function Un(a,b){b=a.h.xb()[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 Vn(a,b){var c=a.h.mc();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 Mn:return a.videoBandwidth||NaN;case Gn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
577
|
+
function Jn(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"===
|
|
578
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function On(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=Jn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
579
|
+
function Kn(a,b){if(!b||a.includes("offline:"))return a;a=new tc(a);a.g.set("CMCD",b);return a.toString()}var In="m",Gn="a",Mn="v",Hn="av",Qn="i",Sn="c",Rn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Nj:"s",OTHER:"o"});function Wn(a){this.h=a;this.g=null}q=Wn.prototype;q.configure=function(a){this.h=a};q.Bg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Xn)?1E3*this.g.get(Xn):null};q.zg=function(){return this.h.enabled&&this.g&&this.g.has(Yn)?1E3*this.g.get(Yn):null};q.ai=function(){return this.h.enabled&&this.g&&this.g.has(Zn)?this.g.get(Zn):null};q.bi=function(){return this.h.enabled&&this.g&&this.g.has($n)?this.g.get($n):null};
|
|
580
|
+
q.getBandwidthEstimate=function(a){var b=this.zg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function ao(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Wn);Wn.prototype.getBandwidthEstimate=Wn.prototype.getBandwidthEstimate;Wn.prototype.getRoundTripTime=Wn.prototype.bi;Wn.prototype.getResponseDelay=Wn.prototype.ai;Wn.prototype.getEstimatedThroughput=Wn.prototype.zg;
|
|
581
|
+
Wn.prototype.getMaxBitrate=Wn.prototype.Bg;var Yn="etp",Xn="mb",Zn="rd",$n="rtt";function bo(){this.g=null;this.h=[]}function co(a,b){return O(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;G(c)})}bo.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){jg.call(this);var c=this;this.l=eo;this.de=this.h=null;this.ma=!1;this.qe=new gb;this.jd=new gb;this.m=new gb;this.Fa=new gb;this.bb=new gb;this.F=this.C=this.B=this.H=null;this.te=0;this.Y=new bo;this.na=this.bg=this.da=this.i=this.ab=this.G=this.j=this.Ub=this.K=this.fg=this.ea=this.N=this.fd=this.L=this.he=this.I=this.Gb=null;this.Ea=!1;this.va=this.o=null;this.dg=1E9;this.qd=[];this.T=NaN;this.g=fo(this);this.O=null;this.ze=-1;this.Ca=null;this.ia={width:Infinity,height:Infinity};
|
|
582
|
+
this.ae=new pi(this.g,this.ia,null);this.ke=[];this.s=null;this.Da=new Jf(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.Eb=this.g.preferredTextLanguage;this.pd=this.g.preferredTextRole;this.od=this.g.preferForcedSubs;this.md=[];
|
|
583
|
+
b&&b(this);this.N=go(this);this.ea=new Wn(this.g.cmsd);this.H=ho(this);this.H.Qf(this.g.streaming.forceHTTP);this.H.Rf(this.g.streaming.forceHTTPS);this.Hb=this.ba=this.A=null;this.Ce=!1;this.eg=new Rc(function(){return O(function(d){if(1==d.g)return c.ba?F(d,c.Sb(c.Hb,!0),3):d.u(0);if(4!=d.g)return F(d,c.load(c.ba),4);c.Ce?c.Hb.pause():c.Hb.play();c.ba=null;c.Ce=!1;G(d)})});io&&(this.A=io(),this.A.configure(this.g.ads),this.bb.D(this.A,"ad-content-pause-requested",function(d){var e;return O(function(f){if(1==
|
|
584
|
+
f.g){c.eg.stop();if(c.ba)return f.u(0);c.Hb=c.h;c.Ce=c.h.ended;e=d.saveLivePosition||!1;return F(f,c.sg(!0,e),3)}c.ba=f.h;G(f)})}),this.bb.D(this.A,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.ba){var e=c.ba;e.A&&d&&(e.A+=d)}c.eg.Z(.1)}),this.bb.D(this.A,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Hb?d.u(0):F(d,c.Sb(c.Hb,!0),0)})}));this.qe.D(window,"online",function(){jo(c);c.Jf()});this.je=new Rc(function(){for(var d=Date.now()/1E3,e=!1,f=!0,g=t(c.i.variants),
|
|
585
|
+
h=g.next();!h.done;h=g.next())h=h.value,0<h.disabledUntilTime&&h.disabledUntilTime<=d&&(h.disabledUntilTime=0,e=!0),0<h.disabledUntilTime&&(f=!1);f&&c.je.stop();e&&ko(c,!1,void 0,!1,!1)});this.ra=null;a&&(qb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Sb(a,!0))}na(X,jg);function lo(a){null!=a.K&&(Gj(a.K),a.K.release(),a.K=null)}
|
|
586
|
+
function mo(a,b){b.lcevc.enabled?(lo(a),null==a.K&&(a.K=new Fj(a.h,a.fg,b.lcevc),a.C&&(a.C.T=a.K))):lo(a)}function no(a,b){return new U(a,b)}q=X.prototype;
|
|
587
|
+
q.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.l==oo)return c.return();lo(a);b=a.detach();a.l=oo;return F(c,b,2);case 2:return F(c,a.Qe(),3);case 3:a.qe&&(a.qe.release(),a.qe=null);a.jd&&(a.jd.release(),a.jd=null);a.m&&(a.m.release(),a.m=null);a.Fa&&(a.Fa.release(),a.Fa=null);a.bb&&(a.bb.release(),a.bb=null);a.va=null;a.g=null;a.s=null;a.de=null;a.N=null;a.ea=null;if(!a.H){c.u(4);break}return F(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.o&&(a.o.release(),a.o=null),
|
|
588
|
+
jg.prototype.release.call(a),G(c)}})};function po(a,b){a.dispatchEvent(no("onstatechange",(new Map).set("state",b)))}
|
|
589
|
+
q.Sb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==oo)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return F(g,c.detach(),2);case 2:return F(g,qo(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(po(c,"attach"),e=function(){var h=ro(c,!1);h&&so(c,h)},c.jd.D(a,"error",e),c.h=a);if(!b||!Sc()||c.C){g.u(6);break}return F(g,to(c),6);case 6:va(g);c.Y.release();ya(g,0);break;case 5:return f=ua(g),F(g,c.detach(),10);case 10:throw f;
|
|
590
|
+
}})};q.Ch=function(a){this.fg=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==oo)throw new T(2,7,7E3);return F(c,b.dc(!1,a),2)}if(3!=c.g)return F(c,qo(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.jd.Qa(),b.h=null),po(b,"detach"),b.A&&!a&&b.A.release()}finally{b.Y.release()}G(c)})};function qo(a,b){var c;return O(function(d){return 1==d.g?(c=++a.te,F(d,co(a.Y,b),2)):c!=a.te?(a.Y.release(),d.return(!0)):d.return(!1)})}
|
|
591
|
+
q.dc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:return c.l!=oo&&(c.l=eo),F(r,qo(c,"unload"),2);case 2:if(r.h)return r.return();sa(r,3);c.Ea=!1;po(c,"unload");a&&!Sc()&&(a=!1);lo(c);d=c.md.map(function(u){return u()});c.md=[];return F(r,Promise.all(d),5);case 5:c.dispatchEvent(no("unloading"));c.fd&&(c.fd.release(),c.fd=null);c.h&&(c.m.Qa(),c.Fa.Qa());c.je.stop();c.Gb&&(c.Gb.release(),c.Gb=null);c.he&&(c.he.stop(),c.he=null);
|
|
592
592
|
if(!c.G){r.u(6);break}return F(r,c.G.stop(),7);case 7:c.G=null,c.ab=null;case 6:if(!c.o){r.u(8);break}return F(r,c.o.stop(),8);case 8:if(!c.j){r.u(10);break}return F(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.F&&(c.F.release(),c.F=null);if(!rd("webkit")||!c.B){r.u(12);break}return F(r,c.B.destroy(),13);case 13:c.B=null;case 12:if(!c.C){r.u(14);break}return F(r,c.C.destroy(),15);case 15:c.C=null;case 14:if(c.A&&!b)c.A.onAssetUnload();c.ba&&!b&&(c.ba.destroy(),c.ba=
|
|
593
|
-
null);b||c.eg.stop();c.N&&
|
|
594
|
-
m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(cf={},Pc.clear());c.i=null;c.s=new
|
|
595
|
-
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==
|
|
596
|
-
2),F(z,
|
|
597
|
-
A.h)?(
|
|
598
|
-
|
|
599
|
-
d.va==r||(d.o=
|
|
600
|
-
d.o.trySuggestStreams=function(){})),u=
|
|
601
|
-
function
|
|
602
|
-
q.sg=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?F(e,
|
|
603
|
-
function
|
|
604
|
-
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return F(f,
|
|
605
|
-
function
|
|
606
|
-
function
|
|
607
|
-
filter:function(E){var I,L;return O(function(H){if(1==H.g)return F(H,
|
|
608
|
-
new U("regionadd",new Map([["region",E]])),I.dispatchEvent(E))},onEvent:function(E){return h.dispatchEvent(E)},onError:function(E){return h.onError(E)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.O&&a.j.updateDuration()},newDrmInfo:function(E){var I=h.l,L=I?I.g:null;L&&I.A&&
|
|
609
|
-
(new Map).set("isLive",a.V());h.dispatchEvent(
|
|
610
|
-
disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)}};v=new
|
|
611
|
-
A=!0;y={Mb:a.H,onError:function(E){return h.onError(E)},ee:function(E){
|
|
612
|
-
!0;P=t(P.keyIds);for(var R=P.next();!R.done;R=P.next())if(R=R.value,(R=I[L?"00":R])||a.B.F)K.allowedByKeySystem=K.allowedByKeySystem&&!!R&&!
|
|
613
|
-
(a.s||h.getStats()).j=E,a.K&&
|
|
614
|
-
function
|
|
615
|
-
function
|
|
616
|
-
function
|
|
617
|
-
|
|
593
|
+
null);b||c.eg.stop();c.N&&Dn(c.N);c.ea&&(c.ea.g=null);c.h&&rn(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.B){r.u(16);break}return F(r,c.B.destroy(),17);case 17:c.B=null;case 16:c.ra&&c.da!=c.ra.Fc()&&(c.ra.s||c.ra.destroy(),c.ra=null);c.da=null;c.bg=null;c.L=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=
|
|
594
|
+
m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(cf={},Pc.clear());c.i=null;c.s=new Zk;c.cg=null;c.Ca=null;c.O=null;c.ze=-1;c.qd=[];c.T=NaN;uo(c);case 3:va(r);c.Y.release();ya(r,4);break;case 4:if(a&&Sc()&&!c.C&&c.h)return F(r,to(c),0);r.u(0)}})};q.hj=function(a){this.na=a};
|
|
595
|
+
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==oo)throw new T(2,7,7E3);e=null;f="";a instanceof ym?(e=a,f=e.Fc()||""):f=a||"";return F(A,co(d.Y,"load"),2);case 2:d.Y.release();if(!d.h)throw new T(2,7,7002);if(!d.da){A.u(3);break}d.da=f;return F(A,d.dc(!1),3);case 3:g=++d.te;h=function(){return O(function(y){if(1==y.g)return d.te==g?y.u(0):e?F(y,e.destroy(),3):y.u(3);throw new T(2,7,7E3);})};k=function(y,D){return O(function(z){switch(z.g){case 1:return sa(z,
|
|
596
|
+
2),F(z,co(d.Y,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:va(z),d.Y.release(),ya(z,0)}})};ra(A,5,6);null==b&&e&&(b=e.getStartTime());d.na=b;d.Ea=!1;d.dispatchEvent(no("loading"));if(e){c=e.T;A.u(8);break}if(c){A.u(8);break}return F(A,k(function(){return O(function(y){if(1==y.g)return F(y,vo(d,f),2);c=y.h;G(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Bm(e,d);d.s=e.getStats();A.u(11);break}return F(A,wo(d,f,b,c,!0),12);case 12:(e=
|
|
597
|
+
A.h)?(Bm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Zk;case 11:return m=!e,n=Date.now()/1E3,d.s=e?e.getStats():new Zk,d.da=f,d.bg=c||null,m?F(A,k(function(){return O(function(y){return F(y,xo(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):F(A,k(function(){return O(function(y){if(1==y.g)return F(y,Promise.race([e.ea,e.m]),2);d.ab=e.F;var D=e;D.ia=!0;d.G=D.j;d.i=e.gf();G(y)})},"waitForFinish"),15);case 15:if(d.C){A.u(16);break}return F(A,k(function(){return O(function(y){return F(y,
|
|
598
|
+
to(d),0)})},"initializeMediaSourceEngineInner_"),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.ae=e.C;d.G&&d.G.setMediaElement&&d.h&&d.G.setMediaElement(d.h);d.fd=Dm(e);d.Ub=e.Ea;if(p=e.o)d.Da=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(yo(d),d.configure("manifest.disableVideo",!0));d.B=Em(e);return F(A,k(function(){return O(function(y){return F(y,d.B.Sb(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.B)||d.va&&
|
|
599
|
+
d.va==r||(d.o=Cm(e),d.va=e.B,"function"!=typeof d.o.setMediaElement&&(qb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(qb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(qb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),
|
|
600
|
+
d.o.trySuggestStreams=function(){})),u=Fm(e),v=e.ma,F(A,k(function(){return O(function(y){return F(y,zo(d,n,v,u),0)})},"loadInner_"),20);case 20:Am(e);A.u(14);break;case 21:return F(A,k(function(){return O(function(y){return F(y,Ao(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(no("loaded"));case 6:va(A);if(!e){A.u(23);break}return F(A,e.destroy(),23);case 23:d.ra=null;ya(A,0);break;case 5:w=ua(A);if(!w||7E3==w.code){A.u(25);break}return F(A,d.dc(!1),25);case 25:throw w;}})};
|
|
601
|
+
function yo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.dj=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,Bo(c),2):3!=e.g?(d=e.h,F(e,c.dc(a,b),3)):e.return(d)})};
|
|
602
|
+
q.sg=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?F(e,Bo(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})};
|
|
603
|
+
function Bo(a,b){b=void 0===b?!1:b;var c,d;return O(function(e){if(1==e.g){c=null;if(!(a.i&&a.G&&a.ab&&a.da))return e.u(2);d=a.h.currentTime;a.V()&&!b&&(d=null);return F(e,Co(a,a.da,d,a.bg,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.ke.push(c);a.G&&a.G.setMediaElement&&a.G.setMediaElement(null);var f=c,g=a.G,h=a.ab;f.h=a.i;f.j=g;f.F=h;f=c;g=a.va;f.i=a.o;f.B=g;c.o=a.Da;c.start();a.i=null;a.G=null;a.ab=null;a.o=null;a.va=null}return e.return(c)})}
|
|
604
|
+
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return F(f,wo(d,a,b,c),2);(e=f.h)?e.start():so(d,new T(2,7,7005));return f.return(e)})};q.Qe=function(){var a=this,b,c,d,e;return O(function(f){b=[];c=t(a.ke);for(d=c.next();!d.done;d=c.next())e=d.value,e.s||b.push(e.destroy());a.ke=[];return F(f,Promise.all(b),0)})};
|
|
605
|
+
function wo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return d?l.u(2):F(l,vo(a,b),3);2!=l.g&&(d=l.h);if(f=Do(a,d))return l.return(null);g=!1;h=!0;e&&(a.o&&a.va==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=Co(a,b,c,d||null,!e,g,h);e||(k=k.then(function(m){a.ke.push(m);return m}));return l.return(k)})}
|
|
606
|
+
function Co(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,v,w,A,y,D,z,C;return O(function(B){if(1==B.g)return h=null,k=Je(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.O&&h.s?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(E,I){l()?h.configure(E,I):a.configure(E,I)},Infinity!=a.ia.width||Infinity!=a.ia.height?B.u(2):F(B,sd(),3);2!=B.g&&(p=B.h,a.ia.width=p.width,a.ia.height=p.height);r=new pi(k,a.ia,null);u={networkingEngine:a.H,
|
|
607
|
+
filter:function(E){var I,L;return O(function(H){if(1==H.g)return F(H,qi(r,E),2);if(4!=H.g){I=H.h;if(!I)return H.u(0);L=no("trackschanged");return F(H,Promise.resolve(),4)}h.dispatchEvent(L);G(H)})},makeTextStreamsForClosedCaptions:function(E){return Eo(a,E)},onTimelineRegionAdded:function(E){var I=h.G;a:{var L=t(I.g);for(var H=L.next();!H.done;H=L.next())if(H=H.value,H.schemeIdUri==E.schemeIdUri&&H.id==E.id&&H.startTime==E.startTime&&H.endTime==E.endTime){L=H;break a}L=null}null==L&&(I.g.add(E),E=
|
|
608
|
+
new U("regionadd",new Map([["region",E]])),I.dispatchEvent(E))},onEvent:function(E){return h.dispatchEvent(E)},onError:function(E){return h.onError(E)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.O&&a.j.updateDuration()},newDrmInfo:function(E){var I=h.l,L=I?I.g:null;L&&I.A&&si(r,L.keySystem,E)},onManifestUpdated:function(){var E=
|
|
609
|
+
(new Map).set("isLive",a.V());h.dispatchEvent(no("manifestupdated",E));zm(h,!1,function(){if(a.A)a.A.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(E,I,L,H){var J=E;if("com.apple.hls.interstitial"==E&&(J="com.apple.quicktime.HLS",E={startTime:I,endTime:L,values:H},a.A))a.A.onInterstitialMetadata(a,a.h,E);H=t(H);E=H.next();for(var K={};!E.done;K={Sg:void 0},E=H.next())K.Sg=E.value,zm(h,!1,function(M){return function(){Fo(a,I,L,J,M.Sg)}}(K))},
|
|
610
|
+
disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)}};v=new ll(function(){return a.Pb()});v.addEventListener("regionadd",function(E){var I=E.region;Go(a,"timelineregionadded",I,h);zm(h,!1,function(){if(a.A)a.A.onDashTimedMetadata(I)})});w=null;k.streaming.observeQualityChanges&&(w=new ml(function(){return a.xb()}),w.addEventListener("qualitychange",function(E){Ho(a,E.quality,E.position)}),w.addEventListener("audiotrackchange",function(E){Ho(a,E.quality,E.position,!0)}));
|
|
611
|
+
A=!0;y={Mb:a.H,onError:function(E){return h.onError(E)},ee:function(E){zm(h,!0,function(){a:{var I=E,L=no("keystatuschanged");a.dispatchEvent(L);var H=Object.keys(I);1==H.length&&""==H[0]&&(H=["00"],I={"00":I[""]});L=1==H.length&&"00"==H[0];var J=!1;if(H.length){H=t(a.i.variants);for(var K=H.next();!K.done;K=H.next()){K=K.value;var M=[];K.audio&&M.push(K.audio);K.video&&M.push(K.video);M=t(M);for(var N=M.next();!N.done;N=M.next()){var P=N.value;N=K.allowedByKeySystem;if(P.keyIds.size){K.allowedByKeySystem=
|
|
612
|
+
!0;P=t(P.keyIds);for(var R=P.next();!R.done;R=P.next())if(R=R.value,(R=I[L?"00":R])||a.B.F)K.allowedByKeySystem=K.allowedByKeySystem&&!!R&&!ui.includes(R)}N!=K.allowedByKeySystem&&(J=!0)}}}if(J&&(Io(a),!Jo(a)))break a;(I=a.j.j)&&!I.allowedByKeySystem&&ko(a)}})},onExpirationUpdated:function(E,I){var L=no("expirationupdated");h.dispatchEvent(L);if((L=h.j)&&L.onExpirationUpdated)L.onExpirationUpdated(E,I)},onEvent:function(E){h.dispatchEvent(E);"drmsessionupdate"==E.type&&A&&(A=!1,E=Date.now()/1E3-h.va,
|
|
613
|
+
(a.s||h.getStats()).j=E,a.K&&Gj(a.K))}};D=ho(a,l);qg(a.H,D);z=function(){return a.Ac(y)};C={config:k,zi:u,Ii:v,Hi:w,Ac:z,yi:r,networkingEngine:D,Bh:e,Ah:g};h=new ym(b,d,c,C);return B.return(h)})}function vo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,F(e,Rm(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&gd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
614
|
+
function Do(a,b){if(!Sc())return!0;if(b){if(""==(a.h||Uc()).canPlayType(b))return!1;if(!(Sc()&&b in xi))return!0;if(ke(b))return gd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls}return!1}
|
|
615
|
+
function to(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return po(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.cg=b,d=Ko(a.h,c,{Th:function(){return a.keySystem()},onMetadata:function(h,k,l){Lo(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ia=f,F(g,d.K,2);a.C=d;G(g)})}
|
|
616
|
+
function zo(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L;return O(function(H){switch(H.g){case 1:po(a,"load"),e=a.h,a.I=new Qk({Ld:function(){return e.playbackRate},kc:function(){return e.defaultPlaybackRate},Sf:function(J){e.playbackRate=J},Ng:function(J){e.currentTime+=J}}),f=function(){return Mo(a)},g=function(){return No(a)},a.m.D(e,"playing",f),a.m.D(e,"pause",f),a.m.D(e,"ended",f),a.m.D(e,"ratechange",g),mo(a,a.g),a.Eb=a.g.preferredTextLanguage,a.pd=a.g.preferredTextRole,a.od=a.g.preferForcedSubs,
|
|
617
|
+
Oo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.o.init(function(J,K,M){a.i&&a.j&&J!=a.j.j&&Po(a,J,!0,void 0===K?!1:K,void 0===M?0:M)}),a.o.setMediaElement(e),a.o.setCmsdManager(a.ea),a.j=Qo(a),a.j.configure(a.g.streaming),a.l=Ro,e.textTracks&&a.m.D(e.textTracks,"addtrack",function(J){if(J.track)switch(J=J.track,J.kind){case "chapters":So(a,J)}}),a.dispatchEvent(no("streaming")),h=c;case 2:(l=a.j.j)||h||(h=Jo(a)?a.o.chooseVariant():null);m=[];k=l||h;n=t([k.video,k.audio]);for(p=
|
|
618
618
|
n.next();!p.done;p=n.next())(r=p.value)&&!r.segmentIndex&&m.push(r.createSegmentIndex());if(!(0<m.length)){H.u(4);break}return F(H,Promise.all(m),4);case 4:if(!k||0!=k.disabledUntilTime){H.u(2);break}if(a.G&&a.G.onInitialVariantChosen)a.G.onInitialVariantChosen(k);a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&Ya("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
619
|
-
|
|
620
|
-
z=a.
|
|
621
|
-
a.g.streaming.vodDynamicPlaybackRate)E=function(){return
|
|
619
|
+
Oo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Fl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(J){a.F=To(a,J);a.Gb=Uo(a,J);Vo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.na);if(l){H.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){H.u(8);break}v=a.i.presentationTimeline;w=a.na||a.h.currentTime;A=v.Jb();y=v.zb();w<A?w=A:w>y&&(w=y);return F(H,Wo(h,w),9);case 9:D=H.h,u(D);case 8:Po(a,h,!0,!1,0);case 7:return a.F.ready(),
|
|
620
|
+
z=a.Gc().find(function(J){return J.active}),z||((C=uf(a.i.textStreams,a.Eb,a.pd,a.od)[0]||null)&&Yk(a.s.h,C,!0),h&&(C?(Xo(a,h.audio,C)&&(a.ma=!0),a.ma&&a.C.C.setTextVisibility(!0),Yo(a)):a.ma=!1),C&&(a.g.streaming.alwaysStreamText||a.rf())&&Ol(a.j,C)),F(H,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),Zo(a));Io(a);Jo(a);a.i.variants.some(function(J){return J.primary});if((B=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||
|
|
621
|
+
a.g.streaming.vodDynamicPlaybackRate)E=function(){return $o(a)},a.m.D(e,"timeupdate",E);B||(I=function(){return ap(a)},a.m.D(e,"timeupdate",I),ap(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(L=function(){var J;return O(function(K){if(1==K.g){J=a.h.duration-a.h.currentTime;if(isNaN(J)||!(J<=a.g.streaming.preloadNextUrlWindow))return K.u(0);a.m.kb(e,"timeupdate",L);return F(K,a.preload(a.i.nextUrl),4)}a.ra=K.h;G(K)})},a.m.D(e,"timeupdate",L)),a.m.D(e,"ended",function(){a.load(a.ra||a.i.nextUrl)})));
|
|
622
622
|
if(a.A)a.A.onManifestUpdated(B);a.Ea=!0;a.m.ka(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});G(H)}})}
|
|
623
|
-
function
|
|
624
|
-
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?ie(b):"",codecs:b?je(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.
|
|
625
|
-
g.codecs)),b.startsWith("audio/")?(g.type=c.X,f.audio=g):f.video=g,a.B.Y=!0,F(h,
|
|
626
|
-
function
|
|
627
|
-
"ratechange",h),"none"!=d.preload&&a.m.ka(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return
|
|
628
|
-
a.m.D(d.textTracks,"change",function(){return
|
|
629
|
-
l.resolve()}),
|
|
630
|
-
l.resolve()),a.m.ka(d,"error",function(){l.reject(
|
|
631
|
-
u!=w&&(a.A.onManifestUpdated(a.V()),u=w)})));a.Ea=!0;G(v)})}function
|
|
632
|
-
function
|
|
633
|
-
values:[]},d.push(f)),f.values.push(g.Ta.value))}d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.A&&(e.values.push({key:"CUE",description:"",data:"ONCE",mimeType:null,pictureType:null}),a.A.onInterstitialMetadata(a,a.h,e))}});var c=(new Rc(function(){var d=
|
|
634
|
-
function
|
|
635
|
-
function
|
|
636
|
-
function
|
|
637
|
-
|
|
638
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}
|
|
639
|
-
if(r.segmentIndex&&m){var w=r.segmentIndex.Ib(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Pb(m.
|
|
640
|
-
500,K=r.bandwidth;var M=K?K*(m.endTime-m.startTime)/1E3/(J/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==
|
|
641
|
-
function
|
|
642
|
-
function
|
|
643
|
-
function
|
|
644
|
-
function
|
|
645
|
-
function
|
|
646
|
-
function
|
|
647
|
-
(new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(
|
|
648
|
-
d.m}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){
|
|
649
|
-
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
623
|
+
function xo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Wd,d=Date.now()/1E3,e=!0,a.B=a.Ac({Mb:a.H,onError:function(k){so(a,k)},ee:function(){},onExpirationUpdated:function(){var k=no("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
624
|
+
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?ie(b):"",codecs:b?je(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ja,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Zd(g.mimeType,
|
|
625
|
+
g.codecs)),b.startsWith("audio/")?(g.type=c.X,f.audio=g):f.video=g,a.B.Y=!0,F(h,Mh(a.B,[f],[]),2)):F(h,a.B.Sb(a.h),0)})}
|
|
626
|
+
function Ao(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g)return po(a,"src-equals"),d=a.h,a.F=new Gk(d),e=!1,a.md.push(function(){e=!0}),null!=a.na&&a.F.Ee(a.na),a.I=new Qk({Ld:function(){return d.playbackRate},kc:function(){return d.defaultPlaybackRate},Sf:function(w){d.playbackRate=w},Ng:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,Vo(a,d,f),g=function(){return Mo(a)},h=function(){return No(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
627
|
+
"ratechange",h),"none"!=d.preload&&a.m.ka(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return Io(a)}),a.m.D(d.audioTracks,"removetrack",function(){return Io(a)}),a.m.D(d.audioTracks,"change",function(){return Io(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":bp(a,w);break;case "chapters":So(a,w);break;default:Io(a)}}),a.m.D(d.textTracks,"removetrack",function(){return Io(a)}),
|
|
628
|
+
a.m.D(d.textTracks,"change",function(){return Io(a)})),k=En(a.N,a.da,c),!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd)),d.src=k,a.C&&window.ManagedMediaSource&&(d.disableRemotePlayback=!1),($c()||cd())&&d.load(),"none"!=d.preload&&!d.autoplay&&ke(c)&&ld()&&d.load(),a.l=cp,a.dispatchEvent(no("streaming")),l=new $f,xk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.F.ready();
|
|
629
|
+
l.resolve()}),xk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(A){if(1==A.g)return dp(a),w=ep(a),w.find(function(y){return"disabled"!=y.mode})?(0<w.length&&(a.ma=!0),A.u(2)):F(A,new Promise(function(y){a.m.ka(d.textTracks,"change",y);(new Rc(y)).Z(1)}),2);if(e)return A.return();fp(a);G(A)})}),d.error?l.reject(ro(a)):"none"==d.preload&&(Ya('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),
|
|
630
|
+
l.resolve()),a.m.ka(d,"error",function(){l.reject(ro(a))}),m=new Promise(function(w,A){(new Rc(A)).Z(a.g.streaming.loadTimeout)}),F(v,Promise.race([l,m]),2);if((n=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return $o(a)},a.m.D(d,"timeupdate",p);n||(r=function(){return ap(a)},a.m.D(d,"timeupdate",r),ap(a));a.A&&(a.A.onManifestUpdated(n),n&&(u=a.Pb().end,a.m.D(d,"progress",function(){var w=a.Pb().end;
|
|
631
|
+
u!=w&&(a.A.onManifestUpdated(a.V()),u=w)})));a.Ea=!0;G(v)})}function dp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.$g(b,a.g.preferredVariantRole)}function fp(a){var b=a.g.preferredTextLanguage;""!=b&&a.Mf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
632
|
+
function bp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues){for(var d=[],e=t(b.activeCues),f=e.next(),g={};!f.done;g={Ta:void 0},f=e.next()){g.Ta=f.value;Fo(a,g.Ta.startTime,g.Ta.endTime,g.Ta.type,g.Ta.value);if(a.A)a.A.onCueMetadataChange(g.Ta.value);"com.apple.quicktime.HLS"==g.Ta.type&&null!=g.Ta.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.Ta.startTime&&k.endTime==h.Ta.endTime}}(g)),f||(f={startTime:g.Ta.startTime,endTime:g.Ta.endTime,
|
|
633
|
+
values:[]},d.push(f)),f.values.push(g.Ta.value))}d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.A&&(e.values.push({key:"CUE",description:"",data:"ONCE",mimeType:null,pictureType:null}),a.A.onInterstitialMetadata(a,a.h,e))}});var c=(new Rc(function(){var d=gp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).vc().Z(.5);a.md.push(function(){c.stop()})}}
|
|
634
|
+
function Lo(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())Fo(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Fo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(no("metadata",b))}
|
|
635
|
+
function So(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Rc(function(){b.mode="hidden"})).vc().Z(.5);a.md.push(function(){c.stop()})}}q.Mi=function(){for(var a=this.Y;a.g;)a.release()};q.Ac=function(a){return new Fh(a)};
|
|
636
|
+
function ho(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 mg(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(no("downloadheadersreceived",f));d(function(){if(a.ea){var h=a.ea;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
637
|
+
ao(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],ao(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(no("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Ln(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
638
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Ln(h,f,{ot:In,su:!h.i})}}catch(N){$a("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case xg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.V()?"l":"v"};n.ot=Pn(k);var p=n.ot===Mn||n.ot===Gn||n.ot===Hn||n.ot===Rn,r=k.stream;if(r){var u=h.h.fb();if(p&&(n.bl=Tn(h,r.type),n.ot!==Rn)){var v=Un(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);
|
|
639
|
+
if(r.segmentIndex&&m){var w=r.segmentIndex.Ib(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Pb(m.M(),A.M())){var y=A.M()[0],D=f.uris[0],z=new URL(y),C=new URL(D);if(z.origin!==C.origin)var B=y;else{for(var E=z.pathname.split("/").slice(1),I=C.pathname.split("/").slice(1,-1);E[0]===I[0];)E.shift(),I.shift();for(;I.length;)I.shift(),E.unshift("..");B=E.join("/")}n.nor=B}if((A.Ha||A.ta)&&(m.Ha!=A.Ha||m.ta!=A.ta)){var L=A.Ha+"-";A.ta&&(L+=A.ta);n.nrr=L}}}var H=h.h.fb()||1,J=Un(h,r.type)||
|
|
640
|
+
500,K=r.bandwidth;var M=K?K*(m.endTime-m.startTime)/1E3/(J/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==Rn&&(n.tb=Vn(h,n.ot)/1E3);Ln(h,f,n)}}catch(N){$a("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:Ln(h,f,{ot:"k"});break;case 4:Ln(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.G)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.s;g&&(g.fc=isNaN(g.fc)?f:g.fc+f,0===e&&(g.Jg=f))}})}
|
|
641
|
+
function To(a,b){return new Hk(a.h,a.i,a.g.streaming,b,function(){a.Gb&&Tk(a.Gb,!0);a.j&&a.j.Tc();a.L&&hp(a)},function(c){return a.dispatchEvent(c)})}
|
|
642
|
+
function Uo(a,b){b=new Mm(a.fd,a.V()||0<b);b.addEventListener("enter",function(d){Go(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Go(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Go(a,"timelineregionenter",e),Go(a,"timelineregionexit",e))});var c=new Sk(a.h);c.g.add(b);a.Ub&&c.g.add(a.Ub);return c}
|
|
643
|
+
function Vo(a,b,c){a.L=new Tf;a.L.g=Vf;Wf(a.L,c,Math.min(.5,c/2));uo(a);a.he=(new Rc(function(){hp(a)})).Ra(.25);a.m.D(b,"waiting",function(){return hp(a)});a.m.D(b,"stalled",function(){return hp(a)});a.m.D(b,"canplaythrough",function(){return hp(a)});a.m.D(b,"progress",function(){return hp(a)})}
|
|
644
|
+
function hp(a){switch(a.l){case cp:if(a.h.ended)var b=!0;else{var c=Ji(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Ro:a:if(a.h.ended||Rj(a.C))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.Xb();var d=Ji(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Li(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Uf:Vf;c.g=d;(b=b!=d)&&d===Uf&&(c.h=Date.now());b&&uo(a)}function Ko(a,b,c,d){return new Ij(a,b,c,d)}
|
|
645
|
+
function go(a){return new Cn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},xb:function(){return a.xb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},fb:function(){return a.fb()},yb:function(){return a.yb()},mc:function(){return a.mc()},V:function(){return a.V()}},a.g.cmcd)}
|
|
646
|
+
function Qo(a){return new zl(a.i,{dd:function(){return a.F?a.F.yd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},fb:function(){return a.fb()},aa:a.C,Mb:a.H,onError:function(b){return so(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ei:function(){a.G&&a.G.update&&a.G.update()},Bf:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Ud){if(a.F){a.F.Og();var f=Sj(a.C,e);!a.V()&&a.h.paused&&null!=f&&0<f&&a.F.yd()<f&&a.F.Ee(f)}hp(a)}d=
|
|
647
|
+
(new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(no("segmentappended",d))},Di:function(b,c){(c=c.Kc)&&a.Ub&&ol(a.Ub,c,b)},lg:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Vg(zb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;Vh(d,"cenc",c);d=
|
|
648
|
+
d.m}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){Lo(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
|
|
649
|
+
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=km(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(qb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(qb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
650
650
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(qb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&gd(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){qb("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled=
|
|
651
651
|
c}if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){c=a.streaming.liveSyncMinLatency||0;var d=Math.abs((a.streaming.liveSyncMaxLatency||1)-c)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=c+d;a.streaming.liveSync.targetLatencyTolerance=d}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(qb("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),
|
|
652
652
|
delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(qb("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in a.streaming&&(qb("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency=
|
|
@@ -655,157 +655,157 @@ a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.st
|
|
|
655
655
|
a.streaming&&"liveSyncPanicMode"in a.streaming&&(qb("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(qb("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold=
|
|
656
656
|
a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){qb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var e=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return e};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&
|
|
657
657
|
(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=
|
|
658
|
-
100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));c=
|
|
659
|
-
|
|
660
|
-
function
|
|
661
|
-
a.cg!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.C,e=d.C;d.C=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.cg=b;a.j&&(b=a.j,(c=b.i.get(Ud))&&
|
|
662
|
-
|
|
663
|
-
q.xg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Qi=function(){for(var a in this.g)delete this.g[a];
|
|
664
|
-
q.yb=function(){return this.H};q.
|
|
658
|
+
100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));c=xm(this.g,a,
|
|
659
|
+
fo(this));ip(this);return c};
|
|
660
|
+
function ip(a){a.ae=new pi(a.g,a.ia,a.B);if(a.G){var b=Je(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.G.configure(b)}a.B&&a.B.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=oo&&ri(a.ae,a.i)&&Io(a)}catch(f){so(a,f)}a.o&&Jo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||ko(a)}a.H&&(a.H.Qf(a.g.streaming.forceHTTP),a.H.Rf(a.g.streaming.forceHTTPS));if(a.C)if(a.C.configure(a.g.mediaSource),a.C.ia=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
661
|
+
a.cg!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.C,e=d.C;d.C=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.cg=b;a.j&&(b=a.j,(c=b.i.get(Ud))&&Ml(b,c.stream,!0,0,!0))}else b=a.C.C,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(),Zo(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
662
|
+
Wf(a.L,b,Math.min(.5,b/2)));a.i&&Oo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.ea&&a.ea.configure(a.g.cmsd)}q.getConfiguration=function(){var a=fo(this);xm(a,this.g,fo(this));return a};q.Cg=function(){var a=fo(this);xm(a,this.g,fo(this));return mm(this.g,fo(this))};
|
|
663
|
+
q.xg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Qi=function(){for(var a in this.g)delete this.g[a];xm(this.g,fo(this),fo(this));ip(this)};q.Ag=function(){return this.l};q.hf=function(){return this.i?this.i.type:null};q.Xh=function(){return this.h};
|
|
664
|
+
q.yb=function(){return this.H};q.Fc=function(){return this.da};q.wg=function(){return this.A?this.A:null};q.V=function(){return this.i?this.i.presentationTimeline.V():this.h&&this.h.src?Infinity==this.h.duration:!1};q.oc=function(){return this.i?this.i.presentationTimeline.oc():!1};q.ni=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};
|
|
665
665
|
q.Pb=function(){if(this.i){if(!this.Ea&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Jb(),end:a.zb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.ki=function(){this.V()&&(this.h.currentTime=this.Pb().end)};q.oi=function(){return this.Ea};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.B?this.B.g:null};
|
|
666
|
-
q.cd=function(){return this.B?this.B.cd():Infinity};q.ff=function(){return this.B?this.B.ff():[]};q.Kd=function(){return this.B?this.B.Kd():{}};q.pf=function(){return this.
|
|
667
|
-
q.wd=function(a,b){var c=this;b=void 0===b?!0:b;0==a?Ya("A trick play rate of 0 is unsupported!"):(this.Fa.Qa(),this.h.paused&&this.h.play(),this.I.set(a),this.l==
|
|
668
|
-
q.Wc=function(){var a=this.I.kc();this.l==
|
|
666
|
+
q.cd=function(){return this.B?this.B.cd():Infinity};q.ff=function(){return this.B?this.B.ff():[]};q.Kd=function(){return this.B?this.B.Kd():{}};q.pf=function(){return this.L?this.L.g==Vf:!1};q.fb=function(){return this.h?this.I?this.I.i:1:0};
|
|
667
|
+
q.wd=function(a,b){var c=this;b=void 0===b?!0:b;0==a?Ya("A trick play rate of 0 is unsupported!"):(this.Fa.Qa(),this.h.paused&&this.h.play(),this.I.set(a),this.l==Ro&&(this.o.playbackRateChanged(a),Ll(this.j,b&&1<Math.abs(a))),this.V()&&this.Fa.D(this.h,"timeupdate",function(){var d=c.h.currentTime,e=c.Pb(),f=c.g.streaming.safeSeekOffset;0<a?Math.floor(d)>=Math.floor(e.end)&&c.Wc():Math.floor(d)<=Math.floor(e.start+f)&&c.Wc()}))};
|
|
668
|
+
q.Wc=function(){var a=this.I.kc();this.l==cp&&this.I.set(a);this.l==Ro&&(this.I.set(a),this.o.playbackRateChanged(a),Ll(this.j,!1));this.Fa.Qa()};
|
|
669
669
|
q.mc=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,sf(e)){var f=jf(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return rf(g)}):[]};
|
|
670
|
-
q.
|
|
671
|
-
q.Jh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=
|
|
672
|
-
function
|
|
673
|
-
q.Eg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z;return O(function(C){if(1==C.g){if(c.l!=
|
|
674
|
-
u=g.B||r/p;v=g.startTime;A=w=0;1<p&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.hc*m,A=Math.floor(y/h.hc)*n);D=!1;if(z=g.A)D=!0,n=z.height,w=z.positionX,A=z.positionY,m=z.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.
|
|
675
|
-
q.ah=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(
|
|
676
|
-
q.Nf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&sf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Ya("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");
|
|
677
|
-
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);
|
|
678
|
-
q.$g=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.F){this.Da=new
|
|
679
|
-
sf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=jf(c),this.Nf(a,!0,d)):
|
|
680
|
-
q.Wi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.F){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.Da=new
|
|
681
|
-
q.rf=function(){var a=this.ma;return this.C&&this.l==
|
|
682
|
-
q.Nh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Be(a),c=
|
|
683
|
-
function
|
|
684
|
-
q.hh=function(a){a=!!a;if(this.ma!=a){this.ma=a;if(this.l==
|
|
670
|
+
q.Gc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=kf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?ep(this).map(function(f){return of(f)}):[]};q.Rh=function(){var a=this.qd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return lf(b)})};
|
|
671
|
+
q.Jh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Ro&&b.l!=cp)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.u(2):F(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.wb(function(h){var k=jp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.hc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.Eg(a,h.startTime+l*m/k))}}),F(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
672
|
+
function jp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{hc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
673
|
+
q.Eg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z;return O(function(C){if(1==C.g){if(c.l!=Ro&&c.l!=cp)return C.return(null);d=c.qd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(B){return B.id==a}))?e.segmentIndex?C.u(2):F(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=jp(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.hc;n=l/h.rows;p=h.hc*h.rows;r=g.j-g.startTime;
|
|
674
|
+
u=g.B||r/p;v=g.startTime;A=w=0;1<p&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.hc*m,A=Math.floor(y/h.hc)*n);D=!1;if(z=g.A)D=!0,n=z.height,w=z.positionX,A=z.positionY,m=z.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.M(),width:m,sprite:D})})};
|
|
675
|
+
q.ah=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Yk(this.s.h,b,!1),Ol(this.j,b),kp(this),this.Eb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=ep(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,mf(c)==a.id?c.mode=this.ma?"showing":"hidden":c.mode="disabled";kp(this)}};
|
|
676
|
+
q.Nf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&sf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Ya("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Po(this,d,!1,b,c);this.Da=new If(d,
|
|
677
|
+
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);Jo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,mf(c)==a.id){lp(this,c);break}};q.Lh=function(){return mp(this.mc())};q.di=function(){return mp(this.Gc())};q.Kh=function(){return Array.from(np(this.mc()))};q.ci=function(){return Array.from(np(this.Gc()))};
|
|
678
|
+
q.$g=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.F){this.Da=new Jf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;e=this.Da.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=f.value,
|
|
679
|
+
sf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=jf(c),this.Nf(a,!0,d)):ko(this))}else this.h&&this.h.audioTracks&&(d=uf(this.mc(),a,b||"",!1)[0])&&this.Nf(d)};q.Mf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Eb=a,this.pd=b||"",this.od=c,(a=uf(this.i.textStreams,this.Eb,this.pd,this.od)[0]||null)&&a!=this.j.s&&(Yk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.rf()))Ol(this.j,a),kp(this)}else(a=uf(this.Gc(),a,b||"",c)[0])&&this.ah(a)};
|
|
680
|
+
q.Wi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.F){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.Da=new Jf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,""),ko(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&&lp(this,b)}};
|
|
681
|
+
q.rf=function(){var a=this.ma;return this.C&&this.l==Ro?this.C.C.isTextVisible():this.h&&this.h.src&&this.h.textTracks?ep(this).some(function(b){return"showing"==b.mode}):a};q.yg=function(){return this.h&&this.h.src&&this.h.textTracks?op(this).map(function(a){return of(a)}):[]};
|
|
682
|
+
q.Nh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Be(a),c=op(this).filter(function(h){return Be(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
683
|
+
function ep(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function gp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function op(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
684
|
+
q.hh=function(a){a=!!a;if(this.ma!=a){this.ma=a;if(this.l==Ro)this.C.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=uf(this.i.textStreams,this.Eb,this.pd,this.od),0<a.length&&(Ol(this.j,a[0]),kp(this))):Kl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=ep(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")}Yo(this)}};
|
|
685
685
|
q.Zh=function(){if(this.F)var a=this.F.yd();else{if(null==this.na)return new Date;a=this.na}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.Dg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
686
|
-
q.Md=function(){return this.V()?this.i?this.i.presentationTimeline.Md():null:null};q.xb=function(){if(this.l==
|
|
687
|
-
q.getStats=function(){if(this.l!=
|
|
688
|
-
stateHistory:[]};
|
|
689
|
-
var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.Dg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&(this.s.G=this.i.periodCount,this.s.F=this.i.gapCount,this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.h));c=this.o.getBandwidthEstimate();this.s.A=c}this.l==
|
|
690
|
-
b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.N;e=f.O;var g=f.
|
|
686
|
+
q.Md=function(){return this.V()?this.i?this.i.presentationTimeline.Md():null:null};q.xb=function(){if(this.l==Ro)return this.C.xb();var a={total:[],audio:[],video:[],text:[]};this.l==cp&&(a.total=Oi(this.h.buffered));return a};
|
|
687
|
+
q.getStats=function(){if(this.l!=Ro&&this.l!=cp)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],
|
|
688
|
+
stateHistory:[]};Mo(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.V()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.T=this.F.gg(),this.s.Y=this.F.hg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.O=Number(c.droppedVideoFrames);b.N=d;this.s.L=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.H?c.H:NaN):c=NaN;this.s.s=c;if(this.l==Ro){c=this.j.j;b=this.j.s;if(c){d=this.I?this.I.i:1;
|
|
689
|
+
var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.Dg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&(this.s.G=this.i.periodCount,this.s.F=this.i.gapCount,this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.h));c=this.o.getBandwidthEstimate();this.s.A=c}this.l==cp&&(c=this.s,c.fc=isNaN(c.fc)?NaN:c.fc+NaN,c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=
|
|
690
|
+
b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.N;e=f.O;var g=f.L,h=f.Y,k=f.T,l=f.A,m=f.i,n=f.m,p=f.H,r=f.j,u=Vk(f.g,"playing"),v=Vk(f.g,"paused"),w=Vk(f.g,"buffering"),A=f.s,y=f.C,D=f.I,z=f.Jg,C=f.fc,B=f.K,E=f.G,I=f.F,L=Wk(f.g),H=[];f=t(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,H.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,
|
|
691
691
|
estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:y,maxSegmentDuration:D,manifestSizeBytes:z,bytesDownloaded:C,nonFatalErrorCount:B,manifestPeriodCount:E,manifestGapCount:I,stateHistory:L,switchHistory:H}};
|
|
692
|
-
q.xh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:if(h.l!=
|
|
693
|
-
l&&C.label==(f||"")&&C.kind==c}))return
|
|
694
|
-
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.ua,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Zd(d||"",e||"")])};y=Zd(A.mimeType,A.codecs);D=oe(y);if(!D)throw new T(2,2,2014,d);h.i.textStreams.push(A);
|
|
695
|
-
q.yh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:if(c.l!=
|
|
696
|
-
vttOffset:0};l=zb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);r=p.next();for(u={};!r.done;u={ye:void 0,
|
|
697
|
-
n.push(w);y=b;if(!n.length){z.u(5);break}return F(z,
|
|
698
|
-
closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Zd(y||"","")])},c.l==
|
|
699
|
-
q.wh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=
|
|
700
|
-
2,2012);}})};function
|
|
701
|
-
function
|
|
702
|
-
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function
|
|
703
|
-
function
|
|
692
|
+
q.xh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:if(h.l!=Ro&&h.l!=cp)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ya("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.u(2);break}return F(z,pp(h,a),3);case 3:d=z.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=cp){z.u(4);break}g&&(c="forced");return F(z,qp(h,a,b,c,d,f||"",k),5);case 5:l=Be(b);m=h.Gc();if(n=m.find(function(C){return Be(C.language)==
|
|
693
|
+
l&&C.label==(f||"")&&C.kind==c}))return Io(h),z.return(n);throw new T(1,2,2012);case 4:p=Wd;r=h.h.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new T(1,4,4033);if(!k.length){z.u(6);break}return F(z,rp(h,a,h.H,h.g.streaming.retryParameters),7);case 7:u=z.h,v=sp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Lj(w),d="text/vtt";case 6:A={id:h.dg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ok(0,r,[a]),mimeType:d||"",
|
|
694
|
+
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.ua,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Zd(d||"",e||"")])};y=Zd(A.mimeType,A.codecs);D=oe(y);if(!D)throw new T(2,2,2014,d);h.i.textStreams.push(A);Io(h);return z.return(kf(A))}})};
|
|
695
|
+
q.yh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:if(c.l!=Ro&&c.l!=cp)throw new T(1,7,7004);if(b){z.u(2);break}return F(z,pp(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Wd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return F(z,rp(c,a,c.H,c.g.streaming.retryParameters),4);case 4:f=z.h;g=pe[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
696
|
+
vttOffset:0};l=zb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);r=p.next();for(u={};!r.done;u={ye:void 0,Bc:void 0},r=p.next())u.Bc=r.value,u.ye=null,v=function(C){return function(){null==C.ye&&(C.ye=Md([a],[C.Bc.payload]));return C.ye||[]}}(u),w=new Ei(u.Bc.startTime,u.Bc.endTime,v,0,null,null,0,0,Infinity),u.Bc.payload.includes("#xywh")&&(A=u.Bc.payload.split("#xywh=")[1].split(","),4===A.length&&w.ih({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
697
|
+
n.push(w);y=b;if(!n.length){z.u(5);break}return F(z,Rm(n[0].M()[0],c.H,c.g.manifest.retryParameters),6);case 6:y=z.h;case 5:return D={id:c.dg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Mk(n),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.De,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
|
|
698
|
+
closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Zd(y||"","")])},c.l==cp?c.qd.push(D):c.i.imageStreams.push(D),Io(c),z.return(lf(D))}})};
|
|
699
|
+
q.wh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Ro&&d.l!=cp)throw new T(1,7,7004);if(c){k.u(2);break}return F(k,pp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),F(k,qp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.yg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return F(k,new Promise(function(l,m){d.m.ka(f,"load",l);d.m.ka(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return Io(d),k.return(h);case 5:throw new T(1,
|
|
700
|
+
2,2012);}})};function pp(a,b){var c;return O(function(d){switch(d.g){case 1:return ra(d,2),F(d,Rm(b,a.H,a.g.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:ua(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
701
|
+
function qp(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,rp(a,b,a.H,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=sp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Lj(l),e="text/vtt");m=document.createElement("track");var p=a.N,r=b;try{if(p.g.enabled){var u=Fn(p);u.ot=Sn;u.su=!0;var v=Jn(u);var w=Kn(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")||
|
|
702
|
+
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function rp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=xg;f=rg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Ln(k,f,{ot:Sn,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)})}
|
|
703
|
+
function sp(a,b,c,d){var e=pe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=zb(b),b=c.parseMedia(b,a,null),Bn(b,d);throw new T(2,2,2014,c);}q.aj=function(a,b){this.ia.width=a;this.ia.height=b};q.Jf=function(a){if(this.l==Ro){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.hd||d.Ka||d.ub||(d.hd=!1,Jl(b,d,a));b=!0}}else b=!1;return b};
|
|
704
704
|
q.gf=function(){Ya("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Uh=function(){return this.ab};
|
|
705
|
-
function
|
|
706
|
-
function
|
|
705
|
+
function fo(a){var b=tm();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Jf(d))}};b.textDisplayFactory=function(){if(a.de){var c=a.getConfiguration();return new sn(a.h,a.de,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Ym(a.h,"Shaka Player TextTrack"):new pn};return b}q.lh=function(a){this.de=a};
|
|
706
|
+
function Eo(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 Pk,l=e.closedCaptions.get(g);h={id:a.dg++,originalId:g,groupId:null,
|
|
707
707
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Ud,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Zd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
708
|
-
function
|
|
709
|
-
function
|
|
710
|
-
b))}function
|
|
711
|
-
function
|
|
712
|
-
function
|
|
708
|
+
function Wo(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(r){if(1==r.g)return k?F(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.Ib(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},F(h,e(c,b),2);if(3!=h.g)return f=h.h,F(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
709
|
+
function uo(a){var b=a.pf();if(a.s&&a.L&&a.F){var c=a.I;c.j=b;Rk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Mo(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.ze<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.O&&(a.O=Math.min(a.O+ ++a.ze*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(no("buffering",
|
|
710
|
+
b))}function No(a){var b=a.h.playbackRate;0!=b&&(a.I&&a.I.set(b),b=no("ratechange"),a.dispatchEvent(b))}
|
|
711
|
+
function Mo(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Vf?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(no("statechanged",c)))}}
|
|
712
|
+
function $o(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.xg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.wd(d,!1):1==e&&b!==a.I.kc()&&a.Wc()}if(c&&(c=a.Pb(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(a.g.streaming.liveSync&&
|
|
713
713
|
a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?k=Math.max(0,a.i.serviceDescription.targetLatency-
|
|
714
714
|
d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.O||"number"!==typeof g||(a.O=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ca&&null!==a.O&&"number"===typeof g&&a.ze<n&&Date.now()-a.Ca>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,a.O=Math.max(a.O-(g-f)/2,f+d),
|
|
715
|
-
a.Ca=Date.now());e&&null!==a.O&&(h=a.O+d,k=a.O-d);g=c.end-a.h.currentTime;d=0;a.l==
|
|
716
|
-
function
|
|
717
|
-
function
|
|
718
|
-
function
|
|
719
|
-
function
|
|
720
|
-
function
|
|
721
|
-
function
|
|
722
|
-
q.disableStream=function(a,b){if(!this.g.abr.enabled||this.l===
|
|
723
|
-
k){return h+k.end-k.start},0);
|
|
724
|
-
function
|
|
725
|
-
function
|
|
726
|
-
function
|
|
727
|
-
function
|
|
728
|
-
function
|
|
729
|
-
function
|
|
715
|
+
a.Ca=Date.now());e&&null!==a.O&&(h=a.O+d,k=a.O-d);g=c.end-a.h.currentTime;d=0;a.l==cp&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.L.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.wd(m,!1):h&&l&&g-d>h?(b!=l&&a.wd(l,!1),a.Ca=null):k&&m&&g-d<k?(b!=m&&a.wd(m,!1),a.Ca=null):b!==a.I.kc()&&(a.Wc(),a.Ca=Date.now())}}
|
|
716
|
+
function ap(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.T)?(a.T=c,b=!0):(c=Math.max(a.T,c),a.T!=c&&(a.T=c,b=!0)));if(b){var d;0==a.T?d=no("started"):25==a.T?d=no("firstquartile"):50==a.T?d=no("midpoint"):75==a.T?d=no("thirdquartile"):100==a.T&&(d=no("complete"));d&&a.dispatchEvent(d)}}}function Jo(a){try{ti(a.ae,a.i)}catch(c){return so(a,c),!1}var b=tf(a.i.variants);b=a.Da.create(b);a.o.setVariants(Array.from(b.values()));return!0}
|
|
717
|
+
function ko(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=Jo(a)?a.o.chooseVariant():null)&&Po(a,f,e,b,c,d)}
|
|
718
|
+
function Po(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.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Nl(a.j,b,d,e,f,c);d=null;g&&(d=jf(g));b=jf(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Hj(a.K,b,a.hf()),c=no("adaptation",c),tp(a,c)):up(a,d,b)}}
|
|
719
|
+
function lp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=rf(c),b=rf(b),up(a,c,b))}function Xo(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Be(a.g.preferredTextLanguage);c=Be(c.language);if(2==a.g.autoShowText)return Ae(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Be(b.language);return Ae(c,d)&&!Ae(a,c)}Ya("Invalid autoShowText setting!");return!1}
|
|
720
|
+
function Io(a){var b=no("trackschanged");tp(a,b)}function up(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Hj(a.K,c,a.hf());c=no("variantchanged",b);tp(a,c)}function kp(a){var b=no("textchanged");tp(a,b)}function Yo(a){var b=no("texttrackvisibility");tp(a,b)}function Zo(a){a.g.abr.enabled||jo(a);var b=(new Map).set("newStatus",a.g.abr.enabled);tp(a,no("abrstatuschanged",b))}
|
|
721
|
+
function jo(a,b){b=void 0===b?!0:b;if(a.l==Ro){a.je.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Jo(a)}}
|
|
722
|
+
q.disableStream=function(a,b){if(!this.g.abr.enabled||this.l===oo||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.je.Ra(1);b=this.xb().video.reduce(function(h,
|
|
723
|
+
k){return h+k.end-k.start},0);ko(this,!1,b,!0,!1);return!0}return!1};
|
|
724
|
+
function so(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==oo)return f.return();1===b.severity&&a.s.K++;c=!0;if(!(a.Ea&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ra(f,3);return F(f,hm(a.j),5);case 5:d=f.h;c=!d;ta(f,2);break;case 3:ua(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&jo(a,!1);e=no("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);G(f)}})}
|
|
725
|
+
function Go(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(no(b,a))}
|
|
726
|
+
function Ho(a,b,c,d){d=void 0===d?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(no(d?"audiotrackchanged":"mediaqualitychanged",b))}
|
|
727
|
+
function ro(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}function Oo(a,b,c){0<b&&(a.V()||a.kh(b));b=a.getDuration();c<b&&(a.V()||a.Za(c))}function tp(a,b){O(function(c){if(1==c.g)return F(c,Promise.resolve(),2);a.l!=oo&&a.dispatchEvent(b);G(c)})}
|
|
728
|
+
function np(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Be(c.language)):b.add("und");return b}
|
|
729
|
+
function mp(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Be(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
730
730
|
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.lh;X.prototype.getManifestParserFactory=X.prototype.Uh;X.prototype.getManifest=X.prototype.gf;X.prototype.retryStreaming=X.prototype.Jf;X.prototype.setMaxHardwareResolution=X.prototype.aj;X.prototype.addChaptersTrack=X.prototype.wh;X.prototype.addThumbnailsTrack=X.prototype.yh;X.prototype.addTextTrackAsync=X.prototype.xh;X.prototype.getStats=X.prototype.getStats;
|
|
731
731
|
X.prototype.getBufferedInfo=X.prototype.xb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Md;X.prototype.getPresentationStartTimeAsDate=X.prototype.Dg;X.prototype.getPlayheadTimeAsDate=X.prototype.Zh;X.prototype.setTextTrackVisibility=X.prototype.hh;X.prototype.getChapters=X.prototype.Nh;X.prototype.getChaptersTracks=X.prototype.yg;X.prototype.isTextTrackVisible=X.prototype.rf;X.prototype.selectVariantsByLabel=X.prototype.Wi;X.prototype.selectTextLanguage=X.prototype.Mf;
|
|
732
|
-
X.prototype.selectAudioLanguage=X.prototype.$g;X.prototype.getTextLanguages=X.prototype.ci;X.prototype.getAudioLanguages=X.prototype.Kh;X.prototype.getTextLanguagesAndRoles=X.prototype.di;X.prototype.getAudioLanguagesAndRoles=X.prototype.Lh;X.prototype.selectVariantTrack=X.prototype.Nf;X.prototype.selectTextTrack=X.prototype.ah;X.prototype.getThumbnails=X.prototype.Eg;X.prototype.getAllThumbnails=X.prototype.Jh;X.prototype.getImageTracks=X.prototype.Rh;X.prototype.getTextTracks=X.prototype.
|
|
732
|
+
X.prototype.selectAudioLanguage=X.prototype.$g;X.prototype.getTextLanguages=X.prototype.ci;X.prototype.getAudioLanguages=X.prototype.Kh;X.prototype.getTextLanguagesAndRoles=X.prototype.di;X.prototype.getAudioLanguagesAndRoles=X.prototype.Lh;X.prototype.selectVariantTrack=X.prototype.Nf;X.prototype.selectTextTrack=X.prototype.ah;X.prototype.getThumbnails=X.prototype.Eg;X.prototype.getAllThumbnails=X.prototype.Jh;X.prototype.getImageTracks=X.prototype.Rh;X.prototype.getTextTracks=X.prototype.Gc;
|
|
733
733
|
X.prototype.getVariantTracks=X.prototype.mc;X.prototype.cancelTrickPlay=X.prototype.Wc;X.prototype.trickPlay=X.prototype.wd;X.prototype.getPlaybackRate=X.prototype.fb;X.prototype.isBuffering=X.prototype.pf;X.prototype.getKeyStatuses=X.prototype.Kd;X.prototype.getActiveSessionsMetadata=X.prototype.ff;X.prototype.getExpiration=X.prototype.cd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.oi;X.prototype.goToLive=X.prototype.ki;
|
|
734
|
-
X.prototype.seekRange=X.prototype.Pb;X.prototype.isAudioOnly=X.prototype.ni;X.prototype.isInProgress=X.prototype.oc;X.prototype.isLive=X.prototype.V;X.prototype.getAdManager=X.prototype.wg;X.prototype.getAssetUri=X.prototype.
|
|
734
|
+
X.prototype.seekRange=X.prototype.Pb;X.prototype.isAudioOnly=X.prototype.ni;X.prototype.isInProgress=X.prototype.oc;X.prototype.isLive=X.prototype.V;X.prototype.getAdManager=X.prototype.wg;X.prototype.getAssetUri=X.prototype.Fc;X.prototype.getNetworkingEngine=X.prototype.yb;X.prototype.getMediaElement=X.prototype.Xh;X.prototype.getManifestType=X.prototype.hf;X.prototype.getLoadMode=X.prototype.Ag;X.prototype.resetConfiguration=X.prototype.Qi;X.prototype.getBufferFullness=X.prototype.xg;
|
|
735
735
|
X.prototype.getNonDefaultConfiguration=X.prototype.Cg;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.Mi;X.prototype.destroyAllPreloads=X.prototype.Qe;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.sg;X.prototype.unloadAndSavePreload=X.prototype.dj;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.hj;X.prototype.unload=X.prototype.dc;
|
|
736
736
|
X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Ch;X.prototype.attach=X.prototype.Sb;
|
|
737
|
-
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return F(k,
|
|
738
|
-
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=oe(n)?!0:Sc()?lb(n)||(nc(n)?!0:!1):Tc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return F(k,sd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=
|
|
739
|
-
X.isBrowserSupported=function(){window.Promise||Ya("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Sc()?!0:Tc("application/x-mpegurl")};X.setAdManagerFactory=function(a){
|
|
740
|
-
X.registerSupportPlugin=function(a,b){
|
|
737
|
+
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return F(k,mi(),3);case 3:b=k.h;case 2:var l={};if(Sc())for(var m in xi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Sc()?!!xi[n]:Tc(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x($d));
|
|
738
|
+
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=oe(n)?!0:Sc()?lb(n)||(nc(n)?!0:!1):Tc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return F(k,sd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=vp;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
739
|
+
X.isBrowserSupported=function(){window.Promise||Ya("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Sc()?!0:Tc("application/x-mpegurl")};X.setAdManagerFactory=function(a){io=a};
|
|
740
|
+
X.registerSupportPlugin=function(a,b){vp[a]=b};X.prototype.destroy=X.prototype.destroy;var oo=0,eo=1,Ro=2,cp=3;X.LoadMode={DESTROYED:oo,NOT_LOADED:eo,MEDIA_SOURCE:Ro,SRC_EQUALS:cp};X.version="v4.10.26";var wp=["4","10"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(wp[0]),Number(wp[1])));var vp={},io=null;function xp(){this.g=[];this.i=this.l=this.j=this.h=0}function yp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function zp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new gb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=zp.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};
|
|
741
741
|
q.isPaused=function(){return this.i};q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
742
742
|
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
743
743
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
744
|
-
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){
|
|
752
|
-
|
|
753
|
-
function
|
|
754
|
-
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
|
|
755
|
-
a.i.offsetHeight,
|
|
756
|
-
function
|
|
757
|
-
function
|
|
758
|
-
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
744
|
+
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",zp);zp.prototype.release=zp.prototype.release;
|
|
745
|
+
zp.prototype.getPodIndex=zp.prototype.getPodIndex;zp.prototype.getTimeOffset=zp.prototype.getTimeOffset;zp.prototype.getMediaUrl=zp.prototype.getMediaUrl;zp.prototype.getAdvertiserName=zp.prototype.getAdvertiserName;zp.prototype.getCreativeAdId=zp.prototype.getCreativeAdId;zp.prototype.getAdId=zp.prototype.getAdId;zp.prototype.getVastMediaWidth=zp.prototype.getVastMediaWidth;zp.prototype.getVastMediaHeight=zp.prototype.getVastMediaHeight;zp.prototype.getVastMediaBitrate=zp.prototype.getVastMediaBitrate;
|
|
746
|
+
zp.prototype.getDescription=zp.prototype.getDescription;zp.prototype.getTitle=zp.prototype.getTitle;zp.prototype.getPositionInSequence=zp.prototype.getPositionInSequence;zp.prototype.getSequenceLength=zp.prototype.getSequenceLength;zp.prototype.setMuted=zp.prototype.setMuted;zp.prototype.resize=zp.prototype.resize;zp.prototype.isLinear=zp.prototype.isLinear;zp.prototype.isMuted=zp.prototype.isMuted;zp.prototype.setVolume=zp.prototype.setVolume;zp.prototype.getVolume=zp.prototype.getVolume;
|
|
747
|
+
zp.prototype.play=zp.prototype.play;zp.prototype.pause=zp.prototype.pause;zp.prototype.skip=zp.prototype.skip;zp.prototype.canSkipNow=zp.prototype.canSkipNow;zp.prototype.getTimeUntilSkippable=zp.prototype.getTimeUntilSkippable;zp.prototype.isSkippable=zp.prototype.isSkippable;zp.prototype.isPaused=zp.prototype.isPaused;zp.prototype.getRemainingTime=zp.prototype.getRemainingTime;zp.prototype.getMinSuggestedDuration=zp.prototype.getMinSuggestedDuration;zp.prototype.getDuration=zp.prototype.getDuration;
|
|
748
|
+
zp.prototype.isClientRendering=zp.prototype.isClientRendering;zp.prototype.needsSkipUI=zp.prototype.needsSkipUI;function Ap(){}S("shaka.ads.Utils",Ap);Ap.ADS_LOADED="ads-loaded";Ap.AD_STARTED="ad-started";Ap.AD_FIRST_QUARTILE="ad-first-quartile";Ap.AD_MIDPOINT="ad-midpoint";Ap.AD_THIRD_QUARTILE="ad-third-quartile";Ap.AD_COMPLETE="ad-complete";Ap.AD_STOPPED="ad-stopped";Ap.AD_SKIPPED="ad-skipped";Ap.AD_VOLUME_CHANGED="ad-volume-changed";Ap.AD_MUTED="ad-muted";Ap.AD_PAUSED="ad-paused";Ap.AD_RESUMED="ad-resumed";Ap.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Ap.CUEPOINTS_CHANGED="ad-cue-points-changed";
|
|
749
|
+
Ap.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Ap.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Ap.AD_CLICKED="ad-clicked";Ap.AD_PROGRESS="ad-progress";Ap.AD_BUFFERING="ad-buffering";Ap.AD_IMPRESSION="ad-impression";Ap.AD_DURATION_CHANGED="ad-duration-changed";Ap.AD_CLOSED="ad-closed";Ap.AD_LOADED="ad-loaded";Ap.ALL_ADS_COMPLETED="all-ads-completed";Ap.AD_LINEAR_CHANGED="ad-linear-changed";Ap.AD_METADATA="ad-metadata";Ap.AD_RECOVERABLE_ERROR="ad-recoverable-error";Ap.AD_ERROR="ad-error";
|
|
750
|
+
Ap.AD_BREAK_READY="ad-break-ready";Ap.AD_INTERACTION="ad-interaction";Ap.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Ap.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Ap.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Bp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.26");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
|
|
751
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Cp(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Dp(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.ka(this.i,"play",function(){f.F=!0})}Bp.prototype.configure=function(a){this.o=a};Bp.prototype.stop=function(){this.g&&this.g.stop();this.s&&rn(this.s)};
|
|
752
|
+
Bp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function Dp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new U("ad-error",b));Ep(a,null);a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
753
|
+
function Cp(a,b){a.l(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.l(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
754
|
+
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Fp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Gp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
755
|
+
a.i.offsetHeight,Gp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.ka(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){Ep(a,null)}}
|
|
756
|
+
function Gp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
757
|
+
function Fp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new U(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Dp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Hp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){Hp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
758
|
+
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Ep(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Ep(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
759
759
|
a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
760
760
|
a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
|
|
761
761
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
762
|
-
function
|
|
763
|
-
function
|
|
762
|
+
function Hp(a,b){var c=b.getAd();c?(a.j=new zp(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new U("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new U("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.o.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Ya("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
763
|
+
function Ep(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new U("ad-content-resume-requested"));a.l(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function Ip(a,b,c,d,e){this.g=a;this.h=b;this.j=c;this.l=d;this.i=e}q=Ip.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!0};q.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h};
|
|
764
764
|
q.getTimeUntilSkippable=function(){return this.h?0:Math.max(this.getRemainingTime(),0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.j()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
765
765
|
q.getSequenceLength=function(){return this.l};q.getPositionInSequence=function(){return this.i};q.getTitle=function(){return""};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return""};q.getCreativeAdId=function(){return""};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};
|
|
766
|
-
q.release=function(){this.g=null};S("shaka.ads.InterstitialAd",
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
h=e.B.Pb();k=t(g);l=k.next();case 3:if(l.done){v.u(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.l;0<p&&10>=p&&(e.s.has(m)||e.s.set(m,e.g.preload(m.uri)));v.u(4);break}if(!e.s.has(m)){v.u(7);break}return F(v,e.s.get(m),8);case 8:(r=v.h)&&r.destroy(),e.s.delete(m);case 7:u=JSON.stringify(m),e.
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
function Pp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.B.Ag()==
|
|
774
|
-
b);c&&
|
|
775
|
-
function
|
|
776
|
-
E.g)return"detach"!=B.state?E.u(0):od()?F(E,new Promise(function(I){return(new Rc(I)).Z(.1)}),3):E.u(3);h.resolve();a.j.kb(a.B,"onstatechange",k);G(E)})};a.j.D(a.B,"onstatechange",k);return F(C,h,2);case 2:return a.m||(a.
|
|
777
|
-
I.g)return n(),m&&m.stop(),(B=
|
|
778
|
-
B)));return F(E,p(),0)})},u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return F(B,p(),2)}a.
|
|
779
|
-
a.
|
|
780
|
-
b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0<A&&a.g.configure("playRangeEnd",A)),b.Oc&&(m=(new Rc(function(){w.skip()})).Z(b.Oc),a.g.configure("playRangeEnd",b.Oc)),F(C,a.g.Sb(a.o),6);case 6:return a.s.has(b)?F(C,a.s.get(b),10):F(C,a.g.load(b.uri),8);case 10:return y=C.h,a.s.delete(b),y?F(C,a.g.load(y),8):F(C,a.g.load(b.uri),8);case 8:b.Oc&&(m&&m.stop(),m=(new Rc(function(){w.skip()})).Z(b.Oc));D=(Date.now()-g)/1E3;a.
|
|
781
|
-
D)));a.m&&a.
|
|
766
|
+
q.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Ip);Ip.prototype.release=Ip.prototype.release;Ip.prototype.getPodIndex=Ip.prototype.getPodIndex;Ip.prototype.getTimeOffset=Ip.prototype.getTimeOffset;Ip.prototype.getMediaUrl=Ip.prototype.getMediaUrl;Ip.prototype.getAdvertiserName=Ip.prototype.getAdvertiserName;Ip.prototype.getCreativeAdId=Ip.prototype.getCreativeAdId;Ip.prototype.getAdId=Ip.prototype.getAdId;Ip.prototype.getVastMediaWidth=Ip.prototype.getVastMediaWidth;
|
|
767
|
+
Ip.prototype.getVastMediaHeight=Ip.prototype.getVastMediaHeight;Ip.prototype.getVastMediaBitrate=Ip.prototype.getVastMediaBitrate;Ip.prototype.getDescription=Ip.prototype.getDescription;Ip.prototype.getTitle=Ip.prototype.getTitle;Ip.prototype.getPositionInSequence=Ip.prototype.getPositionInSequence;Ip.prototype.getSequenceLength=Ip.prototype.getSequenceLength;Ip.prototype.setMuted=Ip.prototype.setMuted;Ip.prototype.resize=Ip.prototype.resize;Ip.prototype.isLinear=Ip.prototype.isLinear;
|
|
768
|
+
Ip.prototype.isMuted=Ip.prototype.isMuted;Ip.prototype.setVolume=Ip.prototype.setVolume;Ip.prototype.getVolume=Ip.prototype.getVolume;Ip.prototype.play=Ip.prototype.play;Ip.prototype.pause=Ip.prototype.pause;Ip.prototype.skip=Ip.prototype.skip;Ip.prototype.canSkipNow=Ip.prototype.canSkipNow;Ip.prototype.getTimeUntilSkippable=Ip.prototype.getTimeUntilSkippable;Ip.prototype.isSkippable=Ip.prototype.isSkippable;Ip.prototype.isPaused=Ip.prototype.isPaused;Ip.prototype.getRemainingTime=Ip.prototype.getRemainingTime;
|
|
769
|
+
Ip.prototype.getMinSuggestedDuration=Ip.prototype.getMinSuggestedDuration;Ip.prototype.getDuration=Ip.prototype.getDuration;Ip.prototype.isClientRendering=Ip.prototype.isClientRendering;Ip.prototype.needsSkipUI=Ip.prototype.needsSkipUI;function Jp(a,b,c,d){var e=this;this.I=null;this.F=a;this.B=b;this.h=c;this.C=null;this.m=!0;this.o=this.h;this.i=d;this.H=new Set;this.A=new Set;this.s=new Map;this.g=new X;Kp(this);this.K=new gb;this.j=new gb;this.G=!1;this.l=null;this.K.D(this.h,"timeupdate",function(){if(!e.G){var f=null==e.l||0==e.l;e.l=e.h.currentTime;(f=Lp(e,f))&&Mp(e,f,1,1,Date.now())}});this.L=(new Rc(function(){var f,g,h,k,l,m,n,p,r,u;return O(function(v){switch(v.g){case 1:if(!e.A.size||e.G||null==e.l){v.u(0);break}f=!1;
|
|
770
|
+
g=Array.from(e.A);h=e.B.Pb();k=t(g);l=k.next();case 3:if(l.done){v.u(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.l;0<p&&10>=p&&(e.s.has(m)||e.s.set(m,e.g.preload(m.uri)));v.u(4);break}if(!e.s.has(m)){v.u(7);break}return F(v,e.s.get(m),8);case 8:(r=v.h)&&r.destroy(),e.s.delete(m);case 7:u=JSON.stringify(m),e.H.has(u)&&e.H.delete(u),e.A.delete(m),f=!0;case 4:l=k.next();v.u(3);break;case 5:f&&Np(e),G(v)}})})).Ra(1)}Jp.prototype.configure=function(a){this.I=a};
|
|
771
|
+
function Op(a){if(a.F&&a.I&&!a.G){var b=a.I.supportsMultipleMediaElements,c=a.h;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.m==b&&(a.m=!b,a.m?(a.o=a.h,a.C&&(a.C.parentElement&&a.F.removeChild(a.C),a.C=null)):(a.C||(b=document.createElement(a.h.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.backgroundColor="rgb(0, 0, 0)",b.setAttribute("playsinline",""),a.C=b),a.o=a.C))}}
|
|
772
|
+
Jp.prototype.stop=function(){this.j&&this.j.Qa();this.H.clear();this.A.clear();this.g.Qe();this.s.clear();this.g.detach();this.G=!1;this.l=null};Jp.prototype.release=function(){this.stop();this.K&&this.K.release();this.j&&this.j.release();this.F&&rn(this.F);this.L&&(this.L.stop(),this.L=null);this.g.destroy()};
|
|
773
|
+
function Pp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.B.Ag()==cp&&a.m)return Ya("Unsupported interstitial when using single media element",b),m.return();Kp(a);c=!1;return F(m,Qp(a,b),2)}d=m.h;if(d.length)for(e=t(d),f=e.next();!f.done;f=e.next())(g=f.value,h=JSON.stringify(g),a.H.has(h))||(c=!0,a.H.add(h),a.A.add(g),k=!1,b.Bb&&null==a.l?k=!0:0!=g.startTime||g.Ie?null!=a.l&&(l=b.startTime-a.l,0<l&&10>=l&&(k=!0)):k=!0,k&&(a.s.has(g)||a.s.set(g,a.g.preload(g.uri))));else Ya("Unsupported interstitial",
|
|
774
|
+
b);c&&Np(a);G(m)})}function Lp(a,b,c){c=void 0===c?0:c;var d=0,e=null;if(a.A.size&&null!=a.l){var f=a.h.ended,g=Array.from(a.A).sort(function(l,m){return m.startTime-l.startTime});g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;b?k=h.Bb:f?k=h.qc:h.Bb||h.qc||(k=a.l-Math.round(1E3*h.startTime)/1E3,k=0<k&&(1>=k||!h.Ie));if(k){if(d==c){e=h;break}d++}}}return e}
|
|
775
|
+
function Mp(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,v,w,A,y,D,z;O(function(C){switch(C.g){case 1:Op(a);g=Date.now();!a.o.parentElement&&a.F&&a.F.appendChild(a.o);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.Bb?B.Bb==b.Bb:b.qc?B.qc==b.qc:.001>Math.abs(B.startTime-b.startTime)}).length);if(b.once||b.Bb)f++,a.A.delete(b),Np(a);a.G=!0;if(!a.m||1!=d){C.u(2);break}a.i(new U("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new $f;k=function(B){return O(function(E){if(1==
|
|
776
|
+
E.g)return"detach"!=B.state?E.u(0):od()?F(E,new Promise(function(I){return(new Rc(I)).Z(.1)}),3):E.u(3);h.resolve();a.j.kb(a.B,"onstatechange",k);G(E)})};a.j.D(a.B,"onstatechange",k);return F(C,h,2);case 2:return a.m||(a.h.pause(),null!=b.Rc&&0!=b.Rc&&(a.h.currentTime+=b.Rc)),l=!1,m=null,n=function(){if(!a.m&&null==b.Rc)if(b.se&&b.endTime&&Infinity!=b.endTime)a.h.currentTime!=b.endTime&&(a.h.currentTime=b.endTime);else{var B=Date.now();a.h.currentTime+=(B-e)/1E3;e=B}},p=function(){var B,E;return O(function(I){if(1==
|
|
777
|
+
I.g)return n(),m&&m.stop(),(B=Lp(a,b.Bb,d-f))?(a.i(new U("ad-stopped")),a.j.Qa(),Mp(a,B,c,++d,e,f),I.u(0)):a.m?F(I,a.g.detach(),4):F(I,a.g.dc(),4);a.m&&(E=b.Rc,null==E&&(E=b.se&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.l||0):(Date.now()-e)/1E3),a.i(new U("ad-content-resume-requested",(new Map).set("offset",E))));a.i(new U("ad-stopped"));a.j.Qa();a.G=!1;a.m||(n(),a.h.ended||a.h.play());Op(a);G(I)})},r=function(B){return O(function(E){if(l)return E.return();l=!0;a.i(new U("ad-error",(new Map).set("originalEvent",
|
|
778
|
+
B)));return F(E,p(),0)})},u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return F(B,p(),2)}a.i(new U("ad-complete"));G(B)})},v=function(){return O(function(B){if(l)return B.return();l=!0;a.i(new U("ad-skipped"));return F(B,p(),0)})},w=new Ip(a.o,b.isSkippable,v,c,d),a.m||(w.setMuted(a.h.muted),w.setVolume(a.h.volume)),a.i(new U("ad-started",(new Map).set("ad",w))),w.canSkipNow()&&a.i(new U("ad-skip-state-changed")),a.j.ka(a.g,"error",r),a.j.ka(a.g,"firstquartile",function(){n();
|
|
779
|
+
a.i(new U("ad-first-quartile"))}),a.j.ka(a.g,"midpoint",function(){n();a.i(new U("ad-midpoint"))}),a.j.ka(a.g,"thirdquartile",function(){n();a.i(new U("ad-third-quartile"))}),a.j.ka(a.g,"complete",u),a.j.D(a.o,"play",function(){a.i(new U("ad-resumed"))}),a.j.D(a.o,"pause",function(){var B=a.g.getConfiguration();a.o.currentTime>=B.playRangeEnd?u():a.i(new U("ad-paused"))}),a.j.D(a.o,"volumechange",function(){a.o.muted?a.i(new U("ad-muted")):a.i(new U("ad-volume-changed"))}),ra(C,4),Kp(a),b.startTime&&
|
|
780
|
+
b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0<A&&a.g.configure("playRangeEnd",A)),b.Oc&&(m=(new Rc(function(){w.skip()})).Z(b.Oc),a.g.configure("playRangeEnd",b.Oc)),F(C,a.g.Sb(a.o),6);case 6:return a.s.has(b)?F(C,a.s.get(b),10):F(C,a.g.load(b.uri),8);case 10:return y=C.h,a.s.delete(b),y?F(C,a.g.load(y),8):F(C,a.g.load(b.uri),8);case 8:b.Oc&&(m&&m.stop(),m=(new Rc(function(){w.skip()})).Z(b.Oc));D=(Date.now()-g)/1E3;a.i(new U("ads-loaded",(new Map).set("loadTime",
|
|
781
|
+
D)));a.m&&a.h.play();ta(C,0);break;case 4:z=ua(C),r(z),G(C)}})}
|
|
782
782
|
function Qp(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R;return O(function(Q){switch(Q.g){case 1:c=[];if(!b)return Q.return(c);d=b.values.find(function(W){return"X-ASSET-URI"==W.key});e=b.values.find(function(W){return"X-ASSET-LIST"==W.key});if(!d&&!e)return Q.return(c);f=b.values.find(function(W){return"X-RESTRICT"==W.key});h=g=!0;f&&f.data&&(k=f.data,g=!k.includes("SKIP"),h=!k.includes("JUMP"));l=null;if(m=b.values.find(function(W){return"X-RESUME-OFFSET"==W.key}))n=m.data,
|
|
783
783
|
l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(r=b.values.find(function(W){return"X-PLAYOUT-LIMIT"==W.key}))u=r.data,p=parseFloat(u),isNaN(p)&&(p=null);A=w=v=!1;if(y=b.values.find(function(W){return"CUE"==W.key}))D=y.data,v=D.includes("ONCE"),w=D.includes("PRE"),A=D.includes("POST");z=!1;(C=b.values.find(function(W){return"X-TIMELINE-OCCUPIES"==W.key}))?(B=C.data,z=B.includes("RANGE")):!m&&a.B.V()&&(z=!w&&!A);if(d){E=d.data;if(!E)return Q.return(c);c.push({startTime:b.startTime,endTime:b.endTime,uri:E,
|
|
784
|
-
isSkippable:g,Ie:h,Rc:l,Oc:p,once:v,Bb:w,
|
|
785
|
-
function
|
|
784
|
+
isSkippable:g,Ie:h,Rc:l,Oc:p,once:v,Bb:w,qc:A,se:z});Q.u(2);break}if(!e){Q.u(2);break}I=e.data;if(!I)return Q.return(c);L=rg([I],Yf());H=a.B.yb().request(7,L);ra(Q,4);return F(Q,H.promise,6);case 6:J=Q.h;K=ud(J.data);M=JSON.parse(K);N=t(M.ASSETS);for(P=N.next();!P.done;P=N.next())R=P.value,R.URI&&c.push({startTime:b.startTime,endTime:b.endTime,uri:R.URI,isSkippable:g,Ie:h,Rc:l,Oc:p,once:v,Bb:w,qc:A,se:z});ta(Q,2);break;case 4:ua(Q);case 2:return Q.return(c)}})}
|
|
785
|
+
function Np(a){for(var b=[],c=t(a.A),d=c.next(),e={};!d.done;e={Rb:void 0},d=c.next())d=d.value,e.Rb={start:d.startTime,end:null},d.Bb?(e.Rb.start=0,e.Rb.end=null):d.qc?(e.Rb.start=-1,e.Rb.end=null):d.se&&(e.Rb.end=d.endTime),b.find(function(f){return function(g){return f.Rb.start==g.start&&f.Rb.end==g.end}}(e))||b.push(e.Rb);a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}function Kp(a){a.g.configure(a.B.Cg());var b=a.g.yb();b.ng();b.og();qg(a.B.yb(),b)};function Rp(a){this.h=a||"";this.g=0}function Sp(a){Tp(a,/[ \t]+/gm)}function Tp(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Up(a){return a.g==a.h.length?null:(a=Tp(a,/[^ \t\n]*/gm))?a[0]:null};function Vp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Tp(new Rp(a),Wp),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}q=Vp.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!1};q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
786
786
|
q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};
|
|
787
787
|
q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return this.o};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};
|
|
788
788
|
q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Vp);Vp.prototype.release=Vp.prototype.release;
|
|
789
789
|
Vp.prototype.getPodIndex=Vp.prototype.getPodIndex;Vp.prototype.getTimeOffset=Vp.prototype.getTimeOffset;Vp.prototype.getMediaUrl=Vp.prototype.getMediaUrl;Vp.prototype.getAdvertiserName=Vp.prototype.getAdvertiserName;Vp.prototype.getCreativeAdId=Vp.prototype.getCreativeAdId;Vp.prototype.getAdId=Vp.prototype.getAdId;Vp.prototype.getVastMediaWidth=Vp.prototype.getVastMediaWidth;Vp.prototype.getVastMediaHeight=Vp.prototype.getVastMediaHeight;Vp.prototype.getVastMediaBitrate=Vp.prototype.getVastMediaBitrate;
|
|
790
790
|
Vp.prototype.getDescription=Vp.prototype.getDescription;Vp.prototype.getTitle=Vp.prototype.getTitle;Vp.prototype.getPositionInSequence=Vp.prototype.getPositionInSequence;Vp.prototype.getSequenceLength=Vp.prototype.getSequenceLength;Vp.prototype.setMuted=Vp.prototype.setMuted;Vp.prototype.resize=Vp.prototype.resize;Vp.prototype.isLinear=Vp.prototype.isLinear;Vp.prototype.isMuted=Vp.prototype.isMuted;Vp.prototype.setVolume=Vp.prototype.setVolume;Vp.prototype.getVolume=Vp.prototype.getVolume;
|
|
791
791
|
Vp.prototype.play=Vp.prototype.play;Vp.prototype.pause=Vp.prototype.pause;Vp.prototype.skip=Vp.prototype.skip;Vp.prototype.canSkipNow=Vp.prototype.canSkipNow;Vp.prototype.getTimeUntilSkippable=Vp.prototype.getTimeUntilSkippable;Vp.prototype.isSkippable=Vp.prototype.isSkippable;Vp.prototype.isPaused=Vp.prototype.isPaused;Vp.prototype.getRemainingTime=Vp.prototype.getRemainingTime;Vp.prototype.getMinSuggestedDuration=Vp.prototype.getMinSuggestedDuration;Vp.prototype.getDuration=Vp.prototype.getDuration;
|
|
792
|
-
Vp.prototype.isClientRendering=Vp.prototype.isClientRendering;Vp.prototype.needsSkipUI=Vp.prototype.needsSkipUI;var Wp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Xp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.T=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.
|
|
792
|
+
Vp.prototype.isClientRendering=Vp.prototype.isClientRendering;Vp.prototype.needsSkipUI=Vp.prototype.needsSkipUI;var Wp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Xp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.T=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.O=!0;this.H="";this.o=new gb}Xp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.kb(b.target,b.type,b.listener);Yp(this);this.m=[];this.s=[];this.G="";this.O=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
793
793
|
Xp.prototype.release=function(){this.stop();this.o&&this.o.release()};Xp.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(Zp(this,this.G,this.O),this.O=!1)};Xp.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
794
|
-
function $p(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=
|
|
794
|
+
function $p(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=rg([b],Yf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Ad(e)),f=a.K.request(7,d),ra(u,2),F(u,f.promise,4);if(2!=u.g){g=u.h;h=ud(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new tc(b),m=new tc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.T,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),r=new tc(k.manifestUrl),a.l.resolve(l.resolve(r).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
795
795
|
return ta(u,0)}ua(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;G(u)})}
|
|
796
|
-
function Zp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;O(function(y){if(1==y.g)return d=
|
|
796
|
+
function Zp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;O(function(y){if(1==y.g)return d=rg([b],Yf()),e=a.K.request(7,d),ra(y,2),F(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=ud(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),r=p.next();!r.done;r=p.next())for(u=r.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,aq(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
|
|
797
797
|
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Yp(a),a.j=[];c&&(a.I||0<g.length)&&bq(a);return ta(y,0)}ua(y);G(y)})}
|
|
798
|
-
function aq(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=cq(b);if(d=a.F.get(c))return m.return();e=
|
|
798
|
+
function aq(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=cq(b);if(d=a.F.get(c))return m.return();e=rg([b.staticResource],Yf());f=a.K.request(7,e);ra(m,2);a.F.set(c,[]);return F(m,f.promise,4)}if(2!=m.g)return g=m.h,h=ud(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ta(m,0);ua(m);a.F.delete(c);G(m)})}
|
|
799
799
|
function cq(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function bq(a){dq(a);a.I||(eq(a),a.o.D(a.h,"seeked",function(){eq(a)}),a.o.D(a.h,"ended",function(){Yp(a)}));a.o.D(a.h,"timeupdate",function(){dq(a)})}
|
|
800
800
|
function eq(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
801
801
|
function dq(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),fq(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),fq(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),fq(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
802
|
-
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&fq(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Yp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Yp(a);a.
|
|
802
|
+
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&fq(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Yp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Yp(a);a.L=e;a.g=new Vp(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&fq(a,"breakStart");gq(a);break}}}if(!a.g)for(d=
|
|
803
803
|
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(cq(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Yp(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
|
|
804
|
-
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.
|
|
805
|
-
function Yp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?fq(a,"skip"):fq(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.kb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&fq(a,"breakEnd");a.g=null;a.C=null;a.
|
|
804
|
+
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new Vp(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&fq(a,"breakStart");gq(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
805
|
+
function Yp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?fq(a,"skip"):fq(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.kb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&fq(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
|
|
806
806
|
function gq(a){var b=!1;a.h.paused?b=!0:(fq(a,"impression"),fq(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&fq(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||fq(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(fq(a,"impression"),fq(a,"start"),b=!1):fq(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){fq(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
|
|
807
807
|
d.type,d.listener)}
|
|
808
|
-
function fq(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.
|
|
808
|
+
function fq(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=rg([d],Yf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
|
|
809
809
|
case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
|
|
810
810
|
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function hq(a,b){this.g=a;this.i=null;this.h=b}q=hq.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!1};q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};
|
|
811
811
|
q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};
|
|
@@ -819,60 +819,60 @@ e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was
|
|
|
819
819
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
|
|
820
820
|
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
|
|
821
821
|
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=iq.prototype;q.configure=function(){};q.stop=function(){this.B="";this.o=null;this.C=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.C};
|
|
822
|
-
function jq(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function kq(){
|
|
823
|
-
q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new
|
|
824
|
-
q.onAssetUnload=function(){this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new
|
|
825
|
-
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Xp(a,b,c,function(e){return lq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new
|
|
822
|
+
function jq(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function kq(){jg.call(this);this.g=this.h=this.i=this.j=null;this.m=new xp;this.o=navigator.language;this.l=null}na(kq,jg);q=kq.prototype;q.setLocale=function(a){this.o=a};q.configure=function(a){this.l=a;this.j&&this.j.configure(this.l);this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};q.initInterstitial=function(a,b,c){var d=this;this.j&&this.j.release();this.j=new Jp(a,b,c,function(e){return lq(d,e)});this.j.configure(this.l)};
|
|
823
|
+
q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new Bp(a,b,this.o,c,function(e){return lq(d,e)});this.i.configure(this.l)};q.release=function(){this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);jg.prototype.release.call(this)};
|
|
824
|
+
q.onAssetUnload=function(){this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new xp};q.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
|
|
825
|
+
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Xp(a,b,c,function(e){return lq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new $f,$p(d,a,b),d.H=c||"",d.T=Date.now()/1E3,a=d.l);return a};
|
|
826
826
|
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new iq(a,b,this.o,function(d){return lq(c,d)});this.g.configure(this.l)};
|
|
827
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.10.
|
|
828
|
-
(c.G=!0),c.j=new
|
|
829
|
-
q.getServerSideCuePoints=function(){qb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:
|
|
827
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.10.26";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
828
|
+
(c.G=!0),c.j=new $f,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.10.26";this.g.g.replaceAdTagParameters(a)};
|
|
829
|
+
q.getServerSideCuePoints=function(){qb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:yp(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
830
830
|
q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};q.onInterstitialMetadata=function(a,b,c){this.j||this.initInterstitial(null,a,b);this.j&&Pp(this.j,c)};
|
|
831
831
|
function lq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",kq);kq.prototype.onInterstitialMetadata=kq.prototype.onInterstitialMetadata;kq.prototype.onCueMetadataChange=kq.prototype.onCueMetadataChange;kq.prototype.onHlsTimedMetadata=kq.prototype.onHlsTimedMetadata;kq.prototype.onDashTimedMetadata=kq.prototype.onDashTimedMetadata;
|
|
832
832
|
kq.prototype.onManifestUpdated=kq.prototype.onManifestUpdated;kq.prototype.getStats=kq.prototype.getStats;kq.prototype.getCuePoints=kq.prototype.getCuePoints;kq.prototype.getServerSideCuePoints=kq.prototype.getServerSideCuePoints;kq.prototype.replaceServerSideAdTagParameters=kq.prototype.replaceServerSideAdTagParameters;kq.prototype.requestServerSideStream=kq.prototype.requestServerSideStream;kq.prototype.initServerSide=kq.prototype.initServerSide;kq.prototype.addMediaTailorTrackingUrl=kq.prototype.addMediaTailorTrackingUrl;
|
|
833
833
|
kq.prototype.requestMediaTailorStream=kq.prototype.requestMediaTailorStream;kq.prototype.initMediaTailor=kq.prototype.initMediaTailor;kq.prototype.updateClientSideAdsRenderingSettings=kq.prototype.updateClientSideAdsRenderingSettings;kq.prototype.requestClientSideAds=kq.prototype.requestClientSideAds;kq.prototype.onAssetUnload=kq.prototype.onAssetUnload;kq.prototype.release=kq.prototype.release;kq.prototype.initClientSide=kq.prototype.initClientSide;kq.prototype.initInterstitial=kq.prototype.initInterstitial;
|
|
834
834
|
kq.prototype.configure=kq.prototype.configure;kq.prototype.setLocale=kq.prototype.setLocale;kq.ADS_LOADED="ads-loaded";kq.AD_STARTED="ad-started";kq.AD_FIRST_QUARTILE="ad-first-quartile";kq.AD_MIDPOINT="ad-midpoint";kq.AD_THIRD_QUARTILE="ad-third-quartile";kq.AD_COMPLETE="ad-complete";kq.AD_STOPPED="ad-stopped";kq.AD_SKIPPED="ad-skipped";kq.AD_VOLUME_CHANGED="ad-volume-changed";kq.AD_MUTED="ad-muted";kq.AD_PAUSED="ad-paused";kq.AD_RESUMED="ad-resumed";kq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";
|
|
835
835
|
kq.CUEPOINTS_CHANGED="ad-cue-points-changed";kq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";kq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";kq.AD_CLICKED="ad-clicked";kq.AD_PROGRESS="ad-progress";kq.AD_BUFFERING="ad-buffering";kq.AD_IMPRESSION="ad-impression";kq.AD_DURATION_CHANGED="ad-duration-changed";kq.AD_CLOSED="ad-closed";kq.AD_LOADED="ad-loaded";kq.ALL_ADS_COMPLETED="all-ads-completed";kq.AD_LINEAR_CHANGED="ad-linear-changed";kq.AD_METADATA="ad-metadata";
|
|
836
|
-
kq.AD_RECOVERABLE_ERROR="ad-recoverable-error";kq.AD_ERROR="ad-error";kq.AD_BREAK_READY="ad-break-ready";kq.AD_INTERACTION="ad-interaction";kq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";kq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";kq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";
|
|
837
|
-
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(
|
|
836
|
+
kq.AD_RECOVERABLE_ERROR="ad-recoverable-error";kq.AD_ERROR="ad-error";kq.AD_BREAK_READY="ad-break-ready";kq.AD_INTERACTION="ad-interaction";kq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";kq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";kq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";io=function(){return new kq};function mq(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
|
|
837
|
+
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Oi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
838
838
|
function nq(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=oq(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
839
839
|
function oq(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
840
840
|
var pq="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),qq="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),rq=["loop","playbackRate"],sq=["pause","play"],tq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
841
841
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1},uq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},vq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},wq=[["getConfiguration","configure"]],xq=[["isTextTrackVisible","setTextTrackVisibility"]],yq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
842
|
-
zq=["attach","attachCanvas","detach","load","unload"];function Aq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Rc(b);this.
|
|
842
|
+
zq=["attach","attachCanvas","detach","load","unload"];function Aq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Rc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Bq(h)};this.C=function(k,l){k=nq(l);switch(k.type){case "event":var m=k.targetName,n=hg(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
|
|
843
843
|
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Cq.add(this)}q=Aq.prototype;q.destroy=function(){Cq.delete(this);Dq(this);Eq&&Fq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};q.gb=function(){return this.h};q.Ff=function(){return this.I};
|
|
844
|
-
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.
|
|
845
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new
|
|
846
|
-
q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!Hq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new
|
|
844
|
+
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.vc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Cq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new $f;d.s=!0;Gq(d,e)}},function(b){for(var c=t(Cq),d=c.next();!d.done;d=c.next())d=d.value,Hq="available"==b,d.l.vc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Hq&&this.l.Z(Iq);(a=Eq)&&
|
|
845
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new $f,this.s=!0,Gq(this,a)):Eq=null}else window.__onGCastApiAvailable!==Jq&&(Kq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Jq)};q.Of=function(a){this.o=a;this.h&&Lq(this,{type:"appData",appData:this.o})};
|
|
846
|
+
q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!Hq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new $f;chrome.cast.requestSession(function(c){return Gq(a,c)},function(c){return Mq(a,c)});return F(b,a.j,0)})};function Nq(a){a.h&&chrome.cast.requestSession(function(b){return Gq(a,b)},function(b){return Mq(a,b)})}q.Ec=function(){if(this.h){Dq(this);if(Eq){Fq(this);try{Eq.stop(function(){},function(){})}catch(a){}Eq=null}Bq(this)}};
|
|
847
847
|
q.get=function(a,b){var c=this;if("video"==a){if(sq.includes(b))return function(){return c.Xg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))}}else if("player"==a){if(vq[b]&&!this.get("player","isLive")())return function(){};if(yq.includes(b))return function(){return c.Xg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(zq.includes(b))return function(){return c.Ni.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(tq[b]||uq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
848
848
|
q.set=function(a,b,c){this.g[a][b]=c;Lq(this,{type:"set",targetName:a,property:b,value:c})};function Gq(a,b){var c=a.N();Eq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Bq(a);Lq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Mq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
|
|
849
|
-
q.Xg=function(a,b){Lq(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.Ni=function(a,b){var c=Ha.apply(2,arguments),d=new
|
|
850
|
-
function Bq(a){var b=Eq?"connected"==Eq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Dq(a)}a.h=b;a.I=b?Eq.receiver.friendlyName:"";a.l.
|
|
851
|
-
function Jq(a){Kq?window.__onGCastApiAvailable=Kq:delete window.__onGCastApiAvailable;Kq=null;if(a)for(var b=t(Cq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Oq(a,b,c,d){d=void 0===d?!1:d;
|
|
852
|
-
q.destroy=function(a){a&&this.g.
|
|
853
|
-
q.cast=function(){var a=this;return O(function(b){return 1==b.g?F(b,a.g.cast(),2):a.h?F(b,a.h.dc(),0):b.return()})};q.Of=function(a){this.g.Of(a)};q.cj=function(){Nq(this.g)};q.
|
|
854
|
-
q.Eh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.
|
|
855
|
-
function Uq(a){a.g.init();a.m=new gb;for(var b=t(pq),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.gb()||(f=
|
|
856
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Xq(a,f)}})});Yq(a);a.j=new
|
|
849
|
+
q.Xg=function(a,b){Lq(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.Ni=function(a,b){var c=Ha.apply(2,arguments),d=new $f,e=this.H.toString();this.H++;this.i[e]=d;try{Lq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Fq(a){var b=Eq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
850
|
+
function Bq(a){var b=Eq?"connected"==Eq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Dq(a)}a.h=b;a.I=b?Eq.receiver.friendlyName:"";a.l.vc()}function Dq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function Lq(a,b){b=mq(b);var c=Eq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},cb)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.Ec(),b;}}var Iq=.02,Hq=!1,Eq=null,Kq=null,Cq=new Set;
|
|
851
|
+
function Jq(a){Kq?window.__onGCastApiAvailable=Kq:delete window.__onGCastApiAvailable;Kq=null;if(a)for(var b=t(Cq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Oq(a,b,c,d){d=void 0===d?!1:d;jg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Aq(c,function(){return Pq(e)},function(){return Qq(e)},function(f,g){return Rq(e,f,g)},function(){return Sq(e)},function(){return Tq(e)},d);Uq(this)}na(Oq,jg);q=Oq.prototype;
|
|
852
|
+
q.destroy=function(a){a&&this.g.Ec();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;jg.prototype.release.call(this);return Promise.all(a)};q.ii=function(){return this.l};q.Yh=function(){return this.s};q.Dh=function(){return this.g.m&&Hq};q.gb=function(){return this.g.gb()};q.Ff=function(){return this.g.Ff()};
|
|
853
|
+
q.cast=function(){var a=this;return O(function(b){return 1==b.g?F(b,a.g.cast(),2):a.h?F(b,a.h.dc(),0):b.return()})};q.Of=function(a){this.g.Of(a)};q.cj=function(){Nq(this.g)};q.Ec=function(){this.g.Ec()};
|
|
854
|
+
q.Eh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.Ec();return F(d,c.g.destroy(),2)}c.g=null;c.g=new Aq(a,function(){return Pq(c)},function(){return Qq(c)},function(e,f){return Rq(c,e,f)},function(){return Sq(c)},function(){return Tq(c)},b);c.g.init();G(d)})};
|
|
855
|
+
function Uq(a){a.g.init();a.m=new gb;for(var b=t(pq),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.gb()||(f=hg(f),a.j.dispatchEvent(f))});for(var d in ig)a.m.D(a.h,ig[d],function(f){a.g.gb()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={nd:b.nd},b.nd=e,Object.defineProperty(a.l,b.nd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Vq(a,f.nd)}}(b),set:function(f){return function(g){var h=f.nd;a.g.gb()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Wq(a,
|
|
856
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Xq(a,f)}})});Yq(a);a.j=new jg;a.j.me=a.l;a.o=new jg;a.o.me=a.s}function Yq(a){var b=new Map;Wq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
857
857
|
function Wq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
858
|
-
function Tq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.
|
|
858
|
+
function Tq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Fc(),startTime:null};a.i.pause();for(var c=t(rq),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(wq);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(xq);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Pq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
|
|
859
859
|
function Qq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
860
860
|
function Sq(a){for(var b=t(wq),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(rq);for(d=c.next();!d.done;d=c.next())d=
|
|
861
861
|
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(rq),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(xq);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.hh(h);g&&a.h.Mf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new U("error",l);a.h.dispatchEvent(l)})}
|
|
862
862
|
function Vq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.gb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.gb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
863
863
|
function Xq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.yb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.wg()};
|
|
864
864
|
if("setVideoContainer"==b)return function(c){return a.h.lh(c)};if(a.g.gb()){if("getManifest"==b||"drmInfo"==b)return function(){Ya(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ya(b+"() does not work while casting!");return Promise.resolve()}}return a.g.gb()&&0==Object.keys(a.g.g.video).length&&(tq[b]||uq[b])||!a.g.gb()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
865
|
-
function Rq(a,b,c){a.g.gb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",Oq);Oq.prototype.changeReceiverId=Oq.prototype.Eh;Oq.prototype.forceDisconnect=Oq.prototype.
|
|
866
|
-
Oq.prototype.getVideo=Oq.prototype.ii;Oq.prototype.destroy=Oq.prototype.destroy;function Zq(a,b,c,d){
|
|
865
|
+
function Rq(a,b,c){a.g.gb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",Oq);Oq.prototype.changeReceiverId=Oq.prototype.Eh;Oq.prototype.forceDisconnect=Oq.prototype.Ec;Oq.prototype.suggestDisconnect=Oq.prototype.cj;Oq.prototype.setAppData=Oq.prototype.Of;Oq.prototype.cast=Oq.prototype.cast;Oq.prototype.receiverName=Oq.prototype.Ff;Oq.prototype.isCasting=Oq.prototype.gb;Oq.prototype.canCast=Oq.prototype.Dh;Oq.prototype.getPlayer=Oq.prototype.Yh;
|
|
866
|
+
Oq.prototype.getVideo=Oq.prototype.ii;Oq.prototype.destroy=Oq.prototype.destroy;function Zq(a,b,c,d){jg.call(this);var e=this;this.g=a;this.h=b;this.j=new gb;this.H={video:a,player:b};this.F=c||function(){};this.I=d||function(f){return f};this.i=null;this.G=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.C=new Rc(function(){$q(e)});ar(this)}na(Zq,jg);q=Zq.prototype;q.isConnected=function(){return this.G};q.pi=function(){return this.o};q.Zi=function(a){this.i=a};q.Gh=function(){this.i=null};
|
|
867
867
|
q.$i=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Yi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Xi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
868
|
-
q.destroy=function(){var a=this,b,c;return O(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.C&&(a.C.stop(),a.C=null),a.g=null,a.H=null,a.F=null,a.G=!1,a.o=!0,a.l=null,a.s=null,
|
|
868
|
+
q.destroy=function(){var a=this,b,c;return O(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.C&&(a.C.stop(),a.C=null),a.g=null,a.H=null,a.F=null,a.G=!1,a.o=!0,a.l=null,a.s=null,jg.prototype.release.call(a),F(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();G(d)})};
|
|
869
869
|
function ar(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return br(a)};b.onSenderDisconnected=function(){return br(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&cr(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);cr(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return dr(a,
|
|
870
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return er(a,e)};b.start();b=t(pq);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return fr(a,"video",e)});for(var d in
|
|
870
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return er(a,e)};b.start();b=t(pq);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return fr(a,"video",e)});for(var d in ig)a.j.D(a.h,ig[d],function(e){return fr(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;gr(a)});a.j.D(a.g,"playing",function(){a.o=!1;gr(a)});a.j.D(a.g,"pause",function(){gr(a)});a.j.D(a.h,"unloading",function(){a.o=!0;gr(a)});
|
|
871
871
|
a.j.D(a.g,"ended",function(){(new Rc(function(){a.g&&a.g.ended&&(a.o=!0,gr(a))})).Z(hr)})}function br(a){a.m=0;a.A=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;gr(a)}function gr(a){var b;O(function(c){if(1==c.g)return F(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);ir(a)||jr(a);G(c)})}
|
|
872
872
|
function kr(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.F(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(r,5),F(r,a.h.load(b.manifest,b.startTime),7)):F(r,Promise.resolve(),3);case 7:ta(r,3);break;case 5:return g=ua(r),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
873
873
|
a.g.autoplay=f;b.manifest&&(a.g.play(),jr(a));G(r)}})}function fr(a,b,c){a.h&&($q(a),cr(a,{type:"event",targetName:b,event:c},a.l))}
|
|
874
874
|
function $q(a){a.C.Z(lr);for(var b={video:{},player:{}},c=t(qq),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in vq)0==a.m%vq[e]&&(b.player[e]=a.h[e]());for(var f in tq)0==a.m%tq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;cr(a,{type:"update",update:b},a.l);for(var g in uq)0==a.m%uq[g]&&(b={player:{}},b.player[g]=a.h[g](),cr(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
875
|
-
1);ir(a)}function ir(a){return a.A&&(a.g.duration||a.h.V())?(mr(a),a.A=!1,!0):!1}function mr(a,b){var c={contentId:a.h.
|
|
875
|
+
1);ir(a)}function ir(a){return a.A&&(a.g.duration||a.h.V())?(mr(a),a.A=!1,!0):!1}function mr(a,b){var c={contentId:a.h.Fc(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);jr(a,void 0===b?0:b,c)}
|
|
876
876
|
function er(a,b){var c=nq(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;kr(a,c.initState,c.appData);$q(a);break;case "appData":a.F(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
877
877
|
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return nr(a,g,f,null)},function(h){return nr(a,g,f,h)})}}
|
|
878
878
|
function dr(a,b){var c=nq(b.data);switch(c.type){case "PLAY":a.g.play();jr(a);break;case "PAUSE":a.g.pause();jr(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),jr(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),jr(a));break;case "STOP":a.h.dc().then(function(){a.h&&jr(a)});break;case "GET_STATUS":mr(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
@@ -884,16 +884,16 @@ function tr(a,b,c,d,e,f){a=new Qb(a,b,"");c&&a.textDecoration.push("underline");
|
|
|
884
884
|
function Br(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=Cr.has(c)?Cr.get(c):String.fromCharCode(c);break;case 1:d=Dr.get(c);break;case 2:a.i[a.g].pop();d=Er.get(c);break;case 3:a.i[a.g].pop(),d=Fr.get(c)}d&&a.i[a.g].push(new vr(d,a.m,a.j,a.o,a.l))}}function Gr(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Ar(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
885
885
|
var Cr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Dr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Er=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
|
|
886
886
|
[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Fr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
|
|
887
|
-
[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),zr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Hr(a,b){this.h=0;this.o=new wr(a,b);this.i=new wr(a,b);this.g=this.j=new wr(a,b);this.l=0;this.m=null}function Ir(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=yr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Ar(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Ar(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Jr(a){a.h=1;a.g=a.j;a.g.h=0}function Kr(a){$a("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var Lr="black green blue cyan red yellow magenta black".split(" "),Mr="white green blue cyan red yellow magenta white_italics".split(" ");function Nr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.
|
|
888
|
-
function Sr(a,b,c){var d=new Qb(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Sb;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.
|
|
887
|
+
[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),zr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Hr(a,b){this.h=0;this.o=new wr(a,b);this.i=new wr(a,b);this.g=this.j=new wr(a,b);this.l=0;this.m=null}function Ir(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=yr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Ar(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Ar(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Jr(a){a.h=1;a.g=a.j;a.g.h=0}function Kr(a){$a("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var Lr="black green blue cyan red yellow magenta black".split(" "),Mr="white green blue cyan red yellow magenta white_italics".split(" ");function Nr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";Or(this)}function Or(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Pr())}function Pr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Qr(a,b){Rr(a)&&(a.i[a.h][a.g]=new vr(b,a.C,a.A,a.s,a.B),a.g++)}function Rr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}Nr.prototype.isVisible=function(){return this.l};
|
|
888
|
+
function Sr(a,b,c){var d=new Qb(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Sb;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Kb:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
|
|
889
889
|
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=sr(d,"svc"+c,a.i,a.j,b))a.j=b;return c};function Tr(){this.i=[];this.h=null;this.g=0}function Ur(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Vr(a.h)),a.h=null,a.g=0))}function Vr(a){this.g=0;this.h=a}Vr.prototype.qa=function(){return this.g<this.h.length};Vr.prototype.wa=function(){return this.g};function Wr(a){if(!a.qa())throw new T(2,2,3E3);return a.h[a.g++]}Vr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function Xr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
890
890
|
function Yr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Wr(b).value;b=null;c=t(Zr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Sr(e,d,a.i)),Or(e);return b}if(137===c)for(b=Wr(b).value,b=t(Zr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Wr(b).value;b=null;c=t(Zr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Sr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Wr(b).value;
|
|
891
891
|
b=null;c=t(Zr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Sr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Wr(b).value,$r(a,b,d);if(143===c)return d=$r(a,255,d),as(a),d;if(144===c)b.skip(1),d=Wr(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Wr(b).value,c=Wr(b).value,b.skip(1),a.g&&(b=bs((c&48)>>4,(c&12)>>2,c&3),a.g.B=bs((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Wr(b).value,b=Wr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
892
|
-
b.skip(1),d=Wr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Nr(c,a.i);f.j=d;a.h[c]=f}d=Wr(b).value;f=Wr(b).value;var g=Wr(b).value,h=Wr(b).value,k=Wr(b).value;b=Wr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.
|
|
892
|
+
b.skip(1),d=Wr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Nr(c,a.i);f.j=d;a.h[c]=f}d=Wr(b).value;f=Wr(b).value;var g=Wr(b).value,h=Wr(b).value,k=Wr(b).value;b=Wr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
893
893
|
function Zr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function $r(a,b,c){var d=null;b=t(Zr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Sr(f,c,a.i));a.h[e]=null}return d}function as(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function bs(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return cs[a<<2|b<<1|c]}
|
|
894
894
|
var ds=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),cs="black blue green cyan red magenta yellow white".split(" ");function es(){this.h=[];this.g=[];this.i=new Tr;this.l=0;this.m=new Map([["CC1",new Hr(0,0)],["CC2",new Hr(0,1)],["CC3",new Hr(1,0)],["CC4",new Hr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;fs(this)}es.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;fs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())as(b.value)};
|
|
895
895
|
function fs(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,xr(c.i),xr(c.j),xr(c.o);a.B=!0}
|
|
896
|
-
es.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new
|
|
896
|
+
es.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Fg(a,0);if(!(8>a.getLength())&&181===a.U()&&49===a.oa()&&1195456820===a.R()&&3===a.U()&&(c=a.U(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.U(),f=(e&4)>>2,g=a.U(),h=a.U();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,cb:g,Db: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})))}};
|
|
897
897
|
es.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=gs(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Ur(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=hs(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
898
898
|
function gs(a,b){var c=b.type;if(16===(b.cb&112)){var d=b.cb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.cb&&255===b.Db||!b.cb&&!b.Db||!is(b.cb)||!is(b.Db))return 45<=++a.l&&fs(a),null;a.l=0;b.cb&=127;b.Db&=127;var e=b.cb;if(1<=e&&15>=e||!b.cb&&!b.Db)return null;e=null;if(16===(b.cb&112))a:{a.A.add(d),d=b.cb;a=b.Db;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=
|
|
899
899
|
"white";e=!1;7>f?d=Mr[f]:7===f&&(e=!0);a=1===(a&1);4!==c.h&&(f=c.g,3===c.h&&b!==f.g&&(c=1+b-f.h,Gr(f,c,1+f.g-f.h,f.h),Ar(f,0,c-1),Ar(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Br(c.g,0,32),d=!1,b=Mr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Lr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Br(c.g,
|
|
@@ -903,82 +903,82 @@ function hs(a,b){var c=[];try{for(;b.qa();){var d=Wr(b).value,e=(d&224)>>5,f=d&3
|
|
|
903
903
|
v;r=0;for(u=1;16>u;u++,r++)k.i[r]=k.i[u];for(u=0;1>u;u++,r++)k.i[r]=Pr()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=Sr(v,u,k.i));v.i[v.h]=Pr();v.g=0;break;case 12:v.isVisible()&&(e=Sr(v,u,k.i)),Or(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=Yr(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&
|
|
904
904
|
(127===k?Qr(e.g,"\u266a"):Qr(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&Qr(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(ds.has(k)){var A=ds.get(k);Qr(e.g,A)}else Qr(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?Qr(e.g,"_"):Qr(e.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(y){if(y instanceof T&&3E3===y.code)$a("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}
|
|
905
905
|
function is(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}es.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",es);Ib=function(){return new es};function js(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function ks(){this.j=new Map;this.i=this.h=0;this.g=ls}
|
|
906
|
-
ks.prototype.init=function(a){function b(f){f=f.name;f in ms&&(c.g=ms[f])}var c=this,d=[],e=[];(new
|
|
907
|
-
function(f){f
|
|
906
|
+
ks.prototype.init=function(a){function b(f){f=f.name;f in ms&&(c.g=ms[f])}var c=this,d=[],e=[];(new Kg).box("moov",Pg).box("mvex",Pg).S("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.R();g=g.R();c.h=f;c.i=g}).box("trak",Pg).S("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.R();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.oa();g.oa();g.oa();g.oa();d.push(h)}).box("mdia",Pg).S("mdhd",
|
|
907
|
+
function(f){f=Zi(f.reader,f.version);e.push(f.timescale)}).box("minf",Pg).box("stbl",Pg).S("stsd",Rg).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Sg).box("sinf",Pg).box("frma",function(f){f=bj(f.reader).codec;f in ms&&(c.g=ms[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==ls&&Ya("Unable to determine bitstream format for CEA parsing!");
|
|
908
908
|
d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
909
|
-
ks.prototype.parse=function(a){var b=this;if(this.g==ls)return[];var c=[],d=0,e=[];(new
|
|
910
|
-
1];f=
|
|
909
|
+
ks.prototype.parse=function(a){var b=this;if(this.g==ls)return[];var c=[],d=0,e=[];(new Kg).box("moof",function(f){d=f.start;e=[];Pg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,ad:b.h,Hd:b.i,Rg:[],timescale:9E4});Pg(f)}).S("trun",function(f){var g=e[e.length-1];f=$i(f.reader,f.version,f.flags);g.Rg.push(f)}).S("tfhd",function(f){var g=e[e.length-1];f=Xi(f.reader,f.flags);g.ad=f.ad||b.h;g.Hd=f.Hd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).S("tfdt",function(f){var g=e[e.length-
|
|
910
|
+
1];f=Yi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.wa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Ya("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);ns(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.ad,l.Hd,g,l.Rg,c)}}).parse(a,!1);return c};
|
|
911
911
|
function ns(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Zg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Ih);b.qa();){g=b.R();var p=b.U(),r=null;r=!1;h=1;switch(a.g){case os:r=p&31;r=6==r;break;case ps:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case qs:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].ne||0),p=(c+p)/d,h=t(js(b.rb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
|
|
912
|
-
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Kf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",ks);var ls=0,os=1,ps=2,qs=3,ms={avc1:os,avc3:os,dvav:os,dva1:os,hev1:ps,hvc1:ps,dvh1:ps,dvhe:ps,vvc1:qs,vvi1:qs,dvc1:qs,dvi1:qs};Hb["video/mp4"]=function(){return new ks};function rs(){this.g=null}rs.prototype.init=function(){};rs.prototype.parse=function(a){this.g?this.g.clearData():this.g=new
|
|
912
|
+
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Kf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",ks);var ls=0,os=1,ps=2,qs=3,ms={avc1:os,avc3:os,dvav:os,dva1:os,hev1:ps,hvc1:ps,dvh1:ps,dvhe:ps,vvc1:qs,vvi1:qs,dvc1:qs,dvi1:qs};Hb["video/mp4"]=function(){return new ks};function rs(){this.g=null}rs.prototype.init=function(){};rs.prototype.parse=function(a){this.g?this.g.clearData():this.g=new qj;var b=[];a=zb(a);if(!Ej(a))return b;a=this.g.parse(a);var c=a.bd(),d=a.Nd();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(js(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
913
913
|
S("shaka.cea.TsCeaParser",rs);Hb["video/mp2t"]=function(){return new rs};function ss(a,b,c){var d=ts(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Sc});if(1<f.length)throw new T(2,4,4050);f.length&&(g=us(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Sc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Sc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
914
914
|
l.Sc});f.length&&(a=vs(e,k,f,c,h),0==a.length&&(a=[Nd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Nd(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{qg:h,gk:e,drmInfos:a,Fe:g,vg:!0}}
|
|
915
915
|
function ws(a,b,c,d){var e=ss(a,c,d);if(b.vg){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.vg=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.qg||b.qg}
|
|
916
|
-
function xs(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=zb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function ys(a){a=t(
|
|
917
|
-
function zs(a){var b=
|
|
918
|
-
function vs(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Sc];if(h){var k;if((k=
|
|
919
|
-
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:
|
|
920
|
-
function Cs(a){var b=a.attributes.schemeIdUri,c=
|
|
921
|
-
function us(a){if(!window.crypto||!window.crypto.subtle)throw Ya("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=
|
|
916
|
+
function xs(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=zb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function ys(a){a=t(jh(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 hh(c)}return""}
|
|
917
|
+
function zs(a){var b=lh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=hh(b)))return b;a=lh(a.node,"urn:microsoft:playready","pro");if(!a||!hh(a))return"";a=hh(a);a=Hd(a);a=xs(a).filter(function(c){return c.type===As})[0];if(!a)return"";a=wd(a.value,!0);return(a=$g(a,"WRMHEADER"))?ys(a):""}
|
|
918
|
+
function vs(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Sc];if(h){var k;if((k=lh(g.node,"urn:microsoft:playready","pro"))&&hh(k)){k=hh(k);k=Hd(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Yg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Sc){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
|
|
919
|
+
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Yg(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Nd(h,b,g.init||a||k||l);if(h=Bs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function ts(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Cs(c.value))&&b.push(c);return b}
|
|
920
|
+
function Cs(a){var b=a.attributes.schemeIdUri,c=oh(a,"urn:mpeg:cenc:2013","default_KID"),d=mh(a,"urn:mpeg:cenc:2013","pssh").map(ih),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Hd(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Sc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
921
|
+
function us(a){if(!window.crypto||!window.crypto.subtle)throw Ya("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=lh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=lh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Dd(b.attributes.keyUriTemplate);
|
|
922
922
|
if(!a||!b)throw new T(2,4,4051);a=Id(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{wi:b,iv:a}}
|
|
923
|
-
var As=1,Bs=(new Map).set("com.widevine.alpha",function(a){var b=
|
|
924
|
-
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=
|
|
923
|
+
var As=1,Bs=(new Map).set("com.widevine.alpha",function(a){var b=lh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=hh(b))?b:(a=lh(a.node,"urn:microsoft","laurl"))?Dd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",zs).set("com.microsoft.playready.recommendation",zs).set("com.microsoft.playready.software",zs).set("com.microsoft.playready.hardware",zs).set("org.w3.clearkey",function(a){var b=lh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=hh(b))?b:(a=lh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
924
|
+
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=hh(a))?a:""});function Ds(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Ya("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
925
925
|
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})}
|
|
926
|
-
function Es(a,b){var c=Fs(a,b,"timescale"),d=1;c&&(d=
|
|
927
|
-
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,ag:r,Ab:n,Vi:k.length+h}),r=l}}e=k}return{timescale:d,La:c,vd:g,Ob:f/d||0,$f:f,timeline:e}}function Hs(a,b){return[b(a.J),b(a.
|
|
928
|
-
function Gs(a,b,c){b=Hs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=
|
|
929
|
-
function Is(a,b,c,d,e,f){for(var g=
|
|
926
|
+
function Es(a,b){var c=Fs(a,b,"timescale"),d=1;c&&(d=uh(c)||1);c=Fs(a,b,"duration");(c=uh(c||""))&&(c/=d);var e=Fs(a,b,"startNumber"),f=Number(Fs(a,b,"presentationTimeOffset"))||0,g=vh(e||"");if(null==e||null==g)g=1;e=null;if(b=Gs(a,b,"SegmentTimeline")){b=gh(b,"S");e=d;a=a.ha.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],r=nh(n,"t",vh),u=nh(n,"d",vh),v=nh(n,"r",th);n=nh(n,"k",th)||0;null!=r&&(r-=f);if(u){r=null!=r?r:l;v=v||0;if(0>v)if(p){p=nh(p,"t",vh);if(null==
|
|
927
|
+
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,ag:r,Ab:n,Vi:k.length+h}),r=l}}e=k}return{timescale:d,La:c,vd:g,Ob:f/d||0,$f:f,timeline:e}}function Hs(a,b){return[b(a.J),b(a.ga),b(a.la)].filter(ye)}function Fs(a,b,c){b=Hs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
928
|
+
function Gs(a,b,c){b=Hs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=kh(d.value,c));d=b.next());return a}
|
|
929
|
+
function Is(a,b,c,d,e,f){for(var g=oh(a,"http://www.w3.org/1999/xlink","href"),h=oh(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=bh("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return bg(new T(2,4,4028));if("onLoad"!=h)return bg(new T(2,4,4027));var p=Md([d],[g]);return e.request(0,rg(p,b)).za(function(r){r=Zg(r.data,a.tagName);if(!r)return bg(new T(2,4,4001,g));for(a.children=
|
|
930
930
|
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return Js(a,b,c,p[0],e,f+1)})}
|
|
931
|
-
function Js(a,b,c,d,e,f){f=void 0===f?0:f;if(
|
|
932
|
-
;function Ks(a,b,c,d,e,f,g){var h,k=(new
|
|
933
|
-
function Ls(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.Qc(),m=g.reader.Qc();g.reader.skip(2);var n=g.reader.oa();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.R(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.R();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new
|
|
931
|
+
function Js(a,b,c,d,e,f){f=void 0===f?0:f;if(oh(a,"http://www.w3.org/1999/xlink","href")){var g=Is(a,b,c,d,e,f);c&&(g=g.za(void 0,function(){return Js(a,b,c,d,e,f)}));return g}g=[];for(var h=t(fh(a)),k=h.next(),l={};!k.done;l={Xc:void 0},k=h.next())l.Xc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==oh(l.Xc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Xc}}(l)):"SegmentTimeline"!=l.Xc.tagName&&g.push(Js(l.Xc,b,c,d,e,f));return fg(g).za(function(){return a})}
|
|
932
|
+
;function Ks(a,b,c,d,e,f,g){var h,k=(new Kg).S("sidx",function(l){h=Ls(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
933
|
+
function Ls(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.Qc(),m=g.reader.Qc();g.reader.skip(2);var n=g.reader.oa();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.R(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.R();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Ei(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Ms(a){this.h=Eb(a);this.g=new Fg(this.h,0)}Ms.prototype.qa=function(){return this.g.qa()};
|
|
934
934
|
function Ns(a){var b=Os(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Os(a);a:{d=t(Ps);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new Qs(c,
|
|
935
935
|
d)}function Os(a){var b=a.g.wa(),c=a.g.U();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return zb(a.h,b,c)}var Ps=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Qs(a,b){this.id=a;this.g=b}
|
|
936
|
-
function Rs(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ss(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ms(a.g);for(var n=null,p=null;a.qa();){var r=Ns(a);if(187==r.id){var u=Ts(r);u&&(r=c*u.gj,u=b+u.Li,null!=n&&m.push(new
|
|
937
|
-
function Ts(a){var b=new Ms(a.g);a=Ns(b);if(179!=a.id)throw new T(2,3,3013);a=Rs(a);b=Ns(b);if(183!=b.id)throw new T(2,3,3012);b=new Ms(b.g);for(var c=0;b.qa();){var d=Ns(b);if(241==d.id){c=Rs(d);break}}return{gj:a,Li:c}};function Us(a,b,c){b=Gs(a,b,"Initialization");if(!b)return null;var d=a.J.Ma(),e=b.attributes.sourceURL;e&&(d=
|
|
938
|
-
function Ws(a,b,c){var d=Number(Fs(a,Xs,"presentationTimeOffset"))||0,e=Fs(a,Xs,"timescale"),f=1;e&&(f=
|
|
939
|
-
function $s(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I;return O(function(L){if(1==L.g)return h=a.presentationTimeline,k=!a.vb||!a.
|
|
936
|
+
function Rs(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ss(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ms(a.g);for(var n=null,p=null;a.qa();){var r=Ns(a);if(187==r.id){var u=Ts(r);u&&(r=c*u.gj,u=b+u.Li,null!=n&&m.push(new Ei(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Ei(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
937
|
+
function Ts(a){var b=new Ms(a.g);a=Ns(b);if(179!=a.id)throw new T(2,3,3013);a=Rs(a);b=Ns(b);if(183!=b.id)throw new T(2,3,3012);b=new Ms(b.g);for(var c=0;b.qa();){var d=Ns(b);if(241==d.id){c=Rs(d);break}}return{gj:a,Li:c}};function Us(a,b,c){b=Gs(a,b,"Initialization");if(!b)return null;var d=a.J.Ma(),e=b.attributes.sourceURL;e&&(d=Md(d,[Dd(e)]));e=0;var f=null;if(b=nh(b,"range",sh))e=b.start,f=b.end;c=new Ci(function(){return d},e,f,Vs(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
|
|
938
|
+
function Ws(a,b,c){var d=Number(Fs(a,Xs,"presentationTimeOffset"))||0,e=Fs(a,Xs,"timescale"),f=1;e&&(f=uh(e)||1);var g=d/f||0,h=Us(a,Xs,c);Ys(a,h);var k=Ke(a);return{jc:function(){var l=Gs(k,Xs,"RepresentationIndex");var m=k.J.Ma();l&&(l=Dd(l.attributes.sourceURL))&&(m=Md(m,[l]));l=Zs(k);return $s(k,b,h,m,l.start,l.end,g)}}}
|
|
939
|
+
function $s(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I;return O(function(L){if(1==L.g)return h=a.presentationTimeline,k=!a.vb||!a.ha.qf,l=a.ha.start,m=a.ha.duration,n=a.J.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Ha,c.ta,!0):null],p=null,F(L,Promise.all(u),2);v=L.h;w=v[0];A=v[1]||null;y=null;D=l-g;z=l;C=m?l+m:Infinity;if("mp4"==n)var H=Ks(w,e,d,c,D,z,C);else{H=w;var J=new Ms(A);if(440786851!=Ns(J).id)throw new T(2,3,3008);var K=Ns(J);if(408125543!=K.id)throw new T(2,
|
|
940
940
|
3,3009);J=K.g.byteOffset;K=new Ms(K.g);for(var M=null;K.qa();){var N=Ns(K);if(357149030==N.id){M=N;break}}if(!M)throw new T(2,3,3010);M=new Ms(M.g);N=1E6;for(K=null;M.qa();){var P=Ns(M);if(2807729==P.id)N=Rs(P);else if(17545==P.id)if(4==P.g.byteLength)K=P.g.getFloat32(0);else if(8==P.g.byteLength)K=P.g.getFloat64(0);else throw new T(2,3,3003);}if(null==K)throw new T(2,3,3011);M=N/1E9;K*=M;H=Ns(new Ms(H));if(475249515!=H.id)throw new T(2,3,3007);H=Ss(H,J,M,K,d,c,D,z,C)}y=H;B=t(y);for(E=B.next();!E.done;E=
|
|
941
|
-
B.next())I=E.value,I.codecs=a.J.codecs,I.mimeType=a.J.mimeType;h.sd(y);r=new
|
|
942
|
-
function Vs(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.ce,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.
|
|
943
|
-
a.
|
|
944
|
-
function et(a,b,c,d,e,f,g,h){var k=d.Lc.length;d.timeline&&d.timeline.length!=d.Lc.length&&(k=Math.min(d.timeline.length,d.Lc.length));for(var l=a-d.Ob,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={ve:void 0,oe:void 0},u++){r.oe=d.Lc[u];var v=p;p=void 0;p=null!=d.La?v+d.La:d.timeline?d.timeline[u].end:v+b;r.ve=null;r=new
|
|
945
|
-
function ft(a){return[a.J.Qb,a.
|
|
946
|
-
var p=null;d=d=null;a.la.id&&a.J.id&&(d=a.la.id+","+a.J.id,d=c[d])&&(p=d.segmentIndex);var r=a.
|
|
947
|
-
function ht(a){return a.bc}function jt(a){var b=Es(a,ht),c=Fs(a,ht,"media"),d=Fs(a,ht,"index");return{La:b.La,timescale:b.timescale,vd:b.vd,Ob:b.Ob,$f:b.$f,timeline:b.timeline,$b:c&&Dd(c),kd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function kt(a){var b=a.kd?1:0;b+=a.timeline?1:0;b+=a.La?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.kd&&(a.timeline=null),a.La=null);if(!a.kd&&!a.$b)throw new T(2,4,4002);}
|
|
948
|
-
function lt(a,b,c,d,e,f,g){function h(J){var K=(J-v)*u,M=K+b.Ob,N=K+n;K=N+u;var P=Math.min(K,l());N=new
|
|
949
|
-
v})}function l(){var J=null!=p&&e[p]||r;return J?n+J:Infinity}var m=a.presentationTimeline,n=a.
|
|
950
|
-
h(H);M.push(N);H++}return J>l()&&!M.length?null:M})}return Promise.resolve(L)}function it(a,b){var c=a.J.Qd;c||(c=Fs(a,ht,"initialization"));if(!c)return null;c=Dd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.Ma;b=new
|
|
951
|
-
function nt(a,b,c,d,e,f,g,h,k,l){
|
|
941
|
+
B.next())I=E.value,I.codecs=a.J.codecs,I.mimeType=a.J.mimeType;h.sd(y);r=new Mk(y);k&&r.Dc(z,C,!0);return L.return(r)})}function Xs(a){return a.Uc}function Zs(a){var b=Gs(a,Xs,"RepresentationIndex");a=Fs(a,Xs,"indexRange");a=sh(a||"");b&&(a=nh(b,"range",sh,a));return a}function Ys(a,b){at(a,b);if(!Zs(a))throw new T(2,4,4002);}function at(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Ud&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
942
|
+
function Vs(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.ce,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ga.label||null,roles:a.roles||null,language:a.ga.language||null}};function bt(a,b,c){var d=Us(a,ct,c),e=dt(a);if(!e.La&&!e.timeline&&1<e.Lc.length)throw new T(2,4,4002);if(!e.La&&!a.ha.duration&&!e.timeline&&1==e.Lc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.la.id&&a.J.id&&(g=b[a.la.id+","+a.J.id])&&(f=g.segmentIndex);var h=et(a.ha.start,a.ha.duration,a.J.Ma,e,d,c,a.J.mimeType,a.J.codecs);b=!f;f?f.rd(h,a.presentationTimeline.nb()):f=new Mk(h);a.presentationTimeline.sd(h);a.vb&&a.ha.qf||f.Dc(a.ha.start,
|
|
943
|
+
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{jc:function(){f&&0!=f.getNumReferences()||f.Yd(h);return Promise.resolve(f)}}}function ct(a){return a.Qb}function dt(a){var b=ft(a);a=Es(a,ct);var c=a.vd;0==c&&(c=1);var d=0;a.La?d=a.La*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{La:a.La,startTime:d,vd:c,Ob:a.Ob,timeline:a.timeline,Lc:b}}
|
|
944
|
+
function et(a,b,c,d,e,f,g,h){var k=d.Lc.length;d.timeline&&d.timeline.length!=d.Lc.length&&(k=Math.min(d.timeline.length,d.Lc.length));for(var l=a-d.Ob,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={ve:void 0,oe:void 0},u++){r.oe=d.Lc[u];var v=p;p=void 0;p=null!=d.La?v+d.La:d.timeline?d.timeline[u].end:v+b;r.ve=null;r=new Ei(a+v,a+p,function(w){return function(){null==w.ve&&(w.ve=Md(c(),[w.oe.Ci]));return w.ve}}(r),r.oe.start,r.oe.end,e,l,a,m,[],"",null,null,Fi,f);r.codecs=h;r.mimeType=g;n.push(r)}return n}
|
|
945
|
+
function ft(a){return[a.J.Qb,a.ga.Qb,a.la.Qb].filter(ye).map(function(b){return gh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.lf&&(a.lf=!0);var c=Dd(b.attributes.media);b=nh(b,"mediaRange",sh,{start:0,end:null});return{Ci:c,start:b.start,end:b.end}})};function gt(a,b,c,d,e,f,g,h,k){k||a.J.Qd||(a.J.Qd=Fs(a,ht,"initialization"));var l=a.J.Qd?it(a,g):null,m=jt(a);kt(m);var n=Ke(a);if(m.kd)return at(a,l),{jc:function(){var w=Ds(m.kd,n.J.id,null,null,n.bandwidth||null,null);w=Md(n.J.Ma(),[w]);return $s(n,b,l,w,0,null,m.Ob)}};if(m.La)return d||"image"===a.ga.contentType||"text"===a.ga.contentType||(c=a.ha.start,d=a.la.id,k=a.ha.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.yf(m.La),a.presentationTimeline.Pg(c,d)),{jc:function(){return lt(n,
|
|
946
|
+
m,e,l,f,g,h)}};var p=null;d=d=null;a.la.id&&a.J.id&&(d=a.la.id+","+a.J.id,d=c[d])&&(p=d.segmentIndex);var r=a.ha.start,u=a.ha.duration?r+a.ha.duration:Infinity,v=!(a.vb&&a.ha.qf);p?(c=p,mt(c,m,r,u,v,l),c.Ga(a.presentationTimeline.nb())):p=new nt(m,a.J.id,a.bandwidth,a.J.Ma,r,u,l,v,g,a.J.Lf);m.timeline&&"image"!==a.ga.contentType&&"text"!==a.ga.contentType&&a.presentationTimeline.Qg(m.timeline,r);d&&a.vb&&(d.segmentIndex=p);return{jc:function(){p instanceof nt&&0==p.getNumReferences()&&mt(p,m,r,u,
|
|
947
|
+
v,l);return Promise.resolve(p)}}}function ht(a){return a.bc}function jt(a){var b=Es(a,ht),c=Fs(a,ht,"media"),d=Fs(a,ht,"index");return{La:b.La,timescale:b.timescale,vd:b.vd,Ob:b.Ob,$f:b.$f,timeline:b.timeline,$b:c&&Dd(c),kd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function kt(a){var b=a.kd?1:0;b+=a.timeline?1:0;b+=a.La?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.kd&&(a.timeline=null),a.La=null);if(!a.kd&&!a.$b)throw new T(2,4,4002);}
|
|
948
|
+
function lt(a,b,c,d,e,f,g){function h(J){var K=(J-v)*u,M=K+b.Ob,N=K+n;K=N+u;var P=Math.min(K,l());N=new Ei(N,P,function(){var R=M*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(M)*BigInt(w));R=Ds(A,D,J,null,y,R);return Md(z(),[R])},0,null,d,C,n,l(),[],"",null,null,Fi,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.j=K;return N}function k(){var J=[Math.max(m.nb(),n),Math.min(m.Xb(),l())].map(function(K){return K-n});J=[Math.ceil(J[0]/u),Math.ceil(J[1]/u)-1];a.J.Sa&&J[1]++;return J.map(function(K){return K+
|
|
949
|
+
v})}function l(){var J=null!=p&&e[p]||r;return J?n+J:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.la.id,r=a.ha.duration,u=b.La,v=b.vd,w=b.timescale,A=b.$b,y=a.bandwidth||null,D=a.J.id,z=a.J.Ma,C=n-b.Ob,B=k();c=a.vb?Math.max(B[0],B[1]-c+1):B[0];g=g||B[1];B=[];for(var E=c;E<=g;++E){var I=h(E);B.push(I)}var L=new Mk(B);B=m.Xb()<l();E=m.V();if(B||E){var H=Math.max(c,g+1);c=u;a.J.Sa&&(c=.1);L.ue(c,function(){var J=m.nb();L.Ga(J);var K=t(k());K.next();K=K.next().value;for(var M=[];H<=K;){var N=
|
|
950
|
+
h(H);M.push(N);H++}return J>l()&&!M.length?null:M})}return Promise.resolve(L)}function it(a,b){var c=a.J.Qd;c||(c=Fs(a,ht,"initialization"));if(!c)return null;c=Dd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.Ma;b=new Ci(function(){var g=Ds(c,d,null,null,e,null);return Md(f(),[g])},0,null,Vs(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}
|
|
951
|
+
function nt(a,b,c,d,e,f,g,h,k,l){Mk.call(this,[]);this.g=a;this.C=b;this.A=c;this.B=d;this.i=e;this.j=f;this.o=g;this.s=k;this.F=l;h&&ot(this)}na(nt,Mk);q=nt.prototype;q.getNumReferences=function(){return this.g?this.g.timeline.length:0};q.release=function(){Mk.prototype.release.call(this);this.g=null};
|
|
952
952
|
q.Ga=function(a){if(this.g){for(var b=0,c=this.g.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.g.timeline=c.slice(b),this.P.length>=b&&(this.P=this.P.slice(b)),this.h+=b,0===this.getNumReferences()&&this.release())}};
|
|
953
|
-
function mt(a,b,c,d,e,f){pt(a,f);if(a.g){c=a.g.timeline;a.g.$b!==b.$b&&(a.g.$b=b.$b);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();0<b.length&&a.g.timeline.push.apply(a.g.timeline,x(b));a.j!==d&&(a.j=d)}else a.g=b,a.i=c,a.j=d;e&&ot(a)}function pt(a,b){if(a.o!==b){a.o=b;a=t(a.P);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&
|
|
953
|
+
function mt(a,b,c,d,e,f){pt(a,f);if(a.g){c=a.g.timeline;a.g.$b!==b.$b&&(a.g.$b=b.$b);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();0<b.length&&a.g.timeline.push.apply(a.g.timeline,x(b));a.j!==d&&(a.j=d)}else a.g=b,a.i=c,a.j=d;e&&ot(a)}function pt(a,b){if(a.o!==b){a.o=b;a=t(a.P);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Hi(c,b)}}
|
|
954
954
|
function ot(a){if(!a.m){for(var b=a.g.timeline;b.length;)if(b[b.length-1].start>=a.j)b.pop();else break;a.Ga(a.i)}}q.find=function(a){if(this.g&&this.g.timeline&&this.g.timeline.length&&a<this.g.timeline[0].start+this.i)return this.h;if(!this.g)return null;var b=this.g.timeline;if(a<this.i||a>=this.j)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.j?e.end+this.i:this.j;if(a>=f&&a<e)return d+this.h}return null};
|
|
955
|
-
q.get=function(a){var b=this;a-=this.h;if(0>a||a>=this.getNumReferences()||!this.g)return null;var c=this.P[a];if(!c){var d=this.g.timeline[a],e=d.Vi,f=this.g.$f+d.ag;c=this.i-this.g.Ob;var g=this.i+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.j&&(h=this.j);for(var k=this.g.codecs,l=this.g.mimeType,m=[],n=(d.end-d.start)/d.Ab,p={},r=0;r<d.Ab;p={we:void 0,nh:void 0},r++){var u=d.start+n*r,v=u+n;p.nh=r+1;p.we=null;p=new
|
|
956
|
-
null==w.we&&(w.we=qt(b.g.$b,b.C,e,b.A,f,w.nh,b.B));return w.we}}(p),0,null,this.o,c,this.i,this.j,[],"",null,null,
|
|
957
|
-
q.wb=function(a){ot(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.h);c&&a(c)}};function qt(a,b,c,d,e,f,g){a=Ds(a,b,c,f,d||null,e);return
|
|
958
|
-
function st(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=
|
|
955
|
+
q.get=function(a){var b=this;a-=this.h;if(0>a||a>=this.getNumReferences()||!this.g)return null;var c=this.P[a];if(!c){var d=this.g.timeline[a],e=d.Vi,f=this.g.$f+d.ag;c=this.i-this.g.Ob;var g=this.i+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.j&&(h=this.j);for(var k=this.g.codecs,l=this.g.mimeType,m=[],n=(d.end-d.start)/d.Ab,p={},r=0;r<d.Ab;p={we:void 0,nh:void 0},r++){var u=d.start+n*r,v=u+n;p.nh=r+1;p.we=null;p=new Ei(this.i+u,this.i+v,function(w){return function(){if(!b.g)return[];
|
|
956
|
+
null==w.we&&(w.we=qt(b.g.$b,b.C,e,b.A,f,w.nh,b.B));return w.we}}(p),0,null,this.o,c,this.i,this.j,[],"",null,null,Fi,this.s);p.codecs=k;p.mimeType=l;0==this.F?0<r&&p.Wd():0!=r%this.F&&p.Wd();m.push(p)}c=new Ei(this.i+d.start,h,function(){return 0<d.Ab||!b.g?[]:qt(b.g.$b,b.C,e,b.A,f,null,b.B)},0,null,this.o,c,this.i,this.j,m,"",null,null,Fi,this.s,0<d.Ab);c.codecs=k;c.mimeType=l;c.j=g;this.P[a]=c}return c};
|
|
957
|
+
q.wb=function(a){ot(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.h);c&&a(c)}};function qt(a,b,c,d,e,f,g){a=Ds(a,b,c,f,d||null,e);return Md(g(),[a]).map(function(h){return h.toString()})};function rt(a){this.o=null;this.A=a;this.G=new kg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}rt.prototype.configure=function(a){this.o=a};rt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};rt.prototype.setManifestType=function(a){this.s=a};
|
|
958
|
+
function st(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Md(a.i,[tt(a,b)]),d=rg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),lg(a.G,e),ra(l,2),F(l,e.promise,4);if(2!=l.g)return f=l.h,g=ud(f.data),h=JSON.parse(g),1==h.VERSION&&ut(a,h,f.uri),ta(l,0);if((k=ua(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Rc(function(){st(a,b)});a.g.Z(a.C);G(l)})}
|
|
959
959
|
function tt(a,b){if(!a.m.length)return b;b=new tc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ic(e)&&xc(b,e);return b.toString()}function ut(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Rc(function(){st(a,d)});if(c=b.TTL)a.C=c;a.g.Z(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
960
960
|
function vt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}rt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
961
961
|
function wt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Nc:void 0},f=e.next())if(g.Nc=f.value,f=b.get(g.Nc))d.push({Ef:g.Nc,location:f});else if(f=a.F.find(function(k){return function(l){return l.zj==k.Nc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].uh?(h=new tc(h),vc(h,f["URI-REPLACEMENT"].uh),d.push({Ef:g.Nc,location:h.toString()})):d.push({Ef:g.Nc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
962
|
-
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new tc(k.location)).Fb))return!1;return!0});d.length&&(a.B=d[0].Ef);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:
|
|
962
|
+
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new tc(k.location)).Fb))return!1;return!0});d.length&&(a.B=d[0].Ef);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Md(a.i,d)};function xt(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=xt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};q.hi=function(){return this.l};q.jf=function(){return this.j.slice()};q.Qh=function(){return this.i};
|
|
963
963
|
q.rg=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Ud)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
|
|
964
964
|
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)}};
|
|
965
965
|
function yt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[zt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[At(n),n]})),l=new Map(h.textStreams.map(function(n){return[Bt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ct(n),n]}));if(b){var m=Dt(Ud);l.set(Bt(m),m);m=Dt("image");h.set(Ct(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{kg:c,sh:d,oh:e,Gg:f}}
|
|
966
966
|
q.Ke=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q;return O(function(W){if(1==W.g){e=Wd;if(!b&&1==a.length)return f=yt(a,!1),g=f.kg,h=f.sh,k=f.oh,l=f.Gg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),W.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return W.return();u=yt(a,!0);v=u.kg;w=u.sh;A=u.oh;y=u.Gg;return F(W,
|
|
967
967
|
Promise.all([Et(d,d.h,v,n,Ft,Gt,m),Et(d,d.g,w,n,Ft,Gt,m),Et(d,d.j,A,n,Ft,Gt,m),Et(d,d.i,y,n,Ft,Gt,m)]),2)}D=0;z=[];if(d.g.length&&d.h.length)for(H=t(d.h),J=H.next();!J.done;J=H.next())for(K=J.value,M=t(d.g),N=M.next();!N.done;N=M.next())P=N.value,R=Mc(K.drmInfos,P.drmInfos),K.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=D++,z.push({id:Q,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K,video:P,bandwidth:(K.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
968
|
-
decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,B=t(C),E=B.next();!E.done;E=B.next())I=E.value,L=D++,z.push({id:L,language:I.language,disabledUntilTime:0,primary:I.primary,audio:I.type==e.X?I:null,video:I.type==e.
|
|
969
|
-
function Ht(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N;return O(function(P){switch(P.g){case 1:b=Wd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.X}).map(function(Q){return[zt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.
|
|
968
|
+
decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,B=t(C),E=B.next();!E.done;E=B.next())I=E.value,L=D++,z.push({id:L,language:I.language,disabledUntilTime:0,primary:I.primary,audio:I.type==e.X?I:null,video:I.type==e.ja?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=z;G(W)})};
|
|
969
|
+
function Ht(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N;return O(function(P){switch(P.g){case 1:b=Wd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.X}).map(function(Q){return[zt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ja}).map(function(Q){return[At(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ua}).map(function(Q){return[Bt(Q),Q]}))});
|
|
970
970
|
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.De}).map(function(Q){return[Ct(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=It(b.ua),k.set(Bt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=It(b.De),p.set(Ct(r),r);u=new xt;return F(P,Et(u,[],c,0,Jt,Kt,0),2);case 2:return v=P.h,F(P,Et(u,[],d,0,Jt,Kt,0),3);case 3:return w=P.h,F(P,Et(u,[],e,0,Jt,Kt,0),4);case 4:return A=P.h,F(P,Et(u,[],f,0,Jt,Kt,0),5);case 5:y=P.h;D=0;if(w.length&&v.length)for(I=
|
|
971
971
|
t(v),L=I.next();!L.done;L=I.next())for(H=L.value,J=t(w),K=J.next();!K.done;K=J.next())M=K.value,N=D++,M.variantIds.push(N),H.variantIds.push(N);else for(z=w.concat(v),C=t(z),B=C.next();!B.done;B=C.next())E=B.value,E.variantIds=[D++];return P.return(w.concat(v).concat(A).concat(y))}})}
|
|
972
972
|
function Et(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H;return O(function(J){switch(J.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){J.u(4);break}n=m.value;return F(J,Lt(a,n,c,d,f,h,g),5);case 5:p=J.h;if(!p)throw new T(2,4,4037);m=l.next();J.u(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())y=A.value,(D=Mt(a,y,c,e,f,h))&&b.push(D);z=t(h);for(C=z.next();!C.done;C=
|
|
973
973
|
z.next())for(B=C.value,E=t(B),I=E.next(),L={};!I.done;L={Uf:void 0},I=E.next())if(L.Uf=I.value,!Nt(L.Uf)&&(H=b.some(function(K){return function(M){return Ot(a,K.Uf,M)}}(L))))throw new T(2,4,4037);return J.return(b)}})}function Lt(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return Pt(a,c,b,0<g),b.matchedStreams?b.segmentIndex?F(h,Qt(b,d+g),2):h.u(2):h.return(!1);Rt(b,d,e,f,g);return h.return(!0)})}
|
|
974
|
-
function Qt(a,b){var c,d,e,f,g,h;return O(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex());return F(k,Promise.all(c),2)}if(a.segmentIndex instanceof
|
|
975
|
-
function Mt(a,b,c,d,e,f){if(Nt(b))return null;var g=d(b);Pt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new
|
|
974
|
+
function Qt(a,b){var c,d,e,f,g,h;return O(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex());return F(k,Promise.all(c),2)}if(a.segmentIndex instanceof Pk)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.g.push(h.segmentIndex);G(k)})}
|
|
975
|
+
function Mt(a,b,c,d,e,f){if(Nt(b))return null;var g=d(b);Pt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Pk;return F(h,Qt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Rt(g,0,e,f,0);return g}
|
|
976
976
|
function Rt(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==Fe(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
977
977
|
function Ft(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):
|
|
978
978
|
null;b.trickModeVideo=null;return b}function Jt(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set;b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
|
|
979
979
|
function Gt(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Mc(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,
|
|
980
980
|
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Ft(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
|
|
981
|
-
for(var g=new
|
|
981
|
+
for(var g=new Pk,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.g.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),Gt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Gt(a.trickModeVideo,b))}
|
|
982
982
|
function Kt(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
983
983
|
function Pt(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=St(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
984
984
|
function St(a,b,c){var d={audio:zt,video:At,text:Bt,image:Ct}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return Ot(a,l,m)},video:function(l,m){return Ot(a,l,m)},text:Tt,image:Ut}[c.type];for(var g={audio:Vt,video:Wt,text:Xt,image:Yt}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!Nt(e)&&b.delete(d(e));return e}
|
|
@@ -989,121 +989,121 @@ function Wt(a,b,c){var d=Zt(a,b),e=Zt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d
|
|
|
989
989
|
function Xt(a,b,c){var d=Fe(a.language,b.language),e=Fe(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
990
990
|
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Yt(a,b,c){return au(a.width*a.height,b.width*b.height,c.width*c.height)==bu?!0:!1}
|
|
991
991
|
function It(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
|
|
992
|
-
function Dt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new
|
|
992
|
+
function Dt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Mk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
|
|
993
993
|
function au(a,b,c){if(b==a&&a!=c)return cu;if(c==a&&a!=b)return bu;if(b>a){if(c<=a||c-a<b-a)return bu;if(c-a>b-a)return cu}else{if(c>a)return cu;if(a-c<a-b)return bu;if(a-c>a-b)return cu}return eu}function du(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?bu:b<a?cu:eu}function Nt(a){switch(a.type){case Ud:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
994
994
|
function At(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,$t(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function zt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,$t(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Bt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
995
995
|
function Ct(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function $t(a){if(!fu.has(a)){var b=fe(a);fu.set(a,b)}return fu.get(a)}S("shaka.util.PeriodCombiner",xt);xt.prototype.setUseStreamOnce=xt.prototype.jh;xt.prototype.setAllowMultiTypeVariants=xt.prototype.bh;xt.prototype.combinePeriods=xt.prototype.Ke;xt.prototype.deleteStream=xt.prototype.rg;xt.prototype.getImageStreams=xt.prototype.Qh;xt.prototype.getTextStreams=xt.prototype.jf;xt.prototype.getVariants=xt.prototype.hi;
|
|
996
996
|
var bu=1,eu=0,cu=-1,fu=new Map;function gu(a,b){var c=new DOMParser,d=hu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function iu(a,b){try{var c=zd(a);return gu(c,b)}catch(d){return null}}
|
|
997
|
-
var hu=new Kc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function ju(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.na=1;this.F=[];this.l={$d:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,td:0};this.s=new Map;this.o={};this.B={};this.
|
|
998
|
-
new gb;this.I=null;this.Y=!1;this.ba=[]}q=ju.prototype;q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.V()&&this.
|
|
997
|
+
var hu=new Kc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function ju(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.na=1;this.F=[];this.l={$d:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,td:0};this.s=new Map;this.o={};this.B={};this.ia={};this.m=new xt;this.K=0;this.ma=new Ra(5);this.L=new Rc(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.kb(a.I,"timeupdate"),a.I.paused)){a.G.ka(a.I,"timeupdate",function(){return ku(a)});return}ku(a)});this.T=new kg;this.O=null;this.C=[];this.da=Infinity;this.H=!1;this.h=null;this.N=0;this.ea=!1;this.G=
|
|
998
|
+
new gb;this.I=null;this.Y=!1;this.ba=[]}q=ju.prototype;q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.V()&&this.L.vc();this.h&&this.h.configure(this.g);this.m&&(this.m.bh(this.g.dash.multiTypeVariantsAllowed&&ob()),this.m.jh(this.g.dash.useStreamOnceInPeriodFlattening))};
|
|
999
999
|
q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.H=b.isLowLatencyMode(),c.A=[a],c.j=b,F(e,lu(c),2);d=e.h;c.j&&mu(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
1000
|
-
q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={$d:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,td:0};this.m=null;null!=this.
|
|
1000
|
+
q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={$d:"",type:"",profiles:[],Lb:null,Sa:0,Ma:null,td:0};this.m=null;null!=this.L&&(this.L.stop(),this.L=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.T.destroy()};
|
|
1001
1001
|
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ra(c,2),F(c,lu(a),4);if(2!=c.g)return ta(c,0);b=ua(c);if(!a.j||!b)return c.return();a.j.onError(b);G(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.V()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Xb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,mu(this,0))}}};
|
|
1002
1002
|
q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.I=a};
|
|
1003
|
-
function lu(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return b=4,c="MPD",d=nu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=wt(a.h,"Location",!0),f.length&&(e=f)),g=
|
|
1004
|
-
function pu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=
|
|
1005
|
-
p=a.g.dash.xlinkFailGracefully;r=Js(k,a.g.retryParameters,p,c,a.j.networkingEngine);
|
|
1006
|
-
function ru(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,
|
|
1007
|
-
"";a.l.td=
|
|
1008
|
-
K=J.attributes.serviceLocation,M=
|
|
1009
|
-
"suggestedPresentationDelay",
|
|
1010
|
-
Aa.
|
|
1011
|
-
a.H=a.j.isLowLatencyMode());a.H&&Aa.dh(a.da);Aa.yf(Za||1);return F(bc,u,2);case 2:a.H&&(W=0,Hg=null!=
|
|
1012
|
-
nextUrl:wu(b),periodCount:ne.length,gapCount:a.N,isLowLatency:a.ea};if(!Aa.qh()){bc.u(7);break}
|
|
1013
|
-
function qu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K;return O(function(M){if(1==M.g){c=b.attributes.mpdId;d=
|
|
1014
|
-
N}}else if("type"===n.Tb){a.i.presentationTimeline.
|
|
1015
|
-
"";for(var Q=t(P),W=Q.next();!W.done;W=Q.next())W=a.s.get(W.value),
|
|
1016
|
-
I);L=t(f);for(H=L.next();!H.done;H=L.next())J=H.value,e.push.apply(e,x(tu(a,{vb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,la:null,
|
|
1003
|
+
function lu(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return b=4,c="MPD",d=nu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=wt(a.h,"Location",!0),f.length&&(e=f)),g=rg(e,a.g.retryParameters),h=Date.now(),F(n,ou(a,g,0,{type:b}),2);if(3!=n.g){k=n.h;if(!a.j)return n.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);return F(n,pu(a,k.data,k.uri,c),3)}l=Date.now();m=(l-h)/1E3;a.ma.sample(1,m);return n.return(m)})}
|
|
1004
|
+
function pu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=um;if(f!=g){qb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=iu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ad(h.outerHTML)}k=Zg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=vm;l!=m&&l(k);if("Patch"===d)return v.return(qu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(ru(a,k,c));
|
|
1005
|
+
p=a.g.dash.xlinkFailGracefully;r=Js(k,a.g.retryParameters,p,c,a.j.networkingEngine);lg(a.T,r);return F(v,r.promise,2)}u=v.h;return v.return(ru(a,u,c))})}
|
|
1006
|
+
function ru(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,wa,Fa,xa,Pa,Za,Va,Aa,bb,ac,Sa,nb,Tb,Vc,vd,me,Ld,pf,ne,Mi,Hg,Ni,Ig;return O(function(bc){switch(bc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=gh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=ih(l))p=Md(d,[n])[0],m&&(a.h?vt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=wt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.$d=b.attributes.id||
|
|
1007
|
+
"";a.l.td=nh(b,"publishTime",qh)||0;a.F=gh(b,"PatchLocation");u=Promise.resolve();if((v=kh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new rt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=ih(v))(y=nh(v,"queryBeforeStart",xh,!1))?u=st(a.h,A):st(a.h,A);D=t(f.keys());for(z=D.next();!z.done;z=D.next())C=z.value,B=f.get(C),vt(a.h,"Location",C,B)}E=gh(b,"BaseURL");I=!1;if(a.h)for(L=t(E),H=L.next();!H.done;H=L.next())J=H.value,
|
|
1008
|
+
K=J.attributes.serviceLocation,M=ih(J),K&&M&&(vt(a.h,"BaseURL",K,M),I=!0);a.ba=null;I&&a.h||(N=E.map(ih),a.ba=Md(d,N));P=function(){return a.h&&I?wt(a.h,"BaseURL"):a.ba?a.ba:[]};a.l.Ma=P;R=0;E&&E.length&&(R=nh(E[0],"availabilityTimeOffset",wh)||0);a.l.Sa=R;Q=a.g.dash.ignoreMinBufferTime;W=0;Q||(W=nh(b,"minBufferTime",rh)||0);a.K=nh(b,"minimumUpdatePeriod",rh,-1);Y=nh(b,"availabilityStartTime",qh);wa=nh(b,"timeShiftBufferDepth",rh);Fa=a.g.dash.ignoreSuggestedPresentationDelay;xa=null;Fa||(xa=nh(b,
|
|
1009
|
+
"suggestedPresentationDelay",rh));Pa=a.g.dash.ignoreMaxSegmentDuration;Za=null;Pa||(Za=nh(b,"maxSegmentDuration",rh));Va=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.Y=a.i.presentationTimeline.V()&&"static"==Va);a.l.type=Va;su(a);if(a.i)for(Aa=a.i.presentationTimeline,bb=t(Object.values(a.o)),ac=bb.next();!ac.done;ac=bb.next())Sa=ac.value,Sa.segmentIndex&&Sa.segmentIndex.Ga(Aa.nb());else nb=a.g.defaultPresentationDelay||1.5*W,Tb=null!=xa?xa:nb,Aa=new qk(Y,Tb,a.g.dash.autoCorrectDrift);
|
|
1010
|
+
Aa.uc("static"==Va);(Vc=Aa.V())&&!isNaN(a.g.availabilityWindowOverride)&&(wa=a.g.availabilityWindowOverride);null==wa&&(wa=Infinity);Aa.pe(wa);vd=b.attributes.profiles||"";a.l.profiles=vd.split(",");me={vb:"static"!=Va,presentationTimeline:Aa,la:null,ha:null,ga:null,J:null,bandwidth:0,lf:!1,Sa:R,Lb:null,profiles:vd.split(","),roles:null};a.N=0;Ld=tu(a,me,P,b,!1);pf=Ld.duration;ne=Ld.periods;("static"!=Va||a.Y)&&Ld.tg||Aa.Za(pf||Infinity);a.ea&&!a.H&&(Mi=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),
|
|
1011
|
+
a.H=a.j.isLowLatencyMode());a.H&&Aa.dh(a.da);Aa.yf(Za||1);return F(bc,u,2);case 2:a.H&&(W=0,Hg=null!=xa?xa:a.g.defaultPresentationDelay,Aa.Pf(Hg));if(!a.i)return F(bc,a.m.Ke(ne,me.vb),6);a.i.periodCount=ne.length;a.i.gapCount=a.N;return F(bc,uu(a,ne,!1),4);case 6:a.i={presentationTimeline:Aa,variants:a.m.l,textStreams:a.m.jf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:W||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:vu(b),
|
|
1012
|
+
nextUrl:wu(b),periodCount:ne.length,gapCount:a.N,isLowLatency:a.ea};if(!Aa.qh()){bc.u(7);break}Ni=gh(b,"UTCTiming");return F(bc,xu(a,P,Ni),8);case 8:Ig=bc.h;if(!a.j)return bc.return();Aa.eh(Ig);case 7:Aa.Vd();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),G(bc)}})}function uu(a,b,c){var d;return O(function(e){if(1==e.g)return F(e,a.m.Ke(b,!0,c),2);a.i.variants=a.m.l;d=a.m.jf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);G(e)})}
|
|
1013
|
+
function qu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K;return O(function(M){if(1==M.g){c=b.attributes.mpdId;d=nh(b,"originalPublishTime",qh);if(!c||c!==a.l.$d||d!==a.l.td)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(fh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=zh(l.attributes.sel||""),n=m[m.length-1],p=ih(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Tb){r=ih(l)||"";var N=rh(r);if(null!=N){a.l.Lb=N;for(var P=t(a.s.values()),R=P.next();!R.done;R=P.next())R.value.Lb=
|
|
1014
|
+
N}}else if("type"===n.Tb){a.i.presentationTimeline.uc("static"==p);a.l.type=p;N=t(a.s.values());for(P=N.next();!P.done;P=N.next())P.value.vb="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Tb?a.l.td=qh(p)||0:null===n.Tb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Ah(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&yu(a,n.id);else if("SegmentTemplate"===n.name){P=zh(l.attributes.sel||"");N=P[P.length-1];if(N.Tb){P=zu(a,P);R=ih(l)||
|
|
1015
|
+
"";for(var Q=t(P),W=Q.next();!W.done;W=Q.next())W=a.s.get(W.value),Ch(W.J.bc,l.tagName,N.Tb,R);N=P}else N=[];u=N;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){N=zh(l.attributes.sel||"");N=zu(a,N);P=t(N);for(R=P.next();!R.done;R=P.next())R=a.s.get(R.value),R=Gs(R,ht,"SegmentTimeline"),Q=gh(R,"S"),Ah(Q,l),R.children=Q;y=N;D=t(y);for(z=D.next();!z.done;z=D.next())C=z.value,g.add(C)}B=t(g);for(E=B.next();!E.done;E=B.next())I=E.value,Au(a,
|
|
1016
|
+
I);L=t(f);for(H=L.next();!H.done;H=L.next())J=H.value,e.push.apply(e,x(tu(a,{vb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,la:null,ha:null,ga:null,J:null,bandwidth:0,lf:!1,Sa:a.l.Sa,profiles:a.l.profiles,Lb:a.l.Lb,roles:null},a.l.Ma,J,!0).periods));if(!e.length)return M.u(2);a.i.periodCount+=e.length;a.i.gapCount=a.N;return F(M,uu(a,e,!0),2)}"static"==a.l.type&&(K=a.l.Lb,a.i.presentationTimeline.Za(K||Infinity));G(M)})}
|
|
1017
1017
|
function yu(a,b){a.i.periodCount--;for(var c=t(a.s.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.s.get(d);Gs(e,ht,"SegmentTimeline").children=[];Au(a,d);a.s.delete(d)}a.C=a.C.filter(function(f){return f!==b})}
|
|
1018
|
-
function zu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.s.values()),a=e.next();!a.done;a=e.next())a=a.value,a.la.id===c&&a.
|
|
1019
|
-
","+a.J.id);return b}function Au(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ga(a.i.presentationTimeline.nb());try{var e=gt(c,function(f,g,h,k){return Bu(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.
|
|
1020
|
-
function vu(a){var b=
|
|
1021
|
-
return c}function wu(a){a=
|
|
1022
|
-
function tu(a,b,c,d,e){var f=b.Lb;f||(f=
|
|
1023
|
-
a.O)||a.C.includes(r)||l+1==d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=Cu(a,b,c,{start:p,duration:v,node:m,qf:null==v||!n});h.push(k);b.la.id&&v&&(a.
|
|
1018
|
+
function zu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.s.values()),a=e.next();!a.done;a=e.next())a=a.value,a.la.id===c&&a.ga.id===d&&a.J.id&&b.push(c+","+a.J.id);else if(-1<e)for(d=t(a.s.values()),a=d.next();!a.done;a=d.next())a=a.value,a.la.id===c&&a.ga.position===e&&a.J.id&&b.push(c+
|
|
1019
|
+
","+a.J.id);return b}function Au(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ga(a.i.presentationTimeline.nb());try{var e=gt(c,function(f,g,h,k){return Bu(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.ia,c.J.aesKey,null,!0);d.createSegmentIndex=function(){return O(function(f){if(1==f.g)return d.segmentIndex?f.u(0):F(f,e.jc(),3);d.segmentIndex=f.h;G(f)})}}catch(f){if(b=c.J.contentType,b!=Ud&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
1020
|
+
function vu(a){var b=kh(a,"ServiceDescription");if(!b)return null;a=kh(b,"Latency");b=kh(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)));
|
|
1021
|
+
return c}function wu(a){a=gh(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}
|
|
1022
|
+
function tu(a,b,c,d,e){var f=b.Lb;f||(f=nh(d,"mediaPresentationDuration",rh),a.l.Lb=f);var g=0;a.i&&a.i.presentationTimeline&&a.Y&&(g=a.i.presentationTimeline.Jb());var h=[],k=g;d=gh(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=nh(m,"start",rh,k),r=m.attributes.id,u=nh(m,"duration",rh);p=0==l&&0==p&&a.Y?g:p;var v=null;if(n){var w=nh(n,"start",rh);null!=w&&(v=w-p+g)}else null!=f&&(v=f-p+g);w=Xd;v&&u&&Math.abs(v-u)>w&&v>u&&a.N++;null==v&&(v=u);if(!(null!==a.O&&null!==r&&null!==p&&p<
|
|
1023
|
+
a.O)||a.C.includes(r)||l+1==d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=Cu(a,b,c,{start:p,duration:v,node:m,qf:null==v||!n});h.push(k);b.la.id&&v&&(a.ia[b.la.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(A){return A.id});return null!=f?{periods:h,duration:f+g,tg:!1}:{periods:h,duration:k,tg:!0}}
|
|
1024
1024
|
function su(a){var b=Object.keys(a.B).filter(function(f){return!a.C.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.B[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.rg(a.o[e],c),delete a.o[e];delete a.B[c]}}
|
|
1025
|
-
function Cu(a,b,c,d){b.la=Du(a,d.node,null,c);b.
|
|
1025
|
+
function Cu(a,b,c,d){b.la=Du(a,d.node,null,c);b.ha=d;b.la.Sa=b.Sa;b.la.id||(b.la.id="__shaka_period_"+d.start);var e=gh(d.node,"EventStream");c=b.presentationTimeline.nb();e=t(e);for(var f=e.next();!f.done;f=e.next())Eu(a,d.start,d.duration,f.value,c);c=gh(d.node,"AdaptationSet").map(function(m,n){return Fu(a,b,n,m)}).filter(ye);if(b.vb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Pi);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,
|
|
1026
1026
|
4,4018);}d=c.filter(function(m){return!m.Zf});c=c.filter(function(m){return m.Zf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Zf.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={Tf:void 0},k=h.next())l.Tf=k.value,l.Tf.trickModeVideo=e.streams.find(function(m){return function(n){return fe(m.Tf.codecs)==fe(n.codecs)}}(l))}}c=Gu(a.g.disableAudio,d,"audio");e=Gu(a.g.disableVideo,d,"video");f=Gu(a.g.disableText,
|
|
1027
1027
|
d,Ud);d=Gu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.la.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Gu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
1028
|
-
function Fu(a,b,c,d){function e(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.
|
|
1029
|
-
if(null==n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":g=!0;break;case "caption":case "subtitle":k=m}}var p,r;n=
|
|
1030
|
-
"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=
|
|
1028
|
+
function Fu(a,b,c,d){function e(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ga=Du(a,d,b.la,null);b.ga.position=c;var g=!1;c=gh(d,"Role");var h=c.map(function(J){return J.attributes.value}).filter(ye),k=void 0,l=b.ga.contentType==Ud;l&&(k="subtitle");c=t(c);for(var m=c.next();!m.done;m=c.next()){m=m.value;var n=m.attributes.schemeIdUri;
|
|
1029
|
+
if(null==n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":g=!0;break;case "caption":case "subtitle":k=m}}var p,r;n=gh(d,"EssentialProperty");c=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?c=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?r=e(parseInt(v.attributes.value,10)):
|
|
1030
|
+
"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=gh(d,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(r=e(parseInt(v.attributes.value,10)));n=gh(d,"Accessibility");
|
|
1031
1031
|
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||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=v||a.g.disableText)"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?D="visually impaired":"2"==w&&(D="hard of hearing"));else if(v=1,null!=w){w=t(w.split(";"));for(var z=w.next();!z.done;z=w.next()){var C=z.value,
|
|
1032
|
-
B=z=void 0;C.includes("=")?(C=C.split("="),z="svc"+C[0],B=C[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,B=C);y.set(z,Be(B))}}else y.set("svc1","und");else if(v=1,null!=w)for(w=w.split(";"),z=t(w),C=z.next();!C.done;C=z.next()){B=C.value;var E=C=void 0;B.includes("=")?(B=B.split("="),C=B[0].startsWith("CC")?B[0]:"CC"+B[0],E=B[1]||"und"):(C="CC"+v,2==w.length?v+=2:v++,E=B);y.set(C,Be(E))}else y.set("CC1","und");if(m)return null;m=
|
|
1033
|
-
L=Be(b.
|
|
1034
|
-
l=b.
|
|
1035
|
-
function Hu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=Du(a,l,b.
|
|
1036
|
-
2);if(3!=P.g){K=P.h;if(!K.data||16!=K.data.byteLength)throw new T(2,4,4049);M={name:"AES-CBC"};N=w;return F(P,window.crypto.subtle.importKey("raw",K.data,M,!0,["decrypt"]),3)}N.cryptoKey=P.h;w.fetchKey=void 0;G(P)})}}}b.J.aesKey=w;A=function(K,M,N,P){return Bu(a,K,M,N,P)};if(b.J.Uc)var z=Ws(b,A,w);else if(b.J.Qb)z=bt(b,a.o,w);else if(b.J.bc)z=gt(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.
|
|
1037
|
-
K.wb(function(M){M.mimeType=E;M.codecs=I});return Promise.resolve(K)}}}}catch(K){if((v||u)&&4002==K.code)return null;throw K;}n=
|
|
1032
|
+
B=z=void 0;C.includes("=")?(C=C.split("="),z="svc"+C[0],B=C[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,B=C);y.set(z,Be(B))}}else y.set("svc1","und");else if(v=1,null!=w)for(w=w.split(";"),z=t(w),C=z.next();!C.done;C=z.next()){B=C.value;var E=C=void 0;B.includes("=")?(B=B.split("="),C=B[0].startsWith("CC")?B[0]:"CC"+B[0],E=B[1]||"und"):(C="CC"+v,2==w.length?v+=2:v++,E=B);y.set(C,Be(E))}else y.set("CC1","und");if(m)return null;m=gh(d,"ContentProtection");var I=ss(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),
|
|
1033
|
+
L=Be(b.ga.language||"und"),H=b.ga.label;m=gh(d,"Representation");d=m.map(function(J){if(J=Hu(a,b,I,k,L,H,g,h,y,J,D,A))J.hdr=J.hdr||p,J.colorGamut=J.colorGamut||r,J.fastSwitching=u;return J}).filter(function(J){return!!J});if(0==d.length){c="image"==b.ga.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new T(2,4,4003);}if(!b.ga.contentType||"application"==b.ga.contentType)for(b.ga.contentType=Iu(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=b.ga.contentType;
|
|
1034
|
+
l=b.ga.id||"__fake__"+a.na++;n=t(d);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(I.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(J){return J.attributes.id}).filter(ye);return{id:l,contentType:b.ga.contentType,language:L,hk:g,streams:d,drmInfos:I.drmInfos,Zf:c,Pi:m}}
|
|
1035
|
+
function Hu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=Du(a,l,b.ga,null);var p=b.J.id;a.da=Math.min(a.da,b.J.Sa);a.ea=0<a.da;if(!Ju(b.J))return null;var r=b.ha.start;b.bandwidth=nh(l,"bandwidth",uh)||0;b.roles=h;var u=b.J.contentType,v=u==Ud||"application"==u;u="image"==u;try{var w=void 0;if(c.Fe){var A=b.J.Ma,y=Md(A(),[c.Fe.wi]),D=rg(y,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Fe.iv,firstMediaSequenceNumber:0,fetchKey:function(){var K,M,N;return O(function(P){if(1==P.g)return F(P,ou(a,D,6),
|
|
1036
|
+
2);if(3!=P.g){K=P.h;if(!K.data||16!=K.data.byteLength)throw new T(2,4,4049);M={name:"AES-CBC"};N=w;return F(P,window.crypto.subtle.importKey("raw",K.data,M,!0,["decrypt"]),3)}N.cryptoKey=P.h;w.fetchKey=void 0;G(P)})}}}b.J.aesKey=w;A=function(K,M,N,P){return Bu(a,K,M,N,P)};if(b.J.Uc)var z=Ws(b,A,w);else if(b.J.Qb)z=bt(b,a.o,w);else if(b.J.bc)z=gt(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.ia,w,n,!1);else{var C=b.ha.duration||0,B=b.J.Ma,E=b.J.mimeType,I=b.J.codecs;z={jc:function(){var K=Ok(r,C,B());
|
|
1037
|
+
K.wb(function(M){M.mimeType=E;M.codecs=I});return Promise.resolve(K)}}}}catch(K){if((v||u)&&4002==K.code)return null;throw K;}n=gh(l,"ContentProtection");n=ws(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;gh(l,"SupplementalProperty").some(function(K){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==K.attributes.schemeIdUri&&"JOC"==K.attributes.value})&&(A=!0);y=!1;v&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var L;if(u&&((l=gh(l,"EssentialProperty").find(function(K){return["http://dashif.org/thumbnail_tile",
|
|
1038
1038
|
"http://dashif.org/guidelines/thumbnail_tile"].includes(K.attributes.schemeIdUri)}))&&(L=l.attributes.value),!L))return null;var H;v=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(v.includes("hvc1.2.4.L153.B0")||v.includes("hev1.2.4.L153.B0"))&&(H="PQ");l=b.J.id?b.la.id+","+b.J.id:"";a.F.length&&p&&a.s.set(b.la.id+","+p,Ku(b));var J=l&&a.o[l]?a.o[l]:{id:a.na++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){J.segmentIndex&&
|
|
1039
|
-
(J.segmentIndex.release(),J.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:v,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.
|
|
1039
|
+
(J.segmentIndex.release(),J.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:v,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ga.language,label:f,type:b.ga.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.J.ce,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:A,
|
|
1040
1040
|
closedCaptions:k,hdr:H,colorGamut:void 0,videoLayout:void 0,tilesLayout:L,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Zd(b.J.mimeType,b.J.codecs)])};J.createSegmentIndex=function(){var K;return O(function(M){if(1==M.g){if(J.segmentIndex)return M.u(0);K=J;return F(M,z.jc(),3)}K.segmentIndex=M.h;G(M)})};l&&b.vb&&!a.o[l]&&(b=b.la.id||"",a.B[b]||(a.B[b]=[]),a.o[l]=J,a.B[b].push(l));return J}
|
|
1041
|
-
function Ku(a){function b(c){if(!c)return null;c=Ke(c);c.Uc=null;c.Qb=null;c.bc=
|
|
1042
|
-
function ku(a){var b,c;return O(function(d){switch(d.g){case 1:return b=0,ra(d,2),F(d,lu(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=ua(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();mu(a,b);G(d)}})}function mu(a,b){if(!(0>a.K)){var c=a.K;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.
|
|
1043
|
-
function Du(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ce:null,audioSamplingRate:null,Sa:0,Lf:0};d=d||c.Ma;var e=b.attributes.id,f=
|
|
1044
|
-
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=
|
|
1045
|
-
|
|
1041
|
+
function Ku(a){function b(c){if(!c)return null;c=Ke(c);c.Uc=null;c.Qb=null;c.bc=Eh(c.bc);return c}a=Ke(a);a.la=b(a.la);a.ga=b(a.ga);a.J=b(a.J);a.ha&&(a.ha=Ke(a.ha),a.ha.node=null);return a}
|
|
1042
|
+
function ku(a){var b,c;return O(function(d){switch(d.g){case 1:return b=0,ra(d,2),F(d,lu(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=ua(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();mu(a,b);G(d)}})}function mu(a,b){if(!(0>a.K)){var c=a.K;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.L.Z(Math.max(c-b,Ta(a.ma)))}}
|
|
1043
|
+
function Du(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ce:null,audioSamplingRate:null,Sa:0,Lf:0};d=d||c.Ma;var e=b.attributes.id,f=gh(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=ih(m);l&&m&&(vt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(ih));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=oh(b,
|
|
1044
|
+
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=ul(m).join(",");n=nh(b,"frameRate",yh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=Lu(gh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=gh(b,"AudioChannelConfiguration");u=Mu(u)||c.ce;var v=nh(b,"audioSamplingRate",vh)||c.audioSamplingRate;k||(k=Iu(l,m));var w=kh(b,"SegmentBase"),A=kh(b,"SegmentTemplate"),y=w?nh(w,"availabilityTimeOffset",wh)||0:0,D=A?nh(A,"availabilityTimeOffset",wh)||0:0,z=f&&f.length?nh(f[0],"availabilityTimeOffset",
|
|
1045
|
+
wh)||0:0;y=c.Sa+z+y+D;D=null;(z=kh(b,"SegmentSequenceProperties"))&&(z=kh(z,"SAP"))&&(D=nh(z,"cadence",th));z=b.attributes.label;var C=gh(b,"Label");C&&C.length&&(C=C[0],hh(C)&&(z=hh(C)));return{Ma:function(){return Md(d(),f.length?a.h&&h?wt(a.h,e):g?g:[]:[])},Uc:w||c.Uc,Qb:kh(b,"SegmentList")||c.Qb,bc:A||c.bc,width:nh(b,"width",vh)||c.width,height:nh(b,"height",vh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,ce:u,audioSamplingRate:v,
|
|
1046
1046
|
Sa:y,Qd:null,Lf:D||c.Lf,label:z||null}}function Lu(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
1047
1047
|
function Mu(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,
|
|
1048
1048
|
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}
|
|
1049
1049
|
function Ju(a){var b=a.Uc?1:0;b+=a.Qb?1:0;b+=a.bc?1:0;if(0==b)return a.contentType==Ud||"application"==a.contentType?!0:!1;1!=b&&(a.Uc&&(a.Qb=null),a.bc=null);return!0}
|
|
1050
|
-
function Nu(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=
|
|
1050
|
+
function Nu(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=Md(b(),e),g=rg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),lg(a.T,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=ud(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
1051
1051
|
function xu(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ra(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.u(8);
|
|
1052
1052
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ya("NTP UTCTiming scheme is not supported");break;default:Ya("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return F(n,Nu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return F(n,Nu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
|
|
1053
1053
|
3);break;case 5:ua(n);case 3:g=f.next();n.u(2);break;case 4:return Ya("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
1054
|
-
function Eu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=
|
|
1055
|
-
function Bu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=
|
|
1056
|
-
function nu(a){var b=a.l.td;if(!a.l.$d||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=
|
|
1057
|
-
function fv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function gv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=gv(a,b))?a.value:c||null}function hv(a,b){a=gv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function iv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Ab=c}function jv(a,b){this.name=a;this.value=b};function kv(a,b){return a.filter(function(c){return c.name==b})}function lv(a,b){return a.filter(function(c){return hv(c,"TYPE")==b})}function mv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function nv(a,b,c){c=void 0===c?0:c;return(a=mv(a,b))?Number(a.value):c}function ov(a,b,c){return b?pv(a,[b],c):[]}function pv(a,b,c){if(!b.length)return[];b=
|
|
1054
|
+
function Eu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=nh(d,"timescale",vh)||1,k=nh(d,"presentationTimeOffset",vh)||0;d=t(gh(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=nh(l,"presentationTime",vh)||0,n=nh(l,"duration",vh)||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:Dh(l),eventNode:Eh(l)},a.j.onTimelineRegionAdded(l))}}
|
|
1055
|
+
function Bu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=xg,g=e?0:1,h=yl(b,c,d,a.g.retryParameters),F(l,ou(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Iu(a,b){b=Zd(a,b);return oe(b)?Ud:a.split("/")[0]}function ou(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);lg(a.T,b);return b.promise}
|
|
1056
|
+
function nu(a){var b=a.l.td;if(!a.l.$d||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=vh(e.attributes.ttl);return!e||b+e>c}).map(ih).filter(ye);return d.length?Md(a.A,d):[]}S("shaka.dash.DashParser",ju);xi["application/dash+xml"]=function(){return new ju};xi["video/vnd.mpeg.dash.mpd"]=function(){return new ju};function $u(){}S("shaka.dependencies",$u);$u.has=function(a){return av.has(a)};$u.add=function(a,b){if(!bv[a])throw Error(a+" is not supported");a==cv?qb("mux.js","mux.js is no longer used in Shaka Player."):av.set(a,function(){return b})};var cv="muxjs",bv={ik:cv,ISOBoxer:"ISOBoxer"};$u.Allowed=bv;var av=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function dv(a,b,c){this.type=a;this.g=b;this.segments=c||null}function ev(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}ev.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
1057
|
+
function fv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function gv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=gv(a,b))?a.value:c||null}function hv(a,b){a=gv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function iv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Ab=c}function jv(a,b){this.name=a;this.value=b};function kv(a,b){return a.filter(function(c){return c.name==b})}function lv(a,b){return a.filter(function(c){return hv(c,"TYPE")==b})}function mv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function nv(a,b,c){c=void 0===c?0:c;return(a=mv(a,b))?Number(a.value):c}function ov(a,b,c){return b?pv(a,[b],c):[]}function pv(a,b,c){if(!b.length)return[];b=Md(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(qv(d.value,c));return a}
|
|
1058
1058
|
function qv(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new T(2,4,4039,e);}}return a};function rv(){this.g=0}
|
|
1059
1059
|
function sv(a,b){b=ud(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=tv(a,f),--a.g,uv.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=tv(a,g);if(vv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
1060
1060
|
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=tv(a,k),uv.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new iv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new iv("",d,f)));return new dv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
1061
1061
|
g.name&&(g.attributes.push(new jv("URI",h)),d=!0)}}return new dv(b,e)}function tv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Rp(d);var f;(f=Tp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Tp(d,g);)c.push(new jv(f[1],f[2]||f[3])),Sp(d)}return new ev(a,b,c,e)}
|
|
1062
|
-
var uv="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),vv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function wv(){}function xv(a){try{var b=yv(a);return
|
|
1063
|
-
function yv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",wv);wv.parse=xv;
|
|
1064
|
-
Bv;this.m=null;this.ab=0;this.o=Infinity;this.Ca=this.Da=this.T=0;this.da=new
|
|
1065
|
-
q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.I=b.isLowLatencyMode(),F(e,Cv(c,[a]),2)):3!=e.g?(d=e.h,c.
|
|
1062
|
+
var uv="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),vv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function wv(){}function xv(a){try{var b=yv(a);return dg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return bg(c)}}
|
|
1063
|
+
function yv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",wv);wv.parse=xv;ng("data",xv);function zv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.G=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Ud,new Map);this.N.set("image",new Map);this.bb=new Set;this.i=new Map;this.l=null;this.L="";this.Fa=new rv;this.H=-1;this.ia=Infinity;this.ea=this.Hb=this.Ub=!1;this.A=new Rc(function(){if(a.ba&&!a.g.continueLoadingWhenPaused&&(a.Y.kb(a.ba,"timeupdate"),a.ba.paused)){a.Y.ka(a.ba,"timeupdate",function(){return Av(a)});return}Av(a)});this.va=
|
|
1064
|
+
Bv;this.m=null;this.ab=0;this.o=Infinity;this.Ca=this.Da=this.T=0;this.da=new kg;this.C=new Map;this.F=new Map;this.ra=new Map;this.ma=new Map;this.K=new Map;this.na=new Map;this.ya=new Map;this.Gb=this.I=!1;this.Eb=new Ra(5);this.j=null;this.O=!0;this.Ea=new Set;this.Y=new gb;this.ba=null}q=zv.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};
|
|
1065
|
+
q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.I=b.isLowLatencyMode(),F(e,Cv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,F(e,Dv(c,d.data,a),3)):e.return(c.m)})};
|
|
1066
1066
|
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.da&&(a.push(this.da.destroy()),this.da=null);this.g=this.h=null;this.bb.clear();this.m=null;this.i.clear();this.G.clear();this.F.clear();this.s.clear();this.ra.clear();this.ma.clear();this.K.clear();this.na.clear();this.ya.clear();this.Ea.clear();this.j&&this.j.destroy();this.Y&&(this.Y.release(),this.Y=null);return Promise.all(a)};
|
|
1067
1067
|
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g){if(!Ev(a))return r.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Fv(a,g));return F(r,Promise.all(b),2)}Gv(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.gd});d.length&&!h&&(k=Hv,Iv(a,k.vh),l=d.map(function(u){return u.Kb}),a.l.Za(Math.min.apply(Math,x(l))),
|
|
1068
1068
|
a.h.updateDuration());h&&Jv(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.segmentIndex&&!p.stream.segmentIndex.P[0]&&a.h.disableStream(p.stream);G(r)})};function Kv(a,b){return Ev(a)?a.N.get(b.type):b.Xd}
|
|
1069
|
-
function Fv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,
|
|
1070
|
-
m=sv(a.Fa,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.
|
|
1071
|
-
I.next())H=L.value,H.$&&(H.$.Kc=E);u.segmentIndex.rd(C,a.l.nb());C.length&&(J=nv(m.g,"EXT-X-MEDIA-SEQUENCE",0),M=(K=mv(m.g,"EXT-X-SKIP"))?Number(Z(K,"SKIPPED-SEGMENTS")):0,N=Ov(J,C),P=N.pb,R=N.qb,b.pb=P+M,b.qb=R,Q=v.get(J),u.segmentIndex.Ga(Q));if(W=u.segmentIndex.P[0]||null)b.
|
|
1069
|
+
function Fv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,wa;return O(function(Fa){switch(Fa.g){case 1:c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new tc(f),h=g.g,b.Ed&&(0<=b.pb&&h.add("_HLS_msn",String(b.pb)),0<=b.qb&&h.add("_HLS_part",String(b.qb))),b.Fd&&h.add("_HLS_skip","YES"),Ic(h)&&xc(g,h),c.push(g.toString());ra(Fa,2);return F(Fa,Cv(a,c,!0),4);case 4:k=Fa.h;ta(Fa,3);break;case 2:throw l=ua(Fa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Fa.return();
|
|
1070
|
+
m=sv(a.Fa,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.M().includes(n)||b.Wg.push(n);p=kv(m.g,"EXT-X-DEFINE");r=Lv(a,p,n);u=b.stream;v=Kv(a,b);return F(Fa,Mv(a,m,u.mimeType,b.M,r),5);case 5:w=Fa.h;A=w.keyIds;y=w.drmInfos;D=function(xa,Pa){return xa.size===Pa.size&&[].concat(x(xa)).every(function(Za){return Pa.has(Za)})};D(u.keyIds,A)||(u.keyIds=A,u.drmInfos=y,a.h.newDrmInfo(u));z=Nv(a,m,v,r,b.M,b.type);C=z.segments;if(B=z.bandwidth)u.bandwidth=B;E=rl(u);I=t(C);for(L=I.next();!L.done;L=
|
|
1071
|
+
I.next())H=L.value,H.$&&(H.$.Kc=E);u.segmentIndex.rd(C,a.l.nb());C.length&&(J=nv(m.g,"EXT-X-MEDIA-SEQUENCE",0),M=(K=mv(m.g,"EXT-X-SKIP"))?Number(Z(K,"SKIPPED-SEGMENTS")):0,N=Ov(J,C),P=N.pb,R=N.qb,b.pb=P+M,b.qb=R,Q=v.get(J),u.segmentIndex.Ga(Q));if(W=u.segmentIndex.P[0]||null)b.pc=W.startTime,Y=C[C.length-1],b.Kb=Y.endTime;if(wa=mv(m.g,"EXT-X-ENDLIST"))b.gd=!0;Pv(a,m);Qv(a,m.g,u.type,r,b.M);G(Fa)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
|
|
1072
1072
|
q.banLocation=function(a){this.j&&this.j.banLocation(a)};q.setMediaElement=function(a){this.ba=a};
|
|
1073
1073
|
function Rv(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.H,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=Kv(a,f);if(g=g.P[0]||null){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.H=Math.max(a.H,l));f.Re=l;break}}}}if(!(0>a.H))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Sv(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.H-d.Re,0<f&&(e.P.splice(0,f),e=e.P[0]||null))e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
1074
1074
|
Tv(a,d,e)}
|
|
1075
|
-
function Uv(a,b){if(Infinity==a.
|
|
1076
|
-
function Tv(a,b,c){b.
|
|
1077
|
-
function Dv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W;return O(function(Y){switch(Y.g){case 1:d=Wd;e=sv(a.Fa,b);f=kv(e.g,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new
|
|
1078
|
-
v=kv(e.g,"EXT-X-I-FRAME-STREAM-INF");w=kv(e.g,"EXT-X-SESSION-KEY");A=kv(e.g,"EXT-X-SESSION-DATA");y=kv(e.g,"EXT-X-CONTENT-STEERING");Xv(a,A);return F(Y,Yv(a,y),4);case 4:return Zv(a,r),$v(a,p),F(Y,aw(a,r,w,p,l,a.s),5);case 5:return g=Y.h,h=bw(a,p),F(Y,cw(a,u,v),6);case 6:k=Y.h;Y.u(3);break;case 7:B=Y.h,a.i.set(c,B),B.stream&&(E=
|
|
1075
|
+
function Uv(a,b){if(Infinity==a.ia){b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.stream.segmentIndex.P[0]||null,null!=c&&null!=c.h&&(a.ia=Math.min(a.ia,c.h))}b=a.ia;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Sv(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=e.P[0]||null;if(f)if(null==f.h)Xa("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.M(),"Expect AV sync issues!");else for(Tv(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Wf(b)}}}}
|
|
1076
|
+
function Tv(a,b,c){b.pc+=c;b.Kb+=c;a=Kv(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}
|
|
1077
|
+
function Dv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W;return O(function(Y){switch(Y.g){case 1:d=Wd;e=sv(a.Fa,b);f=kv(e.g,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new qk(null,0);a.l.uc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.O=!1,D=kv(e.g,"EXT-X-DEFINE"),n=Lv(a,D,a.L),m=d.ja,z="",C=new Map,F(Y,Vv(a,a.B++,n,e,l,"",m,z,!0,"Media Playlist",null,C,null,!1,null,!1),7);Wv(a,f);p=kv(e.g,"EXT-X-MEDIA");r=kv(e.g,"EXT-X-STREAM-INF");u=kv(e.g,"EXT-X-IMAGE-STREAM-INF");
|
|
1078
|
+
v=kv(e.g,"EXT-X-I-FRAME-STREAM-INF");w=kv(e.g,"EXT-X-SESSION-KEY");A=kv(e.g,"EXT-X-SESSION-DATA");y=kv(e.g,"EXT-X-CONTENT-STEERING");Xv(a,A);return F(Y,Yv(a,y),4);case 4:return Zv(a,r),$v(a,p),F(Y,aw(a,r,w,p,l,a.s),5);case 5:return g=Y.h,h=bw(a,p),F(Y,cw(a,u,v),6);case 6:k=Y.h;Y.u(3);break;case 7:B=Y.h,a.i.set(c,B),B.stream&&(E=rl(B.stream),B.stream.segmentIndex.wb(function(wa){wa.$&&(wa.$.Kc=E)})),m=B.stream.type,g.push({id:0,language:Be(z||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==m?
|
|
1079
1079
|
B.stream:null,video:"video"==m?B.stream:null,bandwidth:B.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==e.type&&(Ev(a)&&(dw(a,e),I=a.o,a.A.Z(I)),L=Array.from(a.i.values()),ew(a,L),Jv(a),Qv(a,e.g,m,n,l));a.m={presentationTimeline:a.l,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
1080
1080
|
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1};if(a.ea||!a.g.hls.disableCodecGuessing){Y.u(8);break}H=[];J=t(a.m.variants);for(K=J.next();!K.done;K=J.next())M=K.value,M.audio&&""===M.audio.codecs&&H.push(M.audio.createSegmentIndex()),M.video&&""===M.video.codecs&&H.push(M.video.createSegmentIndex());return F(Y,Promise.all(H),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];P=g[0];R=t([P.video,P.audio]);for(Q=R.next();!Q.done;Q=R.next())(W=
|
|
1081
1081
|
Q.value)&&!W.segmentIndex&&N.push(W.createSegmentIndex());if(0<N.length)return F(Y,Promise.all(N),0)}Y.u(0)}})}
|
|
1082
|
-
function fw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I;return O(function(L){switch(L.g){case 1:c=
|
|
1083
|
-
case 5:p=L.h;case 4:(r=w.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return A=
|
|
1082
|
+
function fw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I;return O(function(L){switch(L.g){case 1:c=sl(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return L.return(c);d=gw(a,b);e=d.segment;f=d.segmentIndex;g=e.M();h=g[0];k=new tc(h);l=k.Pa.split(".").pop();if(m=hw[l])return L.return(sl(m));n=xg;r=p=null;u=e.$;if(!u){L.u(2);break}v=yl(u.M(),u.Yb(),u.Wb(),a.g.retryParameters);return F(L,iw(a,v,n,{type:0}),3);case 3:w=L.h;p=w.data;if(!u.aesKey){L.u(4);break}return F(L,xl(p,u.aesKey,0),5);
|
|
1083
|
+
case 5:p=L.h;case 4:(r=w.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return A=yl(e.M(),e.Yb(),e.Wb(),a.g.retryParameters),F(L,iw(a,A,n,{type:1}),6);case 6:y=L.h;D=y.data;if(!e.aesKey){L.u(7);break}return F(L,xl(D,e.aesKey,f),8);case 8:D=L.h;case 7:(z=y.headers["content-type"])&&(z=z.split(";")[0].toLowerCase());C="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");B=["audio/mp4","video/mp4","video/iso.segment"];if(Ej(zb(D))){var H=D;var J=zb(H);J=(new qj).parse(J);
|
|
1084
1084
|
var K=J.bd();J=J.kf();var M=[],N=!1,P=!1;switch(K.audio){case "aac":case "aac-loas":M.push("mp4a.40.2");N=!0;break;case "mp3":M.push("mp4a.40.34");N=!0;break;case "ac3":M.push("ac-3");N=!0;break;case "ec3":M.push("ec-3");N=!0;break;case "opus":M.push("opus"),N=!0}switch(K.video){case "avc":J.codec?M.push(J.codec):M.push("avc1.42E01E");P=!0;break;case "hvc":J.codec?M.push(J.codec):M.push("hvc1.1.6.L93.90");P=!0;break;case "av1":M.push("av01.0.01M.08"),P=!0}if(M.length){K=N&&!P;N=new Map;if(P){P=new Gb("video/mp2t");
|
|
1085
|
-
P.i(H);H=t(P.j());for(var R=H.next();!R.done;R=H.next())R=R.value,N.set(R,R);P.g()}J={type:K?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:N,xd:null,colorGamut:null}}else J=null;if(E=J)return L.return(E)}else if(C.includes(l)||B.includes(z)||r&&B.includes(r))if(I=
|
|
1086
|
-
function Jv(a){if(Ev(a)){if(a.va==jw){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Kb),c=Math.min(c,e.
|
|
1087
|
-
c.h&&a.l.fh(c.h);a.l.Vd()}function Wv(a,b){var c=(new tc(a.
|
|
1085
|
+
P.i(H);H=t(P.j());for(var R=H.next();!R.done;R=H.next())R=R.value,N.set(R,R);P.g()}J={type:K?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:N,xd:null,colorGamut:null}}else J=null;if(E=J)return L.return(E)}else if(C.includes(l)||B.includes(z)||r&&B.includes(r))if(I=tl(p,D))return L.return(I);return z?L.return(sl(z)):r?L.return(sl(r)):L.return(c)}})}
|
|
1086
|
+
function Jv(a){if(Ev(a)){if(a.va==jw){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Kb),c=Math.min(c,e.pc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.A);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.pe(b)}}else a.l.Za(kw(a));if(!a.l.s)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1087
|
+
c.h&&a.l.fh(c.h);a.l.Vd()}function Wv(a,b){var c=(new tc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
1088
1088
|
function Lv(a,b,c){c=(new tc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
|
|
1089
1089
|
function Zv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=lw(a,d);if(f){var g=Sd(Ud,d);a.F.set(f,g);Nb(d,g)}e&&(f=Sd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.F.set(e,f));c&&(e=Sd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.F.set(c,e))}}
|
|
1090
|
-
function Xv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",ov([a.
|
|
1091
|
-
function Yv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new rt(a.h);a.j.configure(a.g);a.j.i=[a.
|
|
1090
|
+
function Xv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",ov([a.L],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1091
|
+
function Yv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new rt(a.h);a.j.configure(a.g);a.j.i=[a.L];a.j.setManifestType("HLS");a.j.h=g;c=st(a.j,h);break}return F(k,c,0)})}
|
|
1092
1092
|
function bw(a,b){var c=lv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return mw(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=hv(d.value,"GROUP-ID");if(d=a.F.get(e))if(e=a.G.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=nw(Ud,d)||ow(Ud),pw(f.stream)}}return b.filter(function(g){return g})}
|
|
1093
1093
|
function pw(a){var b=new Set([Zd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.wb(function(c){c.mimeType&&b.add(Zd(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1094
1094
|
function cw(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ra(m,2);return F(m,qw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=ua(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=hv(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
|
|
1095
1095
|
p=Z(g,"CHARACTERISTICS"),r=rw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;r.stream.width=Number(w)||void 0;r.stream.height=Number(A)||void 0;var y=Z(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}))})}
|
|
1096
1096
|
function sw(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=fv(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)mw(a,d[g],c)}
|
|
1097
|
-
function aw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,
|
|
1098
|
-
y(m,""):null;Va.u(6);break}return F(Va,vw(a,m,"",e,null,f),9);case 9:r=Va.h;case 6:if(r){if(r.keyIds)for(D=t(r.keyIds),z=D.next();!z.done;z=D.next())C=z.value,h.add(C);g.push(r)}case 4:l=k.next();Va.u(3);break;case 2:B={};E=t(b);for(I=E.next();!I.done;I=E.next())L=I.value,H=fv(L,!a.j),B[H]?B[H].push(L):B[H]=[L];J=[];for(K in B)M=B[K],N=M[0],P=Z(N,"FRAME-RATE"),R=Number(Z(N,"AVERAGE-BANDWIDTH"))||Number(hv(N,"BANDWIDTH")),Q=Z(N,"RESOLUTION"),W=t(Q?Q.split("x"):[null,null]),Y=W.next().value,
|
|
1099
|
-
Fa=Z(N,"VIDEO-RANGE"),(
|
|
1097
|
+
function aw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,wa,Fa,xa,Pa,Za;return O(function(Va){switch(Va.g){case 1:g=[];h=new Set;if(!(0<c.length)){Va.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Va.u(2);break}m=l.value;n=hv(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){Va.u(4);break}if(tw(n)){u=ov(e(),hv(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=rg(u,a.g.retryParameters),A=iw(a,w,6),a.K.set(v,A));Va.u(4);break}if("identity"!=p){r=(y=uw[p])?
|
|
1098
|
+
y(m,""):null;Va.u(6);break}return F(Va,vw(a,m,"",e,null,f),9);case 9:r=Va.h;case 6:if(r){if(r.keyIds)for(D=t(r.keyIds),z=D.next();!z.done;z=D.next())C=z.value,h.add(C);g.push(r)}case 4:l=k.next();Va.u(3);break;case 2:B={};E=t(b);for(I=E.next();!I.done;I=E.next())L=I.value,H=fv(L,!a.j),B[H]?B[H].push(L):B[H]=[L];J=[];for(K in B)M=B[K],N=M[0],P=Z(N,"FRAME-RATE"),R=Number(Z(N,"AVERAGE-BANDWIDTH"))||Number(hv(N,"BANDWIDTH")),Q=Z(N,"RESOLUTION"),W=t(Q?Q.split("x"):[null,null]),Y=W.next().value,wa=W.next().value,
|
|
1099
|
+
Fa=Z(N,"VIDEO-RANGE"),(xa=Z(N,"REQ-VIDEO-LAYOUT"))&&xa.includes(",")&&(Pa=xa.split(",").filter(function(Aa){return"CH-STEREO"==Aa||"CH-MONO"==Aa}),xa=Pa[0]),xa=xa||"CH-MONO",Za=ww(a,M,d),J.push.apply(J,x(xw(a,Za.audio,Za.video,R,Y,wa,P,Fa,xa,g,h)));return Va.return(J.filter(function(Aa){return null!=Aa}))}})}
|
|
1100
1100
|
function ww(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Z(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(hv(v,"GROUP-ID"))}),sw(a,k,e));k=(e=f.sort().join(","))&&a.G.has(e)?a.G.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var r=b.map(function(v){return hv(v,
|
|
1101
|
-
"URI")});h=d.audio.find(function(v){return v&&v.
|
|
1101
|
+
"URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return r.includes(w)})});g=lw(a,b[0]);n=Sd("video",g);(p=Sd("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(v){var w=Z(v,"URI")||"",A=Z(v,"TYPE");v=hv(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
|
|
1102
1102
|
n=Z(c,"NAME"),p=yw(c),zw(c),m=Z(c,"CHARACTERISTICS"),u=Aw(c));a=Bw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
1103
|
-
function lw(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.ea=0<c.length;a.ea||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return
|
|
1103
|
+
function lw(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.ea=0<c.length;a.ea||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return ul(a)}function yw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1104
1104
|
function Aw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function zw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1105
1105
|
function xw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Cw(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;
|
|
1106
|
-
r=r?r.
|
|
1106
|
+
r=r?r.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";r=r+" - "+u;h&&k&&!Lc(n,p)||a.bb.has(r)||(h={id:a.B++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.bb.add(r))}return e}
|
|
1107
1107
|
function $v(a,b){b=lv(b,"CLOSED-CAPTIONS");a.O=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=Be(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=hv(d,"GROUP-ID");d=hv(d,"INSTREAM-ID").replace("SERVICE","svc");a.C.get(e)||a.C.set(e,new Map);a.C.get(e).set(d,c)}}
|
|
1108
1108
|
function mw(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=hv(k,"URI");k=hv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=hv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Ud);if(k==Ud)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.F.has(l)){b=a.F.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
1109
1109
|
m=n.next().value;n=n.next().value;(m=c.get(m))&&vt(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?yw(h):null;var p="audio"==k?zw(h):!1,r=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?Aw(h):null;d=rw(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.G.has(g)?a.G.get(g).push(d):a.G.set(g,[d]);a.i.set(e,d);return d}
|
|
@@ -1111,17 +1111,17 @@ function qw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=hv(b,
|
|
|
1111
1111
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1112
1112
|
function Bw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=hv(r,"URI");r=Z(r,"PATHWAY-ID");a.j&&r&&vt(a.j,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.O=!1;b=null;break a}if(b){if("NONE"!=b){b=a.C.get(b);break a}a.O=!1}else if(!b&&a.C.size)for(b=t(a.C.keys()).next();!b.done;){b=a.C.get(b.value);break a}}b=null}c=Rd(d,c);d=rw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,
|
|
1113
1113
|
d);return d}
|
|
1114
|
-
function rw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(C){var B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,
|
|
1115
|
-
M,J);P=!1;(!a.ea&&a.g.hls.disableCodecGuessing||a.O&&e==B.
|
|
1116
|
-
w.mimeType=Y.mimeType;w.bandwidth=w.bandwidth||Y.bandwidth;w.codecs=w.codecs||Y.codecs;w.closedCaptions=w.closedCaptions||Y.closedCaptions;w.width=w.width||Y.width;w.height=w.height||Y.height;w.hdr=w.hdr||Y.hdr;w.colorGamut=w.colorGamut||Y.colorGamut;"und"==w.language&&"und"!=Y.language&&(w.language=Y.language);w.language=w.language||Y.language;w.channelsCount=w.channelsCount||Y.channelsCount;w.audioSamplingRate=w.audioSamplingRate||Y.audioSamplingRate;pw(w);w.drmInfos.length&&a.h.newDrmInfo(w);
|
|
1117
|
-
!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)
|
|
1118
|
-
ew(a,bb),Jv(a),ac=a.o,0<ac&&a.A.Z(ac)));Qv(a,K.g,w.type,N,v);G(Sa)}})}function v(){return a.j&&1<c.length?wt(a.j,b):A.concat(pv([a.
|
|
1114
|
+
function rw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(C){var B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,wa,Fa,xa,Pa,Za,Va,Aa,bb,ac;return O(function(Sa){switch(Sa.g){case 1:return B=Wd,E=y.M(),ra(Sa,2),F(Sa,Cv(a,y.M(),!0),4);case 4:I=Sa.h;ta(Sa,3);break;case 2:L=ua(Sa);w.closeSegmentIndex();if(H=a.h.disableStream(w))return Sa.return();throw L;case 3:if(C.aborted)return Sa.return();J=I.uri;J==I.originalUri||E.includes(J)||A.push(J);K=sv(a.Fa,I.data);if(1!=K.type)throw new T(2,4,4017);M=kv(K.g,"EXT-X-DEFINE");N=Lv(a,
|
|
1115
|
+
M,J);P=!1;(!a.ea&&a.g.hls.disableCodecGuessing||a.O&&e==B.ja&&!a.g.hls.disableClosedCaptionsDetection)&&0<K.segments.length&&(a.O=!1,P=!0);R=!a.ea&&a.g.hls.disableCodecGuessing;Q=Ev(a);return F(Sa,Vv(a,0,N,K,v,d,e,f,g,h,k,l,m,n,p,r,void 0,P,R),5);case 5:W=Sa.h;if(C.aborted)return Sa.return();Y=W.stream;Ev(a)&&!Q&&dw(a,K);y.pc=W.pc;y.Kb=W.Kb;y.Fd=W.Fd;y.Ed=W.Ed;y.gd=W.gd;y.Xd=W.Xd;y.pb=W.pb;y.qb=W.qb;y.wf=!0;w.segmentIndex=Y.segmentIndex;w.encrypted=Y.encrypted;w.drmInfos=Y.drmInfos;w.keyIds=Y.keyIds;
|
|
1116
|
+
w.mimeType=Y.mimeType;w.bandwidth=w.bandwidth||Y.bandwidth;w.codecs=w.codecs||Y.codecs;w.closedCaptions=w.closedCaptions||Y.closedCaptions;w.width=w.width||Y.width;w.height=w.height||Y.height;w.hdr=w.hdr||Y.hdr;w.colorGamut=w.colorGamut||Y.colorGamut;"und"==w.language&&"und"!=Y.language&&(w.language=Y.language);w.language=w.language||Y.language;w.channelsCount=w.channelsCount||Y.channelsCount;w.audioSamplingRate=w.audioSamplingRate||Y.audioSamplingRate;pw(w);w.drmInfos.length&&a.h.newDrmInfo(w);wa=
|
|
1117
|
+
!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)wa=!0;a.m&&wa&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==B.ja||e==B.X)for(Fa=t(a.i.values()),xa=Fa.next();!xa.done;xa=Fa.next())Pa=xa.value,Pa.wf||Pa.type!=e||(Pa.stream.mimeType=Y.mimeType,pw(Pa.stream));e==B.ua&&(Za=Y.segmentIndex.get(0))&&Za.$&&(w.mimeType="application/mp4",pw(w));Va=rl(w);w.segmentIndex.wb(function(nb){nb.$&&(nb.$.Kc=Va)});Dw(a)&&(a.Hb?ew(a,[y]):(a.Hb=!0,Aa=Array.from(a.i.values()),bb=Aa.filter(function(nb){return nb.stream.segmentIndex}),
|
|
1118
|
+
ew(a,bb),Jv(a),ac=a.o,0<ac&&a.A.Z(ac)));Qv(a,K.g,w.type,N,v);G(Sa)}})}function v(){return a.j&&1<c.length?wt(a.j,b):A.concat(pv([a.L],c,a.s))}var w=Ew(a,d,e,f,g,h,k,l,m,n,p,r),A=[],y={stream:w,type:e,Wg:A,M:v,pc:0,Kb:0,Xd:new Map,Fd:!1,Ed:!1,gd:!1,Re:-1,pb:-1,qb:-1,wf:!1},D=null,z=new AbortController;w.createSegmentIndex=function(){if(D)return D;z=new AbortController;return D=new Promise(function(C){C(u(z.signal))})};w.closeSegmentIndex=function(){D&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),
|
|
1119
1119
|
w.segmentIndex=null);D=null};return y}function kw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Kb));return b}function Gv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.wb(function(e){c.push(e)});a.l.sd(c)}
|
|
1120
|
-
function ew(a,b){if(!Ev(a))for(var c=kw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.
|
|
1120
|
+
function ew(a,b){if(!Ev(a))for(var c=kw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Dc(0,c);Gv(a,b.map(function(f){return f.stream}));c=Ev(a)&&!a.Ub;a.g.hls.ignoreManifestProgramDateTime||c?Rv(a,b,c):(Uv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Rv(a,b))}function Sv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
|
|
1121
1121
|
function Dw(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1122
|
-
function Vv(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y){A=void 0===A?!0:A;y=void 0===y?!0:y;var D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,
|
|
1122
|
+
function Vv(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y){A=void 0===A?!0:A;y=void 0===y?!0:y;var D,z,C,B,E,I,L,H,J,K,M,N,P,R,Q,W,Y,wa,Fa,xa,Pa,Za,Va,Aa,bb,ac;return O(function(Sa){switch(Sa.g){case 1:var nb=mv(d.g,"EXT-X-PLAYLIST-TYPE"),Tb=mv(d.g,"EXT-X-ENDLIST");Tb=nb&&"VOD"==nb.value||Tb;nb=nb&&"EVENT"==nb.value&&!Tb;nb=!Tb&&!nb;Tb?Iv(a,Bv):nb?Iv(a,jw):Iv(a,Fw);Ev(a)&&Pv(a,d);D=Ev(a)?a.N.get(g):new Map;z=Nv(a,d,D,c,e,g);C=z.segments;B=z.bandwidth;H=L=I=E=null;if(!(0<C.length&&A)){Sa.u(2);break}return F(Sa,
|
|
1123
1123
|
fw(a,C),3);case 3:J=Sa.h,g=J.type,h=J.language,m=J.channelCount,u=J.sampleRate,a.g.disableText||(n=J.closedCaptions),I=J.height,E=J.width,L=J.xd,H=J.colorGamut,y&&(w=J.mimeType,f=J.codecs);case 2:if(w){Sa.u(4);break}return F(Sa,Gw(a,g,f,C),5);case 5:w=Sa.h;case 4:return F(Sa,Mv(a,d,w,e,c),6);case 6:K=Sa.h;M=K.drmInfos;N=K.keyIds;P=K.encrypted;R=K.zh;if(P&&!M.length&&!R)throw new T(2,4,4026);Q=Ew(a,f,g,h,k,l,m,n,p,r,u,v);Q.encrypted=P;Q.drmInfos=M;Q.keyIds=N;Q.mimeType=w;B&&(Q.bandwidth=B);pw(Q);"video"==
|
|
1124
|
-
g&&(E||I||L||H)&&Cw(Q,E,I,null,L,null,H);Ev(a)&&Pv(a,d);W=C[0].startTime;Y=C[C.length-1];
|
|
1124
|
+
g&&(E||I||L||H)&&Cw(Q,E,I,null,L,null,H);Ev(a)&&Pv(a,d);W=C[0].startTime;Y=C[C.length-1];wa=Y.endTime;Fa=new Mk(C);Q.segmentIndex=Fa;Pa=(xa=mv(d.g,"EXT-X-SERVER-CONTROL"))?null!=gv(xa,"CAN-SKIP-UNTIL"):!1;Za=xa?null!=gv(xa,"CAN-BLOCK-RELOAD"):!1;Va=nv(d.g,"EXT-X-MEDIA-SEQUENCE",0);Aa=Ov(Va,C);bb=Aa.pb;ac=Aa.qb;return Sa.return({stream:Q,type:g,Wg:[],M:e,pc:W,Kb:wa,Fd:Pa,Ed:Za,gd:!1,Re:-1,pb:bb,qb:ac,Xd:D,wf:!1})}})}
|
|
1125
1125
|
function Ov(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{pb:a,qb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{pb:a,qb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{pb:a,qb:c}}
|
|
1126
1126
|
function Ew(a,b,c,d,e,f,g,h,k,l,m,n){var p=nw(c,b)||ow(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Ud?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1127
1127
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Ud?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Be(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
@@ -1129,40 +1129,40 @@ fullMimeTypes:new Set};pw(a);return a}
|
|
|
1129
1129
|
function Mv(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=kv(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Hw(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())r=p.value,f.set(r,m);v=u=!1;w=[];A=new Set;y=t(f);D=y.next();case 2:if(D.done){Q.u(4);break}z=D.value;C=t(z);B=C.next().value;E=C.next().value;I=B;L=E;H=hv(I,"METHOD");if("NONE"==H){Q.u(3);break}u=
|
|
1130
1130
|
!0;J=Z(I,"KEYFORMAT")||"identity";K=null;if(tw(H)){v=!0;Q.u(3);break}if("identity"!=J){K=(M=uw[J])?M(I,c):null;Q.u(6);break}return F(Q,vw(a,I,c,d,L,e),8);case 8:K=Q.h;case 6:if(K){if(K.keyIds)for(N=t(K.keyIds),P=N.next();!P.done;P=N.next())R=P.value,A.add(R);w.push(K)}case 3:D=y.next();Q.u(2);break;case 4:return Q.return({drmInfos:w,keyIds:A,encrypted:u,zh:v})}})}
|
|
1131
1131
|
function Iw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ya("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Id(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=nv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ma.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(hv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1132
|
-
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u;return O(function(v){if(1==v.g)return l=ov(d(),hv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=
|
|
1132
|
+
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u;return O(function(v){if(1==v.g)return l=ov(d(),hv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=rg(l,a.g.retryParameters),p=iw(a,n,6),a.K.set(m,p)),F(v,a.K.get(m),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return F(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;G(v)})};
|
|
1133
1133
|
a.ma.set(c,k)}return a.ma.get(c)}
|
|
1134
1134
|
function Pv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=mv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=mv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=mv(b.g,"EXT-X-PART-INF"))a.T=Number(hv(e,"PART-TARGET"));b=mv(b.g,"EXT-X-SERVER-CONTROL");a.I&&a.T?(a.o=a.Gb?5*a.T<=c?Math.min(a.T,a.o):Math.min(c,a.o):Math.min(a.T,a.o),a.Ca=b?Number(hv(b,"PART-HOLD-BACK")):0):(a.o=Math.min(c,a.o),c=b?
|
|
1135
|
-
gv(b,"HOLD-BACK"):null,a.Da=c?Number(c.value):0);a.ab=Math.max(d,a.ab)}function dw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Ca)b=a.Ca;else if(a.Da)b=a.Da;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ab*c}a.l.gh(0);a.l.Pf(b);a.l.
|
|
1135
|
+
gv(b,"HOLD-BACK"):null,a.Da=c?Number(c.value):0);a.ab=Math.max(d,a.ab)}function dw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Ca)b=a.Ca;else if(a.Da)b=a.Da;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ab*c}a.l.gh(0);a.l.Pf(b);a.l.uc(!1)}
|
|
1136
1136
|
function Hw(a,b,c,d,e){var f=mv(c,"EXT-X-MAP");if(!f)return null;var g=hv(f,"URI"),h=ov(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ra.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?tw(hv(m,"METHOD"))&&m.id<f.id&&(k=Iw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Jw(h,f,l,k);a.ra.set(g,b)}return a.ra.get(g)}
|
|
1137
|
-
function Jw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new
|
|
1138
|
-
function Kw(a,b,c,d,e,f,g,h,k){function l(W){W=(new tc(W)).Pa.split(".").pop();var Y=Lw[g][W];Y||(Y=hw[W]);return Y}var m=d.g,n=mv(m,"EXTINF"),p=0,r=0,u=null;d.Ab.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=mv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=
|
|
1139
|
-
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=v,E={},I=0;I<d.Ab.length;E={xe:void 0,ge:void 0},I++){var L=d.Ab[I],H=0==I?c:y[y.length-1],J=0==I?e:H.endTime,K=Number(Z(L,"DURATION"))||a.T;if(K){var M=J+K,N=0,P=null;"EXT-X-PRELOAD-HINT"==L.name?(N=(N=Z(L,"BYTERANGE-START"))?Number(N):0,(H=Z(L,"BYTERANGE-LENGTH"))?P=N+Number(H)-1:N&&(P=Number.MAX_SAFE_INTEGER)):(N=Z(L,"BYTERANGE"),P=t(Mw(H,N)),N=P.next().value,P=P.next().value);E.ge=Z(L,"URI");if(E.ge){H=
|
|
1140
|
-
Z(L,"GAP")&&(a.m.gapCount++,H=2,z=!0);E.xe=null;var R=function(W){return function(){null==W.xe&&(W.xe=ov(h(),W.ge,f));return W.xe}}(E);p&&0<=N&&null!=P&&(D=R,w=!0);J=new
|
|
1141
|
-
y[0].Ha?(w=!1,D=null):y=[]);(n=mv(m,"EXT-X-BYTERANGE"))?(u=t(Mw(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].Ha,u=y[y.length-1].ta);c="";n=null;"image"==g&&(c="1x1",m=mv(m,"EXT-X-TILES"))&&(c=hv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new
|
|
1137
|
+
function Jw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Ci(function(){return a},e,f,null,null,null,d)}
|
|
1138
|
+
function Kw(a,b,c,d,e,f,g,h,k){function l(W){W=(new tc(W)).Pa.split(".").pop();var Y=Lw[g][W];Y||(Y=hw[W]);return Y}var m=d.g,n=mv(m,"EXTINF"),p=0,r=0,u=null;d.Ab.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=mv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=qh(w.value),a.Ub=!0)}var A=Fi;mv(m,"EXT-X-GAP")&&(a.m.gapCount++,A=2);if(!n){if(0==d.Ab.length)throw new T(2,4,4024,"EXTINF");if(!a.I)return null}var y=[];w=!1;var D=null,z=!1,C=!1;if(a.I&&d.Ab.length){p=
|
|
1139
|
+
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=v,E={},I=0;I<d.Ab.length;E={xe:void 0,ge:void 0},I++){var L=d.Ab[I],H=0==I?c:y[y.length-1],J=0==I?e:H.endTime,K=Number(Z(L,"DURATION"))||a.T;if(K){var M=J+K,N=0,P=null;"EXT-X-PRELOAD-HINT"==L.name?(N=(N=Z(L,"BYTERANGE-START"))?Number(N):0,(H=Z(L,"BYTERANGE-LENGTH"))?P=N+Number(H)-1:N&&(P=Number.MAX_SAFE_INTEGER)):(N=Z(L,"BYTERANGE"),P=t(Mw(H,N)),N=P.next().value,P=P.next().value);E.ge=Z(L,"URI");if(E.ge){H=Fi;"YES"==
|
|
1140
|
+
Z(L,"GAP")&&(a.m.gapCount++,H=2,z=!0);E.xe=null;var R=function(W){return function(){null==W.xe&&(W.xe=ov(h(),W.ge,f));return W.xe}}(E);p&&0<=N&&null!=P&&(D=R,w=!0);J=new Ei(J,M,R,N,P,b,0,0,Infinity,[],"",null,B,H,k);"EXT-X-PRELOAD-HINT"==L.name&&(J.xf(),C=!0);"YES"!=Z(L,"INDEPENDENT")&&0<I&&J.Wd();if(E=l(E.ge))J.mimeType=E,Nw.has(E)&&(J.$=null);y.push(J);B&&(B+=K)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;w&&(z||0!=
|
|
1141
|
+
y[0].Ha?(w=!1,D=null):y=[]);(n=mv(m,"EXT-X-BYTERANGE"))?(u=t(Mw(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].Ha,u=y[y.length-1].ta);c="";n=null;"image"==g&&(c="1x1",m=mv(m,"EXT-X-TILES"))&&(c=hv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Ei(e,p,function(){if(D)return D();null==Q&&(Q=ov(h(),d.h,f));return Q||[]},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,Nw.has(e)&&(b.$=null);w&&(a.Gb=!0,b.Kg(),C&&b.xf());return b}
|
|
1142
1142
|
function Mw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ta+1,d=c+b-1);return[c,d]}
|
|
1143
|
-
function Qv(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!Sv(a,c))for(b=kv(b,"EXT-X-DATERANGE"),b=b.sort(function(v,w){v=hv(v,"START-DATE");w=hv(w,"START-DATE");return v<w?-1:v>w?1:0}),c=0;c<b.length;c++){var g=b[c],h=hv(g,"ID");if(!a.Ea.has(h)){var k=hv(g,"START-DATE"),l=
|
|
1144
|
-
n=Z(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Z(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var r=Z(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==r&&(r=hv(b[p],"START-DATE"),r=
|
|
1143
|
+
function Qv(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!Sv(a,c))for(b=kv(b,"EXT-X-DATERANGE"),b=b.sort(function(v,w){v=hv(v,"START-DATE");w=hv(w,"START-DATE");return v<w?-1:v>w?1:0}),c=0;c<b.length;c++){var g=b[c],h=hv(g,"ID");if(!a.Ea.has(h)){var k=hv(g,"START-DATE"),l=qh(k);if(!isNaN(l)){k=Math.max(0,l-f);var m=null,n=Z(g,"END-DATE");if(n&&(n=qh(n),!isNaN(n)&&(m=n-f,0>m)))continue;if(null==m&&(n=Z(g,"DURATION")||Z(g,"PLANNED-DURATION"))&&(n=parseFloat(n),isNaN(n)||(m=k+n),0>l-f+n))continue;
|
|
1144
|
+
n=Z(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Z(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var r=Z(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==r&&(r=hv(b[p],"START-DATE"),r=qh(r),!isNaN(r)&&r&&r>l)){m=Math.max(0,r-f);break}}if(null==m)continue}l="ID CLASS START-DATE END-DATE DURATION END-ON-NEXT".split(" ");p=[];g=t(g.attributes);for(r=g.next();!r.done;r=g.next())if(r=r.value,!l.includes(r.name)){var u=qv(r.value,d);if("X-ASSET-URI"==r.name||"X-ASSET-LIST"==r.name)u=ov(e(),
|
|
1145
1145
|
r.value,d)[0];p.push({key:r.name,description:"",data:u,mimeType:null,pictureType:null})}if(p.length)a.h.onMetadata(n,k,m,p);a.Ea.add(h)}}}}}
|
|
1146
1146
|
function Nv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=nv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=nv(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=mv(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Ev(a)&&c.has(p)&&(r=c.get(p));0===r&&a.va==jw&&0<c.size&&!c.has(p)&&(r=a.l.nb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],y=0==w?r:v.endTime;p=l+n+w;mv(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&&(tw(hv(z,"METHOD"))?
|
|
1147
1147
|
h=Iw(a,z,b,e,d):h=void 0);c.set(p,y);D=Hw(a,b,A.g,e,d);!a.I&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.I=a.h.isLowLatencyMode());if(y=Kw(a,D,v,A,y,d,f,e,h))(v=nv(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,Sv(a,f)&&null!=a.H&&p<a.H||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(C,B){return C+B.duration},0),b=Math.round(m.reduce(function(C,B){return C+B.bitrate*B.duration},0)/
|
|
1148
|
-
b*1E3));if(m=u.some(function(C){return null!=C.h}))for(c={},d=0;d<u.length;c={Jd:void 0,Id:void 0,Bd:void 0,
|
|
1149
|
-
(c.
|
|
1148
|
+
b*1E3));if(m=u.some(function(C){return null!=C.h}))for(c={},d=0;d<u.length;c={Jd:void 0,Id:void 0,Bd:void 0,sc:void 0,zd:void 0},d++)if(c.sc=u[d],null==c.sc.h)for(c.Id=0,c.Jd=d,e=function(C){return function(){var B=u[C.Jd];if(B){if(null!=B.h)return B.h+C.Id;C.Id-=B.endTime-B.startTime;C.Jd+=1}return null}}(c),c.zd=0,c.Bd=d,g=function(C){return function(){var B=u[C.Bd];if(B){B!=C.sc&&(C.zd+=B.endTime-B.startTime);if(null!=B.h)return B.h+C.zd;--C.Bd}return null}}(c);null==c.sc.h;)c.sc.h=g(),null==c.sc.h&&
|
|
1149
|
+
(c.sc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ia;if(m&&Infinity!=c&&!Sv(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Wf(c);return{segments:u,bandwidth:b}}
|
|
1150
1150
|
function nw(a,b){if(a==Ud){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function ow(a){return a==Ud?"text/vtt":Lw[a].mp4}function gw(a,b){a=Ev(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.Zb()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
|
|
1151
|
-
function Gw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(y){switch(y.g){case 1:e=
|
|
1152
|
-
iw(a,u,e,{type:r}),6);case 6:A=y.h,p=A.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return(ow(b))}})}function Cw(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Cv(a,b,c){return iw(a,
|
|
1151
|
+
function Gw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(y){switch(y.g){case 1:e=xg;f=gw(a,d);g=f.segment;if(2==g.status)return y.return(ow(b));h=g.M();k=new tc(h[0]);l=k.Pa.split(".").pop();m=Lw[b];if((n=m[l])||(n=hw[l])||(n=nw(b,c)))return y.return(n);r=1;u=rg(h,a.g.retryParameters);ra(y,2);u.method="HEAD";return F(y,iw(a,u,e,{type:r}),4);case 4:v=y.h;p=v.headers["content-type"];ta(y,3);break;case 2:w=ua(y);if(!w||1002!=w.code&&1001!=w.code){y.u(3);break}u.method="GET";return F(y,
|
|
1152
|
+
iw(a,u,e,{type:r}),6);case 6:A=y.h,p=A.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return(ow(b))}})}function Cw(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Cv(a,b,c){return iw(a,rg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1153
1153
|
function Av(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ra(h,2);b=Date.now();return F(h,a.update(),4);case 4:c=Date.now();Ev(a)&&(d=(c-b)/1E3,a.Eb.sample(1,d),e=a.o,f=Math.max(0,e-Ta(a.Eb)),a.A.Z(f));ta(h,3);break;case 2:g=ua(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.Z(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();G(h)}})}
|
|
1154
|
-
function Ev(a){return a.va!=Bv}function Iv(a,b){a.va=b;a.l&&a.l.
|
|
1155
|
-
function vw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,D,z;return O(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(rd())throw new T(2,4,4041);g=hv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=ov(d(),hv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Jd(Hd(k[0].split("data:text/plain;base64,").pop()));C.u(2);break}m=k.sort().join("");a.na.has(m)||(n=
|
|
1156
|
-
3);case 3:r=C.h,l=Jd(r.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.ya.has(e)){v=a.ya.get(e);C.u(5);break}w=
|
|
1154
|
+
function Ev(a){return a.va!=Bv}function Iv(a,b){a.va=b;a.l&&a.l.uc(!Ev(a));Ev(a)||a.A.stop()}function iw(a,b,c,d){if(!a.da)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);lg(a.da,b);return b.promise}function tw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1155
|
+
function vw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,D,z;return O(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(rd())throw new T(2,4,4041);g=hv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=ov(d(),hv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Jd(Hd(k[0].split("data:text/plain;base64,").pop()));C.u(2);break}m=k.sort().join("");a.na.has(m)||(n=rg(k,a.g.retryParameters),p=iw(a,n,6),a.na.set(m,p));return F(C,a.na.get(m),
|
|
1156
|
+
3);case 3:r=C.h,l=Jd(r.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.ya.has(e)){v=a.ya.get(e);C.u(5);break}w=yl(e.M(),e.Yb(),e.Wb(),a.g.retryParameters);A=xg;return F(C,iw(a,w,A,{type:0}),6);case 6:y=C.h,v=wl(y.data),a.ya.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"),C.return(Qd(D,z))}})}S("shaka.hls.HlsParser",zv);
|
|
1157
1157
|
var hw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Lw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
1158
1158
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Nw=new Set(["video/mp2t"].concat(x($d))),uw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(rd())throw new T(2,4,4041);b=hv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Nd("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
1159
1159
|
keyId:null}],hv(a,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=hv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=hv(a,"URI");b=yv(b.split("?")[0]);b=zb(b.data);c=Nd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=hv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
1160
|
-
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=hv(a,"URI");a=yv(a.split("?")[0]);a=zb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=
|
|
1161
|
-
function Qw(a){a=Hd(
|
|
1160
|
+
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=hv(a,"URI");a=yv(a.split("?")[0]);a=zb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Yg(a,b,new Set,0);return Nd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},Bv="VOD",Fw="EVENT",jw="LIVE",Hv={vh:Bv,tj:Fw,Bj:jw};xi["application/x-mpegurl"]=function(){return new zv};xi["application/vnd.apple.mpegurl"]=function(){return new zv};function Ow(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=zb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Pw(a){if(a=Qw(a))a:{a=t(jh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=kh(b.value,"LA_URL")){a=hh(b);break a}a=""}else a="";return a}
|
|
1161
|
+
function Qw(a){a=Hd(hh(a));a=Ow(a).filter(function(b){return b.type===Rw})[0];if(!a)return null;a=wd(a.value,!0);return(a=$g(a,"WRMHEADER"))?a:null}var Rw=1,Sw=(new Map).set("com.microsoft.playready",Pw).set("com.microsoft.playready.recommendation",Pw).set("com.microsoft.playready.software",Pw).set("com.microsoft.playready.hardware",Pw);function Tw(a){if(!Uw){Uw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Vw=Ww("ftyp",b,d,b,c);b=Ww("dref",Xw);Yw=Ww("dinf",b)}this.g=a}
|
|
1162
1162
|
function Zw(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Ww;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/($w+1));m=Math.floor(m%($w+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(ax(h,4)),[0,0,0,0],x(ax(n,4)),x(ax(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(ax(k,2)),[0,0],x(ax(l,
|
|
1163
1163
|
2)),[0,0]));h=Ww("tkhd",h);k=Ww;n=g.duration*g.timescale;l=Math.floor(n/($w+1));n=Math.floor(n%($w+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(ax(g.timescale,4)),x(ax(l,4)),x(ax(n,4)),x(ax(m,2)),[0,0]));l=Ww("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=bx;break;case "audio":m=cx}n=Ww("hdlr",m);a:{switch(g.type){case "video":g=Ww("minf",Ww("vmhd",dx),Yw,ex(g));break a;
|
|
1164
1164
|
case "audio":g=Ww("minf",Ww("smhd",fx),Yw,ex(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Kd.apply(Ed,x(b));f=a.g[0];c=Ww;d=f.duration*f.timescale;e=Math.floor(d/($w+1));d=Math.floor(d%($w+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(ax(f.timescale,4)),x(ax(e,4)),x(ax(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
1165
|
-
255]));e=Ww("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(ax(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,
|
|
1165
|
+
255]));e=Ww("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(ax(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Ww("trex",k),h.call(g,k);a=Kd.apply(Ed,x(d));a=Ww("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Kd.apply(Ed,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Vw.byteLength+
|
|
1166
1166
|
a.byteLength);b.set(Vw);b.set(a,Vw.byteLength);return b}
|
|
1167
1167
|
function ex(a){var b=Ww,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.xa.byteLength)var e=Ww("avcC",a.xa);else{e=Ww;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.$a.length;n++){var p=gx(a.$a[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1168
1168
|
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(ax(c,2)),x(ax(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=hx(a);g=new Uint8Array([]);
|
|
@@ -1177,35 +1177,35 @@ function px(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.valu
|
|
|
1177
1177
|
g,k);e.call(d,b,[f,qx(c)])}return Kd.apply(Ed,x(b))}function qx(a){a=(a.data?a.data.Ya:[]).map(function(b){return b.data});a=Kd.apply(Ed,x(a));return Ww("mdat",a)}function ax(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function gx(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
1178
1178
|
function Ww(a){var b=Ha.apply(1,arguments),c=rx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],rx[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
1179
1179
|
var Uw=!1,$w=Math.pow(2,32)-1,rx={},bx=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),cx=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),lx=new Uint8Array([0,0,0,0,0,0,0,0]),mx=new Uint8Array([0,0,0,0,0,0,0,0]),ox=new Uint8Array([0,0,0,0,0,0,0,0]),nx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),dx=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),fx=new Uint8Array([0,
|
|
1180
|
-
0,0,0,0,0,0,0]),kx=new Uint8Array([0,0,0,0,0,0,0,1]),Vw=new Uint8Array([]),Xw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Yw=new Uint8Array([]);function sx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Ra(5);this.o=new Rc(function(){tx(a)});this.A=new
|
|
1180
|
+
0,0,0,0,0,0,0]),kx=new Uint8Array([0,0,0,0,0,0,0,1]),Vw=new Uint8Array([]),Xw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Yw=new Uint8Array([]);function sx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Ra(5);this.o=new Rc(function(){tx(a)});this.A=new kg;this.m=new Map}q=sx.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,F(d,ux(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
|
|
1181
1181
|
function tx(a){var b;O(function(c){switch(c.g){case 1:return ra(c,2),F(c,ux(a),4);case 4:ta(c,3);break;case 2:b=ua(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();G(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
|
|
1182
1182
|
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ra(c,2),F(c,ux(a),4);if(2!=c.g)return ta(c,0);b=ua(c);if(!a.h||!b)return c.return();a.h.onError(b);G(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};
|
|
1183
|
-
function ux(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=
|
|
1184
|
-
l);n(m);m=Ad(m.outerHTML)}var p
|
|
1185
|
-
"Duration",
|
|
1186
|
-
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Jd(y);break a}y=null}else y=null;D=Hd(
|
|
1187
|
-
|
|
1183
|
+
function ux(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=rg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),lg(a.A,e),F(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=um){qb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=iu(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
|
|
1184
|
+
l);n(m);m=Ad(m.outerHTML)}var p=Zg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=vm&&l(p);a.i||(a.i=new qk(null,0));if(l=nh(p,"IsLive",xh,!1))throw new T(2,4,4047);a.i.uc(!l);n=nh(p,"TimeScale",vh,1E7);m=nh(p,"DVRWindowLength",vh);l&&(0===m||isNaN(m))&&(m=Infinity);var r=nh(p,"CanSeek",xh,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.pe(r);m=nh(p,
|
|
1185
|
+
"Duration",vh,Infinity);l||a.i.Za(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=gh(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(gh(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var y=Qw(v);if(y)a:{y=t(jh(y,"DATA"));for(var D=y.next();!D.done;D=y.next())if(D=kh(D.value,"KID")){y=Hd(hh(D));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
|
|
1186
|
+
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Jd(y);break a}y=null}else y=null;D=Hd(hh(v));w=Id(w.replace(/-/g,""));w=[{initData:Yg(D,w,new Set,0),initDataType:"cenc",keyId:y}];w=Nd(A,"cenc",w);y&&w.keyIds.add(y);if(A=Sw.get(A))w.licenseServerUri=A(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=gh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=gh(v,"QualityLevel");w=l.timescale;y=l.duration;D=gh(v,"c");for(var z=[],C=0,B=0;B<D.length;++B){var E=D[B],I=D[B+1],L=nh(E,"t",vh),H=
|
|
1187
|
+
nh(E,"d",vh);E=nh(E,"r",th);if(!H)break;L=null!=L?L:C;(E=E||0)&&E--;if(0>E)if(I){I=nh(I,"t",vh);if(null==I)break;else if(L>=I)break;E=Math.ceil((I-L)/H)-1}else{if(Infinity==y)break;else if(L/w>=y)break;E=Math.ceil((y*w-L)/H)-1}for(I=0;I<=E;++I)C=L+H,z.push({start:L/w,end:C/w,ag:L}),L=C}w=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=vx(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Ud||a.g.disableText||m.push(y):n.push(y):r.push(y))}p=[];r=t(0<r.length?
|
|
1188
1188
|
r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(0<n.length?n:[null]),z=v.next();!z.done;z=v.next())A=p,w=A.push,y=a,D=u,z=z.value,B=0,D&&D.bandwidth&&0<D.bandwidth&&(B+=D.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(B+=z.bandwidth),y={id:y.s++,language:D?D.language:"und",disabledUntilTime:0,primary:!!D&&D.primary||!!z&&z.primary,audio:D,video:z,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,y);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,
|
|
1189
1189
|
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1},a.i.Vd());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);G(k)})}
|
|
1190
|
-
function vx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Ya("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=
|
|
1190
|
+
function vx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Ya("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=nh(c,"Bitrate",uh),m=nh(c,"MaxWidth",uh),n=nh(c,"MaxHeight",uh),p=nh(c,"Channels",uh),r=nh(c,"SamplingRate",uh),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Za(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1191
1191
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Be(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1192
1192
|
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=wx[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Ya('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!xx.includes(e.toUpperCase()))return Ya("Codec not supported:",
|
|
1193
1193
|
e),null;c=yx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Ya("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=zx(e,c);break;case "video":if(!c)return Ya("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=Ax(c);break;case "text":if(w.type=Ud,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Zd(w.mimeType,w.codecs));
|
|
1194
|
-
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,$a:A,pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:w},A=Zw(new Tw([A])),a.m.set(w.id,A);A=Bx(a,new
|
|
1195
|
-
A),w,b,d);w.segmentIndex=new
|
|
1194
|
+
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,$a:A,pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:w},A=Zw(new Tw([A])),a.m.set(w.id,A);A=Bx(a,new Ci(function(){return[]},0,null,rl(w),w.mssPrivateData.timescale,
|
|
1195
|
+
A),w,b,d);w.segmentIndex=new Mk(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1196
1196
|
function yx(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1197
1197
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function zx(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Ax(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1198
|
-
function Bx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={re:void 0},g=e.next())h.re=g.value,d.push(new
|
|
1199
|
-
|
|
1198
|
+
function Bx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={re:void 0},g=e.next())h.re=g.value,d.push(new Ei(h.re.start,h.re.end,function(k){return function(){return Md(a.l,[f.replace("{start time}",String(k.re.ag))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",sx);var xx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),wx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1199
|
+
xi["application/vnd.ms-sstr+xml"]=function(){return new sx};function Cx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=zd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Dx(){}function Ex(a,b,c,d,e){var f=new Fx;Dg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Gx,h={mg:!1,ph:!1};a=Hx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new ag(a,function(){h.mg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Rc(function(){h.ph=!0;g.abort()});k.Z(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1200
1200
|
function Hx(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:return h=Ix,k=Jx,p=n=0,r=Date.now(),ra(z,2),F(z,h(a,c),4);case 4:l=z.h;f(Kx(l.headers));if("HEAD"==c.method){z.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(C){function B(){var E,I,L;return O(function(H){switch(H.g){case 1:return ra(H,2),F(H,u.read(),4);case 4:E=H.h;ta(H,3);break;case 2:return ua(H),H.return();case 3:if(E.done){H.u(5);break}n+=
|
|
1201
1201
|
E.value.byteLength;if(!g){H.u(5);break}return F(H,g(E.value),5);case 5:I=Date.now();if(100<I-r||E.done)L=E.done?0:w-n,e(I-r,n-p,L),p=n,r=I;E.done?C.close():(C.enqueue(E.value),B());G(H)}})}B()};new k({start:A});return F(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:ta(z,3);break;case 2:y=ua(z);if(d.mg)throw new T(1,1,7001,a,b);if(d.ph)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,y,b);case 3:return D=Kx(l.headers),z.return(Cx(D,m,l.status,a,l.url,b))}})}
|
|
1202
1202
|
function Kx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Lx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",Dx);Dx.isSupported=Lx;Dx.parse=Ex;var Ix=window.fetch,Gx=window.AbortController,Jx=window.ReadableStream,Fx=window.Headers;
|
|
1203
|
-
Lx()&&(
|
|
1203
|
+
Lx()&&(ng("http",Ex,2,!0),ng("https",Ex,2,!0),ng("blob",Ex,2,!0));function Mx(){}
|
|
1204
1204
|
function Nx(a,b,c,d,e){var f=new Ox,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=Px(f);e(r);n=!0}};f.onload=function(r){var u=Px(f),v=f.response;try{d(Date.now()-g,r.loaded-h,0);var w=Cx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(r){m(new T(1,
|
|
1205
|
-
1,1002,a,r,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(r){var u=Date.now();if(100<u-g||r.lengthComputable&&r.loaded==r.total)d(u-g,r.loaded-h,4==f.readyState?0:r.total-r.loaded),h=r.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new
|
|
1206
|
-
function Px(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Mx);Mx.parse=Nx;var Ox=window.XMLHttpRequest;
|
|
1207
|
-
function Yx(a,b,c,d,e,f){
|
|
1208
|
-
function Zx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=
|
|
1205
|
+
1,1002,a,r,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(r){var u=Date.now();if(100<u-g||r.lengthComputable&&r.loaded==r.total)d(u-g,r.loaded-h,4==f.readyState?0:r.total-r.loaded),h=r.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new ag(k,function(){f.abort();return Promise.resolve()})}
|
|
1206
|
+
function Px(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Mx);Mx.parse=Nx;var Ox=window.XMLHttpRequest;ng("http",Nx,1,!0);ng("https",Nx,1,!0);ng("blob",Nx,1,!0);function Qx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Rx(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.ta}function Sx(a,b){return yl(a.g.M(),a.g.Ha,a.g.ta,b.streaming.retryParameters)};function Tx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Ux(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Tx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function Vx(a){var b=this;this.o=a;this.j=new Map;this.i=new zg(function(){return Wx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Tx}Vx.prototype.destroy=function(){return this.i.destroy()};function Xx(a,b,c){a.m=b;a.l=c}function Wx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1207
|
+
function Yx(a,b,c,d,e,f){Ag(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return F(u,Zx(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=zb(h),l=new Vg(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function $x(a){return O(function(b){return 1==b.g?F(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1208
|
+
function Zx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=xg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),F(g,d.promise,2);f=g.h;Nb(a.h,e);return g.return(f.data)})};function ay(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new $f;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ay.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ra(b,2);return F(b,a.g,4)}if(2!=b.g)return ta(b,0);ua(b);G(b)})};
|
|
1209
1209
|
function by(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return F(g,b(f.key,f.value,f),2)}f.continue();G(g)})}})}ay.prototype.store=function(){return this.h};ay.prototype.promise=function(){return this.g};function cy(a){this.h=a;this.g=[]}cy.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function dy(a,b){return ey(a,b,"readwrite")}function ey(a,b,c){c=a.h.transaction([b],c);var d=new ay(c,b);a.g.push(d);d.promise().then(function(){Nb(a.g,d)},function(){Nb(a.g,d)});return d};function fy(a,b,c){this.h=new cy(a);this.i=b;this.g=c}q=fy.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return gy(this.i)};q.removeSegments=function(a,b){return hy(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return F(d,iy(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.pg(e)}))})};q.addManifests=function(){return gy(this.g)};
|
|
1210
1210
|
q.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function jy(a,b,c){a=dy(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=dy(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return hy(this,this.g,a,b)};
|
|
1211
1211
|
q.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return F(d,iy(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Zc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=ey(a.h,a.g,"readonly"),c=new Map,F(d,by(b,function(e,f){var g;return O(function(h){if(1==h.g)return F(h,a.Zc(f),2);g=h.h;c.set(e,g);G(h)})}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};q.pg=function(a){return a};q.Zc=function(a){return Promise.resolve(a)};
|
|
@@ -1215,7 +1215,7 @@ function iy(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=ey(a.h,b,
|
|
|
1215
1215
|
ky.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=dy(b.g,"session-ids"),F(d,by(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function ly(){this.g=new Map}ly.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ly.prototype.init=function(){var a=this;my.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
1216
1216
|
function ny(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{ob:d,Ia:f},Ia:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function oy(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({ob:d,Ia:f},e)})})}
|
|
1217
1217
|
function py(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function qy(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ry(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1218
|
-
function sy(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=my,d.forEach(function(f){(f=f())&&b.push(f)})),F(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):F(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ty(a,b){my.set(a,b)}S("shaka.offline.StorageMuxer",ly);ly.unregister=function(a){my.delete(a)};ly.register=ty;ly.prototype.destroy=ly.prototype.destroy;var my=new Map;function uy(){fy.apply(this,arguments)}na(uy,fy);uy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=dy(c.h,c.g);e=d.store();f=new
|
|
1218
|
+
function sy(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=my,d.forEach(function(f){(f=f())&&b.push(f)})),F(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):F(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ty(a,b){my.set(a,b)}S("shaka.offline.StorageMuxer",ly);ly.unregister=function(a){my.delete(a)};ly.register=ty;ly.prototype.destroy=ly.prototype.destroy;var my=new Map;function uy(){fy.apply(this,arguments)}na(uy,fy);uy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=dy(c.h,c.g);e=d.store();f=new $f;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return F(g,Promise.all([d.promise(),f]),0)})};
|
|
1219
1219
|
uy.prototype.Zc=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=vy(a.periods[c],e),b.push(f);return F(h,Ht(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1220
1220
|
function vy(a,b){wy(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return xy(e,a.startTime,b)})}
|
|
1221
1221
|
function xy(a,b,c){var d=a.initSegmentUri?yy(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
@@ -1227,34 +1227,34 @@ zy.prototype.Zc=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[]
|
|
|
1227
1227
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1228
1228
|
function Ay(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1229
1229
|
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function By(){fy.apply(this,arguments)}na(By,fy);q=By.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return jy(this,a,b)};q.Zc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Cy(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Cy.prototype;
|
|
1230
|
-
q.init=function(){var a=this,b=new
|
|
1230
|
+
q.init=function(){var a=this,b=new $f,c=!1,d=new Rc(function(){c=!0;b.reject(new T(2,9,9017))});d.Z(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new uy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new zy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1231
1231
|
new zy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new By(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ky(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new T(2,
|
|
1232
1232
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return F(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return F(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),G(b)}})};
|
|
1233
1233
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
1234
1234
|
q.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return F(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),F(b,Dy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,F(b,a.init(),0)}})};
|
|
1235
|
-
function Dy(){var a=new
|
|
1235
|
+
function Dy(){var a=new $f,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}ty("idb",function(){return fd()||Yc()||!window.indexedDB?null:new Cy});function Ey(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ey.prototype.ob=function(){return this.i};Ey.prototype.Ia=function(){return this.h};Ey.prototype.key=function(){return this.l};Ey.prototype.toString=function(){return this.j};
|
|
1236
1236
|
function Fy(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Ey(b,c,d,Number(a[4])):null};function Gy(a,b){this.h=a;this.g=b}
|
|
1237
|
-
function Hy(a,b){var c=new
|
|
1237
|
+
function Hy(a,b){var c=new qk(null,0);c.Za(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Iy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ud}).map(function(l){return Jy(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Jy(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
1238
1238
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1}}
|
|
1239
1239
|
function Iy(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
1240
1240
|
b.next())for(g=e.value,e=Jy(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Jy(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
|
|
1241
|
-
function Jy(a,b,c){var d=b.segments.map(function(e){return Ky(a,e,b)});c.sd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new
|
|
1241
|
+
function Jy(a,b,c){var d=b.segments.map(function(e){return Ky(a,e,b)});c.sd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Mk(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||
|
|
1242
1242
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Zd(b.mimeType,b.codecs)])}}
|
|
1243
|
-
function Ky(a,b,c){var d=new Ey("segment",a.h,a.g,b.dataKey);a=new
|
|
1244
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=Fy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new ly;sa(m,2);return F(m,e.init(),4);case 4:return F(m,py(e,d.ob(),d.Ia()),5);case 5:return f=m.h,F(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Gy(d.ob(),d.Ia()),l=Hy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return
|
|
1243
|
+
function Ky(a,b,c){var d=new Ey("segment",a.h,a.g,b.dataKey);a=new Ei(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Ly(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function Ly(a,b){var c=new Ey("segment",a.h,a.g,b);return new Ci(function(){return[c.toString()]},0,null)};function My(){this.g=null}q=My.prototype;q.configure=function(){};
|
|
1244
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=Fy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new ly;sa(m,2);return F(m,e.init(),4);case 4:return F(m,py(e,d.ob(),d.Ia()),5);case 5:return f=m.h,F(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Gy(d.ob(),d.Ia()),l=Hy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return va(m),F(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
1245
1245
|
q.update=function(){};
|
|
1246
|
-
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new ly,ra(m,2,3),F(m,e.init(),5);case 5:return F(m,py(e,d.ob(),d.Ia()),6);case 6:return f=m.h,F(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return
|
|
1247
|
-
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};
|
|
1248
|
-
function Py(a,b){var c=new ly;return
|
|
1249
|
-
function Sy(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new
|
|
1250
|
-
h.g)return ra(h,2),F(h
|
|
1251
|
-
function Uy(a){var b=[],c=tf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(jf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(kf(c.value));return b};function Wy(){this.g={}}function Xy(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Yy(a,b){a.g[b.id]=b.bandwidth||2048}function Zy(a,b){a=a.g[b];null==a&&(a=0);return a};function $y(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.yb()):(this.h=
|
|
1252
|
-
case 4:b.h=null,b.g=null,G(k)}})})}function az(){if(Sc())a:{var a=t(my.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=$y.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
1253
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Vx(this.g);this.j.push(f);b=bz(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):F(h,
|
|
1254
|
-
function bz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:return dz(),h=g=null,k=new ly,n=m=l=null,ra(z,2,3),F(z,d(),5);case 5:return g=z.h,F(z,ez(a,b,g,e),6);case 6:p=z.h;fz(a);r=!p.presentationTimeline.V()&&!p.presentationTimeline.oc();if(!r)throw new T(2,9,9005,b);return F(z,a.
|
|
1255
|
-
p,b,c,e,f),v=u.xi,w=u.Yf,F(z,l.Ia.addManifests([v]),11);case 11:A=z.h;fz(a);m=A[0];fz(a);if(n)throw n;return F(z,iz(a,w,m,v,f,e,l.Ia,p,h),12);case 12:return fz(a),jz(p,v,h,e),F(z,l.Ia.updateManifest(m,v),13);case 13:return fz(a),y=new Ey("manifest",l.path.ob,l.path.Ia,m),z.return(Vy(y,v));case 3:return
|
|
1246
|
+
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new ly,ra(m,2,3),F(m,e.init(),5);case 5:return F(m,py(e,d.ob(),d.Ia()),6);case 6:return f=m.h,F(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return va(m),F(m,e.destroy(),10);case 10:ya(m,0);break;case 2:ua(m),m.u(3)}})};
|
|
1247
|
+
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};xi["application/x-offline-manifest"]=function(){return new My};function Ny(){}function Oy(a){var b=Fy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=dg(a)):a=b&&"segment"==b.g?Py(b.key(),b):bg(new T(2,1,9004,a));return a}
|
|
1248
|
+
function Py(a,b){var c=new ly;return dg(void 0).za(function(){return c.init()}).za(function(){return py(c,b.ob(),b.Ia())}).za(function(d){return d.getSegments([b.key()])}).za(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",Ny);Ny.plugin=Oy;ng("offline",Oy);function Qy(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Ry(v.info,p)){v.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Sy(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1249
|
+
function Sy(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Fh({Mb:b,onError:function(){},ee:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),F(f,Nh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return ua(f),F(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],F(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1250
|
+
h.g)return ra(h,2),F(h,Zh(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);ua(h);G(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function Ry(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Ob(a.audioCapabilities,b.audioCapabilities,c)&&Ob(a.videoCapabilities,b.videoCapabilities,c)};function Ty(a,b,c){var d=b.presentationTimeline.getDuration();b=Uy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Vy(a,b){var c=Hy(new Gy(a.ob(),a.Ia()),b),d=b.appMetadata||{};c=Uy(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
1251
|
+
function Uy(a){var b=[],c=tf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(jf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(kf(c.value));return b};function Wy(){this.g={}}function Xy(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Yy(a,b){a.g[b.id]=b.bandwidth||2048}function Zy(a,b){a=a.g[b];null==a&&(a=0);return a};function $y(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.yb()):(this.h=tm(),this.g=new mg);this.i=[];this.j=[];var c=!a;this.l=new zg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return F(k,Promise.all(b.j.map(function(l){return Wx(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return F(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return F(k,b.g.destroy(),4);
|
|
1252
|
+
case 4:b.h=null,b.g=null,G(k)}})})}function az(){if(Sc())a:{var a=t(my.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=$y.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=km(a,b));return xm(this.h,a)};q.getConfiguration=function(){var a=tm();xm(a,this.h,tm());return a};q.yb=function(){return this.g};
|
|
1253
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Vx(this.g);this.j.push(f);b=bz(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):F(h,Rm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=wi(a,c||null);return h.return(g())})},e,f);b=new ag(b,function(){return Wx(f)});b.finally(function(){Nb(d.j,f)});return cz(this,b)};
|
|
1254
|
+
function bz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,D;return O(function(z){switch(z.g){case 1:return dz(),h=g=null,k=new ly,n=m=l=null,ra(z,2,3),F(z,d(),5);case 5:return g=z.h,F(z,ez(a,b,g,e),6);case 6:p=z.h;fz(a);r=!p.presentationTimeline.V()&&!p.presentationTimeline.oc();if(!r)throw new T(2,9,9005,b);return F(z,a.Ac(p,function(C){n=n||C},e),7);case 7:h=z.h;fz(a);if(n)throw n;return F(z,gz(p,h,e),8);case 8:return F(z,k.init(),9);case 9:return fz(a),F(z,ny(k),10);case 10:return l=z.h,fz(a),u=hz(h,
|
|
1255
|
+
p,b,c,e,f),v=u.xi,w=u.Yf,F(z,l.Ia.addManifests([v]),11);case 11:A=z.h;fz(a);m=A[0];fz(a);if(n)throw n;return F(z,iz(a,w,m,v,f,e,l.Ia,p,h),12);case 12:return fz(a),jz(p,v,h,e),F(z,l.Ia.updateManifest(m,v),13);case 13:return fz(a),y=new Ey("manifest",l.path.ob,l.path.Ia,m),z.return(Vy(y,v));case 3:return va(z),F(z,k.destroy(),14);case 14:if(!g){z.u(15);break}return F(z,g.stop(),15);case 15:if(!h){z.u(17);break}return F(z,h.destroy(),17);case 17:ya(z,0);break;case 2:D=ua(z);if(null==m){z.u(19);break}return F(z,
|
|
1256
1256
|
kz(m),19);case 19:throw n||D;}})}
|
|
1257
|
-
function iz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,A,y;return O(function(D){switch(D.g){case 1:l={};m=0;n=function(z,C){var B,E,I,L,H,J,K;return O(function(M){if(1==M.g){B=t(z);E=B.next();for(I={};!E.done;I={
|
|
1257
|
+
function iz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,A,y;return O(function(D){switch(D.g){case 1:l={};m=0;n=function(z,C){var B,E,I,L,H,J,K;return O(function(M){if(1==M.g){B=t(z);E=B.next();for(I={};!E.done;I={Cc:void 0},E=B.next())I.Cc=E.value,L=Sx(I.Cc,f),H=I.Cc.i,J=I.Cc.h,K=function(N){return function(P){var R,Q,W;return O(function(Y){if(1==Y.g)return F(Y,g.addSegments([{data:P}]),2);R=Y.h;fz(a);Q=N.Cc.g;W=Rx(Q);l[W]=R[0];m+=P.byteLength;G(Y)})}}(I),Yx(e,I.Cc.groupId,L,H,J,K);return F(M,$x(e),2)}if(!C)return M.u(0);
|
|
1258
1258
|
fz(a);jz(h,d,k,f);return F(M,g.updateManifest(c,d),0)})};p=!1;ra(D,2);if(!lz(h)||!p||mz(h)){D.u(4);break}return F(D,n(b.filter(function(z){return z.h}),!0),5);case 5:return fz(a),b=b.filter(function(z){return!z.h}),r=l,u=m,l={},m=0,F(D,nz(g,c,d,r,u,function(){return fz(a)}),6);case 6:fz(a);case 4:if(p){D.u(7);break}return F(D,n(b,!1),8);case 8:return fz(a),v=l,w=m,l={},m=0,F(D,nz(g,c,d,v,w,function(){return fz(a)}),9);case 9:fz(a);case 7:ta(D,0);break;case 2:return A=ua(D),y=Object.values(l),F(D,
|
|
1259
1259
|
g.removeSegments(y,function(){}),10);case 10:throw A;}})}function kz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new ly,F(f,b.init(),2);case 2:return F(f,ny(b),3);case 3:return c=f.h,d=new Ey("manifest",c.path.ob,c.path.Ia,a),F(f,b.destroy(),4);case 4:return e=new $y,F(f,e.remove(d.toString()),0)}})}
|
|
1260
1260
|
function nz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;ra(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
|
|
@@ -1262,33 +1262,33 @@ function nz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A
|
|
|
1262
1262
|
function gz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,D,z,C,B,E,I,L,H,J,K,M,N,P;return O(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Oe(a,c.restrictions,d),F(R,Se(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Me(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(jf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
|
|
1263
1263
|
e.push(kf(r));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(lf(w));return F(R,c.offline.trackSelectionCallback(e),3);case 3:A=R.h;y=a.presentationTimeline.getDuration();D=0;z=t(A);for(C=z.next();!C.done;C=z.next())B=C.value,E=B.bandwidth*y/8,D+=E;ra(R,4);return F(R,c.offline.downloadSizeCallback(D),6);case 6:I=R.h;if(!I)throw new T(2,9,9014);ta(R,5);break;case 4:L=ua(R);if(L instanceof T)throw L;throw new T(2,9,9015);case 5:H=new Set;J=new Set;K=new Set;M=t(A);for(N=M.next();!N.done;N=
|
|
1264
1264
|
M.next())P=N.value,"variant"==P.type&&H.add(P.id),"text"==P.type&&J.add(P.id),"image"==P.type&&K.add(P.id);a.variants=a.variants.filter(function(Q){return H.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return J.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return K.has(Q.id)});oz(a);G(R)}})}
|
|
1265
|
-
function hz(a,b,c,d,e,f){var g=Ty(c,b,d),h=e.offline.progressCallback;Xx(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&
|
|
1266
|
-
n&&p&&(n.initData=[]);return{xi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cd(),streams:f,sessionIds:p?
|
|
1267
|
-
function mz(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function jz(a,b,c,d){b.expiration=c.cd();c=
|
|
1268
|
-
function sz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:dz();c=Fy(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new ly;sa(k,2);return F(k,e.init(),4);case 4:return F(k,py(e,d.ob(),d.Ia()),5);case 5:return f=k.h,F(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],F(k,Promise.all([tz(a,h,e),uz(f,d,h)]),2);case 2:return
|
|
1265
|
+
function hz(a,b,c,d,e,f){var g=Ty(c,b,d),h=e.offline.progressCallback;Xx(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&Vh(a,"cenc",r)});var k=lz(b)&&!mz(b),l=null;k&&(l=pz.get(a.g.keySystem));for(var m=new Wy,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Yy(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Xy(m,p.value);m=qz(f,m,b,e);f=m.streams;m=m.Yf;n=a.g;p=e.offline.usePersistentLicense;
|
|
1266
|
+
n&&p&&(n.initData=[]);return{xi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cd(),streams:f,sessionIds:p?di(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Yf:m}}function lz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1267
|
+
function mz(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function jz(a,b,c,d){b.expiration=c.cd();c=di(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(lz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return rz(this,sz(this,a))};
|
|
1268
|
+
function sz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:dz();c=Fy(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new ly;sa(k,2);return F(k,e.init(),4);case 4:return F(k,py(e,d.ob(),d.Ia()),5);case 5:return f=k.h,F(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],F(k,Promise.all([tz(a,h,e),uz(f,d,h)]),2);case 2:return va(k),F(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
1269
1269
|
function vz(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Zd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Zd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function tz(a,b,c){return O(function(d){return F(d,wz(a.g,a.h.drm,c,b),0)})}
|
|
1270
1270
|
function uz(a,b,c){function d(){}var e=xz(c);Vy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Oi=function(){return rz(this,yz(this))};
|
|
1271
|
-
function yz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return dz(),b=a.g,c=a.h.drm,d=new ly,e=!1,sa(n,2),F(n,d.init(),4);case 4:f=[],qy(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,Qy(c,b,l),9);case 9:return m=n.h,F(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return
|
|
1272
|
-
q.list=function(){return rz(this,zz())};function zz(){var a,b,c;return O(function(d){switch(d.g){case 1:return dz(),a=[],b=new ly,sa(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),oy(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return F(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Vy(new Ey("manifest",e.ob,e.Ia,l),k);a.push(k)});G(h)})})}),F(d,c,2);case 2:return
|
|
1271
|
+
function yz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return dz(),b=a.g,c=a.h.drm,d=new ly,e=!1,sa(n,2),F(n,d.init(),4);case 4:f=[],qy(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,Qy(c,b,l),9);case 9:return m=n.h,F(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return va(n),F(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
|
|
1272
|
+
q.list=function(){return rz(this,zz())};function zz(){var a,b,c;return O(function(d){switch(d.g){case 1:return dz(),a=[],b=new ly,sa(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),oy(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return F(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Vy(new Ey("manifest",e.ob,e.Ia,l),k);a.push(k)});G(h)})})}),F(d,c,2);case 2:return va(d),F(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
|
|
1273
1273
|
function ez(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},
|
|
1274
|
-
onMetadata:function(){},disableStream:function(){}},c.configure(d.manifest),fz(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,fz(a),k=Az(h),F(l,Promise.all(
|
|
1275
|
-
q.
|
|
1274
|
+
onMetadata:function(){},disableStream:function(){}},c.configure(d.manifest),fz(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,fz(a),k=Az(h),F(l,Promise.all(Bg(k,function(m){return m.createSegmentIndex()})),3);fz(a);if(e)throw e;return l.return(h)})}
|
|
1275
|
+
q.Ac=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Fh({Mb:d.g,onError:b,ee:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),F(f,Kh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?F(f,Xh(e),3):f.return(e)})};
|
|
1276
1276
|
function qz(a,b,c,d){var e=new Map,f=Az(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Bz(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Yf:Array.from(e.values())}}
|
|
1277
1277
|
function Bz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1278
1278
|
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;Cz(d,c.presentationTimeline.nb(),function(l){var m=Rx(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Zy(b,d.id)*p;p=Ux(a.g,p);f.set(m,new Qx(l,p,k,!1))}l.$&&(n=Rx(l.$),f.has(n)||(p=.5*Zy(b,d.id),p=Ux(a.g,p),f.set(n,new Qx(l.$,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
1279
1279
|
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});0!==h&&(k=(k+1)%h)});return g}function Cz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function fz(a){if(a.l.g)throw new T(2,9,7001);}
|
|
1280
|
-
function dz(){if(!az())throw new T(2,9,9E3);}function rz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),sa(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);
|
|
1280
|
+
function dz(){if(!az())throw new T(2,9,9E3);}function rz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),sa(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);va(c);Nb(a.i,b);return ya(c,0)})}function cz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Nb(a.i,c)})}
|
|
1281
1281
|
function xz(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
1282
1282
|
function wz(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=ry(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:vz(d,!1),videoCapabilities:vz(d,!0)}});return F(h,Qy(b,a,f),2)}return 3!=h.g?(g=h.h,F(h,e.remove(g),3)):F(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1283
1283
|
function Az(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
|
|
1284
|
-
function oz(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",$y);$y.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new ly,sa(b,2),F(b,sy(a),2)):5!=b.g?(
|
|
1284
|
+
function oz(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",$y);$y.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new ly,sa(b,2),F(b,sy(a),2)):5!=b.g?(va(b),F(b,a.destroy(),5)):ya(b,0)})};
|
|
1285
1285
|
$y.prototype.list=$y.prototype.list;$y.prototype.removeEmeSessions=$y.prototype.Oi;$y.prototype.remove=$y.prototype.remove;$y.prototype.store=$y.prototype.store;$y.prototype.getNetworkingEngine=$y.prototype.yb;$y.prototype.getConfiguration=$y.prototype.getConfiguration;$y.prototype.configure=$y.prototype.configure;$y.prototype.destroy=$y.prototype.destroy;$y.support=az;
|
|
1286
|
-
var pz=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");
|
|
1287
|
-
function Hz(){this.h=!1;this.g=void 0;this.onabort=null;this.i=new
|
|
1286
|
+
var pz=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");vp.offline=az;function Dz(){}function Ez(a,b){a={priority:b||0,callback:a};for(b=0;b<Fz.length;b++)if(Fz[b].priority<a.priority){Fz.splice(b,0,a);return}Fz.push(a)}S("shaka.polyfill",Dz);Dz.register=Ez;Dz.installAll=function(){for(var a=t(Fz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Ya("Error installing polyfill!",c)}}};var Fz=[];function Gz(){this.g=new Hz}function Iz(){window.AbortController||(window.AbortController=Gz,window.AbortSignal=Hz)}Gz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(Gz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Dz.AbortController=Gz;Gz.install=Iz;
|
|
1287
|
+
function Hz(){this.h=!1;this.g=void 0;this.onabort=null;this.i=new jg}Hz.prototype.addEventListener=function(a,b,c){return this.i.addEventListener(a,b,c)};Hz.prototype.removeEventListener=function(a,b,c){return this.i.removeEventListener(a,b,c)};Hz.prototype.dispatchEvent=function(a){return this.i.dispatchEvent(a)};Hz.prototype.throwIfAborted=function(){if(this.h)throw this.g;};
|
|
1288
1288
|
da.Object.defineProperties(Hz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Ez(Iz);function Jz(){}function Kz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Lz(b.value)}function Lz(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Dz.Aria=Jz;Jz.install=Kz;Ez(Kz);function Mz(){}function Nz(){id()||Zc("Sky_STB")||Oz()}Dz.EncryptionScheme=Mz;Mz.install=Nz;Ez(Nz,-2);function Pz(){}
|
|
1289
1289
|
function Qz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
1290
1290
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Rz);document.addEventListener("webkitfullscreenerror",Rz);document.addEventListener("mozfullscreenchange",Rz);document.addEventListener("mozfullscreenerror",Rz);document.addEventListener("MSFullscreenChange",Rz);document.addEventListener("MSFullscreenError",Rz)}}
|
|
1291
|
-
function Rz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Dz.Fullscreen=Pz;Pz.install=Qz;Ez(Qz);function Sz(){}function Tz(){var a=!0;!fd()||fd()&&nd()||fd()&&Zc("Fuchsia")||(a=!1);if(gd()||jd()||id()||cd()||$c()||Zc("PC=EOS")||kd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Uz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Vz)}
|
|
1291
|
+
function Rz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Dz.Fullscreen=Pz;Pz.install=Qz;Ez(Qz);function Sz(){}function Tz(){var a=!0;!fd()||fd()&&nd()||fd()&&Zc("Fuchsia")||(a=!1);if(gd()||jd()||id()||cd()||$c()||Zc("PC=EOS")||kd()||Zc("WPE"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Uz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Vz)}
|
|
1292
1292
|
function Vz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Tc(e),!f)||d&&(g=d.contentType,h=Tc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Sc())return p.return(b);if(!c){p.u(3);break}return F(p,Wz(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var r=d.contentType;fd()&&d.spatialRendering&&
|
|
1293
1293
|
(r+="; spatialRendering=true");l=lb(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return F(p,Xz(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
|
|
1294
1294
|
function Wz(a){var b,c;return O(function(d){return 1==d.g?fd()?F(d,Yz(a),3):$c()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(lb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(lb(a.contentType))})}
|
|
@@ -1296,12 +1296,12 @@ function Xz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return O(function(u){switch(u.g){ca
|
|
|
1296
1296
|
{initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=ie(k)+";"+he(k);n=ie(l)+";"+he(l);p=c.keySystem;r=null;ra(u,2);if(Pc.has(m+"#"+n+"#"+p)){r=Pc.get(m+"#"+n+"#"+p)||null;u.u(4);break}return F(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=u.h,Pc.set(m+"#"+n+"#"+p,r);case 4:ta(u,
|
|
1297
1297
|
3);break;case 2:ua(u);case 3:return u.return(r)}})}
|
|
1298
1298
|
function Yz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(lb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Zz?(c=Zz[b],d.u(2)):F(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Zz[b]=c);return d.return(c)})}Dz.MediaCapabilities=Sz;Sz.install=Tz;
|
|
1299
|
-
var Uz=null;Sz.originalMcap=Uz;var Zz={};Sz.memoizedCanDisplayTypeRequests_=Zz;Ez(Tz,-1);function $z(){}function aA(){var a=ld();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(bA(),cA()):15>=a&&bA():Zc("DT_STB_BCM")?(bA(),cA()):
|
|
1299
|
+
var Uz=null;Sz.originalMcap=Uz;var Zz={};Sz.memoizedCanDisplayTypeRequests_=Zz;Ez(Tz,-1);function $z(){}function aA(){var a=ld();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(bA(),cA()):15>=a&&bA():Zc("DT_STB_BCM")?(bA(),cA()):bd()||ad()||Zc("Tizen 4")?dA():Zc("WPE")&&(bA(),cA());(window.MediaSource||window.ManagedMediaSource)&&eA();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&fA()}
|
|
1300
1300
|
function bA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function cA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1301
1301
|
function eA(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ee(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ee(c)&&b(c)}}}
|
|
1302
1302
|
function dA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=he(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=he(c)&&b(c)}}}
|
|
1303
1303
|
function fA(){var a=MediaSource.isTypeSupported;cd()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Dz.MediaSource=$z;$z.install=aA;Ez(aA);function gA(){}function hA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?iA():void 0!=window.orientation&&jA())}function iA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1304
|
-
function jA(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new kA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}Dz.Orientation=gA;gA.install=hA;function kA(){
|
|
1304
|
+
function jA(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new kA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}Dz.Orientation=gA;gA.install=hA;function kA(){jg.call(this);this.type="";this.angle=0}na(kA,jg);
|
|
1305
1305
|
kA.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
1306
1306
|
kA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ez(hA);function lA(){}var mA,nA,oA,pA,qA,rA;function sA(a,b){try{var c=new tA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function uA(a){var b=this.mediaKeys;b&&b!=a&&vA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?vA(a,this):Promise.resolve()}
|
|
1307
1307
|
function wA(a){a=zb(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=wd(a.subarray(4),!0);a=Ad(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ab(a);this.dispatchEvent(b)}Dz.PatchedMediaKeysApple=lA;
|
|
@@ -1311,10 +1311,10 @@ sA;window.shakaMediaKeysPolyfill=yA}};
|
|
|
1311
1311
|
function tA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1312
1312
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1313
1313
|
tA.prototype.createMediaKeys=function(){var a=new xA(this.keySystem);return Promise.resolve(a)};tA.prototype.getConfiguration=function(){return this.g};function xA(a){this.h=new WebKitMediaKeys(a);this.g=new gb}xA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new zA(this.h,a)};xA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1314
|
-
function vA(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",wA);try{return
|
|
1315
|
-
q.generateRequest=function(a,b){var c=this;this.h=new
|
|
1314
|
+
function vA(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",wA);try{return xk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}xA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function zA(a){jg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new gb;this.sessionId="";this.expiration=NaN;this.closed=new $f;this.keyStatuses=new AA}na(zA,jg);q=zA.prototype;
|
|
1315
|
+
q.generateRequest=function(a,b){var c=this;this.h=new $f;try{var d=this.l.createSession("video/mp4",zb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Zb()?"license-request":"license-renewal").set("message",Ab(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(BA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1316
1316
|
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:BA(c,"output-not-allowed");break;default:BA(c,"internal-error")}});BA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1317
|
-
q.update=function(a){this.g=new
|
|
1317
|
+
q.update=function(a){this.g=new $f;try{this.i.update(zb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function BA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
|
|
1318
1318
|
function AA(){this.size=0;this.g=void 0}q=AA.prototype;q.Zb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Oc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Oc.value();return this.g&&xb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var yA="apple";function CA(){}function DA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ad()||Zc("Tizen 4")||Zc("Tizen 5.0")||dd())&&(MediaKeys.prototype.setServerCertificate=EA)}function EA(){return Promise.resolve(!1)}Dz.PatchedMediaKeysCert=CA;CA.install=DA;Ez(DA);function FA(){}function GA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=HA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=IA,window.MediaKeys=JA,window.MediaKeySystemAccess=KA,window.shakaMediaKeysPolyfill=LA)}function HA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1319
1319
|
function IA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Dz.PatchedMediaKeysNop=FA;FA.install=GA;function JA(){throw new TypeError("Illegal constructor.");}JA.prototype.createSession=function(){};JA.prototype.setServerCertificate=function(){};JA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function KA(){this.keySystem="";throw new TypeError("Illegal constructor.");}KA.prototype.getConfiguration=function(){};
|
|
1320
1320
|
KA.prototype.createMediaKeys=function(){};var LA="nop";Ez(GA,-10);function MA(){}
|
|
@@ -1326,40 +1326,40 @@ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||
|
|
|
1326
1326
|
function VA(a,b){a.h=b;a.g.Qa();var c=OA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ab(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=WA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Zb()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=WA(a,d.sessionId))&&d.ready()}),
|
|
1327
1327
|
a.g.D(b,c+"keyerror",function(d){var e=WA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?XA(e,"output-restricted"):1==f?XA(e,"expired"):XA(e,"internal-error"))}}))}
|
|
1328
1328
|
RA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new YA(b,this.l,a);this.i.push(a);return a};RA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};RA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1329
|
-
function WA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function YA(a,b,c){
|
|
1330
|
-
function $A(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=zb(Ad("LOAD_SESSION|"+c));else{var e=Ad("PERSISTENT|");d=Kd(e,b)}else d=zb(b)}catch(g){return Promise.reject(g)}a.h=new
|
|
1329
|
+
function WA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function YA(a,b,c){jg.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new $f;this.keyStatuses=new ZA}na(YA,jg);q=YA.prototype;q.ready=function(){XA(this,"usable");this.g&&this.g.resolve();this.g=null};
|
|
1330
|
+
function $A(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=zb(Ad("LOAD_SESSION|"+c));else{var e=Ad("PERSISTENT|");d=Kd(e,b)}else d=zb(b)}catch(g){return Promise.reject(g)}a.h=new $f;var f=UA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Rc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).Z(.01)}return a.h}
|
|
1331
1331
|
function aB(a,b,c){if(a.g)a.g.then(function(){return aB(a,b,c)}).catch(function(){return aB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=ud(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Hd(e.keys[0].k);e=Hd(e.keys[0].kid)}else d=zb(c),e=null;var f=UA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1332
|
-
function XA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return $A(this,b,null)};q.load=function(a){return"persistent-license"==this.l?$A(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new
|
|
1332
|
+
function XA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return $A(this,b,null)};q.load=function(a){return"persistent-license"==this.l?$A(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new $f;aB(this,b,a);return b};
|
|
1333
1333
|
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=UA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function ZA(){this.size=0;this.g=void 0}q=ZA.prototype;q.Zb=function(){return this.g};
|
|
1334
1334
|
q.forEach=function(a){this.g&&a(this.g,Oc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Oc.value();return this.g&&xb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var OA="",TA="webkit";Ez(NA);function bB(){}function cB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=dB,Object.defineProperty(a,"disablePictureInPicture",{get:eB,set:fB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=gB,document.addEventListener("webkitpresentationmodechanged",hB,!0))}}
|
|
1335
1335
|
function hB(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
1336
1336
|
function dB(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function gB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1337
1337
|
function eB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function fB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Dz.PiPWebkit=bB;bB.install=cB;Ez(cB);function iB(){}function jB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=kB))}function kB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Dz.RandomUUID=iB;iB.install=jB;Ez(jB);function lB(){}function mB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:nB})}function nB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Dz.Symbol=lB;lB.install=mB;Ez(mB);function oB(){}function pB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Dz.VideoPlayPromise=oB;oB.install=pB;Ez(pB);function qB(){}function rB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||dd())&&(a.getVideoPlaybackQuality=sB)}}function sB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Dz.VideoPlaybackQuality=qB;qB.install=rB;Ez(rB);function tB(){}function uB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=vB;else if(6==b)a=wB;else{try{var c=!!vB(1,2,"")}catch(d){c=!1}c&&(a=vB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function vB(a,b,c){return new window.TextTrackCue(a,b,c)}function wB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Dz.VTTCue=tB;tB.install=uB;Ez(uB);function xB(){}xB.prototype.parseInit=function(){};xB.prototype.setSequenceMode=function(){};xB.prototype.setManifestType=function(){};xB.prototype.parseMedia=function(a,b){var c=null,d=[];a=ud(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=yB.exec(e))){var f=zB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Qb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1338
1338
|
S("shaka.text.LrcTextParser",xB);xB.prototype.parseMedia=xB.prototype.parseMedia;xB.prototype.setManifestType=xB.prototype.setManifestType;xB.prototype.setSequenceMode=xB.prototype.setSequenceMode;xB.prototype.parseInit=xB.prototype.parseInit;var yB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,zB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;pe["application/x-subtitle-lrc"]=function(){return new xB};function AB(){}AB.prototype.parseInit=function(){};AB.prototype.setSequenceMode=function(){};AB.prototype.setManifestType=function(){};
|
|
1339
|
-
AB.prototype.parseMedia=function(a,b,c){var d=ud(a);a=[];if(""==d)return a;var e
|
|
1340
|
-
|
|
1339
|
+
AB.prototype.parseMedia=function(a,b,c){var d=ud(a);a=[];if(""==d)return a;var e=$g(d,"tt",!0);if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=jh(e,"body")[0];if(!d)return[];var f=ph(e,BB,"frameRate"),g=ph(e,BB,"subFrameRate"),h=ph(e,BB,"frameRateMultiplier"),k=ph(e,BB,"tickRate"),l=ph(e,BB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=ph(e,CB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new DB(f,g,h,k);l=EB(l);g=
|
|
1340
|
+
jh(e,"metadata")[0];g=(g?g.children:[]).filter(function(u){return"\n"!=u});h=jh(e,"style");e=jh(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next())(r=FB(r.value,h,n))&&k.push(r);if(gh(d,"p").length)throw new T(2,2,2001,"<p> can only be inside <div> in TTML");n=t(gh(d,"div"));for(p=n.next();!p.done;p=n.next())if(gh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=GB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),
|
|
1341
1341
|
a.push(b);return a};
|
|
1342
|
-
function GB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(
|
|
1343
|
-
[];if(!A)for(var y=t(r.children),D=y.next();!D.done;D=y.next())(D=GB(D.value,b,c,d,e,f,g,w,k,r,m,n))&&h.push(D);d=null!=l;n=
|
|
1344
|
-
if(!D&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==r.tagName)return e=new Qb(n,y,""),e.lineBreak=!0,e;b="";A&&(b=Dd(
|
|
1342
|
+
function GB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(eh(a)){if(!m)return null;var r={tagName:"span",children:[hh(a)],attributes:{},parent:null}}else r=a;for(var u=null,v=t(HB),w=v.next();!w.done&&!(u=IB(r,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=ph(r,HB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new tc(n),A=new tc(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(r.attributes["xml:space"]||(h?"default":"preserve"));A=r.children.every(eh);h=
|
|
1343
|
+
[];if(!A)for(var y=t(r.children),D=y.next();!D.done;D=y.next())(D=GB(D.value,b,c,d,e,f,g,w,k,r,m,n))&&h.push(D);d=null!=l;n=hh(r);n=r.children.length&&n&&/\S/.test(n);D=r.attributes.begin||r.attributes.end||r.attributes.dur;if(!(D||n||"br"==r.tagName||0!=h.length||d&&!w))return null;y=JB(r,c);n=y.start;for(y=y.end;p&&p.tagName&&"tt"!=p.tagName;)y=KB(p,c,n,y),n=y.start,y=y.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);
|
|
1344
|
+
if(!D&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==r.tagName)return e=new Qb(n,y,""),e.lineBreak=!0,e;b="";A&&(b=Dd(hh(r)||""),w&&(b=b.replace(/\s+/g," ")));b=new Qb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=IB(r,"region",f,"")[0];if(r.attributes.region&&k&&k.attributes["xml:id"]){var z=k.attributes["xml:id"];b.region=g.filter(function(C){return C.id==z})[0]}g=k;l&&d&&!r.attributes.region&&
|
|
1345
1345
|
!r.attributes.style&&(g=IB(l,"region",f,"")[0]);LB(b,r,g,u,v,e,a,0==h.length);return b}
|
|
1346
1346
|
function FB(a,b,c){var d=new Jb,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=MB.exec(c)||NB.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=OB(a,b,"extent");if(g){var h=(f=MB.exec(g))||NB.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Kb:0,d.heightUnits=f||null!=e?Kb:0)}if(a=OB(a,b,"origin"))if(h=(f=MB.exec(a))||NB.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
|
|
1347
1347
|
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Kb,d.height=100-d.viewportAnchorY,d.heightUnits=Kb):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Kb:0;return d}function PB(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
|
|
1348
1348
|
function LB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==QB(b,c,f,"direction",g)&&(a.direction="rtl");h=QB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Ub);(h=QB(b,c,f,"textAlign",!0))?(a.positionAlign=RB[h],a.lineAlign=SB[h],a.textAlign=ec[h.toUpperCase()]):a.textAlign=Sb;if(h=QB(b,c,f,"displayAlign",!0))a.displayAlign=fc[h.toUpperCase()];if(h=QB(b,c,f,"color",g))a.color=PB(h);if(h=QB(b,c,f,"backgroundColor",
|
|
1349
1349
|
g))a.backgroundColor=PB(h);if(h=QB(b,c,f,"border",g))a.border=h;if(h=QB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
|
|
1350
|
-
k}).join(",")}(h=QB(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=QB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=QB(b,c,f,"lineHeight",g))&&h.match(TB)&&(a.lineHeight=h);(h=QB(b,c,f,"fontSize",g))&&(h.match(TB)||h.match(UB))&&(a.fontSize=h);if(h=QB(b,c,f,"fontStyle",g))a.fontStyle=jc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=
|
|
1350
|
+
k}).join(",")}(h=QB(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=QB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=QB(b,c,f,"lineHeight",g))&&h.match(TB)&&(a.lineHeight=h);(h=QB(b,c,f,"fontSize",g))&&(h.match(TB)||h.match(UB))&&(a.fontSize=h);if(h=QB(b,c,f,"fontStyle",g))a.fontStyle=jc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=hh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
|
|
1351
1351
|
e);if(d=QB(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(TB)?a.textStrokeColor=a.color:(a.textStrokeColor=PB(d[0]),d.shift()),d[0]&&d[0].match(TB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=QB(b,c,f,"letterSpacing",g))&&d.match(TB)&&(a.letterSpacing=d);(d=QB(b,c,f,"linePadding",g))&&d.match(TB)&&(a.linePadding=d);if(d=QB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=OB(c,f,"textDecoration"))&&VB(a,d);(d=WB(b,f,"textDecoration"))&&VB(a,d);if(d=QB(b,c,f,"textCombine",g))a.textCombineUpright=
|
|
1352
1352
|
d;switch(QB(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
1353
1353
|
function VB(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Nb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Nb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1354
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Nb(a.textDecoration,"overline")}}function QB(a,b,c,d,e){e=void 0===e?!0:e;return(a=WB(a,c,d))?a:e?OB(b,c,d):null}function OB(a,b,c){if(!a)return null;var d=
|
|
1355
|
-
function XB(a,b,c){a=IB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=
|
|
1354
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Nb(a.textDecoration,"overline")}}function QB(a,b,c,d,e){e=void 0===e?!0:e;return(a=WB(a,c,d))?a:e?OB(b,c,d):null}function OB(a,b,c){if(!a)return null;var d=ph(a,CB,c);return d?d:XB(a,b,c)}function WB(a,b,c){var d=ph(a,CB,c);return d?d:XB(a,b,c)}
|
|
1355
|
+
function XB(a,b,c){a=IB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=oh(a[e],"urn:ebu:tt:style",c);f||(f=ph(a[e],CB,c));f||(f=WB(a[e],b,c));f&&(d=f)}return d}function IB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?oh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1356
1356
|
function KB(a,b,c,d){a=JB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function JB(a,b){var c=YB(a.attributes.begin,b),d=YB(a.attributes.end,b);a=YB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1357
1357
|
function YB(a,b){var c=null;if(ZB.test(a)){a=ZB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if($B.test(a))c=aC($B,a);else if(bC.test(a))c=aC(bC,a);else if(cC.test(a))a=cC.exec(a),c=Number(a[1])/b.frameRate;else if(dC.test(a))a=dC.exec(a),c=Number(a[1])/b.g;else if(eC.test(a))c=aC(eC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1358
1358
|
function aC(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function EB(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{hc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",AB);AB.prototype.parseMedia=AB.prototype.parseMedia;AB.prototype.setManifestType=AB.prototype.setManifestType;AB.prototype.setSequenceMode=AB.prototype.setSequenceMode;AB.prototype.parseInit=AB.prototype.parseInit;
|
|
1359
1359
|
function DB(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
1360
1360
|
var MB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,UB=/^(\d{1,4}(?:\.\d+)?|100)%$/,TB=/^(\d+px|\d+em|\d*\.?\d+c)$/,NB=/^(\d+)px (\d+)px$/,ZB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,$B=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,bC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,cC=/^(\d*(?:\.\d*)?)f$/,dC=/^(\d*(?:\.\d*)?)t$/,eC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),SB={left:Xb,center:"center",right:"end",start:Xb,
|
|
1361
|
-
end:"end"},RB={left:"line-left",center:"center",right:"line-right"},BB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],CB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],HB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];pe["application/ttml+xml"]=function(){return new AB};function fC(){this.g=new AB}fC.prototype.parseInit=function(a){var b=!1;(new
|
|
1362
|
-
fC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new
|
|
1361
|
+
end:"end"},RB={left:"line-left",center:"center",right:"line-right"},BB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],CB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],HB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];pe["application/ttml+xml"]=function(){return new AB};function fC(){this.g=new AB}fC.prototype.parseInit=function(a){var b=!1;(new Kg).box("moov",Pg).box("trak",Pg).box("mdia",Pg).box("minf",Pg).box("stbl",Pg).S("stsd",Rg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};fC.prototype.setSequenceMode=function(){};fC.prototype.setManifestType=function(){};
|
|
1362
|
+
fC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Kg).box("mdat",Ug(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",fC);fC.prototype.parseMedia=fC.prototype.parseMedia;fC.prototype.setManifestType=fC.prototype.setManifestType;fC.prototype.setSequenceMode=fC.prototype.setSequenceMode;fC.prototype.parseInit=fC.prototype.parseInit;pe['application/mp4; codecs="stpp"']=function(){return new fC};
|
|
1363
1363
|
pe['application/mp4; codecs="stpp.ttml"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new fC};pe['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new fC};pe['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new fC};function gC(){this.h=!1;this.g="UNKNOWN"}gC.prototype.parseInit=function(){};gC.prototype.setSequenceMode=function(a){this.h=a};gC.prototype.setManifestType=function(a){this.g=a};
|
|
1364
1364
|
gC.prototype.parseMedia=function(a,b){a=ud(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=hC(new Rp(a[1]));if(null==a)throw new T(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=
|
|
1365
1365
|
95443.7176888889,d+=8589934592;a=b.periodStart+d/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Rp(e);var f=new Jb;Up(e);Sp(e);for(var g=Up(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=
|
|
@@ -1369,17 +1369,17 @@ case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,1
|
|
|
1369
1369
|
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Rp(l[0]),g=hC(h),n=Tp(h,/[ \t]+--\x3e[ \t]+/g),k=hC(h),null==g||null==n||null==k)Ya("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;l=l.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=g,m.endTime=k,m.payload=""):m=new Qb(g,k,"");Sp(h);for(g=Up(h);g;)jC(m,g,b),Sp(h),g=Up(h);
|
|
1370
1370
|
kC(l,m,d);null!=f&&(m.id=f);f=m}f&&e.push(f)}return e};function iC(a){for(var b=t(Object.entries(hc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Qb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(ic));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Qb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1371
1371
|
function kC(a,b,c){if(a.includes("<")){0===c.size&&iC(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(lC)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
|
|
1372
|
-
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=mC(a);try{var m
|
|
1372
|
+
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=mC(a);try{var m=$g("<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=
|
|
1373
1373
|
m.next())nC(a.value,b,c);else b.payload=Dd(a);else b.payload=Dd(a)}else b.payload=Dd(a)}function mC(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function oC(a,b){return a&&0<a.length?a:b}
|
|
1374
1374
|
function nC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Jb;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=oC(g.backgroundColor,h.backgroundColor),h.color=oC(g.color,h.color),h.fontFamily=oC(g.fontFamily,h.fontFamily),h.fontSize=
|
|
1375
1375
|
oC(g.fontSize,h.fontSize),h.textShadow=oC(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=cc(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;
|
|
1376
|
-
if(!f)break;if(f=hC(new Rp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(
|
|
1376
|
+
if(!f)break;if(f=hC(new Rp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(eh(a)||1==e.length&&eh(e[0]))for(c=hh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=cc(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())nC(a.value,d,c)}
|
|
1377
1377
|
function jC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Sb:a.textAlign=ec[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1378
1378
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Rb);else if(d=/^region:(.*)$/.exec(b)){if(b=pC(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=gc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=gc[c[2].toUpperCase()])}
|
|
1379
1379
|
function pC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function hC(a){a=Tp(a,lC);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.VttTextParser",gC);gC.prototype.parseMedia=gC.prototype.parseMedia;gC.prototype.setManifestType=gC.prototype.setManifestType;gC.prototype.setSequenceMode=gC.prototype.setSequenceMode;gC.prototype.parseInit=gC.prototype.parseInit;var lC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1380
|
-
pe["text/vtt"]=function(){return new gC};pe['text/vtt; codecs="vtt"']=function(){return new gC};pe['text/vtt; codecs="wvtt"']=function(){return new gC};function qC(){this.g=null}qC.prototype.parseInit=function(a){var b=this,c=!1;(new
|
|
1381
|
-
qC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new
|
|
1382
|
-
p.value;var r=p.Kf||l,u=p.ne?c+p.ne:a;a=u+(r||0);var v=0;do{var w=m.R();v+=w;var A=m.R(),y=null;"vttc"==
|
|
1380
|
+
pe["text/vtt"]=function(){return new gC};pe['text/vtt; codecs="vtt"']=function(){return new gC};pe['text/vtt; codecs="wvtt"']=function(){return new gC};function qC(){this.g=null}qC.prototype.parseInit=function(a){var b=this,c=!1;(new Kg).box("moov",Pg).box("trak",Pg).box("mdia",Pg).S("mdhd",function(d){d=Zi(d.reader,d.version);b.g=d.timescale}).box("minf",Pg).box("stbl",Pg).S("stsd",Rg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};qC.prototype.setSequenceMode=function(){};qC.prototype.setManifestType=function(){};
|
|
1381
|
+
qC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Kg).box("moof",Pg).box("traf",Pg).S("tfdt",function(D){g=!0;c=Yi(D.reader,D.version).baseMediaDecodeTime}).S("tfhd",function(D){l=Xi(D.reader,D.flags).ad}).S("trun",function(D){h=!0;d=$i(D.reader,D.version,D.flags).Zg}).box("mdat",Ug(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Fg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1382
|
+
p.value;var r=p.Kf||l,u=p.ne?c+p.ne:a;a=u+(r||0);var v=0;do{var w=m.R();v+=w;var A=m.R(),y=null;"vttc"==Og(A)?8<w&&(y=m.rb(w-8)):m.skip(w-8);r&&y&&(w=rC(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(ye)};function rC(a,b,c){var d,e,f;(new Kg).box("payl",Ug(function(g){d=ud(g)})).box("iden",Ug(function(g){e=ud(g)})).box("sttg",Ug(function(g){f=ud(g)})).parse(a);return d?sC(d,e,f,b,c):null}
|
|
1383
1383
|
function sC(a,b,c,d,e){d=new Qb(d,e,"");kC(a,d,new Map);b&&(d.id=b);if(c)for(a=new Rp(c),b=Up(a);b;)jC(d,b,[]),Sp(a),b=Up(a);return d}S("shaka.text.Mp4VttParser",qC);qC.prototype.parseMedia=qC.prototype.parseMedia;qC.prototype.setManifestType=qC.prototype.setManifestType;qC.prototype.setSequenceMode=qC.prototype.setSequenceMode;qC.prototype.parseInit=qC.prototype.parseInit;pe['application/mp4; codecs="wvtt"']=function(){return new qC};function tC(){}tC.prototype.parseInit=function(){};tC.prototype.setSequenceMode=function(){};tC.prototype.setManifestType=function(){};tC.prototype.parseMedia=function(a){var b=ud(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Rp(c[0]),e=uC(d),f=Tp(d,/,/g);d=uC(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Qb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1384
1384
|
function uC(a){a=Tp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.SbvTextParser",tC);tC.prototype.parseMedia=tC.prototype.parseMedia;tC.prototype.setManifestType=tC.prototype.setManifestType;tC.prototype.setSequenceMode=tC.prototype.setSequenceMode;tC.prototype.parseInit=tC.prototype.parseInit;pe["text/x-subviewer"]=function(){return new tC};function vC(){this.g=new gC}vC.prototype.parseInit=function(){};vC.prototype.setSequenceMode=function(){};vC.prototype.setManifestType=function(){};vC.prototype.parseMedia=function(a,b,c){a=ud(a);a=wC(a);a=zb(Ad(a));return this.g.parseMedia(a,b,c)};
|
|
1385
1385
|
function wC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",vC);vC.srt2webvtt=wC;vC.prototype.parseMedia=vC.prototype.parseMedia;
|
|
@@ -1394,35 +1394,35 @@ var yC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,zC=/^\s*([^:]+):\s*(.*)/,AC=/\s*,\s*/,EC
|
|
|
1394
1394
|
function HC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1395
1395
|
function IC(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1396
1396
|
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function JC(a){this.i=a;this.h=0;this.g=new Map}q=JC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(je(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1397
|
-
q.transmux=function(a,b,c,d){for(var e=zb(a),f=
|
|
1397
|
+
q.transmux=function(a,b,c,d){for(var e=zb(a),f=Wi(e),g=f.length;g<e.length&&!HC(e,g);g++);a=1E3*c.endTime;f=Vi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=GC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=FC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Od+k.ca;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1398
1398
|
k.Od,g+l),size:k.ca,duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:h},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};
|
|
1399
1399
|
S("shaka.transmuxer.AacTransmuxer",JC);JC.prototype.transmux=JC.prototype.transmux;JC.prototype.getOriginalMimeType=JC.prototype.getOriginalMimeType;JC.prototype.convertCodecs=JC.prototype.convertCodecs;JC.prototype.isSupported=JC.prototype.isSupported;JC.prototype.destroy=JC.prototype.destroy;lc("audio/aac",function(){return new JC("audio/aac")},rc);function KC(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1400
1400
|
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,pa:a,ca:e}}
|
|
1401
1401
|
function LC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function MC(a){this.i=a;this.h=0;this.g=new Map}q=MC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1402
|
-
q.transmux=function(a,b,c,d){a=zb(a);for(var e=
|
|
1402
|
+
q.transmux=function(a,b,c,d){a=zb(a);for(var e=Wi(a),f=e.length;f<a.length&&!LC(a,f);f++);var g=1E3*c.endTime;e=Vi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=KC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),size:l.ca,duration:1536,
|
|
1403
1403
|
eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.ca}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,$a:[],pa:h,xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",MC);MC.prototype.transmux=MC.prototype.transmux;
|
|
1404
|
-
MC.prototype.getOriginalMimeType=MC.prototype.getOriginalMimeType;MC.prototype.convertCodecs=MC.prototype.convertCodecs;MC.prototype.isSupported=MC.prototype.isSupported;MC.prototype.destroy=MC.prototype.destroy;lc("audio/ac3",function(){return new MC("audio/ac3")},rc);function NC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new
|
|
1405
|
-
q.transmux=function(a,b,c,d){a=zb(a);for(var e=
|
|
1404
|
+
MC.prototype.getOriginalMimeType=MC.prototype.getOriginalMimeType;MC.prototype.convertCodecs=MC.prototype.convertCodecs;MC.prototype.isSupported=MC.prototype.isSupported;MC.prototype.destroy=MC.prototype.destroy;lc("audio/ac3",function(){return new MC("audio/ac3")},rc);function NC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new fj(a.subarray(b+2));hj(c,2);hj(c,3);var d=ij(c,11)+1<<1,e=ij(c,2);if(3==e){e=ij(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ij(c,2);var g=ij(c,3),h=ij(c,1);c=ij(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,pa:a,ca:d}};function OC(a){this.i=a;this.h=0;this.g=new Map}q=OC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1405
|
+
q.transmux=function(a,b,c,d){a=zb(a);for(var e=Wi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Vi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=NC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),
|
|
1406
1406
|
size:l.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.ca}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,$a:[],pa:h,xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",OC);OC.prototype.transmux=OC.prototype.transmux;
|
|
1407
|
-
OC.prototype.getOriginalMimeType=OC.prototype.getOriginalMimeType;OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;lc("audio/ec3",function(){return new OC("audio/ec3")},rc);function PC(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new
|
|
1408
|
-
|
|
1407
|
+
OC.prototype.getOriginalMimeType=OC.prototype.getOriginalMimeType;OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;lc("audio/ec3",function(){return new OC("audio/ec3")},rc);function PC(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new fj(b.data),d=nj(c);nj(c);nj(c);kj(c);if(QC.includes(d)&&(d=V(c),3===d&&hj(c,1),kj(c),kj(c),hj(c,1),mj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)mj(c)&&(6>e?oj(c,16):oj(c,64))}kj(c);d=V(c);if(0===d)V(c);else if(1===d)for(hj(c,1),kj(c),kj(c),d=V(c),e=0;e<d;e++)kj(c);kj(c);hj(c,1);var f=V(c),g=V(c),h=ij(c,1);0===h&&hj(c,1);hj(c,1);var k=0,l=0,m=0,n=0;
|
|
1408
|
+
mj(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(mj(c)&&mj(c)){var p=nj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=ij(c,16),e=ij(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,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],
|
|
1409
1409
|
k[5],255,225].concat(k,[1],b));return{height:c,width:f,xa:a,Aa:d,Ba:e}}
|
|
1410
|
-
function RC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=
|
|
1410
|
+
function RC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=pj(new fj(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?
|
|
1411
1411
|
{data:Kd.apply(Ed,x(c)),ld:b}:null}var QC=[100,110,122,244,44,83,86,118,128,138,139,134];function SC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=TC(b.fullData);a=UC(c.fullData);var f=VC(d.fullData);b=WC(b.fullData,c.fullData,d.fullData,{zf:e.zf,Xf:e.Xf,df:a.df,ef:a.ef,Ye:a.Ye,cf:a.cf,Ze:a.Ze,$e:a.$e,af:a.af,bf:a.bf,Se:a.Se,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,Xe:a.Xe,Le:a.Le,Zd:a.Zd,Je:a.Je,He:a.He,Ge:a.Ge,Cf:f.Cf});return{height:a.height,width:a.width,
|
|
1412
|
-
xa:b,Aa:a.Ui,Ba:a.Ti}}function TC(a){var b=new
|
|
1413
|
-
function UC(a){a=new
|
|
1414
|
-
V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(
|
|
1415
|
-
L+4;K++)
|
|
1416
|
-
|
|
1417
|
-
function VC(a){var b=new
|
|
1412
|
+
xa:b,Aa:a.Ui,Ba:a.Ti}}function TC(a){var b=new fj(a,!0);nj(b);nj(b);ij(b,4);ij(b,2);ij(b,6);a=ij(b,3);b=mj(b);return{zf:a+1,Xf:b}}
|
|
1413
|
+
function UC(a){a=new fj(a,!0);nj(a);nj(a);var b=0,c=0,d=0,e=0;ij(a,4);var f=ij(a,3);mj(a);for(var g=ij(a,2),h=ij(a,1),k=ij(a,5),l=nj(a),m=nj(a),n=nj(a),p=nj(a),r=nj(a),u=nj(a),v=nj(a),w=nj(a),A=nj(a),y=nj(a),D=nj(a),z=[],C=[],B=0;B<f;B++)z.push(mj(a)),C.push(mj(a));if(0<f)for(B=f;8>B;B++)ij(a,2);for(B=0;B<f;B++)z[B]&&ij(a,88),C[B]&&nj(a);V(a);z=V(a);3==z&&ij(a,1);C=V(a);B=V(a);mj(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var E=V(a),I=V(a),L=V(a);if(mj(a))for(var H=0;H<=f;H++)V(a),V(a),V(a);else V(a),
|
|
1414
|
+
V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(mj(a)&&mj(a))for(H=0;4>H;H++)for(var J=0;J<(3===H?2:6);J++)if(mj(a)){var K=Math.min(64,1<<4+(H<<1));1<H&&lj(a);for(var M=0;M<K;M++)lj(a)}else V(a);mj(a);mj(a);mj(a)&&(nj(a),V(a),V(a),mj(a));H=V(a);for(K=J=0;K<H;K++)if(M=!1,0!==K&&(M=mj(a)),M){K===H&&V(a);mj(a);V(a);for(var N=M=0;N<=J;N++){var P=mj(a),R=!1;P||(R=mj(a));(P||R)&&M++}J=M}else{N=V(a);M=V(a);J=N+M;for(P=0;P<N;P++)V(a),mj(a);for(N=0;N<M;N++)V(a),mj(a)}if(mj(a))for(H=V(a),J=0;J<H;J++){for(K=0;K<
|
|
1415
|
+
L+4;K++)ij(a,1);ij(a,1)}H=L=1;J=0;mj(a);mj(a);if(mj(a)){mj(a)&&(K=nj(a),M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<K&&16>=K?(L=M[K-1],H=N[K-1]):255===K&&(L=ij(a,16),H=ij(a,16)));mj(a)&&mj(a);mj(a)&&(ij(a,3),mj(a),mj(a)&&(nj(a),nj(a),nj(a)));mj(a)&&(V(a),V(a));mj(a);mj(a);mj(a);if(K=mj(a))V(a),V(a),V(a),V(a);if(mj(a)&&(ij(a,32),ij(a,32),mj(a)&&V(a),mj(a))){N=!1;K=mj(a);M=mj(a);if(K||M){if(N=mj(a))nj(a),ij(a,5),mj(a),ij(a,5);ij(a,4);ij(a,4);N&&
|
|
1416
|
+
ij(a,4);ij(a,5);ij(a,5);ij(a,5)}for(P=0;P<=f;P++){var Q=!0;R=1;mj(a)||(Q=mj(a));var W=!1;Q?V(a):W=mj(a);W||(R=V(a)+1);if(K){for(Q=0;Q<R;Q++)V(a),V(a),N&&(V(a),V(a));mj(a)}if(M){for(Q=0;Q<R;Q++)V(a),V(a),N&&(V(a),V(a));mj(a)}}}mj(a)&&(mj(a),mj(a),mj(a),J=V(a),V(a),V(a),V(a),V(a))}return{Ye:D,df:g,ef:h,cf:k,Ze:l,$e:m,af:n,bf:p,Se:r,Te:u,Ue:v,Ve:w,We:A,Xe:y,Zd:J,Le:0,Je:z,He:E,Ge:I,width:C-(b+c)*(1===z||2===z?2:1),height:B-(d+e)*(1===z?2:1),Ui:L,Ti:H}}
|
|
1417
|
+
function VC(a){var b=new fj(a,!0);nj(b);nj(b);V(b);V(b);mj(b);mj(b);ij(b,3);mj(b);mj(b);V(b);V(b);lj(b);mj(b);mj(b);mj(b)&&V(b);lj(b);lj(b);mj(b);mj(b);mj(b);mj(b);a=mj(b);b=mj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Cf:c}}
|
|
1418
1418
|
function WC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.df&3)<<6|(d.ef?1:0)<<5|d.cf&31;e[2]=d.Ze;e[3]=d.$e;e[4]=d.af;e[5]=d.bf;e[6]=d.Se;e[7]=d.Te;e[8]=d.Ue;e[9]=d.Ve;e[10]=d.We;e[11]=d.Xe;e[12]=d.Ye;e[13]=240|(d.Zd&3840)>>8;e[14]=d.Zd&255;e[15]=252|d.Cf&3;e[16]=252|d.Je&3;e[17]=248|d.He&7;e[18]=248|d.Ge&7;e[19]=0;e[20]=0;e[21]=(d.Le&3)<<6|(d.zf&7)<<3|(d.Xf?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&
|
|
1419
1419
|
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function XC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*YC[14*(3===c?3-d:3===d?3:4)+e-1];f=ZC[3*(3===c?0:2===c?1:2)+f];c=$C[c][d];var h=aD[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,ca:k,Si:8*c*h}}return null}
|
|
1420
1420
|
function bD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function cD(a,b){if(b+1<a.length&&bD(a,b)){var c=XC(a,b),d=4;c&&c.ca&&(d=c.ca);b+=d;return b===a.length||b+1<a.length&&bD(a,b)}return!1}
|
|
1421
1421
|
var YC=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],ZC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],$C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],aD=[0,1,1,4];function dD(a){this.i=a;this.h=0;this.g=new Map}q=dD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1422
|
-
q.transmux=function(a,b,c,d){for(var e=zb(a),f=
|
|
1422
|
+
q.transmux=function(a,b,c,d){for(var e=zb(a),f=Wi(e).length;f<e.length&&!cD(e,f);f++);var g;for(a=[];f<e.length;){var h=XC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.ca<=e.length&&a.push({data:e.subarray(f,f+h.ca),size:h.ca,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=h.ca}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Si/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1423
1423
|
duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.h,baseMediaDecodeTime:e,Ya:a},stream:b};d=new Tw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Zw(d),this.g.set(c,b));c=px(d);this.h++;b=Kd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",dD);dD.prototype.transmux=dD.prototype.transmux;dD.prototype.getOriginalMimeType=dD.prototype.getOriginalMimeType;dD.prototype.convertCodecs=dD.prototype.convertCodecs;dD.prototype.isSupported=dD.prototype.isSupported;
|
|
1424
1424
|
dD.prototype.destroy=dD.prototype.destroy;lc("audio/mpeg",function(){return new dD("audio/mpeg")},rc);function eD(a){this.h=a;this.g=null}q=eD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=je(a).split(","),c=Sd("audio",b);b=Sd("video",b);return!c||b||"mp3"!=fe(c)?!1:lb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
|
|
1425
|
-
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new
|
|
1425
|
+
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new qj;a=zb(a);a=this.g.parse(a);if("mp3"!=a.bd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Vb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=XC(a,b))?(b+d.ca<=a.length&&(c=Kd(c,a.subarray(b,b+d.ca))),b+=d.ca):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",eD);eD.prototype.transmux=eD.prototype.transmux;
|
|
1426
1426
|
eD.prototype.getOriginalMimeType=eD.prototype.getOriginalMimeType;eD.prototype.convertCodecs=eD.prototype.convertCodecs;eD.prototype.isSupported=eD.prototype.isSupported;eD.prototype.destroy=eD.prototype.destroy;lc("video/mp2t",function(){return new eD("video/mp2t")},qc);/*
|
|
1427
1427
|
@license
|
|
1428
1428
|
MSS Transmuxer
|
|
@@ -1434,28 +1434,28 @@ function gD(a){function b(){this._procFullBox();this.flags&1&&(this._procField("
|
|
|
1434
1434
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1435
1435
|
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==hD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=fD.prototype;q.destroy=function(){};
|
|
1436
1436
|
q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return lb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return lb(b)||lb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
|
|
1437
|
-
q.transmux=function(a,b,c){if(!c)return Promise.resolve(zb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.
|
|
1437
|
+
q.transmux=function(a,b,c){if(!c)return Promise.resolve(zb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.M()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1438
1438
|
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
|
|
1439
|
-
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=iD(u,"traf")+iD(h,"senc")+16);var w=zb(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.
|
|
1439
|
+
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=iD(u,"traf")+iD(h,"senc")+16);var w=zb(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function iD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",fD);fD.prototype.transmux=fD.prototype.transmux;
|
|
1440
1440
|
fD.prototype.getOriginalMimeType=fD.prototype.getOriginalMimeType;fD.prototype.convertCodecs=fD.prototype.convertCodecs;fD.prototype.isSupported=fD.prototype.isSupported;fD.prototype.destroy=fD.prototype.destroy;var hD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);lc("mss/audio/mp4",function(){return new fD("mss/audio/mp4")},rc);lc("mss/video/mp4",function(){return new fD("mss/video/mp4")},rc);function jD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=jD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1441
1441
|
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=je(c).split(",");c=Sd("audio",d);d=Sd("video",d);if(c&&(c=fe(c),!kD.includes(c))||d&&(c=fe(d),!lD.includes(c)))return!1;if(b)return lb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return lb(b)||lb(a)};
|
|
1442
1442
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=je(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return $e(c,"audio/mp4")}).map(Ze).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1443
|
-
q.transmux=function(a,b,c,d,e){var f=zb(a);if("audio"==e&&!
|
|
1444
|
-
if(!v.length)throw new T(2,3,3023,c?c.
|
|
1445
|
-
b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),xa:C.xa,Aa:C.Aa,Ba:C.Ba,data:{sb:this.g,baseMediaDecodeTime:r,Ya:p},stream:b};break;case "hvc":var B=[],E=null,I=[],L=k.
|
|
1446
|
-
P=!0;break;case 19:case 20:case 21:M=Y=P=!0;break;case 32:Y=!0;break;case 33:Y=!0;break;case 34:Y=!0;break;case 35:P=Y=!0;break;case 39:case 40:Y=!0;break;default:Y=!1}if(P&&Y){var
|
|
1447
|
-
0):9E4*(c.endTime-c.startTime);B.push({data:
|
|
1448
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Va=[],Aa,bb=null,ac=t(k.Vb()),Sa=ac.next();!Sa.done;Sa=ac.next()){var nb=Sa.value,Tb=nb.data;if(Tb){var Vc=0;Aa=GC(Tb,Vc);if(!Aa)throw new T(2,3,3018,c?c.
|
|
1449
|
-
Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Vc+=me}else Vc++}}}if(!Aa||null==bb){if(!k.
|
|
1450
|
-
duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),
|
|
1451
|
-
|
|
1452
|
-
Aa:0,Ba:0,data:{sb:this.g,baseMediaDecodeTime:BD,Ya:Ig},stream:b};break;case "ec3":for(var Pu=[],wj=0,
|
|
1453
|
-
yf++}}if(0==wj||0==
|
|
1454
|
-
re);zf?(yj||(yj=zf),re+zf.ca<=Wg.length&&Ru.push({data:Wg.subarray(re,re+zf.ca),size:zf.ca,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),re+=zf.ca):re++}}}if(!yj||null==zj)throw new T(2,3,3018,c?c.
|
|
1455
|
-
[],Aj=null,Xc=k.F;if(!Xc)throw new T(2,3,3018,c?c.
|
|
1456
|
-
0,1,2,3,4];break;case 134:Cb=[1,1,6,0,1,2,3,4,5];break;case 135:Cb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Cb=[1,1,8,0,1,2,3,4,5,6,7]}var Vu=new Uint8Array([0,Xc.channelCount,0,0,Xc.sampleRate>>>24&255,Xc.sampleRate>>>17&255,Xc.sampleRate>>>8&255,Xc.sampleRate>>>0&255,0,0].concat(x(Cb)));for(var Wu=Xc.sampleRate,Xu=t(k.Vb()),
|
|
1457
|
-
xd=Xg+2,Bj=0;255===Af[xd];)Bj+=255,xd+=1;Bj+=Af[xd];xd+=1;xd+=ED?2:0;xd+=FD?2:0;var Yu=Af.slice(xd,xd+Bj);Uu.push({data:Yu,size:Yu.byteLength,duration:960,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Xg=xd+Bj}}if(0==Vu.byteLength||null==Aj)throw new T(2,3,3018,c?c.
|
|
1458
|
-
Ba:0,data:{sb:this.g,baseMediaDecodeTime:GD,Ya:Uu},stream:b}}n&&(l.push(n),n=null)}}catch(
|
|
1443
|
+
q.transmux=function(a,b,c,d,e){var f=zb(a);if("audio"==e&&!Ej(f)){for(var g=Wi(f),h=g.length;h<f.length;h++)if(cD(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(HC(f,h))return this.h||(this.h=new JC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new qj;var k=this.j.parse(f),l=[],m=k.bd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.Hc();
|
|
1444
|
+
if(!v.length)throw new T(2,3,3023,c?c.M()[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=RC(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);p.push({data:D.data,size:D.data.byteLength,duration:z,eb:Math.round((A.pts||0)-(A.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:D.ld?2:1,ib:D.ld?0:1}})}}var C=PC(u);if(!C||null==r)throw new T(2,3,3018,c?c.M()[0]:null);b.height=C.height;
|
|
1445
|
+
b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),xa:C.xa,Aa:C.Aa,Ba:C.Ba,data:{sb:this.g,baseMediaDecodeTime:r,Ya:p},stream:b};break;case "hvc":var B=[],E=null,I=[],L=k.Hc();if(!L.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var H=0;H<L.length;H++){var J=L[H],K=J.nalus;I.push.apply(I,x(K));for(var M=!1,N=[],P=!1,R=t(K),Q=R.next();!Q.done;Q=R.next()){var W=Q.value;switch(W.type){case 1:case 0:var Y=
|
|
1446
|
+
P=!0;break;case 19:case 20:case 21:M=Y=P=!0;break;case 32:Y=!0;break;case 33:Y=!0;break;case 34:Y=!0;break;case 35:P=Y=!0;break;case 39:case 40:Y=!0;break;default:Y=!1}if(P&&Y){var wa=W.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=wa>>24&255;Fa[1]=wa>>16&255;Fa[2]=wa>>8&255;Fa[3]=wa&255;N.push(Fa);N.push(W.fullData)}}var xa=N.length?{data:Kd.apply(Ed,x(N)),ld:M}:null;if(xa){null==E&&null!=J.dts&&(E=J.dts);var Pa=void 0;Pa=H+1<L.length?(L[H+1].dts||0)-(J.dts||0):1<L.length?(J.dts||0)-(L[H-1].dts||
|
|
1447
|
+
0):9E4*(c.endTime-c.startTime);B.push({data:xa.data,size:xa.data.byteLength,duration:Pa,eb:Math.round((J.pts||0)-(J.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:xa.ld?2:1,ib:xa.ld?0:1}})}}var Za=SC(I);if(!Za||null==E)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Za.height;b.width=Za.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,$a:[],pa:new Uint8Array([]),xa:Za.xa,Aa:Za.Aa,Ba:Za.Ba,data:{sb:this.g,baseMediaDecodeTime:E,Ya:B},stream:b}}n&&
|
|
1448
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Va=[],Aa,bb=null,ac=t(k.Vb()),Sa=ac.next();!Sa.done;Sa=ac.next()){var nb=Sa.value,Tb=nb.data;if(Tb){var Vc=0;Aa=GC(Tb,Vc);if(!Aa)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Aa.sampleRate;b.channelsCount=Aa.channelCount;null==bb&&null!==nb.pts&&(bb=nb.pts);for(;Vc<Tb.length;){var vd=FC(Tb,Vc);if(vd){var me=vd.Od+vd.ca;Vc+me<=Tb.length&&Va.push({data:Tb.subarray(Vc+vd.Od,Vc+me),size:vd.ca,duration:1024,eb:0,flags:{hb:0,
|
|
1449
|
+
Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Vc+=me}else Vc++}}}if(!Aa||null==bb){if(!k.Hc().length)throw new T(2,3,3018,c?c.M()[0]:null);bb=9E4*c.startTime;var Ld=Sd("audio",b.codecs.split(","));if(!Ld||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);Aa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Ld};var pf=IC(Ld,b.channelsCount);if(!pf)throw new T(2,3,3018,c?c.M()[0]:null);for(var ne=bb+9E4*(c.endTime-c.startTime),Mi=bb;Mi<ne;)Va.push({data:pf,size:pf.byteLength,
|
|
1450
|
+
duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Mi+=1024/Aa.sampleRate*9E4}var Hg=Aa.sampleRate,Ni=bb/9E4*Hg;n={id:b.id,type:"audio",codecs:Aa.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Hg,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.g,baseMediaDecodeTime:Ni,Ya:Va},stream:b};break;case "ac3":for(var Ig=[],bc=0,Zm=new Uint8Array([]),vj=null,Ou=t(k.Vb()),$m=Ou.next();!$m.done;$m=Ou.next()){var an=$m.value,bn=an.data;null==vj&&null!==
|
|
1451
|
+
an.pts&&(vj=an.pts);for(var xf=0;xf<bn.length;){var Od=KC(bn,xf);Od?(b.audioSamplingRate=Od.sampleRate,b.channelsCount=Od.channelCount,bc=Od.sampleRate,Zm=Od.pa,Ig.push({data:bn.subarray(xf,xf+Od.ca),size:Od.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),xf+=Od.ca):xf++}}if(0==bc||0==Zm.byteLength||null==vj)throw new T(2,3,3018,c?c.M()[0]:null);var BD=vj/9E4*bc;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:bc,duration:d,$a:[],pa:Zm,xa:new Uint8Array([]),
|
|
1452
|
+
Aa:0,Ba:0,data:{sb:this.g,baseMediaDecodeTime:BD,Ya:Ig},stream:b};break;case "ec3":for(var Pu=[],wj=0,cn=new Uint8Array([]),xj=null,Qu=t(k.Vb()),dn=Qu.next();!dn.done;dn=Qu.next()){var en=dn.value,fn=en.data;null==xj&&null!==en.pts&&(xj=en.pts);for(var yf=0;yf<fn.length;){var Pd=NC(fn,yf);Pd?(b.audioSamplingRate=Pd.sampleRate,b.channelsCount=Pd.channelCount,wj=Pd.sampleRate,cn=Pd.pa,Pu.push({data:fn.subarray(yf,yf+Pd.ca),size:Pd.ca,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),yf+=Pd.ca):
|
|
1453
|
+
yf++}}if(0==wj||0==cn.byteLength||null==xj)throw new T(2,3,3018,c?c.M()[0]:null);var CD=xj/9E4*wj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wj,duration:d,$a:[],pa:cn,xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.g,baseMediaDecodeTime:CD,Ya:Pu},stream:b};break;case "mp3":for(var Ru=[],yj,zj=null,Su=t(k.Vb()),gn=Su.next();!gn.done;gn=Su.next()){var hn=gn.value,Wg=hn.data;if(Wg){null==zj&&null!==hn.pts&&(zj=hn.pts);for(var re=0;re<Wg.length;){var zf=XC(Wg,
|
|
1454
|
+
re);zf?(yj||(yj=zf),re+zf.ca<=Wg.length&&Ru.push({data:Wg.subarray(re,re+zf.ca),size:zf.ca,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),re+=zf.ca):re++}}}if(!yj||null==zj)throw new T(2,3,3018,c?c.M()[0]:null);var Tu=yj.sampleRate,DD=zj/9E4*Tu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Tu,duration:d,$a:[],pa:new Uint8Array([]),xa:new Uint8Array([]),Aa:0,Ba:0,data:{sb:this.g,baseMediaDecodeTime:DD,Ya:Ru},stream:b};break;case "opus":var Uu=
|
|
1455
|
+
[],Aj=null,Xc=k.F;if(!Xc)throw new T(2,3,3018,c?c.M()[0]:null);var Cb=[];switch(Xc.Fh){case 1:case 2:Cb=[0];break;case 0:Cb=[255,1,1,0,1];break;case 128:Cb=[255,2,0,0,1];break;case 3:Cb=[1,2,1,0,2,1];break;case 4:Cb=[1,2,2,0,1,2,3];break;case 5:Cb=[1,3,2,0,4,1,2,3];break;case 6:Cb=[1,4,2,0,4,1,2,3,5];break;case 7:Cb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Cb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Cb=[1,1,2,0,1];break;case 131:Cb=[1,1,3,0,1,2];break;case 132:Cb=[1,1,4,0,1,2,3];break;case 133:Cb=[1,1,5,
|
|
1456
|
+
0,1,2,3,4];break;case 134:Cb=[1,1,6,0,1,2,3,4,5];break;case 135:Cb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Cb=[1,1,8,0,1,2,3,4,5,6,7]}var Vu=new Uint8Array([0,Xc.channelCount,0,0,Xc.sampleRate>>>24&255,Xc.sampleRate>>>17&255,Xc.sampleRate>>>8&255,Xc.sampleRate>>>0&255,0,0].concat(x(Cb)));for(var Wu=Xc.sampleRate,Xu=t(k.Vb()),jn=Xu.next();!jn.done;jn=Xu.next()){var kn=jn.value,Af=kn.data;null==Aj&&null!==kn.pts&&(Aj=kn.pts);for(var Xg=0;Xg<Af.length;){for(var ED=0!==(Af[Xg+1]&16),FD=0!==(Af[Xg+1]&8),
|
|
1457
|
+
xd=Xg+2,Bj=0;255===Af[xd];)Bj+=255,xd+=1;Bj+=Af[xd];xd+=1;xd+=ED?2:0;xd+=FD?2:0;var Yu=Af.slice(xd,xd+Bj);Uu.push({data:Yu,size:Yu.byteLength,duration:960,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Xg=xd+Bj}}if(0==Vu.byteLength||null==Aj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Xc.sampleRate;b.channelsCount=Xc.channelCount;var GD=Aj/9E4*Wu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Wu,duration:d,$a:[],pa:Vu,xa:new Uint8Array([]),Aa:0,
|
|
1458
|
+
Ba:0,data:{sb:this.g,baseMediaDecodeTime:GD,Ya:Uu},stream:b}}n&&(l.push(n),n=null)}}catch(ln){return ln&&3023==ln.code?Promise.resolve(new Uint8Array([])):Promise.reject(ln)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Zu=new Tw(l),mn=b.id+"_"+c.i;if(this.i.has(mn))var nn=this.i.get(mn);else nn=Zw(Zu),this.i.set(mn,nn);var HD=px(Zu);this.g++;var ID=Kd(nn,HD);return Promise.resolve(ID)};S("shaka.transmuxer.TsTransmuxer",jD);jD.prototype.transmux=jD.prototype.transmux;
|
|
1459
1459
|
jD.prototype.getOriginalMimeType=jD.prototype.getOriginalMimeType;jD.prototype.convertCodecs=jD.prototype.convertCodecs;jD.prototype.isSupported=jD.prototype.isSupported;jD.prototype.destroy=jD.prototype.destroy;var kD=["aac","ac-3","ec-3","mp3","opus"],lD=["avc","hevc"];lc("video/mp2t",function(){return new jD("video/mp2t")},pc);/*
|
|
1460
1460
|
@license
|
|
1461
1461
|
EME Encryption Scheme Polyfill
|