shaka-player 4.9.19 → 4.9.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales.js +36 -36
- package/dist/shaka-player.compiled.debug.js +200 -198
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +226 -225
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +201 -199
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +269 -268
- package/dist/shaka-player.ui.map +3 -3
- package/externs/shaka/net.js +1 -0
- package/lib/dash/dash_parser.js +4 -2
- package/lib/media/adaptation_set.js +6 -0
- package/lib/media/streaming_engine.js +13 -16
- package/lib/player.js +6 -2
- package/lib/text/ui_text_displayer.js +37 -10
- package/lib/util/periods.js +1 -1
- package/lib/util/stream_utils.js +16 -8
- package/package.json +1 -1
package/dist/shaka-player.ui.js
CHANGED
|
@@ -49,14 +49,14 @@ var Qa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;
|
|
|
49
49
|
ea("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});ea("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Na(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});
|
|
50
50
|
ea("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});ea("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
|
|
51
51
|
ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push([d,b[d]]);return c}});var Ra=this||self;
|
|
52
|
-
function
|
|
52
|
+
function Q(a,b){a=a.split(".");var c=Ra;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
|
|
53
53
|
@license
|
|
54
54
|
Shaka Player
|
|
55
55
|
Copyright 2016 Google LLC
|
|
56
56
|
SPDX-License-Identifier: Apache-2.0
|
|
57
57
|
*/
|
|
58
58
|
function Sa(){}function Ta(){};function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
59
|
-
function Ua(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};
|
|
59
|
+
function Ua(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};Q("shaka.util.FakeEvent",S);
|
|
60
60
|
var Va={Kk:"abrstatuschanged",Lk:"adaptation",Mk:"buffering",Nk:"complete",Ok:"downloadfailed",Pk:"downloadheadersreceived",Qk:"drmsessionupdate",Sk:"emsg",ol:"prft",Error:"error",Tk:"expirationupdated",Uk:"firstquartile",Vk:"gapjumped",Yk:"keystatuschanged",$k:"loaded",al:"loading",fl:"manifestparsed",hl:"manifestupdated",il:"mediaqualitychanged",Metadata:"metadata",jl:"midpoint",kl:"nospatialvideoinfo",ll:"onstatechange",rl:"ratechange",ul:"segmentappended",vl:"sessiondata",wl:"spatialvideoinfo",
|
|
61
61
|
xl:"stalldetected",yl:"started",zl:"statechanged",Al:"streaming",Bl:"textchanged",Cl:"texttrackvisibility",Dl:"thirdquartile",El:"timelineregionadded",Fl:"timelineregionenter",Gl:"timelineregionexit",Hl:"trackschanged",Jl:"unloading",Ll:"variantchanged"};function Wa(){}function Xa(){}function Ya(){}function Za(a){var b=Ka.apply(1,arguments);ab.has(a)||(ab.add(a),Ya.apply(Wa,x(b)))}function bb(){}function cb(){}function eb(){}var ab=new Set;window.console&&(Ya=function(){return console.warn.apply(console,x(Ka.apply(0,arguments)))},Xa=function(){console.error.apply(console,x(Ka.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.Aa=new fb;this.vf=this}gb.prototype.addEventListener=function(a,b){this.Aa&&this.Aa.push(a,b)};gb.prototype.removeEventListener=function(a,b){this.Aa&&this.Aa.remove(a,b)};gb.prototype.dispatchEvent=function(a){if(!this.Aa)return!0;var b=this.Aa.get(a.type)||[],c=this.Aa.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.vf;a.currentTarget=this.vf;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
62
62
|
gb.prototype.release=function(){this.Aa=null};function hb(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 ib(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function jb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function kb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
|
|
@@ -78,7 +78,7 @@ function Bb(a){if(!a.ab&&(a.ab={},a.Nd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.l
|
|
|
78
78
|
q.set=function(a,b){Bb(this);this.g=null;this.ab.hasOwnProperty(a)?this.ab[a]=[b]:this.add(a,b);return this};q.get=function(a){Bb(this);return this.ab[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.ab)return"";var a=[],b;for(b in this.ab)for(var c=encodeURIComponent(b),d=this.ab[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
79
79
|
q.clone=function(){var a=new sb;a.g=this.g;if(this.ab){var b={},c;for(c in this.ab)b[c]=this.ab[c].concat();a.ab=b;a.Nd=this.Nd}return a};function Db(){}function Eb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Fb(a)==Fb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Gb(a);b=Gb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Fb(a){return a instanceof ArrayBuffer?a:a.buffer}function Ib(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
80
80
|
function Gb(a,b,c){c=void 0===c?Infinity:c;return Jb(a,void 0===b?0:b,c,Uint8Array)}function Kb(a,b,c){c=void 0===c?Infinity:c;return Jb(a,void 0===b?0:b,c,Uint16Array)}function Lb(a,b,c){c=void 0===c?Infinity:c;return Jb(a,void 0===b?0:b,c,DataView)}function Jb(a,b,c,d){var e=Fb(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
|
|
81
|
-
|
|
81
|
+
Q("shaka.util.BufferUtils",Db);Db.toDataView=Lb;Db.toUint16=Kb;Db.toUint8=Gb;Db.toArrayBuffer=Ib;Db.equal=Eb;function U(a,b,c){var d=Ka.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Mb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}U.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};Q("shaka.util.Error",U);var Mb=!0;U.Severity={RECOVERABLE:1,CRITICAL:2};U.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
82
82
|
U.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
83
83
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
|
|
84
84
|
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
|
|
@@ -90,7 +90,7 @@ CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:90
|
|
|
90
90
|
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 Nb(a){this.h=a;this.g=void 0}Nb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Ob(a,b){return a.length&&b.length&&a!==b?0<Pb(a,b).length:!0}
|
|
91
91
|
function Pb(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
92
92
|
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
|
|
93
|
-
function Qb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Rb=new Nb(function(){return Ib(new Uint8Array([0]))}),Sb=new Map;function Tb(a){this.h=a;this.g=null}Tb.prototype.V=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Tb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Ub(a){this.h=a;this.g=null}Ub.prototype.Pa=function(){this.stop();this.h();return this};Ub.prototype.V=function(a){var b=this;this.stop();this.g=(new Tb(function(){b.h()})).V(a);return this};Ub.prototype.za=function(a){var b=this;this.stop();this.g=(new Tb(function(){b.g.V(a);b.h()})).V(a);return this};Ub.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};
|
|
93
|
+
function Qb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Rb=new Nb(function(){return Ib(new Uint8Array([0]))}),Sb=new Map;function Tb(a){this.h=a;this.g=null}Tb.prototype.V=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Tb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Ub(a){this.h=a;this.g=null}Ub.prototype.Pa=function(){this.stop();this.h();return this};Ub.prototype.V=function(a){var b=this;this.stop();this.g=(new Tb(function(){b.h()})).V(a);return this};Ub.prototype.za=function(a){var b=this;this.stop();this.g=(new Tb(function(){b.g.V(a);b.h()})).V(a);return this};Ub.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};Q("shaka.util.Timer",Ub);Ub.prototype.stop=Ub.prototype.stop;Ub.prototype.tickEvery=Ub.prototype.za;
|
|
94
94
|
Ub.prototype.tickAfter=Ub.prototype.V;Ub.prototype.tickNow=Ub.prototype.Pa;function Vb(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Wb(a){return""!=Xb().canPlayType(a)}function Yb(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Zb(){return $b("Xbox One")}function ac(){return $b("Tizen")}function bc(){return $b("Tizen 3")}function cc(){return $b("Tizen 2")}function dc(){return $b("Web0S")}function ec(){return dc()&&38===fc()}function gc(){return $b("CrKey")}
|
|
95
95
|
function fc(){if(!$b("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function hc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!ac()&&!$b("PC=EOS")&&!$b("PC=APL")&&!$b("VirginMedia")&&!ic()&&!jc()&&!$b("AFT")&&!$b("WPE")&&!$b("DT_STB_BCM")}function kc(){return $b("PlayStation 5")}function jc(){return $b("PlayStation 4")}function lc(){return $b("Hisense")||$b("VIDAA")}
|
|
96
96
|
function ic(){return $b("SOPOpenBrowser")}function mc(){if(!hc())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 nc(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1}function oc(){return $b("Android")}
|
|
@@ -107,16 +107,16 @@ function wc(a){if(!a)return"";a=Gb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.suba
|
|
|
107
107
|
function xc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Lb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return yc(d)}
|
|
108
108
|
function zc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Gb(a);if(239==c[0]&&187==c[1]&&191==c[2])return wc(c);if(254==c[0]&&255==c[1])return xc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return xc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return xc(a,!1);if(0==c[1]&&0==c[3])return xc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return wc(a);throw new U(2,2,2003);}
|
|
109
109
|
function Ac(a){if(window.TextEncoder&&!jc()){var b=new TextEncoder;return Ib(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 Ib(b)}function Bc(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 yc(a){return Cc.value()(a)}
|
|
110
|
-
function Dc(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||""}
|
|
110
|
+
function Dc(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||""}Q("shaka.util.StringUtils",vc);vc.resetFromCharCode=function(){Cc.g=void 0};
|
|
111
111
|
vc.toUTF16=Bc;vc.toUTF8=Ac;vc.fromBytesAutoDetect=zc;vc.fromUTF16=xc;vc.fromUTF8=wc;var Cc=new Nb(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={dc:65536};0<b.dc;b={dc:b.dc},b.dc/=2)if(a(b.dc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.dc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.dc));return e}}(b);return null});function Ec(){}function Fc(a){a=yc(Gb(a));return btoa(a)}function Gc(a,b){b=void 0==b?!0:b;a=Fc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Hc(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 Ic(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}
|
|
112
|
-
function Jc(a){var b=Gb(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 Kc(){for(var a=Ka.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(Gb(e),c);c+=e.byteLength}return b}
|
|
112
|
+
function Jc(a){var b=Gb(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 Kc(){for(var a=Ka.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(Gb(e),c);c+=e.byteLength}return b}Q("shaka.util.Uint8ArrayUtils",Ec);Ec.concat=Kc;Ec.toHex=Jc;Ec.fromHex=Ic;Ec.fromBase64=Hc;Ec.toBase64=Gc;Ec.toStandardBase64=Fc;function Lc(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new mb(a[0]);b=new mb(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new mb(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new mb(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
113
113
|
function Mc(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
|
|
114
114
|
function Nc(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Gc(Ic(h),!1));var l=g;22!=l.length&&(l=Gc(Ic(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:Gb(Ac(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
115
115
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Oc(a,b){if(1==b.length)return b[0];a=Pc(a,b);if(null!=a)return a;throw new U(2,4,4025,b);}function Pc(a,b){for(var c=t(Qc[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==Sc?"":null}
|
|
116
116
|
function Tc(a,b){var c=[];a=t(Qc[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 Sc="text",Uc={sa:"video",aa:"audio",Ga:Sc,Of:"image",Ik:"application"},Qc={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 Vc(){}function Wc(a,b){a=Xc(a);b=Xc(b);return a.split("-")[0]==b.split("-")[0]}function Yc(a,b){a=Xc(a);b=Xc(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Zc(a,b){a=Xc(a);b=Xc(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
|
|
117
117
|
function Xc(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=$c.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function bd(a,b){var c=dd(a),d=dd(b);return a!=c&&b!=d&&c==d}function ed(a,b){a=Xc(a);b=Xc(b);return b==a?4:Yc(b,a)?3:Zc(b,a)?2:Yc(a,b)?1:0}
|
|
118
118
|
function dd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=$c.get(a)||a}function fd(a){return a.language?Xc(a.language):a.audio&&a.audio.language?Xc(a.audio.language):a.video&&a.video.language?Xc(a.video.language):"und"}
|
|
119
|
-
function gd(a,b){a=Xc(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(Xc(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Yc(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Zc(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Yc(a,b))return b;return null}
|
|
119
|
+
function gd(a,b){a=Xc(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(Xc(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Yc(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Zc(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Yc(a,b))return b;return null}Q("shaka.util.LanguageUtils",Vc);Vc.findClosestLocale=gd;Vc.getLocaleForVariant=fd;
|
|
120
120
|
Vc.getLocaleForText=function(a){return Xc(a.language||"und")};Vc.getBase=dd;Vc.relatedness=ed;Vc.areSiblings=bd;Vc.normalize=Xc;Vc.isSiblingOf=Zc;Vc.isParentOf=Yc;Vc.areLanguageCompatible=Wc;Vc.areLocaleCompatible=function(a,b){a=Xc(a);b=Xc(b);return a==b};
|
|
121
121
|
var $c=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
|
|
122
122
|
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
@@ -128,32 +128,32 @@ q.vh=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a
|
|
|
128
128
|
q.Ka=function(a,b,c){a=Xc(a);void 0===c&&(c=jd);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=jd||d.set(f,e)});this.h.set(a,d);id(this);this.dispatchEvent(new S("locale-updated"));return this};q.ik=function(a){for(var b=t(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new S("unknown-localization",a));return""};
|
|
129
129
|
q.Zi=function(){return this.g};
|
|
130
130
|
function id(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=t(d),h=g.next();!h.done;f={Vc:f.Vc},h=g.next()){f.Vc=h.value;e.add(f.Vc);e.add(dd(f.Vc));h=kb(b.keys(),function(l){return function(m){return bd(m,l.Vc)}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=kb(b.keys(),function(l){return function(m){return dd(m)==l.Vc}}(f));h.sort();k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=t(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
131
|
-
c.reverse();a.i.clear();b=t(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,kd(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new S("missing-localizations",d)))}function kd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}
|
|
131
|
+
c.reverse();a.i.clear();b=t(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,kd(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new S("missing-localizations",d)))}function kd(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}Q("shaka.ui.Localization",hd);hd.prototype.getCurrentLocales=hd.prototype.Zi;
|
|
132
132
|
hd.prototype.resolve=hd.prototype.resolve;hd.prototype.resolveDictionary=hd.prototype.ik;hd.prototype.insert=hd.prototype.Ka;hd.prototype.changeLocale=hd.prototype.vh;hd.prototype.release=hd.prototype.release;var jd=1;hd.ConflictResolution={USE_OLD:0,USE_NEW:jd};hd.UNKNOWN_LOCALES="unknown-locales";hd.UNKNOWN_LOCALIZATION="unknown-localization";hd.MISSING_LOCALIZATIONS="missing-localizations";hd.LOCALE_CHANGED="locale-changed";hd.LOCALE_UPDATED="locale-updated";function ld(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ld.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function md(a){return a.h/(1-Math.pow(a.g,a.i))};function nd(){this.h=new ld(2);this.j=new ld(5);this.g=0;this.i=128E3;this.l=16E3}nd.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};nd.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};nd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(md(this.h),md(this.j))};function od(){this.g=new fb}q=od.prototype;q.release=function(){this.qb();this.g=null};q.s=function(a,b,c,d){this.g&&(a=new pd(a,b,c,d),this.g.push(b,a))};q.oa=function(a,b,c,d){function e(g){f.Xa(a,b,e);c(g)}var f=this;this.s(a,b,e,d)};q.Xa=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Xa(),this.g.remove(b,e))}};
|
|
133
|
-
q.qb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Xa();this.g.g={}}};
|
|
133
|
+
q.qb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Xa();this.g.g={}}};Q("shaka.util.EventManager",od);od.prototype.removeAll=od.prototype.qb;od.prototype.unlisten=od.prototype.Xa;od.prototype.listenOnce=od.prototype.oa;od.prototype.listen=od.prototype.s;od.prototype.release=od.prototype.release;function pd(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qd(a,d);this.target.addEventListener(b,c,this.g)}
|
|
134
134
|
pd.prototype.Xa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function qd(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return rd(a)?b:b.capture||!1}
|
|
135
|
-
function rd(a){var b=sd;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}sd=b}return b||!1}var sd=void 0;function td(a){if(ud.has(a))return ud.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);ud.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),ud.set(a,b),b):!1}function vd(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var ud=new Map;function wd(a,b){this.g=a;this.h=b}wd.prototype.toString=function(){return"v"+this.g+"."+this.h};function xd(a,b){var c=new wd(5,0),d=yd,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function zd(a,b,c,d){Ya([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ad(a,b,c,d){Xa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var yd=null;function Bd(){}Bd.prototype.extract=function(){};Bd.prototype.decode=function(){return[]};Bd.prototype.clear=function(){};Bd.prototype.getStreams=function(){return[]};function Cd(){}Cd.prototype.init=function(){};Cd.prototype.parse=function(){return[]};function Dd(){}Dd.prototype.init=function(){};Dd.prototype.i=function(){};Dd.prototype.g=function(){};Dd.prototype.j=function(){};
|
|
136
|
-
Ed.prototype.g=function(){this.h.clear()};Ed.prototype.j=function(){return this.h.getStreams()};
|
|
135
|
+
function rd(a){var b=sd;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}sd=b}return b||!1}var sd=void 0;function td(a){if(ud.has(a))return ud.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);ud.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),ud.set(a,b),b):!1}function vd(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var ud=new Map;function wd(a,b){this.g=a;this.h=b}wd.prototype.toString=function(){return"v"+this.g+"."+this.h};function xd(a,b){var c=new wd(5,0),d=yd,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function zd(a,b,c,d){Ya([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ad(a,b,c,d){Xa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var yd=null;function Bd(){}Bd.prototype.extract=function(){};Bd.prototype.decode=function(){return[]};Bd.prototype.clear=function(){};Bd.prototype.getStreams=function(){return[]};function Cd(){}Cd.prototype.init=function(){};Cd.prototype.parse=function(){return[]};function Dd(){}Dd.prototype.init=function(){};Dd.prototype.i=function(){};Dd.prototype.g=function(){};Dd.prototype.j=function(){};Q("shaka.media.IClosedCaptionParser",Dd);function Ed(a){this.l=new Cd;if(a=Hd[a.toLowerCase()])this.l=a();this.h=new Bd;if(a=Jd)this.h=a()}Ed.prototype.init=function(a,b){void 0!==b&&b||(this.g(),this.l.init(a))};Ed.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Gb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
136
|
+
Ed.prototype.g=function(){this.h.clear()};Ed.prototype.j=function(){return this.h.getStreams()};Q("shaka.media.ClosedCaptionParser",Ed);Ed.findDecoder=function(){return Jd};Ed.unregisterDecoder=function(){Jd=null};Ed.registerDecoder=function(a){Jd=a};Ed.findParser=function(a){return Hd[a]};Ed.unregisterParser=function(a){delete Hd[a]};Ed.registerParser=function(a,b){Hd[a]=b};var Hd={},Jd=null;function Kd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ld;this.scroll=Md}Q("shaka.text.CueRegion",Kd);var Ld=1;Kd.units={PX:0,PERCENTAGE:Ld,LINES:2};var Md="";Kd.scrollMode={NONE:Md,UP:"up"};function Nd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Od(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Pd(a,b,c){c||(c=Nd);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Bf:d.Bf},e=a.next()){d.Bf=e.value;e=b.findIndex(function(f){return function(g){return c(f.Bf,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
137
137
|
function Qd(a,b,c){c||(c=Nd);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Rd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kd;this.position=null;this.positionAlign=Sd;this.size=0;this.textAlign=Td;this.direction=Ud;this.writingMode=Vd;this.lineInterpretation=Wd;this.line=null;this.lineHeight="";this.lineAlign=Xd;this.displayAlign=Yd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Zd;this.fontStyle=be;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
138
138
|
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={wc:32,rows:15}}function ce(a,b){a=new Rd(a,b,"");a.lineBreak=!0;return a}Rd.prototype.clone=function(){var a=new Rd(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
139
|
-
function de(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Qd(a.nestedCues,b.nestedCues,de))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Qd(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
|
|
139
|
+
function de(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Qd(a.nestedCues,b.nestedCues,de))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Qd(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}Q("shaka.text.Cue",Rd);Rd.equal=de;Rd.prototype.clone=Rd.prototype.clone;var Sd="auto";
|
|
140
140
|
Rd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Sd};var Td="center",ee={LEFT:"left",RIGHT:"right",CENTER:Td,START:"start",END:"end"};Rd.textAlign=ee;var Yd="after",fe={BEFORE:"before",CENTER:"center",AFTER:Yd};Rd.displayAlign=fe;var Ud="ltr";Rd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ud,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Vd="horizontal-tb";Rd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Vd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Wd=0;
|
|
141
141
|
Rd.lineInterpretation={LINE_NUMBER:Wd,PERCENTAGE:1};var Xd="start",ge={CENTER:"center",START:Xd,END:"end"};Rd.lineAlign=ge;var he={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Rd.defaultTextColor=he;var ie={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Rd.defaultTextBackgroundColor=ie;var Zd=400;Rd.fontWeight={NORMAL:Zd,BOLD:700};
|
|
142
|
-
var be="normal",je={NORMAL:be,ITALIC:"italic",OBLIQUE:"oblique"};Rd.fontStyle=je;Rd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function ke(){}ke.prototype.destroy=function(){};function le(a,b,c){me[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,ef:b}}function ne(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([oe,pe,qe,re]),e=d.next();!e.done;e=d.next())if(e=me[c+"-"+e.value]){var f=e.ef(),g=f.isSupported(a,b);f.destroy();if(g)return e.ef}return null}
|
|
142
|
+
var be="normal",je={NORMAL:be,ITALIC:"italic",OBLIQUE:"oblique"};Rd.fontStyle=je;Rd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function ke(){}ke.prototype.destroy=function(){};function le(a,b,c){me[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,ef:b}}function ne(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([oe,pe,qe,re]),e=d.next();!e.done;e=d.next())if(e=me[c+"-"+e.value]){var f=e.ef(),g=f.isSupported(a,b);f.destroy();if(g)return e.ef}return null}Q("shaka.transmuxer.TransmuxerEngine",ke);ke.findTransmuxer=ne;ke.unregisterTransmuxer=function(a,b){delete me[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
143
143
|
ke.registerTransmuxer=le;ke.prototype.destroy=ke.prototype.destroy;var me={},re=1,qe=2,pe=3,oe=4;ke.PluginPriority={FALLBACK:re,PREFERRED_SECONDARY:qe,PREFERRED:pe,APPLICATION:oe};function se(){}function te(a,b){var c=a;b&&!ue.includes(a)&&(c+='; codecs="'+b+'"');return c}function ve(a,b){b&&(a+='; codecs="'+b+'"');return a}function we(a,b,c){var d=te(a,b);b=ve(a,b);ne(b)?(a=ne(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
144
|
-
function xe(a,b,c){var d=[b];
|
|
145
|
-
function
|
|
144
|
+
function xe(a,b,c){var d=[b];ye.forEach(function(e,f){var g=a[f];"codecs"==f?ue.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]}
|
|
145
|
+
function Fe(a){var b=He(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
146
146
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function Ie(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=He(c.value),b.push(c[0]);return b.sort().join(",")}function Je(a){return a.split(";")[0]}
|
|
147
|
-
function Ke(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Le(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function He(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
|
|
148
|
-
var
|
|
147
|
+
function Ke(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Le(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function He(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}Q("shaka.util.MimeUtils",se);se.getFullTypeWithAllCodecs=ve;se.getFullType=te;
|
|
148
|
+
var ye=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),ue=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Me(a){this.i=null;this.j=a;this.F=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.o=new Map}function Ne(a){return Oe[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Jd:!1}Me.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
149
149
|
function Pe(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return E(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Gb(b)),p.return();f=a.F?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Gb(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);F(p)})}
|
|
150
150
|
Me.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return E(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));F(d)})};function Qe(a,b,c){a.l=b;a.m=c}function Re(a,b,c){a.G=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
151
151
|
function Se(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Se(a,d.value,c)}
|
|
152
152
|
function Te(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Se(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.G&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
153
|
-
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}
|
|
153
|
+
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}Q("shaka.text.TextEngine",Me);Me.prototype.destroy=Me.prototype.destroy;Me.findParser=function(a){return Oe[a]};Me.unregisterParser=function(a){delete Oe[a]};Me.registerParser=function(a,b){Oe[a]=b};var Oe={};function Ue(a,b){return a.concat(b)}function Ve(){}function We(a){return null!=a};function Xe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer instanceof ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){}
|
|
154
154
|
function $e(a,b,c,d){var e=a.variants;if(b.length||c.length)e=af(e,b,c);if(d.length){b=new fb;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var w=[],A={};v=t(v);for(var y=v.next();!y.done;A={Jd:A.Jd},y=v.next())A.Jd=y.value,y=d.filter(function(C){return function(z){return C.Jd.decodingInfos[0][z]}}(A)).length,y>u?(u=y,w=[A.Jd]):y==u&&w.push(A.Jd);f.push.apply(f,x(w))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
|
|
155
|
-
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=
|
|
156
|
-
e.set(k,l)}c=Array.from(b).sort(function(u,v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=vd();var r=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=
|
|
155
|
+
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Fe(m.codecs),p=Fe(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);
|
|
156
|
+
e.set(k,l)}c=Array.from(b).sort(function(u,v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=vd();var r=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Fe(m.codecs),p=Fe(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),r.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Fe(m.codecs),p=Fe(g.codecs),n!=p||g.bandwidth&&
|
|
157
157
|
m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),r.push(g.id)))}else l.push(g),r.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!r.includes(u.id)?!1:!0})}
|
|
158
158
|
function af(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={If:d.If},e=b.next())if(d.If=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.If)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={zf:d.zf},b=c.next())if(d.zf=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.zf)}}(d)),b.length){a=b;break}return a}function bf(a,b,c){a.variants=a.variants.filter(function(d){return cf(d,b,c)})}
|
|
159
159
|
function cf(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
|
|
@@ -171,8 +171,8 @@ function sf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMime
|
|
|
171
171
|
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=Je(l),l=nf(Ke(l),k),k=we(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
|
|
172
172
|
k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(var p=g.next();!p.done;p=g.next())f=p.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=
|
|
173
173
|
n.next();!m.done;m=n.next()){m=Object.assign({},m.value);var r=c.get(k),u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};r=t(r);for(p=r.next();!p.done;p=r.next()){p=p.value;if(p.initData&&p.initData.length){for(var v=new Set,w=t(p.initData),A=w.next();!A.done;A=w.next())v.add(A.value.initDataType);u.initDataType=p.initData[0].initDataType}p.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");p.persistentStateRequired&&(u.persistentState=
|
|
174
|
-
"required");p.sessionType&&(u.sessionTypes=[p.sessionType]);d&&(u.audio?(u.audio.encryptionScheme=u.audio.encryptionScheme||p.encryptionScheme,u.audio.robustness=u.audio.robustness||p.audioRobustness):u.audio={
|
|
175
|
-
robustness:p.videoRobustness},""==u.video.robustness&&delete u.video.robustness)}m.keySystemConfiguration=u;l.push(m)}a.push(l)}return a}function nf(a,b){return"flac"==a.toLowerCase()?mc()?"fLaC":"flac":"opus"===a.toLowerCase()?mc()?"mp4"==Ee(b)?"Opus":"opus":"opus":a}
|
|
174
|
+
"required");p.sessionType&&(u.sessionTypes=[p.sessionType]);d&&(u.audio?(p.encryptionScheme&&(u.audio.encryptionScheme=u.audio.encryptionScheme||p.encryptionScheme),u.audio.robustness=u.audio.robustness||p.audioRobustness):(u.audio={robustness:p.audioRobustness},p.encryptionScheme&&(u.audio.encryptionScheme=p.encryptionScheme)),""==u.audio.robustness&&delete u.audio.robustness);e&&(u.video?(p.encryptionScheme&&(u.video.encryptionScheme=u.video.encryptionScheme||p.encryptionScheme),u.video.robustness=
|
|
175
|
+
u.video.robustness||p.videoRobustness):(u.video={robustness:p.videoRobustness},p.encryptionScheme&&(u.video.encryptionScheme=p.encryptionScheme)),""==u.video.robustness&&delete u.video.robustness)}m.keySystemConfiguration=u;l.push(m)}a.push(l)}return a}function nf(a,b){return"flac"==a.toLowerCase()?mc()?"fLaC":"flac":"opus"===a.toLowerCase()?mc()?"mp4"==Ee(b)?"Opus":"opus":"opus":a}
|
|
176
176
|
function mf(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function gf(a){a.textStreams=a.textStreams.filter(function(b){b=te(b.mimeType,b.codecs);return Ne(b)})}
|
|
177
177
|
function hf(a){var b,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(tf.has(f)){l.B(5);break}g=uf.get(f);if(!g){tf.set(f,!1);l.B(5);break}return E(l,vf(g),7);case 7:h=l.h,tf.set(f,h);case 5:(k=tf.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,F(l)}})}
|
|
178
178
|
function vf(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
|
|
@@ -188,18 +188,18 @@ function Bf(a){var b=Cf(a);b.active="disabled"!=a.mode;b.type="text";b.originalT
|
|
|
188
188
|
function Cf(a){var b=a.language;return{id:zf(a),active:!1,type:"",bandwidth:0,language:Xc(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,
|
|
189
189
|
originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function Ef(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function Ff(a){return a.filter(function(b){return Ef(b)})}
|
|
190
190
|
function Gf(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=gd(Xc(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Xc(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Hf(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Ue,[]);return a.length?
|
|
191
|
-
Hf(e,a[0]):e}function Hf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function lf(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
|
|
191
|
+
Hf(e,a[0]):e}function Hf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function lf(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}Q("shaka.util.StreamUtils",Ze);Ze.meetsRestrictions=cf;
|
|
192
192
|
var qf={},Af=0,tf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),uf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function If(){var a=this;this.A=null;this.m=!1;this.i=new nd;this.H=new od;navigator.connection&&navigator.connection.addEventListener&&this.H.s(navigator.connection,"change",function(){if(a.m&&a.g.useNetworkInformation){a.i=new nd;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.u=[];this.F=1;this.I=!1;this.h=this.o=this.g=this.j=null;this.G=new Ub(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
193
193
|
b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.l=null}q=If.prototype;q.stop=function(){this.A=null;this.m=!1;this.u=[];this.F=1;this.o=this.j=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop();this.l=null};q.release=function(){this.H.release();this.G=null};q.init=function(a){this.A=a};
|
|
194
194
|
q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.o.clientHeight*d);c=Math.min(c,this.o.clientWidth*d)}var e=this.u.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||
|
|
195
195
|
(e=this.u);d=e;a&&e.length!=this.u.length&&(d=this.u.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=Jf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Kf(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Jf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Jf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=
|
|
196
196
|
0;d<a.length;d++){e=a[d];for(var f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.j=Date.now();return c};q.enable=function(){this.m=!0};q.disable=function(){this.m=!1};
|
|
197
197
|
q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.j&&this.m&&Lf(this))};q.trySuggestStreams=function(){null!=this.j&&this.m&&Lf(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.l?this.l.getBandwidthEstimate(a):a};q.setVariants=function(a){this.u=a};
|
|
198
|
-
q.playbackRateChanged=function(a){this.F=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.G.V(
|
|
198
|
+
q.playbackRateChanged=function(a){this.F=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.G.V(Mf)}),this.h.observe(this.o))};q.setCmsdManager=function(a){this.l=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
199
199
|
function Lf(a){if(!a.I){var b=a.i;if(!(b.g>=b.i))return;a.I=!0;a.j-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.j<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Jf(a,b,c,d,e){if(a.l){var f=a.l.Ih();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return cf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
200
|
-
function Kf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}
|
|
201
|
-
If.prototype.getBandwidthEstimate=If.prototype.getBandwidthEstimate;If.prototype.trySuggestStreams=If.prototype.trySuggestStreams;If.prototype.segmentDownloaded=If.prototype.segmentDownloaded;If.prototype.disable=If.prototype.disable;If.prototype.enable=If.prototype.enable;If.prototype.chooseVariant=If.prototype.chooseVariant;If.prototype.init=If.prototype.init;If.prototype.release=If.prototype.release;If.prototype.stop=If.prototype.stop;var
|
|
202
|
-
function Sf(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!Tf(e,f)||!Uf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Tf(a,b))&&Uf(a.roles,b.roles)));return d?!1:!0}Rf.prototype.values=function(){return this.g.values()};
|
|
200
|
+
function Kf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}Q("shaka.abr.SimpleAbrManager",If);If.prototype.configure=If.prototype.configure;If.prototype.setCmsdManager=If.prototype.setCmsdManager;If.prototype.setMediaElement=If.prototype.setMediaElement;If.prototype.playbackRateChanged=If.prototype.playbackRateChanged;If.prototype.setVariants=If.prototype.setVariants;
|
|
201
|
+
If.prototype.getBandwidthEstimate=If.prototype.getBandwidthEstimate;If.prototype.trySuggestStreams=If.prototype.trySuggestStreams;If.prototype.segmentDownloaded=If.prototype.segmentDownloaded;If.prototype.disable=If.prototype.disable;If.prototype.enable=If.prototype.enable;If.prototype.chooseVariant=If.prototype.chooseVariant;If.prototype.init=If.prototype.init;If.prototype.release=If.prototype.release;If.prototype.stop=If.prototype.stop;var Mf=1;Q("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});Q("shaka.config.CodecSwitchingStrategy",{ql:"reload",Bi:"smooth"});function Rf(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)}Rf.prototype.add=function(a,b,c){return Sf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
202
|
+
function Sf(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||c&&!Tf(e,f)||!Uf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Tf(a,b))&&Uf(a.roles,b.roles)));return d?!1:!0}Rf.prototype.values=function(){return this.g.values()};
|
|
203
203
|
function Tf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Ie(d)});b=b.codecs.split(",").map(function(d){return Ie(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Uf(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Vf(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Wf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Vf.prototype.create=function(a){var b=this,c="smooth"==this.h&&vd(),d=a.filter(function(e){return Sf(b.i,e,!c,b.g)});return d.length?new Rf(d[0],d,!c,this.g):this.j.create(a)};
|
|
204
204
|
function Wf(a,b,c,d,e,f,g,h,k,l){this.u=a;this.A=b;this.h=c;this.i=d;this.F=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.o=void 0===l?!1:l}
|
|
205
205
|
Wf.prototype.create=function(a){var b=[];b=Xf(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Yf(b,this.A);a.length&&(b=a);this.l&&(a=Zf(b,this.l),a.length&&(b=a));this.i&&(a=$f(b,this.i),a.length&&(b=a));this.h&&(a=ag(b,this.h),a.length&&(b=a));this.g&&(a=bg(b,this.g),a.length&&(b=a));this.j&&(a=cg(b,this.j),a.length&&(b=a));a=dg(b,this.F);a.length&&(b=a);return new Rf(b[0],b,!("smooth"==this.m&&vd()),this.o)};
|
|
@@ -208,26 +208,26 @@ function ag(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCou
|
|
|
208
208
|
function kg(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 U(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 E(d,new Promise(function(e){(new Ub(e)).V(c/1E3)}),2)}a.h*=a.m;F(d)})}function jg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function lg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}lg.prototype.resolve=function(){};lg.prototype.reject=function(){};function mg(a,b){this.promise=a;this.i=b;this.g=!1}function ng(a){return new mg(Promise.reject(a),function(){return Promise.resolve()})}function og(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new mg(a,function(){return Promise.resolve()})}function pg(a){return new mg(Promise.resolve(a),function(){return Promise.resolve()})}function qg(a){return new mg(a,function(){return a.catch(function(){})})}mg.prototype.abort=function(){this.g=!0;return this.i()};
|
|
209
209
|
function rg(a){return new mg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}mg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
210
210
|
mg.prototype.Qa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=sg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new lg,g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new mg(f,function(){return d()})};
|
|
211
|
-
function sg(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()}}}
|
|
211
|
+
function sg(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()}}}Q("shaka.util.AbortableOperation",mg);mg.prototype.chain=mg.prototype.Qa;mg.prototype["finally"]=mg.prototype.finally;mg.all=rg;mg.prototype.abort=mg.prototype.abort;mg.notAbortable=qg;mg.completed=pg;mg.aborted=og;mg.failed=ng;function tg(){this.g=[]}function ug(a,b){a.g.push(b.finally(function(){Od(a.g,b)}))}tg.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 vg(a,b,c,d,e,f){gb.call(this);this.i=!1;this.m=new tg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.F=d||null;this.H=e||null;this.G=f||null;this.o=this.u=!1}oa(vg,gb);q=vg.prototype;q.Zg=function(a){this.u=a};q.$g=function(a){this.o=a};function wg(a,b,c,d){c=c||xg;var e=yg[a];if(!e||c>=e.priority)yg[a]={priority:c,ef:b,Xj:void 0===d?!1:d}}
|
|
212
212
|
function zg(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(d=a.next();!d.done;d=a.next())b.h.add(d.value)}q.$j=function(a){this.g.add(a)};q.Dk=function(a){this.g.delete(a)};q.Li=function(){this.g.clear()};q.bk=function(a){this.h.add(a)};q.Ek=function(a){this.h.delete(a)};q.Mi=function(){this.h.clear()};
|
|
213
213
|
function Ag(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();gb.prototype.release.call(this);return this.m.destroy()};
|
|
214
214
|
q.request=function(a,b,c){var d=this,e=new Bg;if(this.i){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new Cg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xe(b.retryParameters):jg();b.uris=Xe(b.uris);f=Dg(this,a,b,c);var g=f.Qa(function(){return Eg(d,a,b,c,new ig(b.retryParameters,!1),0,null,e)}),h=g.Qa(function(p){return Fg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
215
215
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Qa(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.Bj||!d.l||u.fromCache||"HEAD"==b.method||a!=Gg||d.l(u.timeMs,u.data.byteLength,Hg(c));d.G&&d.G(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new Cg(n.promise,function(){return n.abort()},e);ug(this.m,f);return f};
|
|
216
216
|
function Dg(a,b,c,d){function e(h){f=f.Qa(function(){c.body&&(c.body=Ib(c.body));return h(b,c,d)})}var f=pg(void 0);a.F&&e(a.F);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Qa(void 0,function(h){if(h instanceof U&&7001==h.code)throw h;throw new U(2,1,1006,h);})}
|
|
217
217
|
function Eg(a,b,c,d,e,f,g,h){a.u&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new mb(c.uris[f]),l=k.Sb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),nb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=yg[l])?l.ef:null;if(!n)return ng(new U(2,1,1E3,k));var p=l.Xj,r=null,u=null,v=!1,w=!1,A;return qg(kg(e)).Qa(function(){if(a.i)return og();A=Date.now();var y=0;c.requestStartTime=Date.now();
|
|
218
|
-
var C=n(c.uris[f],c,b,function(D,K,
|
|
218
|
+
var C=n(c.uris[f],c,b,function(D,K,G){r&&r.stop();u&&u.V(B/1E3);a.l&&b==Gg&&(y++,c.packetNumber=y,a.l(D,K,Hg(d),c),m=!0,h.g=G)},function(D){a.j&&a.j(D,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return C;var z=c.retryParameters.connectionTimeout;z&&(r=new Ub(function(){v=!0;C.abort()}),r.V(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Ub(function(){v=!0;C.abort()}));return C}).Qa(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var C={response:y,
|
|
219
219
|
Bj:m};!w&&a.j&&a.j(y.headers,c,b);return C},function(y){r&&r.stop();u&&u.stop();if(a.A){var C=null,z=0;y instanceof U&&(C=y,1001==y.code&&(z=y.data[1]));a.A(c,C,z,v)}if(a.i)return og();v&&(y=new U(1,1,1003,c.uris[f],b));if(y instanceof U){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return C=(new Map).set("error",y),C=new S("retry",C),a.dispatchEvent(C),f=(f+1)%c.uris.length,Eg(a,b,c,d,e,f,y,h)}throw y;})}
|
|
220
|
-
function Fg(a,b,c,d){var e=pg(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ff:f.Ff},g=a.next())f.Ff=g.value,e=e.Qa(function(h){return function(){var k=c.response;k.data&&(k.data=Ib(k.data));return h.Ff(b,k,d)}}(f));return e.Qa(function(){return c},function(h){var k=2;if(h instanceof U){if(7001==h.code)throw h;k=h.severity}throw new U(k,1,1007,h);})}function Hg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.ge)return!1}return!0}
|
|
220
|
+
function Fg(a,b,c,d){var e=pg(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ff:f.Ff},g=a.next())f.Ff=g.value,e=e.Qa(function(h){return function(){var k=c.response;k.data&&(k.data=Ib(k.data));return h.Ff(b,k,d)}}(f));return e.Qa(function(){return c},function(h){var k=2;if(h instanceof U){if(7001==h.code)throw h;k=h.severity}throw new U(k,1,1007,h);})}function Hg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.ge)return!1}return!0}Q("shaka.net.NetworkingEngine",vg);
|
|
221
221
|
vg.prototype.request=vg.prototype.request;vg.prototype.destroy=vg.prototype.destroy;vg.makeRequest=Ag;vg.defaultRetryParameters=function(){return jg()};vg.prototype.clearAllResponseFilters=vg.prototype.Mi;vg.prototype.unregisterResponseFilter=vg.prototype.Ek;vg.prototype.registerResponseFilter=vg.prototype.bk;vg.prototype.clearAllRequestFilters=vg.prototype.Li;vg.prototype.unregisterRequestFilter=vg.prototype.Dk;vg.prototype.registerRequestFilter=vg.prototype.$j;vg.unregisterScheme=function(a){delete yg[a]};
|
|
222
222
|
vg.registerScheme=wg;vg.prototype.setForceHTTPS=vg.prototype.$g;vg.prototype.setForceHTTP=vg.prototype.Zg;function Bg(){this.g=0}vg.NumBytesRemainingClass=Bg;function Cg(a,b,c){mg.call(this,a,b);this.h=c}oa(Cg,mg);vg.PendingRequest=Cg;var Gg=1;vg.RequestType={MANIFEST:0,SEGMENT:Gg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};vg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var xg=3;
|
|
223
223
|
vg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:xg};var yg={};function Ig(a){this.g=!1;this.h=new lg;this.i=a}Ig.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Jg(a,b){if(a.g){if(b instanceof U&&7003==b.code)throw b;throw new U(2,7,7003,b);}};function Kg(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Lg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Mg(a,b){this.h=Lb(a);this.i=b==Ng;this.g=0}q=Mg.prototype;q.Ca=function(){return this.g<this.h.byteLength};q.Ja=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.Y=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Og();}};q.wa=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Og();}};q.T=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Og();}};
|
|
224
224
|
q.Xh=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Og();}};q.md=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Og();}if(2097151<b)throw new U(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Hb=function(a){if(this.g+a>this.h.byteLength)throw Og();var b=Gb(this.h,this.g,a);this.g+=a;return b};
|
|
225
|
-
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Og();this.g+=a};q.jk=function(a){if(this.g<a)throw Og();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Og();this.g=a};q.Kc=function(){for(var a=this.g;this.Ca()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Gb(this.h,a,this.g-a);this.g+=1;return wc(a)};function Og(){return new U(2,3,3E3)}
|
|
225
|
+
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Og();this.g+=a};q.jk=function(a){if(this.g<a)throw Og();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Og();this.g=a};q.Kc=function(){for(var a=this.g;this.Ca()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Gb(this.h,a,this.g-a);this.g+=1;return wc(a)};function Og(){return new U(2,3,3E3)}Q("shaka.util.DataViewReader",Mg);Mg.prototype.readTerminatedString=Mg.prototype.Kc;Mg.prototype.seek=Mg.prototype.seek;Mg.prototype.rewind=Mg.prototype.jk;
|
|
226
226
|
Mg.prototype.skip=Mg.prototype.skip;Mg.prototype.readBytes=Mg.prototype.Hb;Mg.prototype.readUint64=Mg.prototype.md;Mg.prototype.readInt32=Mg.prototype.Xh;Mg.prototype.readUint32=Mg.prototype.T;Mg.prototype.readUint16=Mg.prototype.wa;Mg.prototype.readUint8=Mg.prototype.Y;Mg.prototype.getLength=Mg.prototype.getLength;Mg.prototype.getPosition=Mg.prototype.Ja;Mg.prototype.hasMoreData=Mg.prototype.Ca;var Ng=1;Mg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ng};function Pg(){this.i=[];this.h=[];this.g=!1}q=Pg.prototype;q.box=function(a,b){a=Qg(a);this.i[a]=Rg;this.h[a]=b;return this};q.W=function(a,b){a=Qg(a);this.i[a]=Sg;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Mg(a,0);for(this.g=!1;a.Ca()&&!this.g;)this.kd(0,a,b,c)};
|
|
227
227
|
q.kd=function(a,b,c,d){var e=b.Ja();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.T(),g=b.T(),h=Tg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ja()+8>b.getLength()){this.g=!0;return}f=b.md();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Sg){if(d&&b.Ja()+4>b.getLength()){this.g=!0;return}n=b.T();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Ja(),b=0<d?b.Hb(d):new Uint8Array(0),b=new Mg(b,0),l({name:h,parser:this,
|
|
228
228
|
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ja(),b.getLength()-b.Ja()))}};function Ug(a){for(var b=Vg(a);a.reader.Ca()&&!a.parser.g;)a.parser.kd(a.start+b,a.reader,a.partialOkay)}function Wg(a){for(var b=Vg(a),c=a.reader.T(),d=0;d<c&&(a.parser.kd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Xg(a){var b=Vg(a);for(a.reader.skip(78);a.reader.Ca()&&!a.parser.g;)a.parser.kd(a.start+b,a.reader,a.partialOkay)}
|
|
229
229
|
function Yg(a){var b=Vg(a);a.reader.skip(8);var c=a.reader.wa();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Ca()&&!a.parser.g;)a.parser.kd(a.start+b,a.reader,a.partialOkay)}function Zg(a){return function(b){a(b.reader.Hb(b.reader.getLength()-b.reader.Ja()))}}function Qg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Tg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
230
|
-
function Vg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}
|
|
230
|
+
function Vg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}Q("shaka.util.Mp4Parser",Pg);Pg.headerSize=Vg;Pg.typeToString=Tg;Pg.allData=Zg;Pg.audioSampleEntry=Yg;Pg.visualSampleEntry=Xg;Pg.sampleDescription=Wg;Pg.children=Ug;Pg.prototype.parseNext=Pg.prototype.kd;Pg.prototype.parse=Pg.prototype.parse;Pg.prototype.stop=Pg.prototype.stop;Pg.prototype.fullBox=Pg.prototype.W;Pg.prototype.box=Pg.prototype.box;var Rg=0,Sg=1;function $g(a){var b=this;this.g=[];this.h=[];this.data=[];(new Pg).box("moov",Ug).box("moof",Ug).W("pssh",function(c){if(!(1<c.version)){var d=Gb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Jc(c.reader.Hb(16)));if(0<c.version){d=c.reader.T();for(var e=0;e<d;e++){var f=Jc(c.reader.Hb(16));b.h.push(f)}}}}).parse(a)}
|
|
231
231
|
function ah(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Lb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Ic(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
232
232
|
@license
|
|
233
233
|
tXml
|
|
@@ -262,9 +262,9 @@ function ai(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return
|
|
|
262
262
|
function Zh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Eb(c,e.value.initData))return}0<a.i.size&&fi(a)&&(a.l.resolve(),a.l=new lg,a.l.catch(function(){}));gi(a,b,c,a.g.sessionType)}}function hi(a){a=a.i.keys();a=hb(a,function(b){return b.sessionId});return Array.from(a)}
|
|
263
263
|
q.pg=function(){var a=this,b=this.i.keys();b=hb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Qd=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.Ke=function(){return Lg(this.ea)};
|
|
264
264
|
function Sh(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=ii(a,c,d);y.B(2);break}return E(y,ji(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new U(2,6,6001);Jg(a.j);ta(y,4);a.J.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.J.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.J.add(r.contentType.toLowerCase());if(c.length){var C=
|
|
265
|
-
f.keySystem;var z=d.get(f.keySystem);var B=[],D=[],K=[],
|
|
266
|
-
for(B=z.next();!B.done;B=z.next())B=B.value,B.distinctiveIdentifierRequired&&(C.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(C.persistentStateRequired=B.persistentStateRequired);z=C}else z=f.keySystem,C=b.get(f.keySystem),B=[],D=[],K=[],
|
|
267
|
-
sessionType:C.sessionTypes[0]||"temporary",audioRobustness:(C.audioCapabilities?C.audioCapabilities[0].robustness:"")||"",videoRobustness:(C.videoCapabilities?C.videoCapabilities[0].robustness:"")||"",serverCertificate:
|
|
265
|
+
f.keySystem;var z=d.get(f.keySystem);var B=[],D=[],K=[],G=[],I=[],J=new Set;ki(z,B,D,G,K,I,J);var H=a.R?"persistent-license":"temporary";C={keySystem:C,encryptionScheme:B[0],licenseServerUri:D[0],distinctiveIdentifierRequired:z[0].distinctiveIdentifierRequired,persistentStateRequired:z[0].persistentStateRequired,sessionType:z[0].sessionType||H,audioRobustness:z[0].audioRobustness||"",videoRobustness:z[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:K[0],initData:I,keyIds:J};z=t(z);
|
|
266
|
+
for(B=z.next();!B.done;B=z.next())B=B.value,B.distinctiveIdentifierRequired&&(C.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(C.persistentStateRequired=B.persistentStateRequired);z=C}else z=f.keySystem,C=b.get(f.keySystem),B=[],D=[],K=[],G=[],I=[],J=new Set,ki(C.drmInfos,B,D,G,K,I,J),z={keySystem:z,encryptionScheme:B[0],licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==C.distinctiveIdentifier,persistentStateRequired:"required"==C.persistentState,
|
|
267
|
+
sessionType:C.sessionTypes[0]||"temporary",audioRobustness:(C.audioCapabilities?C.audioCapabilities[0].robustness:"")||"",videoRobustness:(C.videoCapabilities?C.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:K[0],initData:I,keyIds:J};a.g=z;if(!a.g.licenseServerUri)throw new U(2,6,6012,a.g.keySystem);return E(y,f.createMediaKeys(),6);case 6:u=y.h;Jg(a.j);a.u=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.u)){y.B(7);break}ta(y,8);return E(y,a.u.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
|
|
268
268
|
10);case 10:v=y.h;if("usable"!=v)throw new U(2,6,6018);Jg(a.j);va(y,7,4);break;case 8:w=wa(y,4);if(w instanceof U)throw w;throw new U(2,6,6019,w.message);case 7:return a.ba=!0,E(y,bi(a),11);case 11:Jg(a.j);va(y,0);break;case 4:A=wa(y);Jg(a.j,A);a.g=null;a.J.clear();if(A instanceof U)throw A;throw new U(2,6,6002,A.message);}})}
|
|
269
269
|
function ii(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Vh(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new U(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Ef:d.Ef},e=a.next())for(d.Ef=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
270
270
|
l.Ef}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
@@ -281,13 +281,13 @@ p=new U(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.Bb&&d.Bb.reject(p)):(d&&d.Bb&&d.Bb.
|
|
|
281
281
|
mi(a,d));F(w)}})}
|
|
282
282
|
function oi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Qb(a.g.keySystem)&&16==g.byteLength&&(Yb()||jc())){h=Lb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Jc(g).slice(0,32);a.X.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Bb&&(a.i.delete(b),b.close().catch(function(){}));fi(a)&&
|
|
283
283
|
(a.l.resolve(),a.N.V(pi))}function Kh(a){var b=a.X,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new U(2,6,6014));a.G.bf(Lg(c))}
|
|
284
|
-
function qi(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
285
|
-
{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(
|
|
286
|
-
!1,bc()&&(
|
|
287
|
-
F(Fa)}})};m=function(
|
|
288
|
-
E(Ja,l(
|
|
289
|
-
la.h,R=T.keySystemAccess,E(la,l(
|
|
290
|
-
|
|
284
|
+
function qi(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I;return O(function(J){if(1==J.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
|
|
285
|
+
{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(H,L){var N,M,P,T,R,la,ra,Ca;return O(function(Fa){switch(Fa.g){case 1:return ta(Fa,2),E(Fa,L.createMediaKeys(),4);case 4:va(Fa,3);break;case 2:return wa(Fa),Fa.return();case 3:M=(N=L.getConfiguration().sessionTypes)?N.includes("persistent-license"):
|
|
286
|
+
!1,bc()&&(M=!1),P=L.getConfiguration().videoCapabilities,T=L.getConfiguration().audioCapabilities,R={persistentState:M,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(H)&&k.get(H)?R=k.get(H):k.set(H,R),(la=P[0].encryptionScheme)&&!R.encryptionSchemes.includes(la)&&R.encryptionSchemes.push(la),(ra=P[0].robustness)&&!R.videoRobustnessLevels.includes(ra)&&R.videoRobustnessLevels.push(ra),(Ca=T[0].robustness)&&!R.audioRobustnessLevels.includes(Ca)&&R.audioRobustnessLevels.push(Ca),
|
|
287
|
+
F(Fa)}})};m=function(H,L,N,M){var P,T,R,la,ra,Ca,Fa,Ia,Pa;return O(function(Ja){switch(Ja.g){case 1:ta(Ja,2);P=Xe(g);T=t(P.videoCapabilities);for(R=T.next();!R.done;R=T.next())la=R.value,la.encryptionScheme=L,la.robustness=N;ra=t(P.audioCapabilities);for(R=ra.next();!R.done;R=ra.next())Ca=R.value,Ca.encryptionScheme=L,Ca.robustness=M;Fa=Xe(P);Fa.persistentState="required";Fa.sessionTypes=["persistent-license"];Ia=[Fa,P];return E(Ja,navigator.requestMediaKeySystemAccess(H,Ia),4);case 4:return Pa=Ja.h,
|
|
288
|
+
E(Ja,l(H,Pa),5);case 5:va(Ja,0);break;case 2:wa(Ja),F(Ja)}})};n=function(H,L,N,M){var P,T,R;return O(function(la){switch(la.g){case 1:return ta(la,2),P={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:H,video:{encryptionScheme:L,robustness:N},audio:{encryptionScheme:L,robustness:M}}},E(la,navigator.mediaCapabilities.decodingInfo(P),4);case 4:return T=
|
|
289
|
+
la.h,R=T.keySystemAccess,E(la,l(H,R),5);case 5:va(la,0);break;case 2:wa(la),F(la)}})};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,C=t(a),r=C.next();!r.done;r=C.next())z=r.value,"org.w3.clearkey"===z&&mc()||(v.push(m(z,y,"","")),v.push(n(z,y,"","")));B=t(a);for(r=B.next();!r.done;r=B.next())for(D=r.value,K=t(d[D]||[]),G=K.next();!G.done;G=K.next())I=G.value,v.push(m(D,null,I,"")),v.push(m(D,null,"",I)),v.push(n(D,null,
|
|
290
|
+
I,"")),v.push(n(D,null,"",I));return E(J,Promise.all(v),2)}return J.return(Lg(k))})}function ri(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Ub(e)).V(si)}),ta(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);wa(c);F(c)})}
|
|
291
291
|
function Nh(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return E(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 ta(g,2),a.ha||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,ri(e),5):E(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);F(g)})})),0)})}function Vh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
292
292
|
function Lh(a){a.i.forEach(function(b,c){var d=b.Lg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Lg=e)})}function fi(a){a=a.i.values();return ib(a,function(b){return b.loaded})}function ei(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.X.get(c.value))return!1;return!0}
|
|
293
293
|
function Uh(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)}
|
|
@@ -304,16 +304,16 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
304
304
|
function ti(a,b,c){this.h=a;this.i=b;this.g=c}function ui(a,b){return O(function(c){if(1==c.g)return E(c,ef(a.g,b,a.h.drm.preferredKeySystems),2);$e(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(Ef))throw new U(2,4,4032);return c.return(vi(a,b))})}
|
|
305
305
|
function vi(a,b){var c=df(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.u)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,wi(a,d.keySystem,f.video),wi(a,d.keySystem,f.audio);xi(a,b)}return c}function wi(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,Zh(a.g,e.initDataType,e.initData)}}}
|
|
306
306
|
function xi(a,b){a=a.g?a.g.Ke():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?yi.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 U(2,4,4012,a);}var yi=["output-restricted","internal-error"];function zi(){}function Ai(a,b){if(b){var c=Bi[b.toLowerCase()];if(c)return c}throw new U(2,4,4E3,a,b);}
|
|
307
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var yi=["output-restricted","internal-error"];function zi(){}function Ai(a,b){if(b){var c=Bi[b.toLowerCase()];if(c)return c}throw new U(2,4,4E3,a,b);}Q("shaka.media.ManifestParser",zi);zi.unregisterParserByMime=function(a){delete Bi[a]};zi.registerParserByMime=function(a,b){Bi[a]=b};zi.registerParserByExtension=function(){xd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};zi.AccessibilityPurpose={Kl:"visually impaired",Wk:"hard of hearing"};var Bi={};function Ci(a,b){function c(){f=!0}function d(m){h.push(m);Ug(m)}var e=a=Gb(a),f=!1,g,h=[],k=[];(new Pg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).W("stsd",function(m){g=m;h.push(m);Wg(m)}).W("encv",c).W("enca",c).W("dvav",function(m){k.push({box:m,zb:1701733238})}).W("dva1",function(m){k.push({box:m,zb:1701733238})}).W("dvh1",function(m){k.push({box:m,zb:1701733238})}).W("dvhe",function(m){k.push({box:m,zb:1701733238})}).W("hev1",function(m){k.push({box:m,zb:1701733238})}).W("hvc1",
|
|
308
308
|
function(m){k.push({box:m,zb:1701733238})}).W("avc1",function(m){k.push({box:m,zb:1701733238})}).W("avc3",function(m){k.push({box:m,zb:1701733238})}).W("ac-3",function(m){k.push({box:m,zb:1701733217})}).W("ec-3",function(m){k.push({box:m,zb:1701733217})}).W("ac-4",function(m){k.push({box:m,zb:1701733217})}).W("mp4a",function(m){k.push({box:m,zb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw eb(Jc(a)),new U(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
|
|
309
309
|
e=Di(e,g,l.box,h,l.zb);return Yb()&&nc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
310
310
|
function Di(a,b,c,d,e){var f=Ei.value(),g=a.subarray(c.start,c.start+c.size),h=Lb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Lb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Fi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Zb()||Yb()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Fi(e,d.start,d.size+k.byteLength);k=Lb(e,b.start);b=Vg(b);
|
|
311
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Fi(a,b,c){a=Lb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Ei=new Nb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Gi(a,b,c,d,e,f,g){this.P=a;this.Wa=b;this.Da=c;this.Ig=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}Gi.prototype.Pb=function(){return this.Wa};Gi.prototype.Nb=function(){return this.Da};Gi.prototype.Td=function(){return this.g};function Hi(a,b){return a===b?!0:a&&b?a.Pb()==b.Pb()&&a.Nb()==b.Nb()&&Qd(a.P().sort(),b.P().sort())&&Eb(a.Td(),b.Td()):a==b}
|
|
311
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Fi(a,b,c){a=Lb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Ei=new Nb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Gi(a,b,c,d,e,f,g){this.P=a;this.Wa=b;this.Da=c;this.Ig=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}Gi.prototype.Pb=function(){return this.Wa};Gi.prototype.Nb=function(){return this.Da};Gi.prototype.Td=function(){return this.g};function Hi(a,b){return a===b?!0:a&&b?a.Pb()==b.Pb()&&a.Nb()==b.Nb()&&Qd(a.P().sort(),b.P().sort())&&Eb(a.Td(),b.Td()):a==b}Q("shaka.media.InitSegmentReference",Gi);
|
|
312
312
|
Gi.prototype.getEndByte=Gi.prototype.Nb;Gi.prototype.getStartByte=Gi.prototype.Pb;
|
|
313
313
|
function Ii(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?Ji:r;this.startTime=a;this.j=this.endTime=b;this.G=c;this.Wa=d;this.Da=e;this.ra=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.u=null;this.i=0;this.o=void 0===v?!1:v;this.Te=this.ge=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
314
314
|
a.next())b.value.Sh();this.o&&this.g.length&&this.g[this.g.length-1].Rh();this.F=this.mimeType=this.codecs=null}q=Ii.prototype;q.P=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.aj=function(){return this.endTime};q.Pb=function(){return this.Wa};q.Nb=function(){return this.Da};q.uj=function(){return this.tilesLayout};q.tj=function(){return this.A};q.Bc=function(){return this.status};q.Rj=function(){this.status=Ki};q.Hg=function(){this.preload=!0};q.Jj=function(){return this.preload};
|
|
315
315
|
q.Ve=function(){this.l=!1};q.Gj=function(){return this.l};q.Sh=function(){this.ge=!0};q.Ij=function(){return this.ge};q.Rh=function(){this.Te=!0};q.Hj=function(){return this.Te};q.Qh=function(){this.m=!0};q.Cj=function(){return this.m};q.ji=function(a){this.u=a};q.sj=function(){return this.u};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.fh=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.zk=function(a){this.F=a};q.Td=function(){return this.F};function Li(a,b){a.ra=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Li(c.value,b)}
|
|
316
|
+
q.fh=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.zk=function(a){this.F=a};q.Td=function(){return this.F};function Li(a,b){a.ra=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Li(c.value,b)}Q("shaka.media.SegmentReference",Ii);Ii.prototype.getSegmentData=Ii.prototype.Td;Ii.prototype.setSegmentData=Ii.prototype.zk;Ii.prototype.syncAgainst=Ii.prototype.fh;Ii.prototype.offset=Ii.prototype.offset;
|
|
317
317
|
Ii.prototype.getThumbnailSprite=Ii.prototype.sj;Ii.prototype.setThumbnailSprite=Ii.prototype.ji;Ii.prototype.hasByterangeOptimization=Ii.prototype.Cj;Ii.prototype.markAsByterangeOptimization=Ii.prototype.Qh;Ii.prototype.isLastPartial=Ii.prototype.Hj;Ii.prototype.markAsLastPartial=Ii.prototype.Rh;Ii.prototype.isPartial=Ii.prototype.Ij;Ii.prototype.markAsPartial=Ii.prototype.Sh;Ii.prototype.isIndependent=Ii.prototype.Gj;Ii.prototype.markAsNonIndependent=Ii.prototype.Ve;Ii.prototype.isPreload=Ii.prototype.Jj;
|
|
318
318
|
Ii.prototype.markAsPreload=Ii.prototype.Hg;Ii.prototype.markAsUnavailable=Ii.prototype.Rj;Ii.prototype.getStatus=Ii.prototype.Bc;Ii.prototype.getTileDuration=Ii.prototype.tj;Ii.prototype.getTilesLayout=Ii.prototype.uj;Ii.prototype.getEndByte=Ii.prototype.Nb;Ii.prototype.getStartByte=Ii.prototype.Pb;Ii.prototype.getEndTime=Ii.prototype.aj;Ii.prototype.getStartTime=Ii.prototype.getStartTime;Ii.prototype.getUris=Ii.prototype.P;var Ji=0,Ki=1;Ii.Status={Jk:Ji,Il:Ki,cl:2};function Mi(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ni(a){return!a||Mi(a)?null:a.length?a.end(a.length-1):null}function Oi(a,b){return!a||!a.length||Mi(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Pi(a,b){if(!a||!a.length||Mi(a))return 0;var c=0;a=t(Qi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
319
319
|
function Ri(a,b,c){if(!a||!a.length||Mi(a))return null;a=Qi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Qi(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};/*
|
|
@@ -326,7 +326,7 @@ function Si(){}function Ti(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&5
|
|
|
326
326
|
function Wi(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=wc(Gb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=wc(Gb(a.data,3+c,f)),h;"--\x3e"===d?h=wc(Gb(a.data,4+c+f)):h=Ib(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=wc(Gb(a.data,1,d));a=wc(Gb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=wc(Gb(a.data,1,d));a=wc(Gb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=wc(Gb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
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=Ib(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=wc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=wc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ib(a.data),b):null}
|
|
329
|
-
function Xi(a){for(var b=0,c=[];Ti(a,b);){var d=Vi(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=Vi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Wi(e))&&c.push(f);b+=e.size+10}Ui(a,b)&&(b+=10)}return c}function Yi(a,b){for(var c=b=void 0===b?0:b,d=0;Ti(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Vi(a,b+6),Ui(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}
|
|
329
|
+
function Xi(a){for(var b=0,c=[];Ti(a,b);){var d=Vi(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=Vi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Wi(e))&&c.push(f);b+=e.size+10}Ui(a,b)&&(b+=10)}return c}function Yi(a,b){for(var c=b=void 0===b?0:b,d=0;Ti(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Vi(a,b+6),Ui(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}Q("shaka.util.Id3Utils",Si);Si.getID3Data=Yi;
|
|
330
330
|
Si.getID3Frames=Xi;function Zi(a,b){var c=null,d=null,e=null,f=a.T();b&1&&(e=a.md());b&2&&a.skip(4);b&8&&(c=a.T());b&16&&(d=a.T());return{trackId:f,Od:c,Ge:d,Ml:e}}function $i(a,b){return 1==b?(b=a.T(),a=a.T(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.T()}}function aj(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.T();a.skip(4);a=a.wa();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
331
331
|
function bj(a,b,c){var d=a.T(),e=[],f=null;c&1&&(f=a.T());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Sg:null,sampleSize:null,kf:null};c&256&&(h.Sg=a.T());c&512&&(h.sampleSize=a.T());c&1024&&a.skip(4);c&2048&&(h.kf=0==b?a.T():a.Xh());e.push(h)}return{Ql:d,$h:e,Pi:f}}function cj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.wa();a.skip(2);a.skip(2);a.skip(2);a=a.wa()+a.wa()/65536;return{channelCount:b,sampleRate:a}}function dj(a){a=a.T();return{cb:Tg(a)}}
|
|
332
332
|
function ej(a){var b=null,c=null,d=a.Hb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.wa()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.wa();a.wa();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,pe:c}}
|
|
@@ -348,7 +348,7 @@ function fj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
|
|
|
348
348
|
*/
|
|
349
349
|
function hj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Gb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function ij(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Mg(c,0)).T(),a.g=8*d,a.i-=d)}function jj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;ij(a)}a.h<<=b;a.g-=b}
|
|
350
350
|
function kj(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&&ij(a);c=b-c;return 0<c?d<<c|kj(a,c):d}function lj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;ij(a);return b+lj(a)}function mj(a){jj(a,1+lj(a))}function V(a){var b=lj(a);return kj(a,b+1)-1}function nj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function oj(a){return 1===kj(a,1)}function sj(a){return kj(a,8)}
|
|
351
|
-
function tj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=nj(a),d=(c+d+256)%256),c=0===d?c:d}function uj(a){sj(a);V(a);return V(a)}
|
|
351
|
+
function tj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=nj(a),d=(c+d+256)%256),c=0===d?c:d}function uj(a){sj(a);V(a);return V(a)}Q("shaka.util.ExpGolomb",hj);function vj(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.A=this.F=null;this.i=[];this.h=[];this.G=null;this.l=[];this.H=this.o=this.u=null}q=vj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
352
352
|
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,wj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Qe:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
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=yc(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
|
|
354
354
|
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.H={channelCount:0===(u&15)?2:u&15,Ki: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.Qe&&(g.Qe=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");
|
|
@@ -366,10 +366,10 @@ function Aj(a){var b={height:null,width:null,cb:null};a=a.Oe();if(!a.length)retu
|
|
|
366
366
|
n=0;oj(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.cb="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
367
|
function zj(a){var b={height:null,width:null,cb:null};a=a.Oe();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new hj(a.fullData,!0);sj(c);sj(c);kj(c,4);var d=kj(c,3);oj(c);var e=kj(c,2),f=kj(c,1),g=kj(c,5),h=kj(c,32);a=sj(c);for(var k=sj(c),l=sj(c),m=sj(c),n=sj(c),p=sj(c),r=sj(c),u=[],v=[],w=0;w<d;w++)u.push(oj(c)),v.push(oj(c));if(0<d)for(w=d;8>w;w++)kj(c,2);for(w=0;w<d;w++)u[w]&&kj(c,88),v[w]&&sj(c);V(c);d=V(c);3==d&&kj(c,1);u=V(c);v=V(c);var A=w=0,y=0,C=0;oj(c)&&
|
|
368
368
|
(w+=V(c),A+=V(c),y+=V(c),C+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(y+C)*(1===d?2:1));c=function(z){for(var B=0,D=0;32>D;D++)B|=(z>>D&1)<<31-D;return B>>>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());a&&(e+="."+
|
|
369
|
-
a.toString(16).toUpperCase());b.cb=e;return b}function yj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Cj(a){return 0>wj(a)?!1:!0}function wj(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}
|
|
369
|
+
a.toString(16).toUpperCase());b.cb=e;return b}function yj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Cj(a){return 0>wj(a)?!1:!0}function wj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}Q("shaka.util.TsParser",vj);vj.syncOffset=wj;vj.probe=Cj;vj.prototype.getVideoInfo=vj.prototype.wg;vj.prototype.getVideoResolution=vj.prototype.zj;vj.prototype.getVideoNalus=vj.prototype.Oe;
|
|
370
370
|
vj.prototype.getCodecs=vj.prototype.Pd;vj.prototype.getStartTime=vj.prototype.getStartTime;vj.prototype.getVideoData=vj.prototype.cd;vj.prototype.getAudioData=vj.prototype.fc;vj.prototype.getMetadata=vj.prototype.getMetadata;vj.prototype.parseNalus=vj.prototype.Og;vj.prototype.parseAvcNalus=vj.prototype.Wj;vj.prototype.parse=vj.prototype.parse;vj.prototype.clearData=vj.prototype.clearData;vj.Timescale=9E4;var Bj=[100,110,122,244,44,83,86,118,128,138,139,134];function Dj(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,xd("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ya("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ya("Could not find LCEVC Library on this page"),
|
|
371
371
|
a=!1):(this.h.SupportObject.SupportStatus||Ya(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Ej(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
372
|
-
Dj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Fj(a,b,c){var d=Gj,e=Hj;switch(b.mimeType){case "video/webm":d=Ij;break;case "video/mp4":d=Jj}switch(c){case "DASH":e=Kj;break;case "HLS":e=Lj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}
|
|
372
|
+
Dj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Fj(a,b,c){var d=Gj,e=Hj;switch(b.mimeType){case "video/webm":d=Ij;break;case "video/mp4":d=Jj}switch(c){case "DASH":e=Kj;break;case "HLS":e=Lj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}Q("shaka.lcevc.Dec",Dj);Dj.prototype.release=Dj.prototype.release;var Gj=0,Ij=1,Jj=2,Lj=0,Kj=1,Hj=-1;function Mj(a,b,c,d){var e=this;this.i=a;this.ba=c;this.A=null;this.H=b;this.h={};this.I={};this.Ea={};this.g=null;this.ha=!1;this.X=d||null;this.l={};this.u=new od;this.j={};this.J=null;this.N=new lg;this.O="";this.qa=!1;this.m=Nj(this,this.N);this.G=!1;this.K=new Ig(function(){return Oj(e)});this.F=!1;this.$="UNKNOWN";this.Ha=this.Na=!1;this.Ba=new lg;this.o=!1;this.xa=!0;this.ma=this.R=this.na=this.S=this.L=this.ea=null;this.Aa=new lg}
|
|
373
373
|
function Nj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.u.s(c,"startstreaming",function(){a.xa=!0});a.u.s(c,"endstreaming",function(){a.xa=!1});a.u.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.u.oa(a.i,"playing",function(){a.qa=!0});a.O=Pj(c);a.i.src=a.O;return c}c=new MediaSource;a.u.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.u.oa(a.i,"playing",function(){a.qa=!0});a.O=Pj(c);a.i.src=a.O;return c}
|
|
374
374
|
function Qj(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?E(r,a.createSegmentIndex(),2):r.B(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Uc;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.Ga){if(m=te(h,k),!Ne(m))return r.return(!1)}else if(b==c.sa?k=mf(k):b==c.aa&&(k=nf(k,h)),n=
|
|
375
375
|
xe(a,h,k),p=ve(h,k),!td(n)&&!ne(p))return r.return(!1);return r.return(!0)})}q=Mj.prototype;q.destroy=function(){return this.K.destroy()};
|
|
@@ -383,10 +383,10 @@ function Vj(a){return a.G?!1:a.m?"ended"==a.m.readyState:!0}function Wj(a,b){a.G
|
|
|
383
383
|
q.Mb=function(){var a={total:this.G?[]:Qi(this.i.buffered),audio:this.G?[]:Qi(Xj(this,"audio")),video:this.G?[]:Qi(Xj(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 Xj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
384
384
|
function ak(a,b,c,d,e,f){var g=null,h=Gb(c);if(ue.includes(e))f=Xi(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ba.cf([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ra&&d.ra.timescale){var k=d.ra.timescale;if(!isNaN(k)){var l=0,m=!1;(new Pg).box("moof",Ug).box("traf",Ug).W("tfdt",function(n){l=$i(n.reader,
|
|
385
385
|
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Cj(h)||(a.L?a.L.clearData():a.L=new vj,h=a.L.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ba.cf(h,f,d?d.endTime:null));return g}
|
|
386
|
-
function ik(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,C,z,B,D,K;return O(function(
|
|
387
|
-
case 6:if(!a.h[b])return
|
|
388
|
-
C=b==m.sa||!(m.sa in a.h),a.F&&C&&a.Ba.resolve(p)));f&&b==m.sa&&(a.g||Sj(a,"application/cea-608",a.F,!1),a.J||(z=r.split(";",1)[0],a.J=new Ed(z)),d?(B=a.J.i(c),B.length&&Te(a.g,B,d.startTime,d.endTime,p)):a.J.init(c,h));if(!a.j[b]){
|
|
389
|
-
a.Aa,14);case 14:K=
|
|
386
|
+
function ik(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,C,z,B,D,K;return O(function(G){switch(G.g){case 1:m=Uc;if(b!=m.Ga){G.B(2);break}if(!a.F){G.B(3);break}return E(G,a.Ba,4);case 4:n=G.h,a.g.u=n;case 3:return E(G,Pe(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.P()[0]:null),5);case 5:return G.return();case 2:if(l||!a.o){G.B(6);break}return E(G,ik(a,m.aa,c,d,e,f,g,h,k,!0),7);case 7:return E(G,ik(a,m.sa,c,d,e,f,g,h,k,!0),8);case 8:return G.return();
|
|
387
|
+
case 6:if(!a.h[b])return G.return();p=a.h[b].timestampOffset;r=a.I[b];a.j[b]&&(r=a.j[b].getOriginalMimeType());d&&(u=ak(a,b,c,d,r,p),null!=u&&(null==a.S&&b==m.sa&&(a.S=u,a.na=d.startTime,null!=a.R&&(v=0,a.na==a.ma&&(v=a.S-a.R),a.Aa.resolve(v))),null==a.R&&b==m.aa&&(a.R=u,a.ma=d.startTime,null!=a.S&&(w=0,a.na==a.ma&&(w=a.S-a.R),a.Aa.resolve(w))),A=d.startTime-u,y=Math.abs(p-A),(.001<=y||g||h)&&(!k||0<A||!p)&&(p=A,a.Ha&&(jk(a,b,function(){return kk(a,b)},null),jk(a,b,function(){return lk(a,b,p)},null))),
|
|
388
|
+
C=b==m.sa||!(m.sa in a.h),a.F&&C&&a.Ba.resolve(p)));f&&b==m.sa&&(a.g||Sj(a,"application/cea-608",a.F,!1),a.J||(z=r.split(";",1)[0],a.J=new Ed(z)),d?(B=a.J.i(c),B.length&&Te(a.g,B,d.startTime,d.endTime,p)):a.J.init(c,h));if(!a.j[b]){G.B(9);break}return E(G,a.j[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=G.h;case 9:c=mk(a,c,d?d.startTime:null,b,d?d.P()[0]:null);if(!d||!a.F||b==m.Ga){G.B(11);break}if(!g&&!h){G.B(11);break}D=d.startTime;if("HLS"!=a.$||a.o||b!=m.aa||!a.h[m.sa]){G.B(13);break}return E(G,
|
|
389
|
+
a.Aa,14);case 14:K=G.h,.1<Math.abs(K)&&(D-=K);case 13:jk(a,b,function(){return kk(a,b)},null),jk(a,b,function(){return lk(a,b,D)},null);case 11:return E(G,jk(a,b,function(){var I=c;if("video"==b&&a.X){var J=a.X;J.g&&J.g.appendBuffer(I,"video",J.o,-p)}a.h[b].appendBuffer(I)},d?d.P()[0]:null),15);case 15:F(G)}})}function nk(a,b){var c=Yj(a,"video")||0;Re(a.g,b,c)}function ok(a){a.g&&Re(a.g,"",0)}
|
|
390
390
|
q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Uc,a==e.Ga?E(f,d.g.remove(b,c),0):E(f,jk(d,a,function(){return pk(d,a,b,c)},null),4)):d.o?E(f,jk(d,e.aa,function(){return pk(d,e.aa,b,c)},null),0):f.B(0)})};function qk(a,b){var c;return O(function(d){return 1==d.g?(c=Uc,b==c.Ga?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,jk(a,b,function(){return pk(a,b,0,a.m.duration)},null),4)):a.o?E(d,jk(a,c.aa,function(){return pk(a,c.aa,0,a.m.duration)},null),0):d.B(0)})}
|
|
391
391
|
q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Uc,a==c.Ga?d.return():E(d,jk(b,a,function(){b.i.currentTime-=.001;Uj(b,a)},null),2)):b.o?E(d,jk(b,c.aa,function(){var e=c.aa;b.i.currentTime-=.001;Uj(b,e)},null),0):d.B(0)})};
|
|
392
392
|
function rk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Uc;if(b==l.Ga)return f||(a.g.u=c),Qe(a.g,d,e),p.return();m=[];return E(p,sk(a,b,g,h,k),2)}n=p.h;n||(m.push(jk(a,b,function(){return kk(a,b)},null)),a.o&&m.push(jk(a,l.aa,function(){return kk(a,l.aa)},null)));f||(m.push(jk(a,b,function(){return lk(a,b,c)},null)),a.o&&m.push(jk(a,l.aa,function(){return lk(a,l.aa,c)},null)));m.push(jk(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=
|
|
@@ -397,9 +397,9 @@ function lk(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Uj(a,b)}function Uj(a
|
|
|
397
397
|
function uk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Jg(a.K);c=[];d={};for(e in a.h)d.Bd=new lg,f={start:function(m){return function(){return m.Bd.resolve()}}(d),p:d.Bd,uri:null},a.l[e].push(f),c.push(d.Bd),1==a.l[e].length&&f.start(),d={Bd:d.Bd};ta(l,2);return E(l,Promise.all(c),4);case 4:va(l,3);break;case 2:throw g=wa(l),g;case 3:return ta(l,5,6),E(l,b(),6);case 6:xa(l);for(h in a.h)vk(a,h);ya(l,0);break;case 5:throw k=wa(l),new U(2,3,3015,k,a.i.error||"No error in the media element",
|
|
398
398
|
null);}})}function vk(a,b){a.l[b].shift();wk(a,b)}function wk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new U(2,3,3017,b)):c.p.reject(new U(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),vk(a,b)}}function mk(a,b,c,d,e){var f=null==c,g=a.Ea[d];c=a.ba.dj();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Qb(c),f=ac()||Zb()||ic()||Yb()&&nc()&&c;f&&"mp4"==Ee(a.I[d])&&(b=Ci(b,e));return b}
|
|
399
399
|
function xk(a,b,c,d){return jk(a,b,function(){b!==Sc&&(vd()&&(a.j[b]&&(a.j[b].destroy(),delete a.j[b]),d&&(a.j[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.I[b]=c),Uj(a,b))},null)}
|
|
400
|
-
function yk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
401
|
-
Promise.all(g),4);case 4:return a.j={},a.h={},w=a.m.duration,a.N=new lg,a.m=Nj(a,a.N),E(
|
|
402
|
-
|
|
400
|
+
function yk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I;return O(function(J){switch(J.g){case 1:c=Uc;a.G=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.qa&&(a.i.autoplay=!1);ua(J,2);a.u.qb();g=[];for(h in a.j)g.push(a.j[h].destroy());for(k in a.l)for(l=a.l[k],m=l[0],a.l[k]=l.slice(0,1),m&&g.push(m.p.catch(Ve)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new U(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(H){}}return E(J,
|
|
401
|
+
Promise.all(g),4);case 4:return a.j={},a.h={},w=a.m.duration,a.N=new lg,a.m=Nj(a,a.N),E(J,a.N,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.ea)&&a.ea&&(a.m.duration=a.ea),A=new lg,y=a.m.sourceBuffers,C=b.size,z=0,B=function(){z++;z===C&&(A.resolve(),a.u.Xa(y,"addsourcebuffer",B))},a.u.s(y,"addsourcebuffer",B),D=t(b.keys()),K=D.next();case 6:if(K.done)return a.i.currentTime=d,E(J,A,2);G=K.value;I=b.get(G);return E(J,Rj(a,G,I,I.codecs),9);case 9:a.o?(a.l[c.aa]=[],a.l[c.sa]=[]):a.l[G]=[];K=D.next();
|
|
402
|
+
J.B(6);break;case 2:xa(J),a.G=!1,Jg(a.K),a.u.oa(a.i,"canplaythrough",function(){a.K.g||(a.i.autoplay=e,f||a.i.play())}),ya(J,0)}})}function zk(a,b){return uk(a,function(){return yk(a,b)})}
|
|
403
403
|
function sk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){if(1==z.g){f=Uc;if(b==f.Ga)return z.return(!1);g=Ie(Ke(a.I[b]));h=Je(a.I[b]);l=!1;m=te(c,d);n=a.A.forceTransmux;if(!td(m)||!a.F&&ue.includes(m))n=!0;n&&(p=ve(c,d),r=ne(p))&&(k=r(),u=Pc(f.aa,(d||"").split(",")),v=Pc(f.sa,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.aa&&(w=u),m=k.convertCodecs(b,ve(c,w))):m=k.convertCodecs(b,p));A=Ie(Ke(m));y=Je(m);if(g===A&&h===y)return a.j[b]&&!k?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&k?a.j[b]=
|
|
404
404
|
k:k&&(a.j[b]&&a.j[b].transmux!=k.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=k):k.destroy()),z.return(!1);C=!0;if(a.o||l&&k&&!a.j[b])C=!1;if(C&&"smooth"===a.A.codecSwitchingStrategy&&vd())return E(z,xk(a,b,m,k),3);k&&k.destroy();return E(z,zk(a,e),3)}return z.return(!0)})}
|
|
405
405
|
function Ak(a,b,c,d){if(b==Sc)var e=!1;else{e=Ie(Ke(a.I[b]));var f=Je(a.I[b]),g=te(c,d),h=a.A.forceTransmux;if(!td(g)||!a.F&&ue.includes(g))h=!0;c=ve(c,d);h&&(h=ne(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Ie(Ke(g));g=Je(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!vd()||a.o:!1}var Pj=window.URL.createObjectURL,Tj="sequence";function Bk(a,b,c){this.i=a;this.u=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.H=!0;this.I=0;this.G=void 0===c?!0:c;this.J=0;this.o=!1;this.F=a}q=Bk.prototype;q.getDuration=function(){return this.j};q.ij=function(){return this.g};q.ii=function(a){this.i=a};q.sb=function(a){this.j=a};q.mj=function(){return this.i};q.ci=function(a){this.A=a};q.Nc=function(a){this.H=a};q.nf=function(a){this.m=a};q.Ne=function(){return this.m};q.Xg=function(a){this.u=a};q.$i=function(){return this.u};
|
|
@@ -407,7 +407,7 @@ q.Vh=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.$e(a[0].start+
|
|
|
407
407
|
q.ee=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.$e(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.o&&(this.i=d-this.h-this.g)}};q.Ue=function(){this.o=!0};q.Lj=function(){return this.o};q.ei=function(a){this.F=a};q.cj=function(){return this.F};
|
|
408
408
|
q.$e=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Jg=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.H};q.Gc=function(){return Infinity!=this.j&&!this.H};q.Cb=function(){return Math.max(this.I,this.jc()-this.m)};q.li=function(a){this.I=a};
|
|
409
409
|
q.jc=function(){return this.U()||this.Gc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.J,this.j):this.h?Math.min(this.h,this.j):this.j};q.Sd=function(a){var b=Math.max(this.l,this.I);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.jc()-this.m+a,this.Ob()))};q.ic=function(){return this.Sd(0)};q.Ob=function(){return Math.max(0,this.jc()-(this.U()||this.Gc()?this.u:0))};q.si=function(){return null==this.i||null!=this.h&&this.G?!1:!0};
|
|
410
|
-
q.bi=function(a){this.J=a};
|
|
410
|
+
q.bi=function(a){this.J=a};Q("shaka.media.PresentationTimeline",Bk);Bk.prototype.setAvailabilityTimeOffset=Bk.prototype.bi;Bk.prototype.usingPresentationStartTime=Bk.prototype.si;Bk.prototype.getSeekRangeEnd=Bk.prototype.Ob;Bk.prototype.getSeekRangeStart=Bk.prototype.ic;Bk.prototype.getSafeSeekRangeStart=Bk.prototype.Sd;Bk.prototype.getSegmentAvailabilityEnd=Bk.prototype.jc;Bk.prototype.setUserSeekStart=Bk.prototype.li;Bk.prototype.getSegmentAvailabilityStart=Bk.prototype.Cb;
|
|
411
411
|
Bk.prototype.isInProgress=Bk.prototype.Gc;Bk.prototype.isLive=Bk.prototype.U;Bk.prototype.offset=Bk.prototype.offset;Bk.prototype.notifyMaxSegmentDuration=Bk.prototype.Jg;Bk.prototype.notifyMinSegmentStartTime=Bk.prototype.$e;Bk.prototype.getInitialProgramDateTime=Bk.prototype.cj;Bk.prototype.setInitialProgramDateTime=Bk.prototype.ei;Bk.prototype.isStartTimeLocked=Bk.prototype.Lj;Bk.prototype.lockStartTime=Bk.prototype.Ue;Bk.prototype.notifySegments=Bk.prototype.ee;Bk.prototype.notifyTimeRange=Bk.prototype.Vh;
|
|
412
412
|
Bk.prototype.getDelay=Bk.prototype.$i;Bk.prototype.setDelay=Bk.prototype.Xg;Bk.prototype.getSegmentAvailabilityDuration=Bk.prototype.Ne;Bk.prototype.setSegmentAvailabilityDuration=Bk.prototype.nf;Bk.prototype.setStatic=Bk.prototype.Nc;Bk.prototype.setClockOffset=Bk.prototype.ci;Bk.prototype.getPresentationStartTime=Bk.prototype.mj;Bk.prototype.setDuration=Bk.prototype.sb;Bk.prototype.setPresentationStartTime=Bk.prototype.ii;Bk.prototype.getMaxSegmentDuration=Bk.prototype.ij;
|
|
413
413
|
Bk.prototype.getDuration=Bk.prototype.getDuration;function Ck(a,b,c){this.j=c;this.l=a;this.u=Dk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}Ck.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function Ek(a,b){a.i=b}function Fk(a){this.g=a}function Dk(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(Qi(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 Gk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.F=b;this.u=c;this.l=new od;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.o=!1;this.l.s(a,"waiting",function(){return Hk(f)});this.m=(new Ub(function(){Hk(f)})).za(this.u.gapJumpTimerTime)}Gk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.A=null};Gk.prototype.Mg=function(){this.o=!0;Hk(this)};
|
|
@@ -426,11 +426,11 @@ q.Xe=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;
|
|
|
426
426
|
q.Yc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Ii(a.startTime,b,a.G,a.Wa,a.Da,a.ra,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
|
|
427
427
|
q.tf=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Ub(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.za(a))};Xk.prototype[Symbol.iterator]=function(){return this.Wb(0)};
|
|
428
428
|
Xk.prototype.Wb=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 Yk(this,d,f,c)};function Zk(a,b,c){a=new Ii(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Xk([a])}
|
|
429
|
-
|
|
429
|
+
Q("shaka.media.SegmentIndex",Xk);Xk.forSingleSegment=Zk;Xk.prototype.getIteratorForTime=Xk.prototype.Wb;Xk.prototype.updateEvery=Xk.prototype.tf;Xk.prototype.fit=Xk.prototype.Yc;Xk.prototype.evict=Xk.prototype.eb;Xk.prototype.mergeAndEvict=Xk.prototype.be;Xk.prototype.offset=Xk.prototype.offset;Xk.prototype.get=Xk.prototype.get;Xk.prototype.find=Xk.prototype.find;Xk.prototype.markImmutable=Xk.prototype.Sj;Xk.prototype.release=Xk.prototype.release;Xk.prototype.getNumEvicted=Xk.prototype.getNumEvicted;
|
|
430
430
|
Xk.prototype.getNumReferences=Xk.prototype.getNumReferences;function Yk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Yk.prototype.pd=function(a){this.reverse=a};Yk.prototype.Oi=function(){return this.h};Yk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
431
|
-
Yk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};
|
|
431
|
+
Yk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};Q("shaka.media.SegmentIterator",Yk);Yk.prototype.next=Yk.prototype.next;Yk.prototype.current=Yk.prototype.current;Yk.prototype.currentPosition=Yk.prototype.Oi;
|
|
432
432
|
Yk.prototype.setReverse=Yk.prototype.pd;function $k(){Xk.call(this,[]);this.h=[]}oa($k,Xk);q=$k.prototype;q.clone=function(){var a=new $k;a.h=this.h.slice();return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.xc=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.xc(a)};q.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};
|
|
433
|
-
q.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Xe=function(){};q.eb=function(){};q.be=function(){};q.Yc=function(){};q.tf=function(){};
|
|
433
|
+
q.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Xe=function(){};q.eb=function(){};q.be=function(){};q.Yc=function(){};q.tf=function(){};Q("shaka.media.MetaSegmentIndex",$k);$k.prototype.updateEvery=$k.prototype.tf;$k.prototype.fit=$k.prototype.Yc;$k.prototype.mergeAndEvict=$k.prototype.be;$k.prototype.evict=$k.prototype.eb;$k.prototype.merge=$k.prototype.Xe;
|
|
434
434
|
$k.prototype.offset=$k.prototype.offset;$k.prototype.get=$k.prototype.get;$k.prototype.find=$k.prototype.find;$k.prototype.forEachTopLevelReference=$k.prototype.xc;$k.prototype.release=$k.prototype.release;function al(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Me();this.h=new Ub(function(){b.g.Th(.25*b.i)})}al.prototype.release=function(){this.set(this.Ac());this.h&&(this.h.stop(),this.h=null);this.g=null};al.prototype.set=function(a){this.i=a;bl(this)};al.prototype.Ac=function(){return this.g.Ac()};function bl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Me()!=b&&a.g.ah(b);return}catch(c){}a.h.za(.25);0!=a.g.Me()&&a.g.ah(0)};function cl(a){var b=this;this.h=a;this.g=new Set;this.i=(new Ub(function(){dl(b,!1)})).za(.25)}cl.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 dl(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function el(){this.g=null;this.h=[]}function fl(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 gl(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 hl(){this.i=this.h=null;this.g=[]}function il(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 jl(){this.Be=this.A=this.F=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.N=this.O=this.J=this.K=this.L=this.l=this.o=NaN;this.g=new el;this.h=new hl};function kl(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 ll(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
435
435
|
function ml(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Wb(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.Da&&(c=!1);2==b.Bc()&&(c=!1);c&&b.ra&&nl(a,b.ra);c&&!a.h.has(b)&&(c=new ol(a.l),pl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.ge&&b.Te)break}ql(a)}}function nl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Hi(d,b)})){var c=new ol(a.l);pl(c,b,a.i);a.j.set(b,c)}}
|
|
436
436
|
function rl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&sl(a,c)}function tl(a){rl(a,a.h);rl(a,a.j);a.g=null}kl.prototype.eb=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&&sl(this,d);b&&ql(this)};kl.prototype.pd=function(a){this.o=a;this.g&&this.g.pd(a)};
|
|
@@ -460,33 +460,33 @@ wa(h),E(h,Yl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values()
|
|
|
460
460
|
function Xl(a,b){if(Zl(b))return nk(a.g.ka,b.stream.originalId||""),null;b.type==Sc&&ok(a.g.ka);if(!a.g.ka.xa&&b.type!=Sc)return a.h.updateIntervalSeconds/2;var c=a.g.Le();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.eb(c,!0),ml(e,c);d=b.pb?b.pb.endTime:c;e=Zj(a.g.ka,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.F),g=a.m.presentationTimeline.getDuration()-d,h=Yj(a.g.ka,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
461
461
|
!0,"video"==b.type&&(a=a.i.get(Sc))&&Zl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=$l(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Zl(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.pb?h.pb.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.Z&&b.ua&&!a.o.has(b.stream)&&(b.Z.eb(e.startTime),ml(b.Z,e.startTime));am(a,b,c,e).catch(function(){});
|
|
462
462
|
return null}function $l(a,b,c,d){if(b.ua)return b.ua.current();if(b.pb||d)return b.ua=b.stream.segmentIndex.Wb(b.pb?b.pb.endTime:d,!1,0>a.g.Ra()),b.ua&&b.ua.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ra();var f=null;d&&(b.ua=b.stream.segmentIndex.Wb(e,!1,a),f=b.ua&&b.ua.next().value);f||(b.ua=b.stream.segmentIndex.Wb(c,!1,a),f=b.ua&&b.ua.next().value);return f}
|
|
463
|
-
function am(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:e=Uc;f=b.stream;g=b.ua;b.gb=!0;ta(z,2);if(2==d.Bc())throw new U(1,1,1011);return E(z,bm(a,b,d),4);case 4:Jg(a.l);if(a.A)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),r=p=!1,v=function(B){var D,K,
|
|
464
|
-
ta(
|
|
463
|
+
function am(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:e=Uc;f=b.stream;g=b.ua;b.gb=!0;ta(z,2);if(2==d.Bc())throw new U(1,1,1011);return E(z,bm(a,b,d),4);case 4:Jg(a.l);if(a.A)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),r=p=!1,v=function(B){var D,K,G,I;return O(function(J){switch(J.g){case 1:if(p)return J.return();r=!0;Jg(a.l);if(a.A)return J.return();
|
|
464
|
+
ta(J,2);n=cm(n,B);D=!1;K=0;(new Pg).box("mdat",function(H){K=H.size+H.start;D=!0}).parse(n,!1,!0);if(!D){J.B(4);break}G=n.subarray(0,K);n=n.subarray(K);return E(J,dm(a,b,c,f,d,G,!0),5);case 5:b.Z&&b.ua&&ml(b.Z,d.startTime,!0);case 4:va(J,0);break;case 2:u=I=wa(J),F(J)}})},E(z,em(a,b,d,v),9);l=em(a,b,d);return E(z,l,7);case 7:m=z.h;Jg(a.l);if(a.A)return z.return();Jg(a.l);return b.qc?(b.gb=!1,Ml(a,b,0),z.return()):E(z,dm(a,b,c,f,d,m),6);case 9:w=z.h;if(u)throw u;if(r){z.B(10);break}p=!0;Jg(a.l);return a.A?
|
|
465
465
|
z.return():b.qc?(b.gb=!1,Ml(a,b,0),z.return()):E(z,dm(a,b,c,f,d,w),10);case 10:b.Z&&b.ua&&ml(b.Z,d.startTime,!0);case 6:Jg(a.l);if(a.A)return z.return();b.pb=d;g.next();b.gb=!1;b.Qg=!1;A=a.g.ka.Mb();y=A[b.type];cb(JSON.stringify(y));b.qc||a.g.Mg(d,b.stream);Ml(a,b,0);va(z,0);break;case 2:C=wa(z);Jg(a.l,C);if(a.A)return z.return();b.gb=!1;if(7001==C.code)b.gb=!1,El(b),Ml(a,b,0),z.B(0);else if(b.type==e.Ga&&a.h.ignoreTextStreamFailures)a.i.delete(e.Ga),z.B(0);else if(3017==C.code)fm(a,b,C),z.B(0);else return b.Vd=
|
|
466
466
|
!0,1==C.category&&b.Z&&sl(b.Z,d),C.severity=2,E(z,Yl(a,b,C),0)}})}function gm(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.B(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Gb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
|
|
467
|
-
function cm(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function fm(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Qg})){if(
|
|
467
|
+
function cm(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function fm(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Qg})){if(a.g.He(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.F);if(20<d)a.F-=.2;else if(4<d)a.F-=.04;else{b.Vd=!0;a.A=!0;a.g.onError(c);return}b.Qg=!0}Ml(a,b,4)}
|
|
468
468
|
function bm(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:d=Uc;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.O)-.1);g=Math.min(c.appendWindowEnd,a.N)+.01;h=Ie(c.codecs||b.stream.codecs);k=Je(c.mimeType||b.stream.mimeType);l=c.timestampOffset;if(l==b.Fg&&f==b.Dg&&g==b.Cg&&h==b.Eg&&k==b.Oh){w.B(2);break}m=b.Eg&&b.Oh&&Ak(a.g.ka,b.type,k,h);if(!m){w.B(3);break}n=null;b.type===d.sa?n=a.i.get(d.aa):b.type===d.aa&&(n=a.i.get(d.sa));if(!n){w.B(3);break}return E(w,Fl(n).catch(function(){}),
|
|
469
469
|
5);case 5:n.gd=null,Ul(a,n);case 3:return p=function(){var A,y,C;return O(function(z){if(1==z.g)return A=new Map,a.j.audio&&A.set(d.aa,a.j.audio),a.j.video&&A.set(d.sa,a.j.video),ta(z,2),b.Dg=f,b.Cg=g,b.Eg=h,b.Oh=k,b.Fg=l,y=a.m.sequenceMode||"HLS"==a.m.type,E(z,rk(a.g.ka,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,A),4);if(2!=z.g)return va(z,0);C=wa(z);b.Dg=null;b.Cg=null;b.Eg=null;b.Fg=null;throw C;})},E(w,p(),2);case 2:return Hi(c.ra,b.gd)||(b.gd=c.ra,c.l&&c.ra&&(r=em(a,
|
|
470
|
-
b,c.ra),u=function(){var A,y,C,z,B,D,K;return O(function(
|
|
471
|
-
Xg).box("hev1",Xg).box("hvc1",Xg).box("dvav",Xg).box("dva1",Xg).box("dvh1",Xg).box("dvhe",Xg).box("vexu",Ug).box("proj",Ug).W("prji",function(
|
|
470
|
+
b,c.ra),u=function(){var A,y,C,z,B,D,K;return O(function(G){switch(G.g){case 1:return ta(G,2),E(G,r,4);case 4:return A=G.h,Jg(a.l),y=null,C=new Map,z={projection:null,hfov:null},B=new Pg,B.box("moov",Ug).box("trak",Ug).box("mdia",Ug).W("mdhd",function(I){y=aj(I.reader,I.version).timescale}).box("hdlr",function(I){I=I.reader;I.skip(8);switch(I.Kc()){case "soun":C.set(d.aa,y);break;case "vide":C.set(d.sa,y)}y=null}).box("minf",Ug).box("stbl",Ug).W("stsd",Wg).box("encv",Xg).box("avc1",Xg).box("avc3",
|
|
471
|
+
Xg).box("hev1",Xg).box("hvc1",Xg).box("dvav",Xg).box("dva1",Xg).box("dvh1",Xg).box("dvhe",Xg).box("vexu",Ug).box("proj",Ug).W("prji",function(I){I=I.reader.Kc();z.projection=I}).box("hfov",function(I){I=I.reader.T()/1E3;z.hfov=I}).parse(A),hm(a,z),C.has(b.type)?c.ra.timescale=C.get(b.type):null!=y&&(c.ra.timescale=y),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(G,a.g.sh(b.type,A),5);case 5:return E(G,ik(a.g.ka,b.type,A,null,b.stream,D),6);case 6:va(G,0);break;case 2:throw K=wa(G),b.gd=
|
|
472
472
|
null,K;}})},a.g.Uj(c.startTime,c.ra),e.push(u()))),a.m.sequenceMode&&(v=b.pb?b.pb.i:null,c.i!=v&&e.push(tk(a.g.ka,b.type,c.startTime))),E(w,Promise.all(e),0)}})}
|
|
473
473
|
function dm(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.H;if(l||m)k=new Pg;l&&k.W("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.Kc();var A=u.reader.Kc();var y=u.reader.T();var C=u.reader.T();var z=u.reader.T();var B=u.reader.T();var D=e.startTime+C/y}else y=u.reader.T(),D=u.reader.md()/
|
|
474
|
-
y+e.timestampOffset,C=D-e.startTime,z=u.reader.T(),B=u.reader.T(),w=u.reader.Kc(),A=u.reader.Kc();u=u.reader.Hb(u.reader.getLength()-u.reader.Ja());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Vj():(v=(new Map).set("detail",{startTime:D,endTime:
|
|
475
|
-
w||(w=Xi(u),w.length&&
|
|
476
|
-
|
|
474
|
+
y+e.timestampOffset,C=D-e.startTime,z=u.reader.T(),B=u.reader.T(),w=u.reader.Kc(),A=u.reader.Kc();u=u.reader.Hb(u.reader.getLength()-u.reader.Ja());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Vj():(v=D+z/y,y=(new Map).set("detail",{startTime:D,endTime:v,schemeIdUri:w,value:A,timescale:y,presentationTimeDelta:C,eventDuration:z,id:B,messageData:u}),y=new S("emsg",y),y.cancelable=!0,a.g.onEvent(y),y.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
475
|
+
w||(w=Xi(u),w.length&&a.g.cf([{cueTime:D,data:u,frames:w,dts:D,pts:D}],0,v)))});m&&k.W("prft",function(u){if(!a.H&&e.ra.timescale){var v=u.reader,w=u.version;v.T();u=v.T();var A=v.T();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.T():(w=v.T(),v=v.T(),v=w*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.ra.timescale*1E3)});v=new S("prft",v);a.g.onEvent(v);a.H=!0}});(l||m)&&k.parse(f);return E(r,
|
|
476
|
+
im(a,b,c),2);case 2:return Jg(a.l),n=b.le,b.le=!1,p=b.ph,b.ph=!1,E(r,a.g.sh(b.type,f),3);case 3:return E(r,ik(a.g.ka,b.type,f,e,d,h,n,p,g),4);case 4:Jg(a.l),F(r)}})}function im(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Wj(a.g.ka,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():E(h,a.g.ka.remove(b.type,e,e+g),2)}Jg(a.l);F(h)})}
|
|
477
477
|
function Zl(a){return a&&a.type==Sc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
478
478
|
function em(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Td())return l.return(e);f=null;if(b.Z){var m=b.Z,n=m.h;c instanceof Gi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.eh=d),f=m.df):f=null}f||(f=Vl(c,b.stream,d||null,a.h.retryParameters,a.g.Zb));g=0;b.ua&&(g=b.ua.h);b.Ab=f;return E(l,f.promise,2);case 2:h=l.h;b.Ab=null;k=h.data;if(!c.aesKey){l.B(3);break}return E(l,gm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
479
479
|
function Vl(a,b,c,d,e){var f=a instanceof Ii?a:void 0,g=f?1:0;a=Bl(a.P(),a.Wa,a.Da,d,c);a.contentType=b.type;return e.request(Gg,a,{type:g,stream:b,segment:f})}
|
|
480
480
|
function Sl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.qc=!1,b.wf=!1,b.Fe=0,b.Ld=!0,b.pb=null,b.ua=null,b.Z&&!a.o.has(b.stream)&&tl(b.Z),d?(e=a.g.Le(),f=a.g.ka.getDuration(),E(g,a.g.ka.remove(b.type,e+d,f),3)):E(g,qk(a.g.ka,b.type),4);if(3!=g.g)return Jg(a.l),c?E(g,a.g.ka.flush(b.type),3):g.B(3);Jg(a.l);b.Ld=!1;b.endOfStream=!1;b.gb||b.Jb||Ml(a,b,0);F(g)})}
|
|
481
481
|
function Ml(a,b,c){var d=b.type;if(d!=Sc||a.i.has(d))b.Jb=(new Tb(function(){var e;return O(function(f){if(1==f.g)return ta(f,2),E(f,Wl(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);F(f)})})).V(c)}function El(a){null!=a.Jb&&(a.Jb.stop(),a.Jb=null)}function Fl(a){return O(function(b){return a.Ab?E(b,a.Ab.abort(),0):b.B(0)})}
|
|
482
|
-
function Yl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,kg(a.K),2);Jg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime
|
|
482
|
+
function Yl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,kg(a.K),2);Jg(a.l);1===c.category&&(d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime,c.handled=a.g.He(b.stream,d),c.handled&&(c.severity=1));if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
|
|
483
483
|
function jm(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.L<c)return h.return(!1);a.L=b;d=Uc;if(e=a.i.get(d.aa))e.gd=null,Ul(a,e),Fl(e).catch(function(){});if(f=a.i.get(d.sa))f.gd=null,Ul(a,f),Fl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.aa,a.j.audio);a.j.video&&g.set(d.sa,a.j.video);return E(h,zk(a.g.ka,g),2)}return h.return(!0)})}
|
|
484
484
|
function hm(a,b){if(a.I.projection!=b.projection||a.I.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new S("spatialvideoinfo",c)}else c=new S("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.I=b}};function km(){}
|
|
485
485
|
function lm(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]=Xe(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Xe(n)),m=lm(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),
|
|
486
486
|
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 mm(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 nm(a,b){return a&&b}
|
|
487
487
|
function om(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]=
|
|
488
|
-
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}
|
|
489
|
-
function tm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}
|
|
488
|
+
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}Q("shaka.util.ConfigUtils",km);km.getDifferenceFromConfigObjects=om;km.convertToConfigObject=mm;km.mergeConfigObjects=lm;function pm(){}function qm(a){a=zc(a);return(new mb(a)).Vb}function rm(a,b,c){function d(h){Lb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Gb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new U(2,6,6015);var e;"string"==typeof b?e=Bc(b,!0):e=b;a=zc(a);a=Bc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function sm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zc(a).split("skd://").pop();return rm(a,c,b)}
|
|
489
|
+
function tm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}Q("shaka.util.FairPlayUtils",pm);pm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=wc(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=Ib(Hc(c)))}};pm.expressplayFairPlayRequest=function(a,b){tm(a,b)};
|
|
490
490
|
pm.conaxFairPlayRequest=function(a,b){tm(a,b)};pm.ezdrmFairPlayRequest=function(a,b){tm(a,b)};pm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Gb(b.body),a=Gc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ac("spc="+a))};pm.expressplayInitDataTransform=function(a,b,c){return sm(a,b,c)};
|
|
491
491
|
pm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Kb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return rm(a,d,b)};pm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zc(a).split(";").pop();return rm(a,c,b)};pm.verimatrixInitDataTransform=function(a,b,c){return sm(a,b,c)};pm.initDataTransform=rm;
|
|
492
492
|
pm.defaultGetContentId=qm;pm.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"'}]},ta(b,2),E(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);wa(b);return b.return(!1)})};function um(){}
|
|
@@ -504,7 +504,7 @@ preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredA
|
|
|
504
504
|
playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(ym(m,
|
|
505
505
|
l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}function zm(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 lm(a,b,c||vm(),d,"")}
|
|
506
506
|
function ym(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=gd(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Xc(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-
|
|
507
|
-
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!=Sc&&"image"!=c.type||b.push(c);return b}function wm(a){return nm([a],a)}function xm(a){return nm([a],a)}
|
|
507
|
+
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!=Sc&&"image"!=c.type||b.push(c);return b}function wm(a){return nm([a],a)}function xm(a){return nm([a],a)}Q("shaka.util.PlayerConfiguration",um);um.mergeConfigObjects=zm;um.createDefault=vm;function Am(a,b,c,d,e){gb.call(this);this.L=a;this.R=b;this.xa=e.networkingEngine;this.S=d;this.o=null;this.kb=c;this.qa=0;this.Na=e.Xc;this.F=e.Pj;this.Za=e.Qj;this.g=e.config;this.j=this.G=this.h=null;this.ea=!1;this.H=e.Zj;this.ma=!1;this.l=null;this.ba=!1;this.i=this.A=null;this.$=!1;this.K=new Map;this.na=!1;this.Ba=e.Yj;this.X=new jl;this.m=new lg;this.N=null;this.u=!1;this.Ea=e.Ji;this.ha=null;this.Ha=e.Ii;this.O=!1;this.J=[];this.I=[]}oa(Am,gb);
|
|
508
508
|
function Bm(a,b,c){(a=b?a.I:a.J)?a.push(c):c()}function Cm(a){if(a.I)for(var b=t(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function Dm(a,b){a.N=b;a.O=!0;if(a.J){b=t(a.J);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.J=null}q=Am.prototype;q.getStartTime=function(){return this.S};q.$c=function(){return this.L};q.rg=function(){return this.h};function Em(a){a.$=!0;return a.i}function Fm(a){a.ea=!0;return a.j}function Gm(a){a.ma=!0;return a.H}q.getStats=function(){return this.X};
|
|
509
509
|
function Hm(a){a.ba=!0;return a.l}function Im(a){a.na=!0;return a.K}
|
|
510
510
|
q.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return ta(c,3),E(c,Jm(a),5);case 5:return Km(a),E(c,Lm(a),6);case 6:Km(a);a.o||(a.o=new Wf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
|
|
@@ -515,7 +515,7 @@ function Lm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Nm(a,"drm-e
|
|
|
515
515
|
Promise.resolve(),7);case 7:a.dispatchEvent(f),F(g)}})}q.configure=function(a,b){a=mm(a,b);zm(this.g,a)};q.getConfiguration=function(){return Xe(this.g)};
|
|
516
516
|
function Mm(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 kl(d,b,function(l,m,n){return Vl(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.K.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.S||0;(h=(g=b.segmentIndex.Wb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ra&&nl(e,h.ra):ml(e,h.startTime));F(k)})}q.Hk=function(){return this.m};
|
|
517
517
|
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.ea){e.B(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.$){e.B(4);break}return E(e,a.i.stop(),4);case 4:a.H&&!a.ma&&a.H.release();if(!a.l||a.ba){e.B(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.K.size&&!a.na)for(b=t(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,tl(d);F(e)}})};
|
|
518
|
-
function Om(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))}
|
|
518
|
+
function Om(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}Q("shaka.media.PreloadManager",Am);Am.prototype.destroy=Am.prototype.destroy;Am.prototype.waitForFinish=Am.prototype.Hk;function Pm(a,b){gb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Sc:null,Rc:Qm,Fc:function(d,e){return Rm(c,"enter",d,e)}},{Sc:Sm,Rc:Qm,Fc:function(d,e){return Rm(c,"enter",d,e)}},{Sc:Tm,Rc:Qm,Fc:function(d,e){return Rm(c,"enter",d,e)}},{Sc:Qm,Rc:Sm,Fc:function(d,e){return Rm(c,"exit",d,e)}},{Sc:Qm,Rc:Tm,Fc:function(d,e){return Rm(c,"exit",d,e)}},{Sc:Sm,Rc:Tm,Fc:function(d,e){return Rm(c,"skip",d,e)}},{Sc:Tm,Rc:Sm,Fc:function(d,e){return Rm(c,"skip",d,e)}}];this.h=new od;this.h.s(this.i,
|
|
519
519
|
"regionremove",function(d){c.g.delete(d.region)})}oa(Pm,gb);Pm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;gb.prototype.release.call(this)};Pm.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?Sm:a>d.endTime?Tm:Qm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Sc==e&&h.Rc==f&&h.Fc(d,b)}}};
|
|
520
520
|
function Rm(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Sm=1,Qm=2,Tm=3;function Um(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new mb(a)).fb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Vm[d])return m.return(e);f=0;g=Ag([a],c);ta(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=wa(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
521
521
|
e.toLowerCase().split(";").shift():"")}})}
|
|
@@ -528,7 +528,7 @@ function $m(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--
|
|
|
528
528
|
(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 an(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=an.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;bn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
529
529
|
q.append=function(a){var b=Ym(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={Uc:d.Uc},e=b.next())d.Uc=e.value,a.some(function(f){return function(g){return g.startTime==f.Uc.startTime&&g.endTime==f.Uc.endTime&&g.text==f.Uc.payload?!0:!1}}(d))||(e=$m(d.Uc))&&c.push(e);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):c.indexOf(f)-
|
|
530
530
|
c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(bn(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"};
|
|
531
|
-
function bn(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}
|
|
531
|
+
function bn(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}Q("shaka.text.SimpleTextDisplayer",an);an.prototype.setTextVisibility=an.prototype.setTextVisibility;an.prototype.isTextVisible=an.prototype.isTextVisible;an.prototype.destroy=an.prototype.destroy;an.prototype.append=an.prototype.append;an.prototype.remove=an.prototype.remove;an.prototype.configure=an.prototype.configure;function cn(){}q=cn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};Q("shaka.text.StubTextDisplayer",cn);cn.prototype.setTextVisibility=cn.prototype.setTextVisibility;cn.prototype.isTextVisible=cn.prototype.isTextVisible;cn.prototype.destroy=cn.prototype.destroy;cn.prototype.append=cn.prototype.append;cn.prototype.remove=cn.prototype.remove;cn.prototype.configure=cn.prototype.configure;function dn(){}function W(a){return document.createElement(a)}function en(){var a=document.createElement("button");a.setAttribute("type","button");return a}function fn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}Q("shaka.util.Dom",dn);dn.removeAllChildren=fn;function gn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.u=b;this.l=null;this.g=W("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.u.appendChild(this.g);c&&c.captionsUpdatePeriod||xd("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.G=(new Ub(function(){d.A.paused||hn(d)})).za(c&&
|
|
532
532
|
c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new od;this.j.s(document,"fullscreenchange",function(){hn(d,!0)});this.j.s(this.A,"seeking",function(){hn(d,!0)});this.j.s(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(){hn(d,!0)}),this.o.observe(this.g));this.F=new Map}q=gn.prototype;q.configure=function(a){this.G&&this.G.za(a.captionsUpdatePeriod)};
|
|
533
533
|
q.append=function(a){var b=[].concat(x(this.h)),c={};a=t(Zm(a));for(var d=a.next();!d.done;c={se:c.se},d=a.next())c.se=d.value,b.some(function(e){return function(f){return de(f,e.se)}}(c))||this.h.push(c.se);hn(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.G&&this.G.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
534
534
|
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});hn(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function jn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
@@ -540,12 +540,13 @@ g.viewportAnchorX-g.regionAnchorX*g.width/100+m);0!==g.heightUnits&&0!==g.widthU
|
|
|
540
540
|
"flex-start":"center"==b.displayAlign?"center":"flex-end";a.F.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Zf:f,zi:e,Lc:c})}function nn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sd?c:"left"===a||"start"===a&&b===Ud||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ud?"line-right":"center"}
|
|
541
541
|
function mn(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=on(c.linePadding,c,a.u);f.paddingRight=on(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
542
542
|
"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=W("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=pn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=pn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=
|
|
543
|
-
b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer
|
|
544
|
-
d/h*100),1==g&&(f.position="absolute",c.writingMode==Vd?(f.width="100%",c.lineAlign==Xd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xd?f.right=d+"%":"end"==c.lineAlign&&(f.left=
|
|
545
|
-
"line-
|
|
546
|
-
|
|
543
|
+
b);k&&(l.textContent=k)}if(h&&!d[d.length-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=
|
|
544
|
+
c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=on(c.fontSize,c,a.u);d=c.line;null!=d&&(g=c.lineInterpretation,g==Wd&&(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==Vd?(f.width="100%",c.lineAlign==Xd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xd?f.right=d+"%":"end"==c.lineAlign&&(f.left=
|
|
545
|
+
100-d+"%"))));f.lineHeight=c.lineHeight;a=nn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Vd?(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==Vd?(f.right=c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Vd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");
|
|
546
|
+
f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Vd?f.width=c.size+"%":f.height=c.size+"%")}
|
|
547
|
+
function on(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 pn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}Q("shaka.text.UITextDisplayer",gn);gn.prototype.setTextVisibility=gn.prototype.setTextVisibility;
|
|
547
548
|
gn.prototype.isTextVisible=gn.prototype.isTextVisible;gn.prototype.remove=gn.prototype.remove;gn.prototype.destroy=gn.prototype.destroy;gn.prototype.append=gn.prototype.append;gn.prototype.configure=gn.prototype.configure;function qn(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=Ym(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");
|
|
548
|
-
break;case "right":g.push("align:right");break;case Td: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}
|
|
549
|
+
break;case "right":g.push("align:right");break;case Td: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}Q("shaka.text.WebVttGenerator",function(){});function rn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}rn.prototype.configure=function(a){this.g=a};function sn(a){a.i=!1;a.l=!0;a.j=!1}
|
|
549
550
|
function tn(a,b,c){try{if(!a.g.enabled)return b;var d=un(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=vn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=wn;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=xn;break a}e=void 0}d.ot=e;d.su=
|
|
550
551
|
!0;var f=yn(d);return zn(b,f)}catch(g){return Za("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function un(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}}
|
|
551
552
|
function An(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,un(a));c.pr=a.h.Ra();var e=c.ot===Bn||c.ot===wn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Cn(a,c);if(d)d=Dn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=yn(a);f&&(b.uris=b.uris.map(function(g){return zn(g,f)}))}}}function Cn(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}
|
|
@@ -553,8 +554,8 @@ function En(a){if(0===a.type)return Fn;if(a=a.stream){var b=a.type;if("video"==b
|
|
|
553
554
|
function Jn(a,b){b=a.h.Mb()[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 Kn(a,b){var c=a.h.Db();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Bn:return a.videoBandwidth||NaN;case vn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
554
555
|
function yn(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"===
|
|
555
556
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Dn(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=yn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
556
|
-
function zn(a,b){if(!b||a.includes("offline:"))return a;a=new mb(a);a.g.set("CMCD",b);return a.toString()}var xn="m",vn="a",Bn="v",wn="av",Fn="i",Hn="c",Gn="tt";
|
|
557
|
-
q.getBandwidthEstimate=function(a){var b=this.Hh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Qn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}
|
|
557
|
+
function zn(a,b){if(!b||a.includes("offline:"))return a;a=new mb(a);a.g.set("CMCD",b);return a.toString()}var xn="m",vn="a",Bn="v",wn="av",Fn="i",Hn="c",Gn="tt";Q("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Bi:"s",OTHER:"o"});function Ln(a){this.h=a;this.g=null}q=Ln.prototype;q.configure=function(a){this.h=a};q.Ih=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Mn)?1E3*this.g.get(Mn):null};q.Hh=function(){return this.h.enabled&&this.g&&this.g.has(Nn)?1E3*this.g.get(Nn):null};q.nj=function(){return this.h.enabled&&this.g&&this.g.has(On)?this.g.get(On):null};q.oj=function(){return this.h.enabled&&this.g&&this.g.has(Pn)?this.g.get(Pn):null};
|
|
558
|
+
q.getBandwidthEstimate=function(a){var b=this.Hh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Qn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}Q("shaka.util.CmsdManager",Ln);Ln.prototype.getBandwidthEstimate=Ln.prototype.getBandwidthEstimate;Ln.prototype.getRoundTripTime=Ln.prototype.oj;Ln.prototype.getResponseDelay=Ln.prototype.nj;Ln.prototype.getEstimatedThroughput=Ln.prototype.Hh;
|
|
558
559
|
Ln.prototype.getMaxBitrate=Ln.prototype.Ih;var Nn="etp",Mn="mb",On="rd",Pn="rtt";function fo(){this.g=null;this.h=[]}function go(a,b){return O(function(c){if(1==c.g)return a.g?E(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;F(c)})}fo.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){gb.call(this);var c=this;this.l=ho;this.jf=this.h=null;this.ea=!1;this.xf=new od;this.Ic=new od;this.m=new od;this.Ba=new od;this.Ec=new od;this.G=this.H=this.F=this.I=null;this.yf=0;this.S=new fo;this.ha=this.lh=this.X=this.i=this.Ha=this.K=this.j=this.kb=this.L=this.mh=this.$=this.O=this.Cc=this.N=this.rf=this.J=this.Za=null;this.Na=!1;this.qa=this.o=null;this.Lf=1E9;this.je=[];this.R=NaN;this.g=io(this);this.ba={width:Infinity,height:Infinity};this.gf=new ti(this.g,this.ba,null);
|
|
559
560
|
this.Jf=[];this.u=null;this.xa=new Wf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Ea=this.g.preferredTextLanguage;this.fe=this.g.preferredTextRole;this.ce=this.g.preferForcedSubs;this.ae=[];b&&b(this);this.O=jo(this);this.$=new Ln(this.g.cmsd);
|
|
560
561
|
this.I=ko(this);this.I.Zg(this.g.streaming.forceHTTP);this.I.$g(this.g.streaming.forceHTTPS);this.Nf=this.ma=this.A=null;this.Mf=new Ub(function(){return O(function(d){if(1==d.g)return c.ma?E(d,c.vc(c.Nf,!0),3):d.B(0);if(4!=d.g)return E(d,c.load(c.ma),4);c.Nf.play();c.ma=null;F(d)})});lo&&(this.A=lo(),this.A.configure(this.g.ads),this.Ec.s(this.A,"ad-started",function(d){var e,f,g;return O(function(h){if(1==h.g){if(c.g.ads.supportsMultipleMediaElements)return h.return();e=d.originalEvent;if(!e)return h.return();
|
|
@@ -579,22 +580,22 @@ function Co(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value
|
|
|
579
580
|
q.Bh=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,Fo(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
|
|
580
581
|
function Fo(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.K&&a.Ha&&a.X))return e.B(2);c=a.h.currentTime;a.U()&&(c=null);d=Date.now()/1E3;return E(e,Go(a,a.X,c,a.lh,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.K,h=a.Ha;f.h=a.i;f.j=g;f.G=h;f=b;g=a.qa;f.i=a.o;f.A=g;b.o=a.xa;b.start();a.i=null;a.K=null;a.Ha=null;a.o=null;a.qa=null}return e.return(b)})}
|
|
581
582
|
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 E(f,Ao(d,a,b,c),2);(e=f.h)?e.start():wo(d,new U(2,7,7005));return f.return(e)})};function Ao(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.B(2):E(l,zo(a,b),3);2!=l.g&&(d=l.h);if(g=Ho(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.qa==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(Go(a,b,c,d||null,f,!e,h,k))})}
|
|
582
|
-
function Go(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,p,r,u,v,w,A,y,C,z,B,D;return O(function(K){if(1==K.g)return k=null,l=Xe(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.O&&k.u?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(
|
|
583
|
-
filter:function(
|
|
584
|
-
new S("regionadd",new Map([["region",
|
|
585
|
-
(new Map).set("isLive",a.U());k.dispatchEvent(qo("manifestupdated",
|
|
586
|
-
|
|
587
|
-
var
|
|
588
|
-
!yi.includes(R)}
|
|
583
|
+
function Go(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,p,r,u,v,w,A,y,C,z,B,D;return O(function(K){if(1==K.g)return k=null,l=Xe(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.O&&k.u?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(G,I){m()?k.configure(G,I):a.configure(G,I)},Infinity!=a.ba.width||Infinity!=a.ba.height?K.B(2):E(K,uc(),3);2!=K.g&&(r=K.h,a.ba.width=r.width,a.ba.height=r.height);u=new ti(l,a.ba,null);v={networkingEngine:a.I,
|
|
584
|
+
filter:function(G){var I,J;return O(function(H){if(1==H.g)return E(H,ui(u,G),2);if(4!=H.g){I=H.h;if(!I)return H.B(0);J=qo("trackschanged");return E(H,Promise.resolve(),4)}k.dispatchEvent(J);F(H)})},makeTextStreamsForClosedCaptions:function(G){return Io(a,G)},onTimelineRegionAdded:function(G){var I=k.H;a:{var J=t(I.g);for(var H=J.next();!H.done;H=J.next())if(H=H.value,H.schemeIdUri==G.schemeIdUri&&H.id==G.id&&H.startTime==G.startTime&&H.endTime==G.endTime){J=H;break a}J=null}null==J&&(I.g.add(G),G=
|
|
585
|
+
new S("regionadd",new Map([["region",G]])),I.dispatchEvent(G))},onEvent:function(G){return k.dispatchEvent(G)},onError:function(G){return k.onError(G)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){p("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.O&&a.j.updateDuration()},newDrmInfo:function(G){var I=k.l,J=I?I.g:null;J&&I.u&&wi(u,J.keySystem,G)},onManifestUpdated:function(){var G=
|
|
586
|
+
(new Map).set("isLive",a.U());k.dispatchEvent(qo("manifestupdated",G));Bm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new wl(function(){return a.Ta()});w.addEventListener("regionadd",function(G){var I=G.region;Jo(a,"timelineregionadded",I,k);Bm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(I)})});A=null;l.streaming.observeQualityChanges&&(A=new xl(function(){return a.Mb()}),A.addEventListener("qualitychange",function(G){var I=
|
|
587
|
+
G.quality;G=G.position;I=(new Map).set("mediaQuality",{bandwidth:I.bandwidth,audioSamplingRate:I.audioSamplingRate,codecs:I.codecs,contentType:I.contentType,frameRate:I.frameRate,height:I.height,mimeType:I.mimeType,channelsCount:I.channelsCount,pixelAspectRatio:I.pixelAspectRatio,width:I.width}).set("position",G);a.dispatchEvent(qo("mediaqualitychanged",I))}));y=!0;C={Zb:a.I,onError:function(G){return k.onError(G)},bf:function(G){Bm(k,!0,function(){a:{var I=G,J=qo("keystatuschanged");a.dispatchEvent(J);
|
|
588
|
+
var H=Object.keys(I);1==H.length&&""==H[0]&&(H=["00"],I={"00":I[""]});J=1==H.length&&"00"==H[0];var L=!1;if(H.length){H=t(a.i.variants);for(var N=H.next();!N.done;N=H.next()){N=N.value;var M=[];N.audio&&M.push(N.audio);N.video&&M.push(N.video);M=t(M);for(var P=M.next();!P.done;P=M.next()){var T=P.value;P=N.allowedByKeySystem;if(T.keyIds.size){N.allowedByKeySystem=!0;T=t(T.keyIds);for(var R=T.next();!R.done;R=T.next())if(R=R.value,(R=I[J?"00":R])||a.F.H)N.allowedByKeySystem=N.allowedByKeySystem&&!!R&&
|
|
589
|
+
!yi.includes(R)}P!=N.allowedByKeySystem&&(L=!0)}}}if(L&&(Ko(a),!Lo(a)))break a;(I=a.j.j)&&!I.allowedByKeySystem&&Mo(a)}})},onExpirationUpdated:function(G,I){var J=qo("expirationupdated");k.dispatchEvent(J);if((J=k.j)&&J.onExpirationUpdated)J.onExpirationUpdated(G,I)},onEvent:function(G){k.dispatchEvent(G);"drmsessionupdate"==G.type&&y&&(y=!1,G=Date.now()/1E3-k.qa,(a.u||k.getStats()).j=G,a.L&&Ej(a.L))}};z=ko(a,m);zg(a.I,z);B=function(){return a.Xc(C)};D={config:l,Qj:v,Zj:w,Yj:A,Xc:B,Pj:u,networkingEngine:z,
|
|
589
590
|
Ji:f,Ii:h};k=new Am(b,d,e,c,D);a.Jf.push(k);return K.return(k)})}function zo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Um(b,a.I,c),2);d=e.h;"application/x-mpegurl"==d&&hc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
590
591
|
function Ho(a,b){if(!Vb())return!0;if(b){if(""==(a.h||Xb()).canPlayType(b))return!1;if(!(Vb()&&b in Bi))return!0;if(Le(b)){if(a.g.streaming.preferNativeHls)return!0;if(hc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(hc())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
591
592
|
function xo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return to(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):xd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Kf=b,d=No(a.h,c,{dj:function(){return a.keySystem()},cf:function(h,k,l){Oo(a,h,k,l)}},a.L),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ha=f,E(g,d.N,2);a.H=d;F(g)})}
|
|
592
|
-
function Do(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
593
|
-
Ro(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(
|
|
594
|
-
p.value)&&!r.segmentIndex&&l.push(r.createSegmentIndex());if(!(0<l.length)){
|
|
595
|
-
break}v=a.i.presentationTimeline;w=a.ha||a.h.currentTime;A=v.ic();y=v.Ob();w<A?w=A:w>y&&(w=y);return E(
|
|
596
|
-
Lo(a);a.i.variants.some(function(
|
|
597
|
-
a.m.Xa(e,"timeupdate",
|
|
593
|
+
function Do(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I;return O(function(J){switch(J.g){case 1:to(a,"load");e=a.h;a.J=new al({Me:function(){return e.playbackRate},Ac:function(){return e.defaultPlaybackRate},ah:function(H){e.playbackRate=H},Th:function(H){e.currentTime+=H}});f=function(){return Po(a)};g=function(){return Qo(a)};a.m.s(e,"playing",f);a.m.s(e,"pause",f);a.m.s(e,"ended",f);a.m.s(e,"ratechange",g);po(a,a.g);a.Ea=a.g.preferredTextLanguage;a.fe=a.g.preferredTextRole;a.ce=a.g.preferForcedSubs;
|
|
594
|
+
Ro(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(H,L,N){a.i&&a.j&&H!=a.j.j&&So(a,H,!0,void 0===L?!1:L,void 0===N?0:N)});a.o.setMediaElement(e);a.o.setCmsdManager(a.$);a.j=To(a);a.j.configure(a.g.streaming);a.l=Uo;e.textTracks&&a.m.s(e.textTracks,"addtrack",function(H){if(H.track)switch(H=H.track,H.kind){case "chapters":Vo(a,H)}});a.dispatchEvent(qo("streaming"));h=c;(k=a.j.j)||h||(h=Wo(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(r=
|
|
595
|
+
p.value)&&!r.segmentIndex&&l.push(r.createSegmentIndex());if(!(0<l.length)){J.B(2);break}return E(J,Promise.all(l),2);case 2:if(a.K&&a.K.onInitialVariantChosen)a.K.onInitialVariantChosen(m);Ro(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Il(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(H){a.G=Xo(a,H);a.Za=Yo(a,H);Zo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ha);if(k){J.B(4);break}if(!a.g.streaming.startAtSegmentBoundary){J.B(5);
|
|
596
|
+
break}v=a.i.presentationTimeline;w=a.ha||a.h.currentTime;A=v.ic();y=v.Ob();w<A?w=A:w>y&&(w=y);return E(J,$o(h,w),6);case 6:C=J.h,u(C);case 5:So(a,h,!0,!1,0);case 4:return a.G.Pf(),z=a.kc().find(function(H){return H.active}),z||((B=Gf(a.i.textStreams,a.Ea,a.fe,a.ce)[0]||null)&&il(a.u.h,B,!0),h&&(B?(ap(a,h.audio,B)&&(a.ea=!0),a.ea&&a.H.H.setTextVisibility(!0),bp(a)):a.ea=!1),B&&(a.g.streaming.alwaysStreamText||a.Hc())&&Rl(a.j,B)),E(J,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),cp(a));Ko(a);
|
|
597
|
+
Lo(a);a.i.variants.some(function(H){return H.primary});if((D=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)K=function(){return dp(a)},a.m.s(e,"timeupdate",K);D||(G=function(){return ep(a)},a.m.s(e,"timeupdate",G),ep(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(I=function(){var H,L;return O(function(N){if(1==N.g){H=a.h.duration-a.h.currentTime;if(isNaN(H)||!(H<=a.g.streaming.preloadNextUrlWindow))return N.B(0);
|
|
598
|
+
a.m.Xa(e,"timeupdate",I);L=a;return E(N,a.preload(a.i.nextUrl),4)}L.na=N.h;F(N)})},a.m.s(e,"timeupdate",I)),a.m.s(e,"ended",function(){a.load(a.na||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(D);a.Na=!0;a.m.oa(e,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});F(J)}})}
|
|
598
599
|
function Bo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Uc,d=Date.now()/1E3,e=!0,a.F=a.Xc({Zb:a.I,onError:function(k){wo(a,k)},bf:function(){},onExpirationUpdated:function(){var k=qo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.u.j=Date.now()/1E3-d)}}),a.F.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
599
600
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Je(b):"",codecs:b?Ke(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.sa,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(te(g.mimeType,
|
|
600
601
|
g.codecs)),b.startsWith("audio/")?(g.type=c.aa,f.audio=g):f.video=g,a.F.$=!0,E(h,Qh(a.F,[f],[]),2)):E(h,a.F.vc(a.h),0)})}
|
|
@@ -605,13 +606,13 @@ a.m.s(d.textTracks,"change",function(){return Ko(a)})),d.src=tn(a.O,a.X,c),(ac()
|
|
|
605
606
|
l]),2);if((m=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return dp(a)},a.m.s(d,"timeupdate",n);m||(p=function(){return ep(a)},a.m.s(d,"timeupdate",p),ep(a));a.A&&(a.A.onManifestUpdated(m),m&&(r=a.Ta().end,a.m.s(d,"progress",function(){var v=a.Ta().end;r!=v&&(a.A.onManifestUpdated(a.U()),r=v)})));a.Na=!0;F(u)})}function hp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.lf(b,a.g.preferredVariantRole)}
|
|
606
607
|
function jp(a){var b=a.g.preferredTextLanguage;""!=b&&a.Ug(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
607
608
|
function fp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.s(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,kp(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Ub(function(){var d=lp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Pa().V(.5);a.ae.push(function(){c.stop()})}}
|
|
608
|
-
function Oo(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())kp(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function kp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(qo("metadata",b))}
|
|
609
|
+
function Oo(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())kp(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function kp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(qo("metadata",b))}
|
|
609
610
|
function Vo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ub(function(){b.mode="hidden"})).Pa().V(.5);a.ae.push(function(){c.stop()})}}q.dk=function(){for(var a=this.S;a.g;)a.release()};q.Xc=function(a){return new Jh(a)};
|
|
610
611
|
function ko(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Bm(b(),!0,e):e()}b||(b=function(){return null});return new vg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(qo("downloadheadersreceived",f));d(function(){if(a.$){var h=a.$;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],
|
|
611
612
|
Qn(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],Qn(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(qo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.O,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)An(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
612
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}An(h,f,{ot:xn,su:!h.i})}}catch(
|
|
613
|
-
if(r.segmentIndex&&m){var w=r.segmentIndex.Wb(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Qd(m.P(),A.P())){var y=A.P()[0],C=f.uris[0],z=new URL(y),B=new URL(C);if(z.origin!==B.origin)var D=y;else{for(var K=z.pathname.split("/").slice(1),
|
|
614
|
-
500,
|
|
613
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}An(h,f,{ot:xn,su:!h.i})}}catch(M){Za("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case Gg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=En(k);var p=n.ot===Bn||n.ot===vn||n.ot===wn||n.ot===Gn,r=k.stream;if(r){var u=h.h.Ra();if(p&&(n.bl=In(h,r.type),n.ot!==Gn)){var v=Jn(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);
|
|
614
|
+
if(r.segmentIndex&&m){var w=r.segmentIndex.Wb(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Qd(m.P(),A.P())){var y=A.P()[0],C=f.uris[0],z=new URL(y),B=new URL(C);if(z.origin!==B.origin)var D=y;else{for(var K=z.pathname.split("/").slice(1),G=B.pathname.split("/").slice(1,-1);K[0]===G[0];)K.shift(),G.shift();for(;G.length;)G.shift(),K.unshift("..");D=K.join("/")}n.nor=D}if((A.Wa||A.Da)&&(m.Wa!=A.Wa||m.Da!=A.Da)){var I=A.Wa+"-";A.Da&&(I+=A.Da);n.nrr=I}}}var J=h.h.Ra()||1,H=Jn(h,r.type)||
|
|
615
|
+
500,L=r.bandwidth;var N=L?L*(m.endTime-m.startTime)/1E3/(H/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}p&&n.ot!==Gn&&(n.tb=Kn(h,n.ot)/1E3);An(h,f,n)}}catch(M){Za("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:An(h,f,{ot:"k"});break;case 4:An(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.K)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.u)&&(f.Be=isNaN(f.Be)?e:f.Be+e)})}
|
|
615
616
|
function Xo(a,b){return new Sk(a.h,a.i,a.g.streaming,b,function(){a.Za&&dl(a.Za,!0);a.j&&a.j.le();a.N&&mp(a)},function(c){return a.dispatchEvent(c)})}
|
|
616
617
|
function Yo(a,b){b=new Pm(a.Cc,a.U()||0<b);b.addEventListener("enter",function(d){Jo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Jo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Jo(a,"timelineregionenter",e),Jo(a,"timelineregionexit",e))});var c=new cl(a.h);c.g.add(b);a.kb&&c.g.add(a.kb);return c}
|
|
617
618
|
function Zo(a,b,c){a.N=new eg;a.N.g=gg;hg(a.N,c,Math.min(.5,c/2));yo(a);a.rf=(new Ub(function(){mp(a)})).za(.25);a.m.s(b,"waiting",function(){return mp(a)});a.m.s(b,"stalled",function(){return mp(a)});a.m.s(b,"canplaythrough",function(){return mp(a)});a.m.s(b,"progress",function(){return mp(a)})}
|
|
@@ -686,12 +687,12 @@ function Mo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=vo
|
|
|
686
687
|
function qp(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=Df(c),b=Df(b),zp(a,c,b))}function ap(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Xc(a.g.preferredTextLanguage);c=Xc(c.language);if(2==a.g.autoShowText)return Wc(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Xc(b.language);return Wc(c,d)&&!Wc(a,c)}Ya("Invalid autoShowText setting!");return!1}
|
|
687
688
|
function Ko(a){var b=qo("trackschanged");yp(a,b)}function zp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Fj(a.L,c,a.sg());c=qo("variantchanged",b);yp(a,c)}function pp(a){var b=qo("textchanged");yp(a,b)}function bp(a){var b=qo("texttrackvisibility");yp(a,b)}function cp(a){a.g.abr.enabled||mo(a);var b=(new Map).set("newStatus",a.g.abr.enabled);yp(a,qo("abrstatuschanged",b))}
|
|
688
689
|
function mo(a,b){b=void 0===b?!0:b;if(a.l==Uo){a.uf.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Lo(a)}}
|
|
689
|
-
q.He=function(a,b){if(!this.g.abr.enabled||this.l===ro||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.uf.za(1);b=this.Mb().video.reduce(function(f,g){return f+g.end-g.start},0);Mo(this,!1,b,!0,!1);return!0}return!1};
|
|
690
|
+
q.He=function(a,b){if(!this.g.abr.enabled||this.l===ro||!navigator.onLine||0==b)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.uf.za(1);b=this.Mb().video.reduce(function(f,g){return f+g.end-g.start},0);Mo(this,!1,b,!0,!1);return!0}return!1};
|
|
690
691
|
function wo(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==ro)return f.return();c=!0;if(!(a.Na&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.B(2);break}ta(f,3);return E(f,jm(a.j),5);case 5:d=f.h;c=!d;va(f,2);break;case 3:wa(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&mo(a,!1);e=qo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);F(f)}})}
|
|
691
692
|
function Jo(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(qo(b,a))}function vo(a){if(!a.h.error)return null;var b=a.h.error.code;if(1==b)return null;var c=a.h.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new U(2,3,3016,b,c,a.h.error.message)}
|
|
692
693
|
function Ro(a,b,c){0<b&&(a.U()||a.li(b));b=a.getDuration();c<b&&(a.U()||a.sb(c))}function yp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=ro&&a.dispatchEvent(b);F(c)})}function sp(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(Xc(c.language)):b.add("und");return b}
|
|
693
694
|
function rp(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=Xc(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));
|
|
694
|
-
h.push({language:l,role:m,label:n})}});return h}
|
|
695
|
+
h.push({language:l,role:m,label:n})}});return h}Q("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.dh;X.prototype.getManifestParserFactory=X.prototype.hj;X.prototype.getManifest=X.prototype.rg;X.prototype.retryStreaming=X.prototype.Rg;X.prototype.setMaxHardwareResolution=X.prototype.yk;X.prototype.addChaptersTrack=X.prototype.Di;X.prototype.addThumbnailsTrack=X.prototype.Fi;X.prototype.addTextTrackAsync=X.prototype.Ei;X.prototype.getStats=X.prototype.getStats;
|
|
695
696
|
X.prototype.getBufferedInfo=X.prototype.Mb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Ne;X.prototype.getPresentationStartTimeAsDate=X.prototype.Jh;X.prototype.getPlayheadTimeAsDate=X.prototype.lj;X.prototype.setTextTrackVisibility=X.prototype.pf;X.prototype.getChapters=X.prototype.Ui;X.prototype.getChaptersTracks=X.prototype.Gh;X.prototype.isTextTrackVisible=X.prototype.Hc;X.prototype.selectVariantsByLabel=X.prototype.qk;X.prototype.selectTextLanguage=X.prototype.Ug;
|
|
696
697
|
X.prototype.selectAudioLanguage=X.prototype.lf;X.prototype.getTextLanguages=X.prototype.qj;X.prototype.getAudioLanguages=X.prototype.Ri;X.prototype.getTextLanguagesAndRoles=X.prototype.rj;X.prototype.getAudioLanguagesAndRoles=X.prototype.Si;X.prototype.selectVariantTrack=X.prototype.mf;X.prototype.selectTextTrack=X.prototype.Vg;X.prototype.getThumbnails=X.prototype.vg;X.prototype.getAllThumbnails=X.prototype.Qi;X.prototype.getImageTracks=X.prototype.Je;X.prototype.getTextTracks=X.prototype.kc;
|
|
697
698
|
X.prototype.getVariantTracks=X.prototype.Db;X.prototype.cancelTrickPlay=X.prototype.Wc;X.prototype.trickPlay=X.prototype.Oc;X.prototype.getPlaybackRate=X.prototype.Ra;X.prototype.isBuffering=X.prototype.Xd;X.prototype.getKeyStatuses=X.prototype.Ke;X.prototype.getActiveSessionsMetadata=X.prototype.pg;X.prototype.getExpiration=X.prototype.Qd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Aj;X.prototype.seekRange=X.prototype.Ta;
|
|
@@ -699,14 +700,14 @@ X.prototype.isAudioOnly=X.prototype.ed;X.prototype.isInProgress=X.prototype.Gc;X
|
|
|
699
700
|
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.dk;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Bh;X.prototype.unloadAndSavePreload=X.prototype.Ck;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Gk;X.prototype.unload=X.prototype.Pc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.qh;X.prototype.attach=X.prototype.vc;
|
|
700
701
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.B(2);break}return E(k,qi(),3);case 3:b=k.h;case 2:var l={};if(Vb())for(var m in Bi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Vb()?!!Bi[n]:Wb(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(ue));
|
|
701
702
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Ne(n)?!0:Vb()?td(n)||(ne(n)?!0:!1):Wb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,uc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Ap;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=so;X.setAdManagerFactory=function(a){lo=a};X.registerSupportPlugin=function(a,b){Ap[a]=b};X.prototype.destroy=X.prototype.destroy;var ro=0,ho=1,Uo=2,gp=3;
|
|
702
|
-
X.LoadMode={DESTROYED:ro,NOT_LOADED:ho,MEDIA_SOURCE:Uo,SRC_EQUALS:gp};X.version="v4.9.
|
|
703
|
+
X.LoadMode={DESTROYED:ro,NOT_LOADED:ho,MEDIA_SOURCE:Uo,SRC_EQUALS:gp};X.version="v4.9.21";var Bp=["4","9"];yd=new function(a){this.g=a;this.i=zd;this.h=Ad}(new wd(Number(Bp[0]),Number(Bp[1])));var Ap={},lo=null;function Cp(){this.h=[];this.j=this.i=this.g=0};function Dp(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 od;this.m.s(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.s(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Dp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
703
704
|
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)};
|
|
704
705
|
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)};
|
|
705
706
|
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()};
|
|
706
|
-
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};
|
|
707
|
+
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};Q("shaka.ads.ClientSideAd",Dp);Dp.prototype.release=Dp.prototype.release;
|
|
707
708
|
Dp.prototype.getPodIndex=Dp.prototype.getPodIndex;Dp.prototype.getTimeOffset=Dp.prototype.getTimeOffset;Dp.prototype.getMediaUrl=Dp.prototype.getMediaUrl;Dp.prototype.getAdvertiserName=Dp.prototype.getAdvertiserName;Dp.prototype.getCreativeAdId=Dp.prototype.getCreativeAdId;Dp.prototype.getAdId=Dp.prototype.getAdId;Dp.prototype.getVastMediaWidth=Dp.prototype.getVastMediaWidth;Dp.prototype.getVastMediaHeight=Dp.prototype.getVastMediaHeight;Dp.prototype.getVastMediaBitrate=Dp.prototype.getVastMediaBitrate;
|
|
708
709
|
Dp.prototype.getDescription=Dp.prototype.getDescription;Dp.prototype.getTitle=Dp.prototype.getTitle;Dp.prototype.getPositionInSequence=Dp.prototype.getPositionInSequence;Dp.prototype.getSequenceLength=Dp.prototype.getSequenceLength;Dp.prototype.setMuted=Dp.prototype.setMuted;Dp.prototype.resize=Dp.prototype.resize;Dp.prototype.isLinear=Dp.prototype.isLinear;Dp.prototype.isMuted=Dp.prototype.isMuted;Dp.prototype.setVolume=Dp.prototype.setVolume;Dp.prototype.getVolume=Dp.prototype.getVolume;
|
|
709
|
-
Dp.prototype.play=Dp.prototype.play;Dp.prototype.pause=Dp.prototype.pause;Dp.prototype.skip=Dp.prototype.skip;Dp.prototype.canSkipNow=Dp.prototype.canSkipNow;Dp.prototype.getTimeUntilSkippable=Dp.prototype.getTimeUntilSkippable;Dp.prototype.isSkippable=Dp.prototype.isSkippable;Dp.prototype.isPaused=Dp.prototype.isPaused;Dp.prototype.getRemainingTime=Dp.prototype.getRemainingTime;Dp.prototype.getMinSuggestedDuration=Dp.prototype.getMinSuggestedDuration;Dp.prototype.getDuration=Dp.prototype.getDuration;function Ep(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new od;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.
|
|
710
|
+
Dp.prototype.play=Dp.prototype.play;Dp.prototype.pause=Dp.prototype.pause;Dp.prototype.skip=Dp.prototype.skip;Dp.prototype.canSkipNow=Dp.prototype.canSkipNow;Dp.prototype.getTimeUntilSkippable=Dp.prototype.getTimeUntilSkippable;Dp.prototype.isSkippable=Dp.prototype.isSkippable;Dp.prototype.isPaused=Dp.prototype.isPaused;Dp.prototype.getRemainingTime=Dp.prototype.getRemainingTime;Dp.prototype.getMinSuggestedDuration=Dp.prototype.getMinSuggestedDuration;Dp.prototype.getDuration=Dp.prototype.getDuration;function Ep(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new od;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.21");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.s(this.l,
|
|
710
711
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Fp(f,g)});this.h.s(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Gp(f,g)});this.h.s(this.i,"ended",function(){f.l.contentComplete()});this.h.oa(this.i,"play",function(){f.H=!0})}Ep.prototype.configure=function(a){this.u=a};Ep.prototype.stop=function(){this.g&&this.g.stop();this.o&&fn(this.o)};
|
|
711
712
|
Ep.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.G.destroy()};function Gp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new S("ad-error",b));Hp(a,null);a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
712
713
|
function Fp(a,b){a.m(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.s(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.s(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.F);a.m(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -722,7 +723,7 @@ function Kp(a,b){var c=b.getAd();c?(a.j=new Dp(c,a.g,a.i),b=(new Map).set("ad",a
|
|
|
722
723
|
function Hp(a,b){a.m(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.u.customPlayheadTracker||a.i.ended||a.i.play())};function Lp(a){this.h=a||"";this.g=0}function Mp(a){Np(a,/[ \t]+/gm)}function Np(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 Op(a){return a.g==a.h.length?null:(a=Np(a,/[^ \t\n]*/gm))?a[0]:null};function Pp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Np(new Lp(a),Qp),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=Pp.prototype;q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
|
|
723
724
|
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()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};
|
|
724
725
|
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""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};
|
|
725
|
-
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};
|
|
726
|
+
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};Q("shaka.ads.MediaTailorAd",Pp);Pp.prototype.release=Pp.prototype.release;Pp.prototype.getPodIndex=Pp.prototype.getPodIndex;Pp.prototype.getTimeOffset=Pp.prototype.getTimeOffset;
|
|
726
727
|
Pp.prototype.getMediaUrl=Pp.prototype.getMediaUrl;Pp.prototype.getAdvertiserName=Pp.prototype.getAdvertiserName;Pp.prototype.getCreativeAdId=Pp.prototype.getCreativeAdId;Pp.prototype.getAdId=Pp.prototype.getAdId;Pp.prototype.getVastMediaWidth=Pp.prototype.getVastMediaWidth;Pp.prototype.getVastMediaHeight=Pp.prototype.getVastMediaHeight;Pp.prototype.getVastMediaBitrate=Pp.prototype.getVastMediaBitrate;Pp.prototype.getDescription=Pp.prototype.getDescription;Pp.prototype.getTitle=Pp.prototype.getTitle;
|
|
727
728
|
Pp.prototype.getPositionInSequence=Pp.prototype.getPositionInSequence;Pp.prototype.getSequenceLength=Pp.prototype.getSequenceLength;Pp.prototype.setMuted=Pp.prototype.setMuted;Pp.prototype.resize=Pp.prototype.resize;Pp.prototype.isLinear=Pp.prototype.isLinear;Pp.prototype.isMuted=Pp.prototype.isMuted;Pp.prototype.setVolume=Pp.prototype.setVolume;Pp.prototype.getVolume=Pp.prototype.getVolume;Pp.prototype.play=Pp.prototype.play;Pp.prototype.pause=Pp.prototype.pause;Pp.prototype.skip=Pp.prototype.skip;
|
|
728
729
|
Pp.prototype.canSkipNow=Pp.prototype.canSkipNow;Pp.prototype.getTimeUntilSkippable=Pp.prototype.getTimeUntilSkippable;Pp.prototype.isSkippable=Pp.prototype.isSkippable;Pp.prototype.isPaused=Pp.prototype.isPaused;Pp.prototype.getRemainingTime=Pp.prototype.getRemainingTime;Pp.prototype.getMinSuggestedDuration=Pp.prototype.getMinSuggestedDuration;Pp.prototype.getDuration=Pp.prototype.getDuration;var Qp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Rp(a,b,c,d){this.F=a;this.L=b;this.h=c;this.l=null;this.S=NaN;this.i=d;this.K=!1;this.A=null;this.j=[];this.O=[];this.N=this.G=this.g=null;this.H=new Map;this.m=[];this.u=[];this.I="";this.R=!0;this.J="";this.o=new od}Rp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Xa(b.target,b.type,b.listener);Sp(this);this.m=[];this.u=[];this.I="";this.R=!0;this.J="";this.A=null;this.j=[];this.O=[];this.H.clear()};
|
|
@@ -746,7 +747,7 @@ case "resume":a.i(new S("ad-resumed"));break;case "pause":a.i(new S("ad-paused")
|
|
|
746
747
|
break;case "skipStateChanged":a.i(new S("ad-skip-state-changed"))}};function bq(a,b){this.g=a;this.i=null;this.h=b}q=bq.prototype;q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
747
748
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.h.muted=a};
|
|
748
749
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};
|
|
749
|
-
q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};
|
|
750
|
+
q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};Q("shaka.ads.ServerSideAd",bq);bq.prototype.release=bq.prototype.release;bq.prototype.getPodIndex=bq.prototype.getPodIndex;
|
|
750
751
|
bq.prototype.getTimeOffset=bq.prototype.getTimeOffset;bq.prototype.getMediaUrl=bq.prototype.getMediaUrl;bq.prototype.getAdvertiserName=bq.prototype.getAdvertiserName;bq.prototype.getCreativeAdId=bq.prototype.getCreativeAdId;bq.prototype.getAdId=bq.prototype.getAdId;bq.prototype.getVastMediaWidth=bq.prototype.getVastMediaWidth;bq.prototype.getVastMediaHeight=bq.prototype.getVastMediaHeight;bq.prototype.getVastMediaBitrate=bq.prototype.getVastMediaBitrate;bq.prototype.getDescription=bq.prototype.getDescription;
|
|
751
752
|
bq.prototype.getTitle=bq.prototype.getTitle;bq.prototype.getPositionInSequence=bq.prototype.getPositionInSequence;bq.prototype.getSequenceLength=bq.prototype.getSequenceLength;bq.prototype.setMuted=bq.prototype.setMuted;bq.prototype.resize=bq.prototype.resize;bq.prototype.isLinear=bq.prototype.isLinear;bq.prototype.isMuted=bq.prototype.isMuted;bq.prototype.setVolume=bq.prototype.setVolume;bq.prototype.getVolume=bq.prototype.getVolume;bq.prototype.play=bq.prototype.play;bq.prototype.pause=bq.prototype.pause;
|
|
752
753
|
bq.prototype.skip=bq.prototype.skip;bq.prototype.canSkipNow=bq.prototype.canSkipNow;bq.prototype.getTimeUntilSkippable=bq.prototype.getTimeUntilSkippable;bq.prototype.isSkippable=bq.prototype.isSkippable;bq.prototype.isPaused=bq.prototype.isPaused;bq.prototype.getRemainingTime=bq.prototype.getRemainingTime;bq.prototype.getMinSuggestedDuration=bq.prototype.getMinSuggestedDuration;bq.prototype.getDuration=bq.prototype.getDuration;function cq(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.I=!1;this.A=this.m=this.o=null;this.F="";this.G=[];this.h=new od;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){dq(e,f)});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
|
|
@@ -758,11 +759,11 @@ function dq(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
758
759
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);gb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.j=new Cp};q.requestClientSideAds=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.I=Date.now()/1E3;b.l.requestAds(a)};
|
|
759
760
|
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Rp(a,b,c,function(e){return fq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new U(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new lg,Up(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
760
761
|
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new U(1,10,10005);var b=this.h;b.I=a;b.i(new S("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 U(2,10,10002);this.g&&this.g.release();this.g=new cq(a,b,this.m,function(d){return fq(c,d)});this.g.configure(this.l)};
|
|
761
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&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.9.
|
|
762
|
-
(c.I=!0),c.j=new lg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(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.9.
|
|
762
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&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.9.21";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
763
|
+
(c.I=!0),c.j=new lg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(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.9.21";this.g.g.replaceAdTagParameters(a)};
|
|
763
764
|
q.getServerSideCuePoints=function(){xd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
764
765
|
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)};
|
|
765
|
-
function fq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}
|
|
766
|
+
function fq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}Q("shaka.ads.AdManager",eq);eq.prototype.onCueMetadataChange=eq.prototype.onCueMetadataChange;eq.prototype.onHlsTimedMetadata=eq.prototype.onHlsTimedMetadata;eq.prototype.onDashTimedMetadata=eq.prototype.onDashTimedMetadata;eq.prototype.onManifestUpdated=eq.prototype.onManifestUpdated;
|
|
766
767
|
eq.prototype.getStats=eq.prototype.getStats;eq.prototype.getCuePoints=eq.prototype.getCuePoints;eq.prototype.getServerSideCuePoints=eq.prototype.getServerSideCuePoints;eq.prototype.replaceServerSideAdTagParameters=eq.prototype.replaceServerSideAdTagParameters;eq.prototype.requestServerSideStream=eq.prototype.requestServerSideStream;eq.prototype.initServerSide=eq.prototype.initServerSide;eq.prototype.addMediaTailorTrackingUrl=eq.prototype.addMediaTailorTrackingUrl;
|
|
767
768
|
eq.prototype.requestMediaTailorStream=eq.prototype.requestMediaTailorStream;eq.prototype.initMediaTailor=eq.prototype.initMediaTailor;eq.prototype.updateClientSideAdsRenderingSettings=eq.prototype.updateClientSideAdsRenderingSettings;eq.prototype.requestClientSideAds=eq.prototype.requestClientSideAds;eq.prototype.onAssetUnload=eq.prototype.onAssetUnload;eq.prototype.release=eq.prototype.release;eq.prototype.initClientSide=eq.prototype.initClientSide;eq.prototype.configure=eq.prototype.configure;
|
|
768
769
|
eq.prototype.setLocale=eq.prototype.setLocale;eq.ADS_LOADED="ads-loaded";eq.AD_STARTED="ad-started";eq.AD_FIRST_QUARTILE="ad-first-quartile";eq.AD_MIDPOINT="ad-midpoint";eq.AD_THIRD_QUARTILE="ad-third-quartile";eq.AD_COMPLETE="ad-complete";eq.AD_STOPPED="ad-stopped";eq.AD_SKIPPED="ad-skipped";eq.AD_VOLUME_CHANGED="ad-volume-changed";eq.AD_MUTED="ad-muted";eq.AD_PAUSED="ad-paused";eq.AD_RESUMED="ad-resumed";eq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";eq.CUEPOINTS_CHANGED="ad-cue-points-changed";
|
|
@@ -796,7 +797,7 @@ d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(lq),m=l.ne
|
|
|
796
797
|
function Pq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Oa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Oa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
797
798
|
function Rq(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.hc()};if("getDrmEngine"==b)return function(){return a.h.F};if("getAdManager"==b)return function(){return a.h.Ie()};
|
|
798
799
|
if("setVideoContainer"==b)return function(c){return a.h.dh(c)};if(a.g.Oa()){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.Oa()&&0==Object.keys(a.g.g.video).length&&(nq[b]||oq[b])||!a.g.Oa()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
799
|
-
function Lq(a,b,c){a.g.Oa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
|
|
800
|
+
function Lq(a,b,c){a.g.Oa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}Q("shaka.cast.CastProxy",Iq);Iq.prototype.changeReceiverId=Iq.prototype.wh;Iq.prototype.forceDisconnect=Iq.prototype.Zc;Iq.prototype.suggestDisconnect=Iq.prototype.ni;Iq.prototype.setAppData=Iq.prototype.Wg;Iq.prototype.cast=Iq.prototype.cast;Iq.prototype.receiverName=Iq.prototype.hf;Iq.prototype.isCasting=Iq.prototype.Oa;Iq.prototype.canCast=Iq.prototype.Uf;Iq.prototype.getPlayer=Iq.prototype.bd;
|
|
800
801
|
Iq.prototype.getVideo=Iq.prototype.lc;Iq.prototype.destroy=Iq.prototype.destroy;function Tq(a,b,c,d){gb.call(this);var e=this;this.g=a;this.h=b;this.j=new od;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.o=!0;this.m=0;this.F=!1;this.A=!0;this.u=this.l=null;this.I=new Ub(function(){Uq(e)});Vq(this)}oa(Tq,gb);q=Tq.prototype;q.isConnected=function(){return this.H};q.Fj=function(){return this.o};q.vk=function(a){this.i=a};q.Ni=function(){this.i=null};
|
|
801
802
|
q.wk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.tk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.rk=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
802
803
|
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.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.o=!0,a.l=null,a.u=null,gb.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
@@ -812,7 +813,7 @@ function Zq(a,b){var c=hq(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.A=!0
|
|
|
812
813
|
function Yq(a,b){var c=hq(b.data);switch(c.type){case "PLAY":a.g.play();dr(a);break;case "PAUSE":a.g.pause();dr(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(),dr(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),dr(a));break;case "STOP":a.h.Pc().then(function(){a.h&&dr(a)});break;case "GET_STATUS":gr(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));
|
|
813
814
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||dr(a);break;case "LOAD":a.m=0;a.F=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&gr(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Xq(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:Xq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
814
815
|
function hr(a,b,c,d){a.h&&Xq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Xq(a,b,c,d){a.H&&(a=gq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function dr(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?ir:a.h.Xd()?jr:a.g.paused?kr:lr,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Xq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
815
|
-
|
|
816
|
+
Q("shaka.cast.CastReceiver",Tq);Tq.prototype.destroy=Tq.prototype.destroy;Tq.prototype.setContentArtist=Tq.prototype.rk;Tq.prototype.setContentImage=Tq.prototype.tk;Tq.prototype.setContentTitle=Tq.prototype.wk;Tq.prototype.clearContentMetadata=Tq.prototype.Ni;Tq.prototype.setContentMetadata=Tq.prototype.vk;Tq.prototype.isIdle=Tq.prototype.Fj;Tq.prototype.isConnected=Tq.prototype.isConnected;var fr=.5,br=5,ir="IDLE",lr="PLAYING",jr="BUFFERING",kr="PAUSED";function mr(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=nr(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
816
817
|
r||-1===u)p=or(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,A=v.i,y=v.j,C=v.h;if(w!=h||A!=k||y!=l||C!=m)n.payload&&a.nestedCues.push(n),n=nr(d,e,w,A,y,C),h=w,k=A,l=y,m=C;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=or(d,e),a.nestedCues.push(n));n=nr(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
817
818
|
function nr(a,b,c,d,e,f){a=new Rd(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function or(a,b){a=new Rd(a,b,"");a.lineBreak=!0;return a}function pr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function qr(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.u=b;this.j=this.m=!1;this.l="white";this.o="black";rr(this)}function sr(a,b,c){var d="CC"+((a.A<<1|a.u)+1),e=new Rd(b,c,"");e.lineInterpretation=1;var f=tr.get(a.g);f&&(e.line=f);(b=mr(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=tr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function rr(a){ur(a,0,15);a.g=1}
|
|
818
819
|
function vr(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case wr:d=xr.has(c)?xr.get(c):String.fromCharCode(c);break;case yr:d=zr.get(c);break;case Ar:a.i[a.g].pop();d=Br.get(c);break;case Cr:a.i[a.g].pop(),d=Dr.get(c)}d&&a.i[a.g].push(new pr(d,a.m,a.j,a.o,a.l))}}function Er(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 ur(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
@@ -837,14 +838,14 @@ e-1,e,b.h),ur(b,0,e-1),ur(b,b.g,15-b.g),c.l=a);break;case 46:ur(c.j,0,15);break;
|
|
|
837
838
|
function vs(a,b){var c=[];try{for(;b.Ca();){var d=js(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=js(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new ks(e));for(var g=a.j.get(e),h=b.Ja();b.Ja()-h<f;){e=b;var k=js(e),l=k.value,m=k.pts;if(16===l){var n=js(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!Ur(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.m-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=Vr(r,p,g.i));if(r.h+1>=r.o){p=r;for(var u=
|
|
838
839
|
0,v=1;16>v;v++,u++)p.i[u]=p.i[v];for(v=0;1>v;v++,u++)p.i[u]=Sr()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=Vr(r,p,g.i));r.i[r.h]=Sr();r.g=0;break;case 12:r.isVisible()&&(e=Vr(r,p,g.i)),Rr(r),p=r,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=ls(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Tr(g.g,
|
|
839
840
|
"\u266a"):Tr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Tr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(rs.has(e)){var A=rs.get(e);Tr(g.g,A)}else Tr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Tr(g.g,"_"):Tr(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(y){if(y instanceof U&&3E3===y.code)Za("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}function ws(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
840
|
-
ss.prototype.getStreams=function(){return Array.from(this.A)};
|
|
841
|
+
ss.prototype.getStreams=function(){return Array.from(this.A)};Q("shaka.cea.CeaDecoder",ss);Jd=function(){return new ss};function xs(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 ys(){this.j=new Map;this.i=this.h=0;this.g=zs}
|
|
841
842
|
ys.prototype.init=function(a){function b(f){f=f.name;f in As&&(c.g=As[f])}var c=this,d=[],e=[];(new Pg).box("moov",Ug).box("mvex",Ug).W("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.T();g=g.T();c.h=f;c.i=g}).box("trak",Ug).W("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.T();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.wa();g.wa();g.wa();g.wa();d.push(h)}).box("mdia",Ug).W("mdhd",
|
|
842
843
|
function(f){f=aj(f.reader,f.version);e.push(f.timescale)}).box("minf",Ug).box("stbl",Ug).W("stsd",Wg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Xg).box("sinf",Ug).box("frma",function(f){f=dj(f.reader).cb;f in As&&(c.g=As[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new U(2,2,2010);this.g==zs&&Ya("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
843
844
|
ys.prototype.parse=function(a){var b=this;if(this.g==zs)return[];var c=[],d=0,e=[];(new Pg).box("moof",function(f){d=f.start;e=[];Ug(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Od:b.h,Ge:b.i,Wh:[],timescale:9E4});Ug(f)}).W("trun",function(f){var g=e[e.length-1];f=bj(f.reader,f.version,f.flags);g.Wh.push(f)}).W("tfhd",function(f){var g=e[e.length-1];f=Zi(f.reader,f.flags);g.Od=f.Od||b.h;g.Ge=f.Ge||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).W("tfdt",function(f){var g=e[e.length-
|
|
844
845
|
1];f=$i(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Ja(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Ya("Unable to find base media decode time for CEA captions!"),new U(2,2,2010);f.reader.seek(h);Bs(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Od,l.Ge,g,l.Wh,c)}}).parse(a,!1);return c};
|
|
845
846
|
function Bs(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.$h});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Pi);b.Ca();){g=b.T();var p=b.Y(),r=null;r=!1;h=1;switch(a.g){case Cs:r=p&31;r=6==r;break;case Ds:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].kf||0),p=(c+p)/d,h=t(xs(b.Hb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
846
|
-
c+(n[l].Sg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}
|
|
847
|
-
|
|
847
|
+
c+(n[l].Sg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}Q("shaka.cea.Mp4CeaParser",ys);var zs=0,Cs=1,Ds=2,As={avc1:Cs,avc3:Cs,hev1:Ds,hvc1:Ds,dvav:Cs,dva1:Cs,dvh1:Ds,dvhe:Ds};Hd["video/mp4"]=function(){return new ys};function Es(){this.g=null}Es.prototype.init=function(){};Es.prototype.parse=function(a){this.g?this.g.clearData():this.g=new vj;var b=[];a=Gb(a);if(!Cj(a))return b;a=this.g.parse(a);var c=a.Pd(),d=a.Oe();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(xs(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
848
|
+
Q("shaka.cea.TsCeaParser",Es);Hd["video/mp2t"]=function(){return new Es};function Fs(a,b,c){var d=Gs(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new U(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.nd});if(1<f.length)throw new U(2,4,4050);f.length&&(g=Hs(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.nd}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.nd?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
848
849
|
l.nd});f.length&&(a=Is(e,k,f,c,h),0==a.length&&(a=[Mc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Mc(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Ah:h,Nl:e,drmInfos:a,Rf:g,Eh:!0}}
|
|
849
850
|
function Js(a,b,c,d){var e=Fs(a,c,d);if(b.Eh){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.Eh=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new U(2,4,4008);return e.Ah||b.Ah}
|
|
850
851
|
function Ks(a){var b=0,c=Lb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Gb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ls(a){a=t(nh(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 lh(c)}return""}
|
|
@@ -870,18 +871,18 @@ d)}function at(a){var b=a.g.Ja(),c=a.g.Y();if(0==c)throw new U(2,3,3002);c=8-Mat
|
|
|
870
871
|
function dt(a){if(8<a.g.byteLength)throw new U(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new U(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function et(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Zs(a.g);for(var n=null,p=null;a.Ca();){var r=$s(a);if(187==r.id){var u=ft(r);u&&(r=c*u.Fk,u=b+u.ck,null!=n&&m.push(new Ii(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Ii(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
871
872
|
function ft(a){var b=new Zs(a.g);a=$s(b);if(179!=a.id)throw new U(2,3,3013);a=dt(a);b=$s(b);if(183!=b.id)throw new U(2,3,3012);b=new Zs(b.g);for(var c=0;b.Ca();){var d=$s(b);if(241==d.id){c=dt(d);break}}return{Fk:a,ck:c}};function gt(a,b,c){b=Ts(a,b,"Initialization");if(!b)return null;var d=a.M.Va(),e=b.attributes.sourceURL;e&&(d=Lc(d,[Dc(e)]));e=0;var f=null;if(b=th(b,"range",yh))e=b.start,f=b.end;c=new Gi(function(){return d},e,f,ht(a),null,null,c);c.codecs=a.M.codecs;c.mimeType=a.M.mimeType;return c}
|
|
872
873
|
function it(a,b,c){var d=Number(Ss(a,jt,"presentationTimeOffset"))||0,e=Ss(a,jt,"timescale"),f=1;e&&(f=Ah(e)||1);var g=d/f||0,h=gt(a,jt,c);kt(a,h);var k=Ye(a);return{zc:function(){var l=Ts(k,jt,"RepresentationIndex");var m=k.M.Va();l&&(l=Dc(l.attributes.sourceURL))&&(m=Lc(m,[l]));l=lt(k);return mt(k,b,h,m,l.start,l.end,g)}}}
|
|
873
|
-
function mt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
874
|
-
3,3009);
|
|
875
|
-
D.next())
|
|
874
|
+
function mt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G;return O(function(I){if(1==I.g)return h=a.presentationTimeline,k=!a.Lb||!a.va.$d,l=a.va.start,m=a.va.duration,n=a.M.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.P(),c.Wa,c.Da,!0):null],p=null,E(I,Promise.all(u),2);v=I.h;w=v[0];A=v[1]||null;y=null;C=l-g;z=l;B=m?l+m:Infinity;if("mp4"==n)var J=Xs(w,e,d,c,C,z,B);else{J=new Zs(A);if(440786851!=$s(J).id)throw new U(2,3,3008);var H=$s(J);if(408125543!=H.id)throw new U(2,
|
|
875
|
+
3,3009);J=H.g.byteOffset;H=new Zs(H.g);for(var L=null;H.Ca();){var N=$s(H);if(357149030==N.id){L=N;break}}if(!L)throw new U(2,3,3010);L=new Zs(L.g);N=1E6;for(H=null;L.Ca();){var M=$s(L);if(2807729==M.id)N=dt(M);else if(17545==M.id)if(4==M.g.byteLength)H=M.g.getFloat32(0);else if(8==M.g.byteLength)H=M.g.getFloat64(0);else throw new U(2,3,3003);}if(null==H)throw new U(2,3,3011);L=N/1E9;H*=L;N=$s(new Zs(w));if(475249515!=N.id)throw new U(2,3,3007);J=et(N,J,L,H,d,c,C,z,B)}y=J;D=t(y);for(K=D.next();!K.done;K=
|
|
876
|
+
D.next())G=K.value,G.codecs=a.M.codecs,G.mimeType=a.M.mimeType;h.ee(y);r=new Xk(y);k&&r.Yc(z,B,!0);return I.return(r)})}function jt(a){return a.od}function lt(a){var b=Ts(a,jt,"RepresentationIndex");a=Ss(a,jt,"indexRange");a=yh(a||"");b&&(a=th(b,"range",yh,a));return a}function kt(a,b){nt(a,b);if(!lt(a))throw new U(2,4,4002);}function nt(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Sc&&"mp4"!=c&&"webm"!=c)throw new U(2,4,4006);if("webm"==c&&!b)throw new U(2,4,4005);}
|
|
876
877
|
function ht(a){var b=a.M;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.jd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function ot(a,b,c){var d=gt(a,pt,c),e=qt(a);if(!e.bb&&!e.timeline&&1<e.hd.length)throw new U(2,4,4002);if(!e.bb&&!a.va.duration&&!e.timeline&&1==e.hd.length)throw new U(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new U(2,4,4002);var f=null,g=null;a.La.id&&a.M.id&&(g=b[a.La.id+","+a.M.id])&&(f=g.segmentIndex);var h=rt(a.va.start,a.va.duration,a.M.Va,e,d,c,a.M.mimeType,a.M.codecs);b=!f;f?f.be(h,a.presentationTimeline.Cb()):f=new Xk(h);a.presentationTimeline.ee(h);a.Lb&&a.va.$d||f.Yc(a.va.start,
|
|
877
878
|
a.va.duration?a.va.start+a.va.duration:Infinity,b);g&&(g.segmentIndex=f);return{zc:function(){f&&0!=f.getNumReferences()||f.Xe(h);return Promise.resolve(f)}}}function pt(a){return a.bc}function qt(a){var b=st(a);a=Rs(a,pt);var c=a.me;0==c&&(c=1);var d=0;a.bb?d=a.bb*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{bb:a.bb,startTime:d,me:c,ac:a.ac,timeline:a.timeline,hd:b}}
|
|
878
879
|
function rt(a,b,c,d,e,f,g,h){var k=d.hd.length;d.timeline&&d.timeline.length!=d.hd.length&&(k=Math.min(d.timeline.length,d.hd.length));for(var l=a-d.ac,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={Fd:r.Fd,Dd:r.Dd},u++){r.Dd=d.hd[u];var v=p;p=void 0;p=null!=d.bb?v+d.bb:d.timeline?d.timeline[u].end:v+b;r.Fd=null;v=new Ii(a+v,a+p,function(w){return function(){null==w.Fd&&(w.Fd=Lc(c(),[w.Dd.Tj]));return w.Fd}}(r),r.Dd.start,r.Dd.end,e,l,a,m,[],"",null,null,Ji,f);v.codecs=h;v.mimeType=g;n.push(v)}return n}
|
|
879
880
|
function st(a){return[a.M.bc,a.Ia.bc,a.La.bc].filter(We).map(function(b){return kh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Ag&&(a.Ag=!0);var c=Dc(b.attributes.media);b=th(b,"mediaRange",yh,{start:0,end:null});return{Tj:c,start:b.start,end:b.end}})};function tt(a,b,c,d,e,f,g,h,k){k||a.M.dd||(a.M.dd=Ss(a,ut,"initialization"));var l=a.M.dd?vt(a,g):null,m=wt(a);xt(m);var n=Ye(a);if(m.Wd)return nt(a,l),{zc:function(){var w=Qs(m.Wd,n.M.id,null,null,n.bandwidth||null,null);w=Lc(n.M.Va(),[w]);return mt(n,b,l,w,0,null,m.ac)}};if(m.bb)return d||"image"===a.Ia.contentType||(a.presentationTimeline.Jg(m.bb),a.presentationTimeline.$e(a.va.start)),{zc:function(){return yt(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.La.id&&a.M.id&&(d=a.La.id+","+a.M.id,d=c[d])&&
|
|
880
881
|
(p=d.segmentIndex);var r=a.va.start,u=a.va.duration?r+a.va.duration:Infinity,v=!(a.Lb&&a.va.$d);p?(c=p,zt(c,m,r,u,v,l),c.eb(a.presentationTimeline.Cb())):p=new At(m,a.M.id,a.bandwidth,a.M.Va,r,u,l,v,g,a.M.Tg);m.timeline&&"image"!==a.Ia.contentType&&a.presentationTimeline.Vh(m.timeline,r);d&&a.Lb&&(d.segmentIndex=p);return{zc:function(){p instanceof At&&0==p.getNumReferences()&&zt(p,m,r,u,v,l);return Promise.resolve(p)}}}function ut(a){return a.pc}
|
|
881
882
|
function wt(a){var b=Rs(a,ut),c=Ss(a,ut,"media"),d=Ss(a,ut,"index");return{bb:b.bb,timescale:b.timescale,me:b.me,ac:b.ac,jh:b.jh,timeline:b.timeline,nc:c&&Dc(c),Wd:d,mimeType:a.M.mimeType,codecs:a.M.codecs}}function xt(a){var b=a.Wd?1:0;b+=a.timeline?1:0;b+=a.bb?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.Wd&&(a.timeline=null),a.bb=null);if(!a.Wd&&!a.nc)throw new U(2,4,4002);}
|
|
882
|
-
function yt(a,b,c,d,e,f,g){function h(
|
|
883
|
-
v})}function l(){var
|
|
884
|
-
h(
|
|
883
|
+
function yt(a,b,c,d,e,f,g){function h(H){var L=(H-v)*u,N=L+b.ac,M=L+n;L=M+u;var P=Math.min(L,l());M=new Ii(M,P,function(){var T=N*w;"BigInt"in window&&T>Number.MAX_SAFE_INTEGER&&(T=BigInt(N)*BigInt(w));T=Qs(A,C,H,null,y,T);return Lc(z(),[T])},0,null,d,B,n,l(),[],"",null,null,Ji,f);M.codecs=a.M.codecs;M.mimeType=a.M.mimeType;M.j=L;return M}function k(){var H=[Math.max(m.Cb(),n),Math.min(m.jc(),l())].map(function(L){return L-n});H=[Math.ceil(H[0]/u),Math.ceil(H[1]/u)-1];a.M.Ya&&H[1]++;return H.map(function(L){return L+
|
|
884
|
+
v})}function l(){var H=null!=p&&e[p]||r;return H?n+H:Infinity}var m=a.presentationTimeline,n=a.va.start,p=a.La.id,r=a.va.duration,u=b.bb,v=b.me,w=b.timescale,A=b.nc,y=a.bandwidth||null,C=a.M.id,z=a.M.Va,B=n-b.ac,D=k();c=a.Lb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var K=c;K<=g;++K){var G=h(K);D.push(G)}var I=new Xk(D);D=m.jc()<l();K=m.U();if(D||K){var J=Math.max(c,g+1);c=u;a.M.Ya&&(c=.1);I.tf(c,function(){var H=m.Cb();I.eb(H);var L=t(k());L.next();L=L.next().value;for(var N=[];J<=L;){var M=
|
|
885
|
+
h(J);N.push(M);J++}return H>l()&&!N.length?null:N})}return Promise.resolve(I)}function vt(a,b){var c=a.M.dd;c||(c=Ss(a,ut,"initialization"));if(!c)return null;c=Dc(c);var d=a.M.id,e=a.bandwidth||null,f=a.M.Va;b=new Gi(function(){var g=Qs(c,d,null,null,e,null);return Lc(f(),[g])},0,null,ht(a),null,null,b);b.codecs=a.M.codecs;b.mimeType=a.M.mimeType;return b}
|
|
885
886
|
function At(a,b,c,d,e,f,g,h,k,l){Xk.call(this,[]);this.h=a;this.H=b;this.F=c;this.G=d;this.i=e;this.l=f;this.u=g;this.A=k;this.I=l;h&&Bt(this)}oa(At,Xk);q=At.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){Xk.prototype.release.call(this);this.h=null};
|
|
886
887
|
q.eb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.getNumReferences()&&this.release())}};
|
|
887
888
|
function zt(a,b,c,d,e,f){Ct(a,f);if(a.h){c=a.h.timeline;a.h.nc!==b.nc&&(a.h.nc=b.nc);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Bt(a)}function Ct(a,b){if(a.u!==b){a.u=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Li(c,b)}}
|
|
@@ -891,11 +892,11 @@ w.Gd&&(w.Gd=Dt(b.h.nc,b.H,e,b.F,f,w.Hf,b.G));return w.Gd}}(p),0,null,this.u,c,th
|
|
|
891
892
|
function Dt(a,b,c,d,e,f,g){a=Qs(a,b,c,f,d||null,e);return Lc(g(),[a]).map(function(h){return h.toString()})};function Et(a){var b=Je(a),c=b.split("/")[0];a=Ke(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,pe:null,colorGamut:null}}
|
|
892
893
|
function Ft(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var D=B.wa(),K=B.wa();B.skip(50);n=String(D);m=String(K);z.reader.Ca()&&Ug(z)}function d(z){var B=cj(z.reader);p=B.channelCount;r=B.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
|
|
893
894
|
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 Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).W("mdhd",function(z){l=aj(z.reader,z.version).language}).box("minf",Ug).box("stbl",Ug).W("stsd",Wg).box("mp4a",function(z){var B=cj(z.reader);p=B.channelCount;r=B.sampleRate;z.reader.Ca()?Ug(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
|
|
894
|
-
"mp4a",D,K;z.Ca();){D=z.Y();for(var
|
|
895
|
-
c).box("av01",c).box("avcC",function(z){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}z=z.reader;z.skip(1);z=B+"."+fj(z.Y())+fj(z.Y())+fj(z.Y());g.push(z);k=!0}).box("hvcC",function(z){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var D=z.reader;D.skip(1);z=D.Y();var K=["","A","B","C"][z>>6],
|
|
896
|
-
fj(
|
|
897
|
-
function(z){var B=w||"",D=z.reader;D.skip(1);z=D.Y();D=D.Y();var K=z>>>5,
|
|
898
|
-
|
|
895
|
+
"mp4a",D,K;z.Ca();){D=z.Y();for(var G=z.Y();G&128;)G=z.Y();if(3==D)z.wa(),G=z.Y(),G&128&&z.wa(),G&64&&z.skip(z.Y()),G&32&&z.wa();else if(4==D)K=z.Y(),z.skip(12);else if(5==D)break}K&&(B+="."+fj(K),5==D&&z.Ca()&&(D=z.Y(),K=(D&248)>>3,31===K&&z.Ca()&&(K=32+((D&7)<<3)+((z.Y()&224)>>5)),B+="."+K));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
|
|
896
|
+
c).box("av01",c).box("avcC",function(z){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}z=z.reader;z.skip(1);z=B+"."+fj(z.Y())+fj(z.Y())+fj(z.Y());g.push(z);k=!0}).box("hvcC",function(z){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var D=z.reader;D.skip(1);z=D.Y();var K=["","A","B","C"][z>>6],G=z&31,I=D.T(),J=(z&32)>>5?"H":"L";z=[D.Y(),D.Y(),D.Y(),D.Y(),D.Y(),D.Y()];D=D.Y();for(var H=0,L=0;32>L;L++){H|=I&1;if(31==L)break;H<<=1;I>>=1}B=B+("."+K+G)+("."+
|
|
897
|
+
fj(H,!0));B+="."+J+D;K="";for(G=z.length;G--;)if((J=z[G])||K)K="."+J.toString(16).toUpperCase()+K;B+=K;g.push(B);k=!0}).box("dvcC",function(z){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var D=z.reader;D.skip(2);z=D.Y();D=D.Y();g.push(B+"."+gj(z>>1&127)+"."+gj(z<<5&32|D>>3&31));k=!0}).W("vpcC",function(z){var B=w||"",D=z.reader;z=D.Y();var K=D.Y();D=D.Y()>>4&15;g.push(B+"."+gj(z)+"."+gj(K)+"."+gj(D));k=!0}).box("av1C",
|
|
898
|
+
function(z){var B=w||"",D=z.reader;D.skip(1);z=D.Y();D=D.Y();var K=z>>>5,G=(D&64)>>6;g.push(B+"."+K+"."+gj(z&31)+(D>>>7?"H":"M")+"."+gj(2===K&&G?(D&32)>>5?12:10:G?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+gj(1)+"."+gj(1)+"."+gj(1)+".0");k=!0}).box("enca",Yg).box("encv",Xg).box("sinf",Ug).box("frma",function(z){z=dj(z.reader).cb;e(z)}).box("colr",function(z){g=g.map(function(K){if(K.startsWith("av01.")){var G=z.reader,I=G.Ja(),J=G.Hb(4);var H=String.fromCharCode(J[0]);H+=String.fromCharCode(J[1]);
|
|
899
|
+
H+=String.fromCharCode(J[2]);H+=String.fromCharCode(J[3]);if("nclx"===H){J=G.wa();H=G.wa();var L=G.wa(),N=G.Y()>>7,M=K.split(".");10==M.length&&(M[6]=gj(J),M[7]=gj(H),M[8]=gj(L),M[9]=String(N),K=M.join("."))}G.seek(I)}return K});var B=ej(z.reader),D=B.colorGamut;u=B.pe;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var C=new Ed("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);C.g()}return{type:A?"audio":"video",
|
|
899
900
|
mimeType:A?"audio/mp4":"video/mp4",codecs:Gt(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:y,pe:u,colorGamut:v}}function Gt(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Ie(d);b.has(e)||(c.push(d),b.add(e))}b=Tc("audio",c);d=Tc("video",c);a=Tc(Sc,c);d=Ht(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
900
901
|
function Ht(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?td('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function It(a){var b=null;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).box("minf",Ug).box("stbl",Ug).W("stsd",Wg).box("encv",Xg).box("enca",Yg).box("sinf",Ug).box("schi",Ug).W("tenc",function(c){c=c.reader;c.Y();c.Y();c.Y();c.Y();b=Jc(c.Hb(16))}).parse(a,!0);return b};function Jt(a){this.o=null;this.A=a;this.I=new tg;this.i=[];this.h=null;this.m=[];this.F=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}Jt.prototype.configure=function(a){this.o=a};Jt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};Jt.prototype.setManifestType=function(a){this.u=a};
|
|
901
902
|
function Kt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Lc(a.i,[Lt(a,b)]),d=Ag(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),ug(a.I,e),ta(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=wc(f.data),h=JSON.parse(g),1==h.VERSION&&Mt(a,h,f.uri),va(l,0);if((k=wa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Ub(function(){Kt(a,b)});a.g.V(a.G);F(l)})}
|
|
@@ -904,14 +905,14 @@ function Nt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Jt.
|
|
|
904
905
|
function Ot(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={uc:e.uc},g=f.next())if(e.uc=g.value,g=b.get(e.uc))d.push({Pg:e.uc,location:g});else if(g=a.H.find(function(k){return function(l){return l.Xk==k.uc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Ai?(h=new mb(h),ob(h,g["URI-REPLACEMENT"].Ai),d.push({Pg:e.uc,location:h.toString()})):d.push({Pg:e.uc,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
905
906
|
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new mb(k.location)).Vb))return!1;return!0});d.length&&(a.F=d[0].Pg);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(f=b.get(g.value))a.F=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Lc(a.i,d)};function Pt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.u=this.o=!1;this.m=new Set}q=Pt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};q.xj=function(){return this.j};q.ug=function(){return this.l.slice()};q.bj=function(){return this.i};
|
|
906
907
|
function Qt(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[Rt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[St(n),n]})),l=new Map(h.textStreams.map(function(n){return[Tt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ut(n),n]}));if(b){var m=Vt(Sc);l.set(Tt(m),m);m=Vt("image");h.set(Ut(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{rh:c,wi:d,oi:e,Mh:f}}
|
|
907
|
-
q.Xf=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,C,z,B,D,K,
|
|
908
|
-
return E(la,Promise.all([Wt(d,d.h,v,n,Xt,Yt,m),Wt(d,d.g,w,n,Xt,Yt,m),Wt(d,d.l,A,n,Xt,Yt,m),Wt(d,d.i,y,n,Xt,Yt,m)]),2)}C=0;z=[];if(d.g.length&&d.h.length)for(
|
|
909
|
-
allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),K=D.next();!K.done;K=D.next())
|
|
910
|
-
function Zt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
911
|
-
R]}))});f=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.Of}).map(function(R){return[Ut(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=$t(b.Ga),k.set(Tt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=$t(b.Of),p.set(Ut(r),r);u=new Pt;return E(
|
|
912
|
-
t(v),
|
|
913
|
-
function Wt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
914
|
-
z.next())for(B=u.value,D={},K=t(B),A=K.next();!A.done;D={ze:D.ze},A=K.next())if(D.ze=A.value,!eu(D.ze)&&(
|
|
908
|
+
q.Xf=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,C,z,B,D,K,G,I,J,H,L,N,M,P,T,R;return O(function(la){if(1==la.g){e=Uc;if(!b&&1==a.length)return f=Qt(a,!1),g=f.rh,h=f.wi,k=f.oi,l=f.Mh,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.i=Array.from(l[0].values()),la.B(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 la.return();u=Qt(a,!0);v=u.rh;w=u.wi;A=u.oi;y=u.Mh;
|
|
909
|
+
return E(la,Promise.all([Wt(d,d.h,v,n,Xt,Yt,m),Wt(d,d.g,w,n,Xt,Yt,m),Wt(d,d.l,A,n,Xt,Yt,m),Wt(d,d.i,y,n,Xt,Yt,m)]),2)}C=0;z=[];if(d.g.length&&d.h.length)for(J=t(d.h),H=J.next();!H.done;H=J.next())for(L=H.value,N=t(d.g),M=N.next();!M.done;M=N.next())P=M.value,T=Pb(L.drmInfos,P.drmInfos),L.drmInfos.length&&P.drmInfos.length&&!T.length||(R=C++,z.push({id:R,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L,video:P,bandwidth:(L.bandwidth||0)+(P.bandwidth||0),drmInfos:T,allowedByApplication:!0,
|
|
910
|
+
allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),K=D.next();!K.done;K=D.next())G=K.value,I=C++,z.push({id:I,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G.type==e.aa?G:null,video:G.type==e.sa?G:null,bandwidth:G.bandwidth||0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=z;F(la)})};
|
|
911
|
+
function Zt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J,H,L,N,M;return O(function(P){switch(P.g){case 1:b=Uc;if(1==a.length)return P.return(a[0]);c=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.aa}).map(function(R){return[Rt(R),R]}))});d=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.sa}).map(function(R){return[St(R),R]}))});e=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.Ga}).map(function(R){return[Tt(R),
|
|
912
|
+
R]}))});f=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.Of}).map(function(R){return[Ut(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=$t(b.Ga),k.set(Tt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=$t(b.Of),p.set(Ut(r),r);u=new Pt;return E(P,Wt(u,[],c,0,au,bu,0),2);case 2:return v=P.h,E(P,Wt(u,[],d,0,au,bu,0),3);case 3:return w=P.h,E(P,Wt(u,[],e,0,au,bu,0),4);case 4:return A=P.h,E(P,Wt(u,[],f,0,au,bu,0),5);case 5:y=P.h;C=0;if(w.length&&v.length)for(G=
|
|
913
|
+
t(v),I=G.next();!I.done;I=G.next())for(J=I.value,H=t(w),L=H.next();!L.done;L=H.next())N=L.value,M=C++,N.variantIds.push(M),J.variantIds.push(M);else for(z=w.concat(v),B=t(z),D=B.next();!D.done;D=B.next())K=D.value,K.variantIds=[C++];return P.return(w.concat(v).concat(A).concat(y))}})}
|
|
914
|
+
function Wt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G;return O(function(I){switch(I.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){I.B(4);break}n=m.value;return E(I,cu(a,n,c,d,f,h,g),5);case 5:p=I.h;if(!p)throw new U(2,4,4037);m=l.next();I.B(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,(C=du(a,y,c,e,f,h))&&b.push(C);z=t(h);for(u=z.next();!u.done;u=
|
|
915
|
+
z.next())for(B=u.value,D={},K=t(B),A=K.next();!A.done;D={ze:D.ze},A=K.next())if(D.ze=A.value,!eu(D.ze)&&(G=b.some(function(J){return function(H){return fu(a,J.ze,H)}}(D))))throw new U(2,4,4037);return I.return(b)}})}function cu(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return gu(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,hu(b,d+g),2):h.B(2):h.return(!1);iu(b,d,e,f,g);return h.return(!0)})}
|
|
915
916
|
function hu(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return E(l,Promise.all(c),2)}if(a.segmentIndex instanceof $k)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);F(l)})}
|
|
916
917
|
function du(a,b,c,d,e,f){if(eu(b))return null;var g=d(b);gu(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.B(0);g.segmentIndex=new $k;return E(h,hu(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;iu(g,0,e,f,0);return g}
|
|
917
918
|
function iu(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==ed(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)}}
|
|
@@ -924,8 +925,8 @@ function bu(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done
|
|
|
924
925
|
function gu(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=ju(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
925
926
|
function ju(a,b,c){var d={audio:Rt,video:St,text:Tt,image:Ut}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return fu(a,l,m)},video:function(l,m){return fu(a,l,m)},text:ku,image:lu}[c.type];for(var g={audio:mu,video:nu,text:ou,image:pu}[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.u&&!eu(e)&&b.delete(d(e));return e}
|
|
926
927
|
function qu(a,b){return a.mimeType!=b.mimeType?!1:ru(a.codecs)===ru(b.codecs)}q.ai=function(a){this.o=a};q.ki=function(a){this.u=a};function fu(a,b,c){return!qu(b,c)&&!a.o||b.drmInfos&&!Ob(b.drmInfos,c.drmInfos)?!1:!0}function ku(a,b){return b.language?a.forced!==b.forced||0==ed(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function lu(){return!0}
|
|
927
|
-
function mu(a,b,c){var d=qu(a,b),e=qu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=ed(a.language,b.language);e=ed(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)
|
|
928
|
-
if(c.roles.length&&!b.roles.length)return!1
|
|
928
|
+
function mu(a,b,c){var d=qu(a,b),e=qu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=ed(a.language,b.language);e=ed(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length<
|
|
929
|
+
b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=su(a.channelsCount,b.channelsCount,c.channelsCount);if(d==tu)return!0;if(d==uu)return!1;d=su(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==tu?!0:d==uu?!1:a.bandwidth&&vu(a.bandwidth,b.bandwidth,c.bandwidth)==tu?!0:!1}
|
|
929
930
|
function nu(a,b,c){var d=qu(a,b),e=qu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=su(a.width*a.height,b.width*b.height,c.width*c.height);if(d==tu)return!0;if(d==uu)return!1;if(a.frameRate){d=su(a.frameRate,b.frameRate,c.frameRate);if(d==tu)return!0;if(d==uu)return!1}return a.bandwidth&&vu(a.bandwidth,b.bandwidth,c.bandwidth)==tu?!0:!1}
|
|
930
931
|
function ou(a,b,c){var d=ed(a.language,b.language),e=ed(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;
|
|
931
932
|
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 pu(a,b,c){return su(a.width*a.height,b.width*b.height,c.width*c.height)==tu?!0:!1}
|
|
@@ -933,7 +934,7 @@ function $t(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType
|
|
|
933
934
|
function Vt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Xk([]),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}}
|
|
934
935
|
function su(a,b,c){if(b==a&&a!=c)return uu;if(c==a&&a!=b)return tu;if(b>a){if(c<=a||c-a<b-a)return tu;if(c-a>b-a)return uu}else{if(c>a)return uu;if(a-c<a-b)return tu;if(a-c>a-b)return uu}return wu}function vu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?tu:b<a?uu:wu}function eu(a){switch(a.type){case Sc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
935
936
|
function St(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,ru(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Rt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,ru(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Tt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
936
|
-
function Ut(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function ru(a){if(!xu.has(a)){var b=
|
|
937
|
+
function Ut(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function ru(a){if(!xu.has(a)){var b=Fe(a);xu.set(a,b)}return xu.get(a)}Q("shaka.util.PeriodCombiner",Pt);Pt.prototype.setUseStreamOnce=Pt.prototype.ki;Pt.prototype.setAllowMultiTypeVariants=Pt.prototype.ai;Pt.prototype.combinePeriods=Pt.prototype.Xf;Pt.prototype.getImageStreams=Pt.prototype.bj;Pt.prototype.getTextStreams=Pt.prototype.ug;Pt.prototype.getVariants=Pt.prototype.xj;var tu=1,wu=0,uu=-1,xu=new Map;function yu(a,b){var c=new DOMParser,d=zu.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 Au(a,b){try{var c=zc(a);return yu(c,b)}catch(d){return null}}
|
|
937
938
|
var zu=new Nb(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Bu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.S=1;this.F=[];this.l={Ze:"",type:"",profiles:[],Yb:null,Ya:0,Va:null,ie:0};this.o=new Map;this.u={};this.O={};this.m=new Pt;this.H=0;this.R=new ld(5);this.I=new Ub(function(){Cu(a)});this.L=new tg;this.J=null;this.X=[];this.K=Infinity;this.G=!1;this.h=null;this.N=!1}q=Bu.prototype;
|
|
938
939
|
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.U()&&this.I.Pa();this.h&&this.h.configure(this.g);this.m&&(this.m.ai(this.g.dash.multiTypeVariantsAllowed&&vd()),this.m.ki(this.g.dash.useStreamOnceInPeriodFlattening))};q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.G=b.isLowLatencyMode(),c.A=[a],c.j=b,E(e,Du(c),2);d=e.h;c.j&&Eu(c,d);if(!c.j)throw new U(2,7,7001);return e.return(c.i)})};
|
|
939
940
|
q.stop=function(){for(var a=t(Object.values(this.u)),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.u={};this.o.clear();this.l={Ze:"",type:"",profiles:[],Yb:null,Ya:0,Va:null,ie:0};this.m=null;null!=this.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();return this.L.destroy()};
|
|
@@ -942,40 +943,40 @@ q.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
|
942
943
|
function Du(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=Fu(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=Ot(a.h,"Location",!0),e.length&&(d=e)),f=Ag(d,a.g.retryParameters),g=Date.now(),E(m,Gu(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.j)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,Hu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.R.sample(1,l);return m.return(l)})}
|
|
943
944
|
function Hu(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=wm;if(f!=g){xd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Au(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=Ac(h.outerHTML)}k=bh(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=xm;l!=m&&l(k);if("Patch"===d)return v.return(Iu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Ju(a,k,c));
|
|
944
945
|
p=a.g.dash.xlinkFailGracefully;r=Ws(k,a.g.retryParameters,p,c,a.j.networkingEngine);ug(a.L,r);return E(v,r.promise,2)}u=v.h;return v.return(Ju(a,u,c))})}
|
|
945
|
-
function Ju(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
946
|
-
b.attributes.id||"";a.l.ie=th(b,"publishTime",wh)||0;a.F=kh(b,"PatchLocation");u=Promise.resolve();if((v=oh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Jt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=mh(v))(y=th(v,"queryBeforeStart",Dh,!1))?u=Kt(a.h,A):Kt(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),Nt(a.h,"Location",B,D)}K=kh(b,"BaseURL");
|
|
947
|
-
|
|
948
|
-
th(b,"suggestedPresentationDelay",xh));Ja=a.g.dash.ignoreMaxSegmentDuration;db=null;Ja||(db=th(b,"maxSegmentDuration",xh));Da=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.N=a.i.presentationTimeline.U()&&"static"==Da);a.l.type=Da;if(a.i)for($a=a.i.presentationTimeline,xb=t(Object.values(a.u)),ad=xb.next();!ad.done;ad=xb.next())
|
|
949
|
-
$a.Nc("static"==Da);(
|
|
950
|
-
a.G?$a.bi(a.K):a.K&&Ya("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");$a.Jg(db||1);return E(rc,u,2);case 2:return a.G&&(ra=0,rj=null!=Pa?Pa:a.g.defaultPresentationDelay,$a.Xg(rj)),a.i?E(rc,Lu(a,Gd.periods,!1),4):E(rc,a.m.Xf(dh,
|
|
951
|
-
minBufferTime:ra||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Mu(b),nextUrl:Nu(b)};if(!$a.si()){rc.B(7);break}eh=kh(b,"UTCTiming");return E(rc,Ou(a,T,eh),8);case 8:
|
|
946
|
+
function Ju(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J,H,L,N,M,P,T,R,la,ra,Ca,Fa,Ia,Pa,Ja,db,Da,$a,xb,ad,ze,Fd,Rc,Ae,Be,Ce,Gd,pj,dh,qj,rj,eh,De;return O(function(rc){switch(rc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=kh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=mh(l))p=Lc(d,[n])[0],m&&(a.h?Nt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Ot(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Ze=
|
|
947
|
+
b.attributes.id||"";a.l.ie=th(b,"publishTime",wh)||0;a.F=kh(b,"PatchLocation");u=Promise.resolve();if((v=oh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Jt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=mh(v))(y=th(v,"queryBeforeStart",Dh,!1))?u=Kt(a.h,A):Kt(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),Nt(a.h,"Location",B,D)}K=kh(b,"BaseURL");I=!1;if(a.h)for(J=t(K),H=J.next();!H.done;H=
|
|
948
|
+
J.next())L=H.value,N=L.attributes.serviceLocation,M=mh(L),N&&M&&(Nt(a.h,"BaseURL",N,M),I=!0);I&&a.h||(P=K.map(mh),G=Lc(d,P));T=function(){return a.h&&I?Ot(a.h,"BaseURL"):G?G:[]};a.l.Va=T;R=0;K&&K.length&&(R=th(K[0],"availabilityTimeOffset",Ch)||0);a.l.Ya=R;la=a.g.dash.ignoreMinBufferTime;ra=0;la||(ra=th(b,"minBufferTime",xh)||0);a.H=th(b,"minimumUpdatePeriod",xh,-1);Ca=th(b,"availabilityStartTime",wh);Fa=th(b,"timeShiftBufferDepth",xh);Ia=a.g.dash.ignoreSuggestedPresentationDelay;Pa=null;Ia||(Pa=
|
|
949
|
+
th(b,"suggestedPresentationDelay",xh));Ja=a.g.dash.ignoreMaxSegmentDuration;db=null;Ja||(db=th(b,"maxSegmentDuration",xh));Da=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.N=a.i.presentationTimeline.U()&&"static"==Da);a.l.type=Da;if(a.i)for($a=a.i.presentationTimeline,xb=t(Object.values(a.u)),ad=xb.next();!ad.done;ad=xb.next())ze=ad.value,ze.segmentIndex&&ze.segmentIndex.eb($a.Cb());else Fd=a.g.defaultPresentationDelay||1.5*ra,Rc=null!=Pa?Pa:Fd,$a=new Bk(Ca,Rc,a.g.dash.autoCorrectDrift);
|
|
950
|
+
$a.Nc("static"==Da);(Ae=$a.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);$a.nf(Fa);Be=b.attributes.profiles||"";a.l.profiles=Be.split(",");Ce={Lb:"static"!=Da,presentationTimeline:$a,La:null,va:null,Ia:null,M:null,bandwidth:0,Ag:!1,Ya:R,Yb:null,profiles:Be.split(",")};Gd=Ku(a,Ce,T,b);pj=Gd.duration;dh=Gd.periods;("static"!=Da||a.N)&&Gd.Ch||$a.sb(pj||Infinity);a.K&&!a.G&&(qj=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.G=a.j.isLowLatencyMode());
|
|
951
|
+
a.G?$a.bi(a.K):a.K&&Ya("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");$a.Jg(db||1);return E(rc,u,2);case 2:return a.G&&(ra=0,rj=null!=Pa?Pa:a.g.defaultPresentationDelay,$a.Xg(rj)),a.i?E(rc,Lu(a,Gd.periods,!1),4):E(rc,a.m.Xf(dh,Ce.Lb),6);case 6:a.i={presentationTimeline:$a,variants:a.m.j,textStreams:a.m.ug(),imageStreams:a.m.i,offlineSessionIds:[],
|
|
952
|
+
minBufferTime:ra||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Mu(b),nextUrl:Nu(b)};if(!$a.si()){rc.B(7);break}eh=kh(b,"UTCTiming");return E(rc,Ou(a,T,eh),8);case 8:De=rc.h;if(!a.j)return rc.return();$a.ci(De);case 7:$a.Ue();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),F(rc)}})}
|
|
952
953
|
function Lu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Xf(b,!0,c),2);a.i.variants=a.m.j;d=a.m.ug();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);F(e)})}
|
|
953
|
-
function Iu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
954
|
-
|
|
955
|
-
ut,"SegmentTimeline").children=[];Pu(a,
|
|
956
|
-
|
|
957
|
-
Infinity));F(
|
|
954
|
+
function Iu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J;return O(function(H){if(1==H.g){c=b.attributes.mpdId;d=th(b,"originalPublishTime",wh);if(!c||c!==a.l.Ze||d!==a.l.ie)throw a.F=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(jh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Fh(l.attributes.sel||""),n=m[m.length-1],p=mh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.ec){r=mh(l)||"";var L=xh(r);if(null!=L){a.l.Yb=L;for(var N=t(a.o.values()),M=N.next();!M.done;M=N.next())M.value.Yb=
|
|
955
|
+
L}}else if("type"===n.ec){a.i.presentationTimeline.Nc("static"==p);a.l.type=p;L=t(a.o.values());for(N=L.next();!N.done;N=L.next())N.value.Lb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.ec?a.l.ie=wh(p)||0:null===n.ec&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Gh(a.F,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(L=n.id,N=t(a.o.keys()),M=N.next();!M.done;M=N.next())if(M=M.value,M.startsWith(L)){var P=a.o.get(M);Ts(P,
|
|
956
|
+
ut,"SegmentTimeline").children=[];Pu(a,M);a.o.delete(M)}}else if("SegmentTemplate"===n.name){N=Fh(l.attributes.sel||"");L=N[N.length-1];if(L.ec){N=Qu(a,N);M=mh(l)||"";P=t(N);for(var T=P.next();!T.done;T=P.next())T=a.o.get(T.value),Hh(T.M.pc,l.tagName,L.ec,M);L=N}else L=[];u=L;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){L=Fh(l.attributes.sel||"");L=Qu(a,L);N=t(L);for(M=N.next();!M.done;M=N.next())M=a.o.get(M.value),M=Ts(M,ut,"SegmentTimeline"),
|
|
957
|
+
P=kh(M,"S"),Gh(P,l),M.children=P;y=L;C=t(y);for(w=C.next();!w.done;w=C.next())z=w.value,g.add(z)}B=t(g);for(w=B.next();!w.done;w=B.next())D=w.value,Pu(a,D);K=t(f);for(G=K.next();!G.done;G=K.next())I=G.value,e.push.apply(e,x(Ku(a,{Lb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,La:null,va:null,Ia:null,M:null,bandwidth:0,Ag:!1,Ya:a.l.Ya,profiles:a.l.profiles,Yb:a.l.Yb},a.l.Va,I).periods));return e.length?E(H,Lu(a,e,!0),2):H.B(2)}"static"==a.l.type&&(J=a.l.Yb,a.i.presentationTimeline.sb(J||
|
|
958
|
+
Infinity));F(H)})}function Qu(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.o.values()),e=a.next();!e.done;e=a.next())e=e.value,e.La.id===c&&e.Ia.id===d&&e.M.id&&b.push(c+","+e.M.id);return b}
|
|
958
959
|
function Pu(a,b){var c=a.o.get(b),d=a.u[b];d.segmentIndex&&d.segmentIndex.eb(a.i.presentationTimeline.Cb());try{var e=tt(c,function(f,g,h,k){return Ru(a,f,g,h,k)},a.u,!0,a.g.dash.initialSegmentLimit,a.O,c.M.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.B(0);f=d;return E(g,e.zc(),3)}f.segmentIndex=g.h;F(g)})}}catch(f){if(b=c.M.contentType,b!=Sc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
959
960
|
function Mu(a){var b=oh(a,"ServiceDescription");if(!b)return null;a=oh(b,"Latency");b=oh(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)));
|
|
960
961
|
return c}function Nu(a){a=kh(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}
|
|
961
962
|
function Ku(a,b,c,d){var e=b.Yb;e||(e=th(d,"mediaPresentationDuration",xh),a.l.Yb=e);var f=0;a.i&&a.i.presentationTimeline&&a.N&&(f=a.i.presentationTimeline.ic());var g=[],h=f;d=kh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=th(l,"start",xh,h),p=l.attributes.id,r=th(l,"duration",xh),u=null;if(m){var v=th(m,"start",xh);null!=v&&(u=v-n)}else null!=e&&(u=e-n+f);null==u&&(u=r);if(!(null!==a.J&&null!==p&&null!==n&&n<a.J)||a.X.includes(p)||k+1==d.length){null!==n&&(null===a.J||n>a.J)&&
|
|
962
963
|
(a.J=n);h=Su(a,b,c,{start:n,duration:u,node:l,$d:null==u||!m});g.push(h);b.La.id&&u&&(a.O[b.La.id]=u);if(null==u){h=null;break}h=n+u}}a.X=g.map(function(w){return w.id});return null!=e?{periods:g,duration:e+f,Ch:!1}:{periods:g,duration:h,Ch:!0}}
|
|
963
964
|
function Su(a,b,c,d){b.La=Tu(a,d.node,null,c);b.va=d;b.La.Ya=b.Ya;b.La.id||(b.La.id="__shaka_period_"+d.start);var e=kh(d.node,"EventStream");c=b.presentationTimeline.Cb();e=t(e);for(var f=e.next();!f.done;f=e.next())Uu(a,d.start,d.duration,f.value,c);c=kh(d.node,"AdaptationSet").map(function(m){return Vu(a,b,m)}).filter(We);if(b.Lb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.gk);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new U(2,4,4018);
|
|
964
|
-
}d=c.filter(function(m){return!m.ih});c=c.filter(function(m){return m.ih});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ih.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={ye:h.ye},l=k.next())h.ye=l.value,h.ye.trickModeVideo=e.streams.find(function(m){return function(n){return
|
|
965
|
+
}d=c.filter(function(m){return!m.ih});c=c.filter(function(m){return m.ih});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ih.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={ye:h.ye},l=k.next())h.ye=l.value,h.ye.trickModeVideo=e.streams.find(function(m){return function(n){return Fe(m.ye.codecs)==Fe(n.codecs)}}(h))}}}c=Wu(a.g.disableAudio,d,"audio");e=Wu(a.g.disableVideo,d,"video");f=Wu(a.g.disableText,
|
|
965
966
|
d,Sc);d=Wu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.La.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Wu(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},[])}
|
|
966
|
-
function Vu(a,b,c){function d(
|
|
967
|
+
function Vu(a,b,c){function d(H){switch(H){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(H){switch(H){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ia=Tu(a,c,b.La,null);var f=!1,g=kh(c,"Role"),h=g.map(function(H){return H.attributes.value}).filter(We),k=void 0,l=b.Ia.contentType==Sc;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
|
|
967
968
|
n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,r;n=kh(c,"EssentialProperty");g=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?g=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?r=d(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=
|
|
968
969
|
w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=kh(c,"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=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(r=d(parseInt(v.attributes.value,10)));n=kh(c,"Accessibility");var y=new Map,C;n=t(n);for(v=
|
|
969
970
|
n.next();!v.done;v=n.next())if(w=v.value,v=w.attributes.schemeIdUri,w=w.attributes.value,"urn:scte:dash:cc:cea-608:2015"==v)if(v=1,null!=w){w=w.split(";");for(var z=t(w),B=z.next();!B.done;B=z.next()){var D=B.value,K=B=void 0;D.includes("=")?(D=D.split("="),B=D[0].startsWith("CC")?D[0]:"CC"+D[0],K=D[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,K=D);y.set(B,Xc(K))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==v)if(v=1,null!=w)for(w=t(w.split(";")),B=w.next();!B.done;B=w.next())B=B.value,
|
|
970
|
-
D=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,D=B),y.set(z,Xc(D));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?C="visually impaired":"2"==w&&(C="hard of hearing"));if(m)return null;m=kh(c,"ContentProtection");var
|
|
971
|
-
kh(c,"Label"))&&m.length&&(m=lh(m[0]))&&(
|
|
972
|
-
b.Ia.contentType;l=b.Ia.id||"__fake__"+a.S++;n=t(c);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(
|
|
973
|
-
function Xu(a,b,c,d,e,f,g,h,k,l,m,n){b.M=Tu(a,l,b.Ia,null);var p=b.M.id;a.K=Math.min(a.K,b.M.Ya);if(!Zu(b.M))return null;var r=b.va.start;b.bandwidth=th(l,"bandwidth",Ah)||0;var u=b.M.contentType,v=u==Sc||"application"==u;u="image"==u;try{var w=void 0;if(c.Rf){var A=b.M.Va,y=Lc(A(),[c.Rf.Mj]),C=Ag(y,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Rf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var
|
|
974
|
-
16!=
|
|
975
|
-
return Promise.resolve(
|
|
976
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(
|
|
977
|
-
(
|
|
978
|
-
closedCaptions:k,hdr:
|
|
971
|
+
D=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,D=B),y.set(z,Xc(D));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?C="visually impaired":"2"==w&&(C="hard of hearing"));if(m)return null;m=kh(c,"ContentProtection");var G=Fs(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),I=Xc(b.Ia.language||"und"),J=c.attributes.label;(m=
|
|
972
|
+
kh(c,"Label"))&&m.length&&(m=lh(m[0]))&&(J=m);m=kh(c,"Representation");c=m.map(function(H){if(H=Xu(a,b,G,k,I,J,f,h,y,H,C,A))H.hdr=H.hdr||p,H.colorGamut=H.colorGamut||r,H.fastSwitching=u;return H}).filter(function(H){return!!H});if(0==c.length){g="image"==b.Ia.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new U(2,4,4003);}if(!b.Ia.contentType||"application"==b.Ia.contentType)for(b.Ia.contentType=Yu(c[0].mimeType,c[0].codecs),l=t(c),v=l.next();!v.done;v=l.next())v.value.type=
|
|
973
|
+
b.Ia.contentType;l=b.Ia.id||"__fake__"+a.S++;n=t(c);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(G.drmInfos);for(z=w.next();!z.done;z=w.next())z=z.value,z.keyIds=z.keyIds&&v.keyIds?new Set([].concat(x(z.keyIds),x(v.keyIds))):z.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(H){return H.attributes.id}).filter(We);return{id:l,contentType:b.Ia.contentType,language:I,Ol:f,streams:c,drmInfos:G.drmInfos,ih:g,gk:m}}
|
|
974
|
+
function Xu(a,b,c,d,e,f,g,h,k,l,m,n){b.M=Tu(a,l,b.Ia,null);var p=b.M.id;a.K=Math.min(a.K,b.M.Ya);if(!Zu(b.M))return null;var r=b.va.start;b.bandwidth=th(l,"bandwidth",Ah)||0;var u=b.M.contentType,v=u==Sc||"application"==u;u="image"==u;try{var w=void 0;if(c.Rf){var A=b.M.Va,y=Lc(A(),[c.Rf.Mj]),C=Ag(y,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Rf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var L,N,M;return O(function(P){if(1==P.g)return E(P,Gu(a,C,6),2);if(3!=P.g){L=P.h;if(!L.data||
|
|
975
|
+
16!=L.data.byteLength)throw new U(2,4,4049);N={name:"AES-CBC"};M=w;return E(P,window.crypto.subtle.importKey("raw",L.data,N,!0,["decrypt"]),3)}M.cryptoKey=P.h;w.fetchKey=void 0;F(P)})}}}b.M.aesKey=w;A=function(L,N,M,P){return Ru(a,L,N,M,P)};if(b.M.od)var z=it(b,A,w);else if(b.M.bc)z=ot(b,a.u,w);else if(b.M.pc)z=tt(b,A,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.O,w,n,!1);else{var B=b.va.duration||0,D=b.M.Va,K=b.M.mimeType,G=b.M.codecs;z={zc:function(){var L=Zk(r,B,D());L.xc(function(N){N.mimeType=K;
|
|
976
|
+
N.codecs=G});return Promise.resolve(L)}}}}catch(L){if((v||u)&&4002==L.code)return null;throw L;}n=kh(l,"ContentProtection");n=Js(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;kh(l,"SupplementalProperty").some(function(L){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==L.attributes.schemeIdUri&&"JOC"==L.attributes.value})&&(A=!0);y=!1;v&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var I;if(u&&((l=kh(l,"EssentialProperty").find(function(L){return["http://dashif.org/thumbnail_tile",
|
|
977
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(L.attributes.schemeIdUri)}))&&(I=l.attributes.value),!I))return null;var J;l=b.M.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");v=b.M.id?b.La.id+","+b.M.id:"";a.F.length&&p&&a.o.set(b.La.id+","+p,$u(b));var H=v&&a.u[v]?a.u[v]:{id:a.S++,originalId:b.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){H.segmentIndex&&
|
|
978
|
+
(H.segmentIndex.release(),H.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,codecs:l,frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.Ia.language,label:f,type:b.Ia.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.M.jd,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:A,
|
|
979
|
+
closedCaptions:k,hdr:J,colorGamut:void 0,videoLayout:void 0,tilesLayout:I,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([te(b.M.mimeType,b.M.codecs)])};H.createSegmentIndex=function(){var L;return O(function(N){if(1==N.g){if(H.segmentIndex)return N.B(0);L=H;return E(N,z.zc(),3)}L.segmentIndex=N.h;F(N)})};v&&b.Lb&&!a.u[v]&&(a.u[v]=H);return H}
|
|
979
980
|
function $u(a){for(var b={},c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,["period","adaptationSet","representation"].includes(d)){var e=a[d];b[d]={od:null,bc:null,pc:e.pc,Va:e.Va,width:e.width,height:e.height,contentType:e.contentType,mimeType:e.mimeType,language:e.language,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,emsgSchemeIdUris:e.emsgSchemeIdUris,id:e.id,jd:e.jd,audioSamplingRate:e.audioSamplingRate,Ya:e.Ya,dd:e.dd}}else"periodInfo"==d?(e=a[d],
|
|
980
981
|
b[d]={start:e.start,duration:e.duration,node:null,$d:e.$d}):b[d]=a[d];return b}function Cu(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,ta(d,2),E(d,Du(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(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();Eu(a,b);F(d)}})}
|
|
981
982
|
function Eu(a,b){if(!(0>a.H)){var c=a.H;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.I.V(Math.max(c-b,md(a.R)))}}
|
|
@@ -991,34 +992,34 @@ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return
|
|
|
991
992
|
3);break;case 5:wa(n);case 3:g=f.next();n.B(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)}})}
|
|
992
993
|
function Uu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=th(d,"timescale",Bh)||1;d=t(kh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=th(k,"presentationTime",Bh)||0,m=th(k,"duration",Bh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:Ih(k),eventNode:k},a.j.onTimelineRegionAdded(k))}}
|
|
993
994
|
function Ru(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=Gg,g=e?0:1,h=Bl(b,c,d,a.g.retryParameters),E(l,Gu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Yu(a,b){b=te(a,b);return Ne(b)?Sc:a.split("/")[0]}function Gu(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);ug(a.L,b);return b.promise}
|
|
994
|
-
function Fu(a){var b=a.l.ie;if(!a.l.Ze||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=Bh(e.attributes.ttl);return!e||b+e>c}).map(mh).filter(We);return d.length?Lc(a.A,d):[]}
|
|
995
|
+
function Fu(a){var b=a.l.ie;if(!a.l.Ze||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=Bh(e.attributes.ttl);return!e||b+e>c}).map(mh).filter(We);return d.length?Lc(a.A,d):[]}Q("shaka.dash.DashParser",Bu);Bi["application/dash+xml"]=function(){return new Bu};Bi["video/vnd.mpeg.dash.mpd"]=function(){return new Bu};function dv(){}Q("shaka.dependencies",dv);dv.has=function(a){return ev.has(a)};dv.add=function(a,b){if(!fv[a])throw Error(a+" is not supported");a==gv?xd("mux.js","mux.js is no longer used in Shaka Player."):ev.set(a,function(){return b})};var gv="muxjs",fv={Pl:gv,ISOBoxer:"ISOBoxer"};dv.Allowed=fv;var ev=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function hv(a,b,c){this.type=a;this.g=b;this.segments=c||null}function iv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}iv.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};
|
|
995
996
|
function jv(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function kv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Y(a,b,c){return(a=kv(a,b))?a.value:c||null}function lv(a,b){a=kv(a,b);if(!a)throw new U(2,4,4023,b);return a.value}function mv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Rb=c}function nv(a,b){this.name=a;this.value=b};function ov(a,b){return a.filter(function(c){return c.name==b})}function pv(a,b){return a.filter(function(c){return lv(c,"TYPE")==b})}function qv(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 rv(a,b,c){c=void 0===c?0:c;return(a=qv(a,b))?Number(a.value):c}function sv(a,b,c){return b?tv(a,[b],c):[]}
|
|
996
997
|
function tv(a,b,c){if(!b.length)return[];b=Lc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new U(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function uv(){this.g=0}
|
|
997
998
|
function vv(a,b){b=wc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new U(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=wv(a,f),--a.g,xv.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=wv(a,g);if(yv.includes(g.name)){if(1!=b)throw new U(2,4,4017);g=
|
|
998
999
|
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=wv(a,k),xv.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Y(k,"TYPE")?f.push(k):"MAP"==Y(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new mv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new mv("",d,f)));return new hv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
999
1000
|
g.name&&(g.attributes.push(new nv("URI",h)),d=!0)}}return new hv(b,e)}function wv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new U(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Lp(d);var f;(f=Np(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Np(d,g);)c.push(new nv(f[1],f[2]||f[3])),Mp(d)}return new iv(a,b,c,e)}
|
|
1000
1001
|
var xv="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),yv="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 zv(){}function Av(a){try{var b=Bv(a);return pg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return ng(c)}}
|
|
1001
|
-
function Bv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Hc(a):e=Ac(a);return{data:e,contentType:c}}
|
|
1002
|
+
function Bv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Hc(a):e=Ac(a);return{data:e,contentType:c}}Q("shaka.net.DataUriPlugin",zv);zv.parse=Av;wg("data",Av);function Cv(){var a=this;this.g=this.h=null;this.F=1;this.u=new Map;this.J=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(Sc,new Map);this.O.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.N="";this.Ba=new uv;this.K=-1;this.$=Infinity;this.X=this.kb=!1;this.A=new Ub(function(){Dv(a)});this.na=Ev;this.o=null;this.Ha=0;this.m=Infinity;this.xa=this.qa=this.R=0;this.S=new tg;this.H=new Map;this.I=new Map;this.ba=new Map;this.ha=new Map;this.L=
|
|
1002
1003
|
new Map;this.Aa=new Map;this.ma=new Map;this.Za=this.G=!1;this.Na=new ld(5);this.j=null;this.ea=!0}q=Cv.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.G=b.isLowLatencyMode(),E(e,Fv(c,[a]),2)):3!=e.g?(d=e.h,c.N=d.uri,E(e,Gv(c,d.data,a),3)):e.return(c.o)})};
|
|
1003
1004
|
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.S&&(a.push(this.S.destroy()),this.S=null);this.g=this.h=null;this.Ea.clear();this.o=null;this.i.clear();this.J.clear();this.I.clear();this.u.clear();this.ba.clear();this.ha.clear();this.L.clear();this.Aa.clear();this.ma.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
1004
1005
|
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!Hv(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Iv(a,g));return E(m,Promise.all(b),2)}Jv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Ud});d.length&&!h&&(k=Kv,Lv(a,k.Ci),l=d.map(function(n){return n.Xb}),a.l.sb(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
1005
1006
|
h&&Mv(a);F(m)})};function Nv(a,b){return Hv(a)?a.O.get(b.type):b.We}
|
|
1006
|
-
function Iv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
1007
|
-
b.P().includes(m)||b.Yh.push(m);n=ov(l.g,"EXT-X-DEFINE");p=Ov(a,n,m);r=b.stream;u=Nv(a,b);return E(T,Pv(a,l,r.mimeType,b.P,p),3)}v=T.h;w=v.keyIds;A=v.drmInfos;y=function(R,la){return R.size===la.size&&[].concat(x(R)).every(function(ra){return la.has(ra)})};y(r.keyIds,w)||(r.keyIds=w,r.drmInfos=A,a.h.newDrmInfo(r));C=Qv(a,l,u,p,b.P,b.type);z=C.segments;if(B=C.bandwidth)r.bandwidth=B;r.segmentIndex.be(z,a.l.Cb());z.length&&(D=rv(l.g,"EXT-X-MEDIA-SEQUENCE",0),
|
|
1008
|
-
0,
|
|
1007
|
+
function Iv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J,H,L,N,M,P;return O(function(T){if(1==T.g){c=[];d=t(b.P());for(e=d.next();!e.done;e=d.next())f=e.value,g=new mb(f),h=g.g,b.De&&(0<=b.Fb&&h.add("_HLS_msn",String(b.Fb)),0<=b.Gb&&h.add("_HLS_part",String(b.Gb))),b.Ee&&h.add("_HLS_skip","YES"),Cb(h)&&qb(g,h),c.push(g.toString());return E(T,Fv(a,c,!0),2)}if(3!=T.g){k=T.h;if(!b.stream.segmentIndex)return T.return();l=vv(a.Ba,k.data);if(1!=l.type)throw new U(2,4,4017);m=k.uri;m==k.originalUri||
|
|
1008
|
+
b.P().includes(m)||b.Yh.push(m);n=ov(l.g,"EXT-X-DEFINE");p=Ov(a,n,m);r=b.stream;u=Nv(a,b);return E(T,Pv(a,l,r.mimeType,b.P,p),3)}v=T.h;w=v.keyIds;A=v.drmInfos;y=function(R,la){return R.size===la.size&&[].concat(x(R)).every(function(ra){return la.has(ra)})};y(r.keyIds,w)||(r.keyIds=w,r.drmInfos=A,a.h.newDrmInfo(r));C=Qv(a,l,u,p,b.P,b.type);z=C.segments;if(B=C.bandwidth)r.bandwidth=B;r.segmentIndex.be(z,a.l.Cb());z.length&&(D=rv(l.g,"EXT-X-MEDIA-SEQUENCE",0),G=(K=qv(l.g,"EXT-X-SKIP"))?Number(Y(K,"SKIPPED-SEGMENTS")):
|
|
1009
|
+
0,I=Rv(D,z),J=I.Fb,H=I.Gb,b.Fb=J+G,b.Gb=H,L=u.get(D),r.segmentIndex.eb(L));N=r.segmentIndex.g[0]||null;b.Jc=N.startTime;M=z[z.length-1];b.Xb=M.endTime;if(P=qv(l.g,"EXT-X-ENDLIST"))b.Ud=!0;Sv(a,l);F(T)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
1009
1010
|
function Tv(a,b){for(var c=-1==a.K,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=Nv(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.K=Math.max(a.K,k));e.$f=k;break}}}}if(!(0>a.K))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,Uv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.K-c.$f,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Vv(a,
|
|
1010
1011
|
c,d)}
|
|
1011
1012
|
function Wv(a,b){if(Infinity==a.$){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.$=Math.min(a.$,d.h))}}b=a.$;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!Uv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Xa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.P(),"Expect AV sync issues!");else for(Vv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.fh(b)}}}
|
|
1012
1013
|
function Vv(a,b,c){b.Jc+=c;b.Xb+=c;a=Nv(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.P()}
|
|
1013
|
-
function Gv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
1014
|
-
u=ov(d.g,"EXT-X-SESSION-DATA");v=ov(d.g,"EXT-X-CONTENT-STEERING");Zv(a,u);return E(Da,$v(a,v),4);case 4:return aw(a,m),bw(a,l),E(Da,cw(a,m,r,l,k,a.u),5);case 5:return f=Da.h,g=dw(a,l),E(Da,ew(a,n,p),6);case 6:h=Da.h;Da.B(3);break;case 7:return y=Da.h,C=y.type,z=y.mimeType,B=y.codecs,D=y.language,K=y.height,
|
|
1015
|
-
gw(
|
|
1014
|
+
function Gv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J,H,L,N,M,P,T,R,la,ra,Ca,Fa,Ia,Pa,Ja,db;return O(function(Da){switch(Da.g){case 1:d=vv(a.Ba,b);e=ov(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new Bk(null,0);a.l.Nc(!0);k=function(){return[c]};if(1==d.type)return a.ea=!1,w=ov(d.g,"EXT-X-DEFINE"),A=Ov(a,w,a.N),E(Da,Xv(a,d,k,A),7);Yv(a,e);l=ov(d.g,"EXT-X-MEDIA");m=ov(d.g,"EXT-X-STREAM-INF");n=ov(d.g,"EXT-X-IMAGE-STREAM-INF");p=ov(d.g,"EXT-X-I-FRAME-STREAM-INF");r=ov(d.g,"EXT-X-SESSION-KEY");
|
|
1015
|
+
u=ov(d.g,"EXT-X-SESSION-DATA");v=ov(d.g,"EXT-X-CONTENT-STEERING");Zv(a,u);return E(Da,$v(a,v),4);case 4:return aw(a,m),bw(a,l),E(Da,cw(a,m,r,l,k,a.u),5);case 5:return f=Da.h,g=dw(a,l),E(Da,ew(a,n,p),6);case 6:h=Da.h;Da.B(3);break;case 7:return y=Da.h,C=y.type,z=y.mimeType,B=y.codecs,D=y.language,K=y.height,G=y.width,I=y.channelCount,J=y.sampleRate,H=y.closedCaptions,L=y.pe,N=y.colorGamut,E(Da,fw(a,a.F++,A,d,k,B,C,D,!0,"Media Playlist",I,H,null,!1,J,!1,z),8);case 8:M=Da.h,a.i.set(c,M),"video"==C&&
|
|
1016
|
+
gw(M.stream,G,K,null,L,null,N),f.push({id:0,language:Xc(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==C?M.stream:null,video:"video"==C?M.stream:null,bandwidth:M.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);1==d.type&&(Hv(a)&&(hw(a,d),P=a.m,a.A.V(P)),T=Array.from(a.i.values()),iw(a,T),Mv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
1016
1017
|
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.X||!a.g.hls.disableCodecGuessing){Da.B(9);break}R=[];la=t(a.o.variants);for(ra=la.next();!ra.done;ra=la.next())Ca=ra.value,Ca.audio&&""===Ca.audio.codecs&&R.push(Ca.audio.createSegmentIndex()),Ca.video&&""===Ca.video.codecs&&R.push(Ca.video.createSegmentIndex());return E(Da,Promise.all(R),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){Fa=
|
|
1017
1018
|
[];Ia=f[0];Pa=t([Ia.video,Ia.audio]);for(Ja=Pa.next();!Ja.done;Ja=Pa.next())(db=Ja.value)&&!db.segmentIndex&&Fa.push(db.createSegmentIndex());if(0<Fa.length)return E(Da,Promise.all(Fa),0)}Da.B(0)}})}
|
|
1018
|
-
function Xv(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
1019
|
-
t(mw(null,y.value)),w=C.next().value,A=C.next().value;z=Bl(g,w,A,a.g.retryParameters);return E(
|
|
1020
|
-
case "opus":N.push("opus"),
|
|
1021
|
-
closedCaptions:
|
|
1019
|
+
function Xv(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G;return O(function(I){switch(I.g){case 1:e=Et(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return I.return(e);f=b.segments[0];g=sv(c(),f.h,d);h=g[0];k=new mb(h);l=k.fb.split(".").pop();if(m=jw[l])return I.return(Et(m));n=Gg;p=null;r=kw(a,b,f.g,c,d);a.ba.clear();if(!r){I.B(2);break}u=Bl(r.P(),r.Pb(),r.Nb(),a.g.retryParameters);return E(I,lw(a,u,n,{type:0}),3);case 3:v=I.h,p=v.data;case 2:w=0;A=null;if(y=qv(f.g,"EXT-X-BYTERANGE"))C=
|
|
1020
|
+
t(mw(null,y.value)),w=C.next().value,A=C.next().value;z=Bl(g,w,A,a.g.retryParameters);return E(I,lw(a,z,n,{type:1}),4);case 4:B=I.h;(D=B.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var J=B.data;var H=Gb(J);H=(new vj).parse(H);var L=H.Pd();H=H.wg();var N=[],M=!1,P=!1;switch(L.audio){case "aac":case "aac-loas":N.push("mp4a.40.2");M=!0;break;case "mp3":N.push("mp4a.40.34");M=!0;break;case "ac3":N.push("ac-3");M=!0;break;case "ec3":N.push("ec-3");M=!0;break;
|
|
1021
|
+
case "opus":N.push("opus"),M=!0}switch(L.video){case "avc":H.cb?N.push(H.cb):N.push("avc1.42E01E");P=!0;break;case "hvc":H.cb?N.push(H.cb):N.push("hvc1.1.6.L93.90");P=!0;break;case "av1":N.push("av01.0.01M.08"),P=!0}if(N.length){L=M&&!P;M=new Map;if(P){P=new Ed("video/mp2t");P.i(J);J=t(P.j());for(var T=J.next();!T.done;T=J.next())T=T.value,M.set(T,T);P.g()}H={type:L?"audio":"video",mimeType:"video/mp2t",codecs:N.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,
|
|
1022
|
+
closedCaptions:M,pe:null,colorGamut:null}}else H=null;if(K=H)return I.return(K)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(G=Ft(p,B.data))return I.return(G);return I.return(e)}})}
|
|
1022
1023
|
function Mv(a){if(Hv(a)){if(a.na==nw){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.Xb),c=Math.min(c,e.Jc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.u);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.nf(b)}}else a.l.sb(ow(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1023
1024
|
c.h&&a.l.ei(c.h);a.l.Ue()}function Yv(a,b){var c=(new mb(a.N)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Y(e,"NAME");var f=Y(e,"VALUE");e=Y(e,"QUERYPARAM");d&&f&&(a.u.has(d)||a.u.set(d,f));e&&(d=c.get(e)[0])&&!a.u.has(d)&&a.u.set(e,d)}}
|
|
1024
1025
|
function Ov(a,b,c){c=(new mb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Y(f,"NAME"),h=Y(f,"VALUE");e=Y(f,"QUERYPARAM");f=Y(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.u.get(f))&&d.set(f,e)}return d}
|
|
@@ -1030,9 +1031,9 @@ function tw(a){var b=new Set([te(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmen
|
|
|
1030
1031
|
function ew(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);ta(m,2);return E(m,uw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=wa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=lv(g,"URI"),k=Y(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Y(g,"LANGUAGE"),n=Y(g,"NAME"),
|
|
1031
1032
|
p=Y(g,"CHARACTERISTICS"),r=vw(a,a.F++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Y(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;r.stream.width=Number(w)||void 0;r.stream.height=Number(A)||void 0;var y=Y(g,"BANDWIDTH");y&&(r.stream.bandwidth=Number(y));a.i.set(h,r);l=r}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1032
1033
|
function ww(a,b,c){b=b.filter(function(h){var k=Y(h,"URI")||"";return"SUBTITLES"!=Y(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=jv(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)qw(a,d[g],c)}
|
|
1033
|
-
function cw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
1034
|
-
y(m,""):null;db.B(6);break}return E(db,zw(a,m,"",e,null,f),9);case 9:r=db.h;case 6:if(r){if(r.keyIds)for(C=t(r.keyIds),z=C.next();!z.done;z=C.next())B=z.value,h.add(B);g.push(r)}case 4:l=k.next();db.B(3);break;case 2:D={};K=t(b);for(
|
|
1035
|
-
Fa=Y(
|
|
1034
|
+
function cw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J,H,L,N,M,P,T,R,la,ra,Ca,Fa,Ia,Pa,Ja;return O(function(db){switch(db.g){case 1:g=[];h=new Set;if(!(0<c.length)){db.B(2);break}k=t(c);l=k.next();case 3:if(l.done){db.B(2);break}m=l.value;n=lv(m,"METHOD");p=Y(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){db.B(4);break}if(xw(n)){u=sv(e(),lv(m,"URI"),f);v=u.sort().join("");a.L.has(v)||(w=Ag(u,a.g.retryParameters),A=lw(a,w,6),a.L.set(v,A));db.B(4);break}if("identity"!=p){r=(y=yw[p])?
|
|
1035
|
+
y(m,""):null;db.B(6);break}return E(db,zw(a,m,"",e,null,f),9);case 9:r=db.h;case 6:if(r){if(r.keyIds)for(C=t(r.keyIds),z=C.next();!z.done;z=C.next())B=z.value,h.add(B);g.push(r)}case 4:l=k.next();db.B(3);break;case 2:D={};K=t(b);for(G=K.next();!G.done;G=K.next())I=G.value,J=jv(I),D[J]?D[J].push(I):D[J]=[I];H=[];for(L in D)N=D[L],M=N[0],P=Y(M,"FRAME-RATE"),T=Number(Y(M,"AVERAGE-BANDWIDTH"))||Number(lv(M,"BANDWIDTH")),R=Y(M,"RESOLUTION"),la=t(R?R.split("x"):[null,null]),ra=la.next().value,Ca=la.next().value,
|
|
1036
|
+
Fa=Y(M,"VIDEO-RANGE"),(Ia=Y(M,"REQ-VIDEO-LAYOUT"))&&Ia.includes(",")&&(Pa=Ia.split(",").filter(function(Da){return"CH-STEREO"==Da||"CH-MONO"==Da}),Ia=Pa[0]),Ia=Ia||"CH-MONO",Ja=Aw(a,N,d),H.push.apply(H,x(Bw(a,Ja.audio,Ja.video,T,ra,Ca,P,Fa,Ia,g,h)));return db.return(H.filter(function(Da){return null!=Da}))}})}
|
|
1036
1037
|
function Aw(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Y(m,"AUDIO");var n=Y(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Y(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(lv(v,"GROUP-ID"))}),ww(a,k,e));k=(e=f.sort().join(","))&&a.J.has(e)?a.J.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var r=b.map(function(v){return lv(v,
|
|
1037
1038
|
"URI")});h=d.audio.find(function(v){return v&&v.P().find(function(w){return r.includes(w)})});g=pw(a,b[0]);n=Pc("video",g);(p=Pc("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=Y(v,"URI")||"",A=Y(v,"TYPE");v=lv(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Y(c,"LANGUAGE"),
|
|
1038
1039
|
n=Y(c,"NAME"),p=Cw(c),Dw(c),m=Y(c,"CHARACTERISTICS"),u=Ew(c));a=Fw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
@@ -1046,21 +1047,21 @@ m=n.next().value;n=n.next().value;(m=c.get(m))&&Nt(a.j,l,m,n)}}c=Y(h,"LANGUAGE")
|
|
|
1046
1047
|
function uw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=lv(b,"URI");d=Y(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Y(b,"LANGUAGE");f=Y(b,"NAME");g=Y(b,"CHARACTERISTICS");h=vw(a,a.F++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Y(b,"RESOLUTION"))?E(p,h.stream.createSegmentIndex(),3):p.B(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
1047
1048
|
Number(m.split("x")[1]));if(n=Y(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1048
1049
|
function Fw(a,b,c,d,e,f,g,h,k){for(var l=a.F++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=lv(r,"URI");r=Y(r,"PATHWAY-ID");a.j&&r&&Nt(a.j,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Y(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.H.get(b);break a}a.ea=!1}else if(!b&&a.H.size)for(b=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}b=null}c=Oc(d,c);d=vw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
1049
|
-
function vw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var D,K,
|
|
1050
|
-
break}if(
|
|
1051
|
-
y.Fb=ra.Fb;y.Gb=ra.Gb;y.Gg=!0;w.segmentIndex=Ca.segmentIndex;w.encrypted=Ca.encrypted;w.drmInfos=Ca.drmInfos;w.keyIds=Ca.keyIds;w.mimeType=Ca.mimeType;w.bandwidth=w.bandwidth||Ca.bandwidth;w.codecs=w.codecs||Ca.codecs;w.closedCaptions=w.closedCaptions||Ca.closedCaptions;tw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&
|
|
1050
|
+
function vw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var D,K,G,I,J,H,L,N,M,P,T,R,la,ra,Ca,Fa,Ia,Pa,Ja,db,Da,$a;return O(function(xb){switch(xb.g){case 1:return D=Uc,K=y.P(),E(xb,Fv(a,y.P(),!0),2);case 2:G=xb.h;if(B.aborted)return xb.return();I=G.uri;I==G.originalUri||K.includes(I)||A.push(I);J=vv(a.Ba,G.data);if(1!=J.type)throw new U(2,4,4017);H=ov(J.g,"EXT-X-DEFINE");L=Ov(a,H,I);N=void 0;M=!1;if(!(!a.X&&a.g.hls.disableCodecGuessing||a.ea&&e==D.sa&&!a.g.hls.disableClosedCaptionsDetection)){xb.B(3);
|
|
1051
|
+
break}if(P=0<J.segments.length)T=J.segments[0],qv(T.g,"EXT-X-GAP")&&(P=!1);if(!P){xb.B(3);break}a.ea=!1;return E(xb,Xv(a,J,v,L),5);case 5:R=xb.h,!R.closedCaptions.size||l&&l.size==R.closedCaptions.size||(l=R.closedCaptions,M=!0),!a.X&&a.g.hls.disableCodecGuessing&&(N=R.mimeType,d=R.codecs);case 3:return la=Hv(a),E(xb,fw(a,0,L,J,v,d,e,f,g,h,k,l,m,n,p,r,N),6);case 6:ra=xb.h;if(B.aborted)return xb.return();Ca=ra.stream;Hv(a)&&!la&&hw(a,J);y.Jc=ra.Jc;y.Xb=ra.Xb;y.Ee=ra.Ee;y.De=ra.De;y.Ud=ra.Ud;y.We=ra.We;
|
|
1052
|
+
y.Fb=ra.Fb;y.Gb=ra.Gb;y.Gg=!0;w.segmentIndex=Ca.segmentIndex;w.encrypted=Ca.encrypted;w.drmInfos=Ca.drmInfos;w.keyIds=Ca.keyIds;w.mimeType=Ca.mimeType;w.bandwidth=w.bandwidth||Ca.bandwidth;w.codecs=w.codecs||Ca.codecs;w.closedCaptions=w.closedCaptions||Ca.closedCaptions;tw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&M&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.sa||e==D.aa)for(Fa=t(a.i.values()),Ia=Fa.next();!Ia.done;Ia=Fa.next())Pa=Ia.value,Pa.Gg||Pa.type!=e||(Pa.stream.mimeType=Ca.mimeType,
|
|
1052
1053
|
tw(Pa.stream));e==D.Ga&&(Ja=Ca.segmentIndex.get(0))&&Ja.ra&&(w.mimeType="application/mp4",tw(w));Gw(a)&&(a.kb?iw(a,[y]):(a.kb=!0,db=Array.from(a.i.values()),Da=db.filter(function(ad){return ad.stream.segmentIndex}),iw(a,Da),Mv(a),$a=a.m,0<$a&&a.A.V($a)));F(xb)}})}function v(){return a.j&&1<c.length?Ot(a.j,b):A.concat(tv([a.N],c,a.u))}var w=Hw(a,d,e,f,g,h,k,l,m,n,p,r),A=[],y={stream:w,type:e,Yh:A,P:v,Jc:0,Xb:0,We:new Map,Ee:!1,De:!1,Ud:!1,$f:-1,Fb:-1,Gb:-1,Gg:!1},C=null,z=new AbortController;w.createSegmentIndex=
|
|
1053
1054
|
function(){if(C)return C;z=new AbortController;return C=new Promise(function(B){B(u(z.signal))})};w.closeSegmentIndex=function(){C&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);C=null};return y}function ow(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.Xb));return b}
|
|
1054
1055
|
function Jv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.xc(function(e){c.push(e)});a.l.ee(c)}function iw(a,b){if(!Hv(a))for(var c=ow(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Yc(0,c);Jv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Tv(a,b):(Wv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Tv(a,b))}
|
|
1055
1056
|
function Uv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Gw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1056
|
-
function fw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w){var A,y,C,z,B,D,K,
|
|
1057
|
-
D=B.drmInfos;K=B.keyIds;
|
|
1057
|
+
function fw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w){var A,y,C,z,B,D,K,G,I,J,H,L,N,M,P,T,R,la,ra,Ca,Fa;return O(function(Ia){switch(Ia.g){case 1:var Pa=qv(d.g,"EXT-X-PLAYLIST-TYPE"),Ja=qv(d.g,"EXT-X-ENDLIST");Ja=Pa&&"VOD"==Pa.value||Ja;Pa=Pa&&"EVENT"==Pa.value&&!Ja;Pa=!Ja&&!Pa;Ja?Lv(a,Ev):Pa?Lv(a,nw):Lv(a,Iw);Hv(a)&&Sv(a,d);A=Hv(a)?a.O.get(g):new Map;y=Qv(a,d,A,c,e,g);C=y.segments;z=y.bandwidth;if(w){Ia.B(2);break}return E(Ia,Jw(a,g,f,C),3);case 3:w=Ia.h;case 2:return E(Ia,Pv(a,d,w,e,c),4);case 4:B=Ia.h;
|
|
1058
|
+
D=B.drmInfos;K=B.keyIds;G=B.encrypted;I=B.Gi;if(G&&!D.length&&!I)throw new U(2,4,4026);J=Hw(a,f,g,h,k,l,m,n,p,r,u,v);J.encrypted=G;J.drmInfos=D;J.keyIds=K;J.mimeType=w;z&&(J.bandwidth=z);tw(J);Hv(a)&&Sv(a,d);H=C[0].startTime;L=C[C.length-1];N=L.endTime;M=new Xk(C);J.segmentIndex=M;T=(P=qv(d.g,"EXT-X-SERVER-CONTROL"))?null!=kv(P,"CAN-SKIP-UNTIL"):!1;R=P?null!=kv(P,"CAN-BLOCK-RELOAD"):!1;la=rv(d.g,"EXT-X-MEDIA-SEQUENCE",0);ra=Rv(la,C);Ca=ra.Fb;Fa=ra.Gb;return Ia.return({stream:J,type:g,Yh:[],P:e,Jc:H,
|
|
1058
1059
|
Xb:N,Ee:T,De:R,Ud:!1,$f:-1,Fb:Ca,Gb:Fa,We:A,Gg:!1})}})}function Rv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Fb:a,Gb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Fb:a,Gb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{Fb:a,Gb:c}}
|
|
1059
1060
|
function Hw(a,b,c,d,e,f,g,h,k,l,m,n){var p=rw(c,b)||sw(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==Sc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.F++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1060
1061
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Sc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Xc(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,
|
|
1061
1062
|
fullMimeTypes:new Set};tw(a);return a}
|
|
1062
|
-
function Pv(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
1063
|
-
!0;
|
|
1063
|
+
function Pv(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J,H,L,N,M,P,T;return O(function(R){switch(R.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=ov(k.g,"EXT-X-KEY"),m=null,l.length)for(m=kw(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);C=y.next();case 2:if(C.done){R.B(4);break}z=C.value;B=t(z);D=B.next().value;K=B.next().value;G=D;I=K;J=lv(G,"METHOD");if("NONE"==J){R.B(3);break}u=
|
|
1064
|
+
!0;H=Y(G,"KEYFORMAT")||"identity";L=null;if(xw(J)){v=!0;R.B(3);break}if("identity"!=H){L=(N=yw[H])?N(G,c):null;R.B(6);break}return E(R,zw(a,G,c,d,I,e),8);case 8:L=R.h;case 6:if(L){if(L.keyIds)for(M=t(L.keyIds),P=M.next();!P.done;P=M.next())T=P.value,A.add(T);w.push(L)}case 3:C=y.next();R.B(2);break;case 4:return R.return({drmInfos:w,keyIds:A,encrypted:u,Gi:v})}})}
|
|
1064
1065
|
function Kw(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 U(2,4,4042);var f=0,g=Y(b,"IV","");if(g){var h=Ic(g.substr(2));if(16!=h.byteLength)throw new U(2,4,4048);}else f=rv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ha.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(lv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1065
1066
|
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u,v;return O(function(w){if(1==w.g)return l=sv(d(),lv(b,"URI"),e),m=l.sort().join(""),a.L.has(m)||(n=Ag(l,a.g.retryParameters),p=lw(a,n,6),a.L.set(m,p)),E(w,a.L.get(m),2);if(3!=w.g){r=w.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new U(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};v=k;return E(w,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}v.cryptoKey=w.h;k.fetchKey=void 0;
|
|
1066
1067
|
F(w)})};a.ha.set(c,k)}return a.ha.get(c)}
|
|
@@ -1069,9 +1070,9 @@ kv(b,"HOLD-BACK"):null,a.qa=c?Number(c.value):0);a.Ha=Math.max(d,a.Ha)}function
|
|
|
1069
1070
|
function kw(a,b,c,d,e){var f=qv(c,"EXT-X-MAP");if(!f)return null;var g=lv(f,"URI"),h=sv(d(),g,e);g=[h.toString(),Y(f,"BYTERANGE","")].join("-");if(!a.ba.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?xw(lv(m,"METHOD"))&&m.id<f.id&&(k=Kw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Lw(h,f,l,k);a.ba.set(g,b)}return a.ba.get(g)}
|
|
1070
1071
|
function Lw(a,b,c,d){var e=0,f=null;b=Y(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Gi(function(){return a},e,f,null,null,null,d)}
|
|
1071
1072
|
function Mw(a,b,c,d,e,f,g,h,k){function l(la){la=(new mb(la)).fb.split(".").pop();var ra=Nw[g][la];ra||(ra=jw[la]);return ra}var m=d.g,n=qv(m,"EXTINF"),p=0,r=0,u=null;d.Rb.length&&!a.G&&Ya("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=qv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=wh(w.value))}var A=
|
|
1072
|
-
Ji;qv(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.Rb.length)throw new U(2,4,4024,"EXTINF");if(!a.G)return null}var y=[];w=!1;var C=null,z=!1,B=!1;if(a.G&&d.Rb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,K={},
|
|
1073
|
-
|
|
1074
|
-
D&&(D+=
|
|
1073
|
+
Ji;qv(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.Rb.length)throw new U(2,4,4024,"EXTINF");if(!a.G)return null}var y=[];w=!1;var C=null,z=!1,B=!1;if(a.G&&d.Rb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,K={},G=0;G<d.Rb.length;K={Hd:K.Hd,yd:K.yd},G++){var I=d.Rb[G],J=0==G?c:y[y.length-1],H=0==G?e:J.endTime,L=Number(Y(I,"DURATION"))||a.R;if(L){var N=H+L,M=0,P=null;"EXT-X-PRELOAD-HINT"==I.name?(M=(M=Y(I,"BYTERANGE-START"))?Number(M):0,(J=Y(I,"BYTERANGE-LENGTH"))?
|
|
1074
|
+
P=M+Number(J)-1:M&&(P=Number.MAX_SAFE_INTEGER)):(M=Y(I,"BYTERANGE"),P=t(mw(J,M)),M=P.next().value,P=P.next().value);K.yd=Y(I,"URI");if(K.yd){J=Ji;"YES"==Y(I,"GAP")&&(J=2,z=!0);K.Hd=null;var T=function(la){return function(){null==la.Hd&&(la.Hd=sv(h(),la.yd,f));return la.Hd}}(K);p&&0<=M&&null!=P&&(C=T,w=!0);H=new Ii(H,N,T,M,P,b,0,0,Infinity,[],"",null,D,J,k);"EXT-X-PRELOAD-HINT"==I.name&&(H.Hg(),B=!0);"YES"!=Y(I,"INDEPENDENT")&&0<G&&H.Ve();if(I=l(K.yd))H.mimeType=I,Ow.has(I)&&(H.ra=null);y.push(H);
|
|
1075
|
+
D&&(D+=L)}}}}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!=y[0].Wa?(w=!1,C=null):y=[]);(n=qv(m,"EXT-X-BYTERANGE"))?(u=t(mw(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].Wa,u=y[y.length-1].Da);c="";n=null;"image"==g&&(c="1x1",m=qv(m,"EXT-X-TILES"))&&(c=lv(m,"LAYOUT"),(m=Y(m,"DURATION"))&&(n=Number(m)));var R=null;b=new Ii(e,p,function(){if(C)return C();null==R&&(R=sv(h(),d.h,f));return R||[]},r,
|
|
1075
1076
|
u,b,0,0,Infinity,y,c,n,v,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,Ow.has(e)&&(b.ra=null);w&&(a.Za=!0,b.Qh(),B&&b.Hg());return b}function mw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Da+1,d=c+b-1);return[c,d]}
|
|
1076
1077
|
function Qv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=rv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=rv(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=qv(b.g,"EXT-X-SKIP"),n=m?Number(Y(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Hv(a)&&c.has(p)&&(r=c.get(p));0===r&&a.na==nw&&0<c.size&&!c.has(p)&&(r=a.l.Cb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],y=0==w?r:v.endTime;p=l+n+w;qv(A.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(A.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&(xw(lv(z,"METHOD"))?
|
|
1077
1078
|
h=Kw(a,z,b,e,d):h=void 0);c.set(p,y);C=kw(a,b,A.g,e,d);!a.G&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.G=a.h.isLowLatencyMode());if(y=Mw(a,C,v,A,y,d,f,e,h))(v=rv(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,Uv(a,f)&&null!=a.K&&p<a.K||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(B,D){return B+D.duration},0),b=Math.round(m.reduce(function(B,D){return B+D.bitrate*D.duration},0)/
|
|
@@ -1083,7 +1084,7 @@ function Jw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(y){switch
|
|
|
1083
1084
|
function Dv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();Hv(a)&&(d=(c-b)/1E3,a.Na.sample(1,d),e=a.m,f=Math.max(0,e-md(a.Na)),a.A.V(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.V(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();F(h)}})}
|
|
1084
1085
|
function Hv(a){return a.na!=Ev}function Lv(a,b){a.na=b;a.l&&a.l.Nc(!Hv(a));Hv(a)||a.A.stop()}function lw(a,b,c,d){if(!a.S)throw new U(2,7,7001);b=a.h.networkingEngine.request(c,b,d);ug(a.S,b);return b.promise}function xw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1085
1086
|
function zw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new U(2,4,4040);if(tc())throw new U(2,4,4041);g=lv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=sv(d(),lv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Jc(Hc(k[0].split("data:text/plain;base64,").pop()));B.B(2);break}m=k.sort().join("");a.Aa.has(m)||(n=Ag(k,a.g.retryParameters),p=lw(a,n,6),a.Aa.set(m,p));return E(B,a.Aa.get(m),
|
|
1086
|
-
3);case 3:r=B.h,l=Jc(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.B(4);break}if(a.ma.has(e)){v=a.ma.get(e);B.B(5);break}w=Bl(e.P(),e.Pb(),e.Nb(),a.g.retryParameters);A=Gg;return E(B,lw(a,w,A,{type:0}),6);case 6:y=B.h,v=It(y.data),a.ma.set(e,v);case 5:v&&(u=v);case 4:return C=new Map,C.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Nc(C,z))}})}
|
|
1087
|
+
3);case 3:r=B.h,l=Jc(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.B(4);break}if(a.ma.has(e)){v=a.ma.get(e);B.B(5);break}w=Bl(e.P(),e.Pb(),e.Nb(),a.g.retryParameters);A=Gg;return E(B,lw(a,w,A,{type:0}),6);case 6:y=B.h,v=It(y.data),a.ma.set(e,v);case 5:v&&(u=v);case 4:return C=new Map,C.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Nc(C,z))}})}Q("shaka.hls.HlsParser",Cv);
|
|
1087
1088
|
var jw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Nw={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",
|
|
1088
1089
|
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"}},Ow=new Set(["video/mp2t"].concat(x(ue))),yw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new U(2,4,4040);if(tc())throw new U(2,4,4041);a=lv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Mc("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
1089
1090
|
keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=lv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=lv(a,"URI");b=Bv(b.split("?")[0]);b=Gb(b.data);c=Mc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=lv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
@@ -1113,8 +1114,8 @@ q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E
|
|
|
1113
1114
|
function Hx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=Ag(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),ug(a.A,e),E(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!=wm){xd("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Au(m,"SmoothStreamingMedia");if(!m)throw new U(2,4,4046,
|
|
1114
1115
|
l);n(m);m=Ac(m.outerHTML)}var p=bh(m,"SmoothStreamingMedia");if(!p)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=xm&&l(p);a.i||(a.i=new Bk(null,0));if(l=th(p,"IsLive",Dh,!1))throw new U(2,4,4047);a.i.Nc(!l);n=th(p,"TimeScale",Bh,1E7);m=th(p,"DVRWindowLength",Bh);l&&(0===m||isNaN(m))&&(m=Infinity);var r=th(p,"CanSeek",Dh,!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.nf(r);m=th(p,
|
|
1115
1116
|
"Duration",Bh,Infinity);l||a.i.sb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};r=kh(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(kh(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=Rw(v);if(y)a:{y=t(nh(y,"DATA"));for(var C=y.next();!C.done;C=y.next())if(C=oh(C.value,"KID")){y=Hc(lh(C));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
|
|
1116
|
-
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Jc(y);break a}y=null}else y=null;C=Hc(lh(v));w=Ic(w.replace(/-/g,""));w=[{initData:ah(C,w,new Set,0),initDataType:"cenc",keyId:y}];w=Mc(A,"cenc",w);y&&w.keyIds.add(y);if(A=Tw.get(A))w.licenseServerUri=A(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=kh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=kh(v,"QualityLevel");w=l.timescale;y=l.duration;C=kh(v,"c");for(var z=[],B=0,D=0;D<C.length;++D){var K=C[D],
|
|
1117
|
-
th(K,"d",Bh);K=th(K,"r",zh);if(!
|
|
1117
|
+
y[4],y[7],y[6]].concat(x(y.slice(8))));y=Jc(y);break a}y=null}else y=null;C=Hc(lh(v));w=Ic(w.replace(/-/g,""));w=[{initData:ah(C,w,new Set,0),initDataType:"cenc",keyId:y}];w=Mc(A,"cenc",w);y&&w.keyIds.add(y);if(A=Tw.get(A))w.licenseServerUri=A(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=kh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=kh(v,"QualityLevel");w=l.timescale;y=l.duration;C=kh(v,"c");for(var z=[],B=0,D=0;D<C.length;++D){var K=C[D],G=C[D+1],I=th(K,"t",Bh),J=
|
|
1118
|
+
th(K,"d",Bh);K=th(K,"r",zh);if(!J)break;I=null!=I?I:B;K=K||0;if(0>K)if(G){G=th(G,"t",Bh);if(null==G)break;else if(I>=G)break;K=Math.ceil((G-I)/J)-1}else{if(Infinity==y)break;else if(I/w>=y)break;K=Math.ceil((y*w-I)/J)-1}for(G=0;G<=K;++G)B=I+J,z.push({start:I/w,end:B/w,kh:I}),I=B}w=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=Ix(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Sc||a.g.disableText||m.push(y):n.push(y):r.push(y))}p=[];r=t(0<r.length?
|
|
1118
1119
|
r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(0<n.length?n:[null]),y=v.next();!y.done;y=v.next())A=p,w=A.push,y=y.value,C=0,u&&u.bandwidth&&0<u.bandwidth&&(C+=u.bandwidth),y&&y.bandwidth&&0<y.bandwidth&&(C+=y.bandwidth),y={id:a.u++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!y&&y.primary,audio:u,video:y,bandwidth:C,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,y);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
|
|
1119
1120
|
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},a.i.Ue());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.F.sample(1,h);F(k)})}
|
|
1120
1121
|
function Ix(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.u++,l=th(c,"Bitrate",Ah),m=th(c,"MaxWidth",Ah),n=th(c,"MaxHeight",Ah),p=th(c,"Channels",Ah),r=th(c,"SamplingRate",Ah),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.sb(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
@@ -1125,15 +1126,15 @@ w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.
|
|
|
1125
1126
|
A),w,b,d);w.segmentIndex=new Xk(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1126
1127
|
function Lx(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1127
1128
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Mx(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Nx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1128
|
-
function Ox(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Ed:g.Ed},h=e.next())g.Ed=h.value,d.push(new Ii(g.Ed.start,g.Ed.end,function(k){return function(){return Lc(a.l,[f.replace("{start time}",String(k.Ed.kh))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}
|
|
1129
|
+
function Ox(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Ed:g.Ed},h=e.next())g.Ed=h.value,d.push(new Ii(g.Ed.start,g.Ed.end,function(k){return function(){return Lc(a.l,[f.replace("{start time}",String(k.Ed.kh))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}Q("shaka.mss.MssParser",Fx);var Kx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Jx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1129
1130
|
Bi["application/vnd.ms-sstr+xml"]=function(){return new Fx};function Px(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=zc(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Qx(){}function Rx(a,b,c,d,e){var f=new Sx;Kg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Tx,h={uh:!1,ri:!1};a=Ux(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new mg(a,function(){h.uh=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Ub(function(){h.ri=!0;g.abort()});k.V(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1130
|
-
function Ux(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return h=Vx,k=Wx,p=n=0,r=Date.now(),ta(z,2),E(z,h(a,c),4);case 4:l=z.h;f(Xx(l.headers));if("HEAD"==c.method){z.B(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function D(){var K,
|
|
1131
|
-
K.value.byteLength;if(!g){
|
|
1132
|
-
function Xx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Yx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}
|
|
1131
|
+
function Ux(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return h=Vx,k=Wx,p=n=0,r=Date.now(),ta(z,2),E(z,h(a,c),4);case 4:l=z.h;f(Xx(l.headers));if("HEAD"==c.method){z.B(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function D(){var K,G,I;return O(function(J){switch(J.g){case 1:return ta(J,2),E(J,u.read(),4);case 4:K=J.h;va(J,3);break;case 2:return wa(J),J.return();case 3:if(K.done){J.B(5);break}n+=
|
|
1132
|
+
K.value.byteLength;if(!g){J.B(5);break}return E(J,g(K.value),5);case 5:G=Date.now();if(100<G-r||K.done)I=K.done?0:w-n,e(G-r,n-p,I),p=n,r=G;K.done?B.close():(B.enqueue(K.value),D());F(J)}})}D()};new k({start:A});return E(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:va(z,3);break;case 2:y=wa(z);if(d.uh)throw new U(1,1,7001,a,b);if(d.ri)throw new U(1,1,1003,a,b);throw new U(1,1,1002,a,y,b);case 3:return C=Xx(l.headers),z.return(Px(C,m,l.status,a,l.url,b))}})}
|
|
1133
|
+
function Xx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Yx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}Q("shaka.net.HttpFetchPlugin",Qx);Qx.isSupported=Yx;Qx.parse=Rx;var Vx=window.fetch,Tx=window.AbortController,Wx=window.ReadableStream,Sx=window.Headers;
|
|
1133
1134
|
Yx()&&(wg("http",Rx,2,!0),wg("https",Rx,2,!0),wg("blob",Rx,2,!0));function Zx(){}
|
|
1134
1135
|
function $x(a,b,c,d,e){var f=new ay,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 U(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=by(f);e(r);n=!0}};f.onload=function(r){var u=by(f),v=f.response;try{d(Date.now()-g,r.loaded-h,0);var w=Px(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(r){m(new U(1,
|
|
1135
1136
|
1,1002,a,r,c))};f.ontimeout=function(){m(new U(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 mg(k,function(){f.abort();return Promise.resolve()})}
|
|
1136
|
-
function by(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}
|
|
1137
|
+
function by(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}Q("shaka.net.HttpXHRPlugin",Zx);Zx.parse=$x;var ay=window.XMLHttpRequest;wg("http",$x,1,!0);wg("https",$x,1,!0);wg("blob",$x,1,!0);function cy(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function dy(a){return a.P().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Wa+":"+a.Da}function ey(a,b){return Bl(a.g.P(),a.g.Wa,a.g.Da,b.streaming.retryParameters)};function fy(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function gy(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}fy.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 hy(a){var b=this;this.o=a;this.j=new Map;this.i=new Ig(function(){return iy(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new fy}hy.prototype.destroy=function(){return this.i.destroy()};function jy(a,b,c){a.m=b;a.l=c}function iy(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1137
1138
|
function ky(a,b,c,d,e,f){Jg(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 E(u,ly(a,c),2);h=u.h;if(a.i.g)throw new U(2,9,7001);if(e)for(m in k=Gb(h),l=new $g(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 my(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1138
1139
|
function ly(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=Gg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Od(a.h,e);return g.return(f.data)})};function ny(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new lg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ny.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return E(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);F(b)})};
|
|
1139
1140
|
function oy(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 E(g,b(f.key,f.value,f),2)}f.continue();F(g)})}})}ny.prototype.store=function(){return this.h};ny.prototype.promise=function(){return this.g};function py(a){this.h=a;this.g=[]}py.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function qy(a,b){return ry(a,b,"readwrite")}function ry(a,b,c){c=a.h.transaction([b],c);var d=new ny(c,b);a.g.push(d);d.promise().then(function(){Od(a.g,d)},function(){Od(a.g,d)});return d};function sy(a,b,c){this.h=new py(a);this.i=b;this.g=c}q=sy.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ty(this.i)};q.removeSegments=function(a,b){return uy(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,vy(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.xh(e)}))})};q.addManifests=function(){return ty(this.g)};
|
|
@@ -1145,7 +1146,7 @@ function vy(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=ry(a.h,b,
|
|
|
1145
1146
|
xy.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=qy(b.g,"session-ids"),E(d,oy(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function yy(){this.g=new Map}yy.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)};yy.prototype.init=function(){var a=this;zy.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)};
|
|
1146
1147
|
function Ay(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Eb:d,$a:f},$a:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function By(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Eb:d,$a:f},e)})})}
|
|
1147
1148
|
function Cy(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function Dy(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Ey(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1148
|
-
function Fy(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=zy,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Gy(a,b){zy.set(a,b)}
|
|
1149
|
+
function Fy(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=zy,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Gy(a,b){zy.set(a,b)}Q("shaka.offline.StorageMuxer",yy);yy.unregister=function(a){zy.delete(a)};yy.register=Gy;yy.prototype.destroy=yy.prototype.destroy;var zy=new Map;function Hy(){sy.apply(this,arguments)}oa(Hy,sy);Hy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=qy(c.h,c.g);e=d.store();f=new lg;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new U(2,9,9012,"Could not find values for "+a))};return E(g,Promise.all([d.promise(),f]),0)})};
|
|
1149
1150
|
Hy.prototype.Md=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=Iy(a.periods[c],e),b.push(f);return E(h,Zt(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})})};
|
|
1150
1151
|
function Iy(a,b){Jy(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ky(e,a.startTime,b)})}
|
|
1151
1152
|
function Ky(a,b,c){var d=a.initSegmentUri?Ly(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=
|
|
@@ -1175,7 +1176,7 @@ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){
|
|
|
1175
1176
|
q.update=function(){};
|
|
1176
1177
|
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 yy,ta(m,2,3),E(m,e.init(),5);case 5:return E(m,Cy(e,d.Eb(),d.$a()),6);case 6:return f=m.h,E(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),E(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.B(3)}})};
|
|
1177
1178
|
q.onInitialVariantChosen=function(){};q.banLocation=function(){};Bi["application/x-offline-manifest"]=function(){return new Zy};function $y(){}function az(a){var b=Sy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=pg(a)):a=b&&"segment"==b.g?bz(b.key(),b):ng(new U(2,1,9004,a));return a}
|
|
1178
|
-
function bz(a,b){var c=new yy;return pg(void 0).Qa(function(){return c.init()}).Qa(function(){return Cy(c,b.Eb(),b.$a())}).Qa(function(d){return d.getSegments([b.key()])}).Qa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}
|
|
1179
|
+
function bz(a,b){var c=new yy;return pg(void 0).Qa(function(){return c.init()}).Qa(function(){return Cy(c,b.Eb(),b.$a())}).Qa(function(d){return d.getSegments([b.key()])}).Qa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}Q("shaka.offline.OfflineScheme",$y);$y.plugin=az;wg("offline",az);function cz(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,dz(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.B(4);break}g=f.value;h=ez(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
|
|
1179
1180
|
function ez(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Jh({Zb:b,onError:function(){},bf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),E(f,Rh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1180
1181
|
h.g)return ta(h,2),E(h,ci(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);F(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function dz(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pd(a.audioCapabilities,b.audioCapabilities,c)&&Pd(a.videoCapabilities,b.videoCapabilities,c)};function fz(a,b,c){var d=b.presentationTimeline.getDuration();b=gz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function hz(a,b){var c=Uy(new Ty(a.Eb(),a.$a()),b),d=b.appMetadata||{};c=gz(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}}
|
|
1181
1182
|
function gz(a){var b=[],c=Ff(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(wf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(xf(c.value));return b};function iz(){this.g={}}function jz(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 kz(a,b){a.g[b.id]=b.bandwidth||2048}function lz(a,b){a=a.g[b];null==a&&(a=0);return a};function mz(a){var b=this;if(a&&a.constructor!=X)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.hc()):(this.h=vm(),this.g=new vg);this.i=[];this.j=[];var c=!a;this.l=new Ig(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return E(k,Promise.all(b.j.map(function(l){return iy(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 E(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return E(k,b.g.destroy(),4);
|
|
@@ -1184,14 +1185,14 @@ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new hy(this.g);th
|
|
|
1184
1185
|
function oz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return qz(),h=g=null,k=new yy,n=m=l=null,ta(z,2,3),E(z,d(),5);case 5:return g=z.h,E(z,rz(a,b,g,e),6);case 6:p=z.h;sz(a);r=!p.presentationTimeline.U()&&!p.presentationTimeline.Gc();if(!r)throw new U(2,9,9005,b);return E(z,a.Xc(p,function(B){n=n||B},e),7);case 7:h=z.h;sz(a);if(n)throw n;return E(z,tz(p,h,e),8);case 8:return E(z,k.init(),9);case 9:return sz(a),E(z,Ay(k),10);case 10:return l=z.h,sz(a),u=uz(h,
|
|
1185
1186
|
p,b,c,e,f),v=u.Oj,w=u.hh,E(z,l.$a.addManifests([v]),11);case 11:A=z.h;sz(a);m=A[0];sz(a);if(n)throw n;return E(z,vz(a,w,m,v,f,e,l.$a,p,h),12);case 12:return sz(a),wz(p,v,h,e),E(z,l.$a.updateManifest(m,v),13);case 13:return sz(a),y=new Ry("manifest",l.path.Eb,l.path.$a,m),z.return(hz(y,v));case 3:return xa(z),E(z,k.destroy(),14);case 14:if(!g){z.B(15);break}return E(z,g.stop(),15);case 15:if(!h){z.B(17);break}return E(z,h.destroy(),17);case 17:ya(z,0);break;case 2:C=wa(z);if(null==m){z.B(19);break}return E(z,
|
|
1186
1187
|
xz(m),19);case 19:throw n||C;}})}
|
|
1187
|
-
function vz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,A,y;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(z,B){var D,K,
|
|
1188
|
+
function vz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,A,y;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(z,B){var D,K,G,I,J,H,L;return O(function(N){if(1==N.g){D={};K=t(z);for(G=K.next();!G.done;D={tc:D.tc},G=K.next())D.tc=G.value,I=ey(D.tc,f),J=D.tc.i,H=D.tc.h,L=function(M){return function(P){var T,R,la;return O(function(ra){if(1==ra.g)return E(ra,g.addSegments([{data:P}]),2);T=ra.h;sz(a);R=M.tc.g;la=dy(R);l[la]=T[0];m+=P.byteLength;F(ra)})}}(D),ky(e,D.tc.groupId,I,J,H,L);return E(N,my(e),
|
|
1188
1189
|
2)}if(!B)return N.B(0);sz(a);wz(h,d,k,f);return E(N,g.updateManifest(c,d),0)})};p=!1;ta(C,2);if(!yz(h)||!p||zz(h)){C.B(4);break}return E(C,n(b.filter(function(z){return z.h}),!0),5);case 5:return sz(a),b=b.filter(function(z){return!z.h}),r=l,u=m,l={},m=0,E(C,Az(g,c,d,r,u,function(){return sz(a)}),6);case 6:sz(a);case 4:if(p){C.B(7);break}return E(C,n(b,!1),8);case 8:return sz(a),v=l,w=m,l={},m=0,E(C,Az(g,c,d,v,w,function(){return sz(a)}),9);case 9:sz(a);case 7:va(C,0);break;case 2:return A=wa(C),
|
|
1189
1190
|
y=Object.values(l),E(C,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function xz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new yy,E(f,b.init(),2);case 2:return E(f,Ay(b),3);case 3:return c=f.h,d=new Ry("manifest",c.path.Eb,c.path.$a,a),E(f,b.destroy(),4);case 4:return e=new mz,E(f,e.remove(d.toString()),0)}})}
|
|
1190
1191
|
function Az(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;ta(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&&
|
|
1191
1192
|
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();va(A,0);break;case 2:return v=wa(A),E(A,xz(b),5);case 5:if(g){A.B(6);break}w=Object.values(d);return E(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
|
|
1192
|
-
function tz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,
|
|
1193
|
-
u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(yf(w));return E(
|
|
1194
|
-
N.next())
|
|
1193
|
+
function tz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,K,G,I,J,H,L,N,M;return O(function(P){switch(P.g){case 1:return d={width:Infinity,height:Infinity},bf(a,c.restrictions,d),E(P,ff(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;$e(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(wf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,e.push(xf(r));
|
|
1194
|
+
u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(yf(w));return E(P,c.offline.trackSelectionCallback(e),3);case 3:A=P.h;y=a.presentationTimeline.getDuration();C=0;z=t(A);for(B=z.next();!B.done;B=z.next())D=B.value,K=D.bandwidth*y/8,C+=K;ta(P,4);return E(P,c.offline.downloadSizeCallback(C),6);case 6:G=P.h;if(!G)throw new U(2,9,9014);va(P,5);break;case 4:I=wa(P);if(I instanceof U)throw I;throw new U(2,9,9015);case 5:J=new Set;H=new Set;L=new Set;N=t(A);for(B=N.next();!B.done;B=
|
|
1195
|
+
N.next())M=B.value,"variant"==M.type&&J.add(M.id),"text"==M.type&&H.add(M.id),"image"==M.type&&L.add(M.id);a.variants=a.variants.filter(function(T){return J.has(T.id)});a.textStreams=a.textStreams.filter(function(T){return H.has(T.id)});a.imageStreams=a.imageStreams.filter(function(T){return L.has(T.id)});Bz(a);F(P)}})}
|
|
1195
1196
|
function uz(a,b,c,d,e,f){var g=fz(c,b,d),h=e.offline.progressCallback;jy(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&Zh(a,"cenc",r)});var k=yz(b)&&!zz(b),l=null;k&&(l=Cz.get(a.g.keySystem));for(var m=new iz,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())kz(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())jz(m,n.value);m=Dz(f,m,b,e);f=m.streams;m=m.hh;p=a.g;n=e.offline.usePersistentLicense;
|
|
1196
1197
|
p&&n&&(p.initData=[]);return{Oj:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Qd(),streams:f,sessionIds:n?hi(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},hh:m}}function yz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1197
1198
|
function zz(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 wz(a,b,c,d){b.expiration=c.Qd();c=hi(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(yz(a)&&d.offline.usePersistentLicense&&!c.length)throw new U(2,9,9007);}q.remove=function(a){return Ez(this,Fz(this,a))};
|
|
@@ -1209,9 +1210,9 @@ initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStar
|
|
|
1209
1210
|
function Ez(a,b){return O(function(c){if(1==c.g)return a.i.push(b),ua(c,2),E(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);Od(a.i,b);return ya(c,0)})}function pz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Od(a.i,c)})}function Kz(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)}
|
|
1210
1211
|
function Jz(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Ey(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Iz(d,!1),videoCapabilities:Iz(d,!0)}});return E(h,cz(b,a,f),2)}return 3!=h.g?(g=h.h,E(h,e.remove(g),3)):E(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1211
1212
|
function Nz(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
1212
|
-
function Bz(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());}
|
|
1213
|
+
function Bz(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());}Q("shaka.offline.Storage",mz);mz.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new yy,ua(b,2),E(b,Fy(a),2)):5!=b.g?(xa(b),E(b,a.destroy(),5)):ya(b,0)})};
|
|
1213
1214
|
mz.prototype.list=mz.prototype.list;mz.prototype.removeEmeSessions=mz.prototype.fk;mz.prototype.remove=mz.prototype.remove;mz.prototype.store=mz.prototype.store;mz.prototype.getNetworkingEngine=mz.prototype.hc;mz.prototype.getConfiguration=mz.prototype.getConfiguration;mz.prototype.configure=mz.prototype.configure;mz.prototype.destroy=mz.prototype.destroy;mz.support=nz;
|
|
1214
|
-
var Cz=(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");Ap.offline=nz;function Qz(){}function Rz(){for(var a=t(Sz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Ya("Error installing polyfill!",c)}}}function Tz(a,b){a={priority:b||0,callback:a};for(b=0;b<Sz.length;b++)if(Sz[b].priority<a.priority){Sz.splice(b,0,a);return}Sz.push(a)}
|
|
1215
|
+
var Cz=(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");Ap.offline=nz;function Qz(){}function Rz(){for(var a=t(Sz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Ya("Error installing polyfill!",c)}}}function Tz(a,b){a={priority:b||0,callback:a};for(b=0;b<Sz.length;b++)if(Sz[b].priority<a.priority){Sz.splice(b,0,a);return}Sz.push(a)}Q("shaka.polyfill",Qz);Qz.register=Tz;Qz.installAll=Rz;var Sz=[];function Uz(){this.g=new Vz}function Wz(){window.AbortController||(window.AbortController=Uz,window.AbortSignal=Vz)}Uz.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 S("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(Uz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Qz.AbortController=Uz;Uz.install=Wz;
|
|
1215
1216
|
function Vz(){gb.call(this);this.h=!1;this.g=void 0;this.onabort=null}oa(Vz,gb);da.Object.defineProperties(Vz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Tz(Wz);function Xz(){}function Yz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Zz(b.value)}function Zz(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)}})}Qz.Aria=Xz;Xz.install=Yz;Tz(Yz);function $z(){}function aA(){bA()}Qz.EncryptionScheme=$z;$z.install=aA;Tz(aA,-2);function cA(){}
|
|
1216
1217
|
function dA(){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}}),
|
|
1217
1218
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",eA);document.addEventListener("webkitfullscreenerror",eA);document.addEventListener("mozfullscreenchange",eA);document.addEventListener("mozfullscreenerror",eA);document.addEventListener("MSFullscreenChange",eA);document.addEventListener("MSFullscreenError",eA)}}
|
|
@@ -1261,7 +1262,7 @@ q.forEach=function(a){this.g&&a(this.g,Rb.value())};q.get=function(a){if(this.ha
|
|
|
1261
1262
|
function vB(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)}
|
|
1262
1263
|
function rB(){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 uB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1263
1264
|
function sB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function tB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Qz.PiPWebkit=pB;pB.install=qB;Tz(qB);function wB(){}function xB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=yB))}function yB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Qz.RandomUUID=wB;wB.install=xB;Tz(xB);function zB(){}function AB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:BB})}function BB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Qz.Symbol=zB;zB.install=AB;Tz(AB);function CB(){}function DB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Qz.VideoPlayPromise=CB;CB.install=DB;Tz(DB);function EB(){}function FB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||ec())&&(a.getVideoPlaybackQuality=GB)}}function GB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Qz.VideoPlaybackQuality=EB;EB.install=FB;Tz(FB);function HB(){}function IB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=JB;else if(6==b)a=KB;else{try{var c=!!JB(1,2,"")}catch(d){c=!1}c&&(a=JB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function JB(a,b,c){return new window.TextTrackCue(a,b,c)}function KB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Qz.VTTCue=HB;HB.install=IB;Tz(IB);function LB(){}LB.prototype.parseInit=function(){};LB.prototype.setSequenceMode=function(){};LB.prototype.setManifestType=function(){};LB.prototype.parseMedia=function(a,b){var c=null,d=[];a=wc(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=MB.exec(e))){var f=NB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Rd(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1264
|
-
|
|
1265
|
+
Q("shaka.text.LrcTextParser",LB);LB.prototype.parseMedia=LB.prototype.parseMedia;LB.prototype.setManifestType=LB.prototype.setManifestType;LB.prototype.setSequenceMode=LB.prototype.setSequenceMode;LB.prototype.parseInit=LB.prototype.parseInit;var MB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,NB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Oe["application/x-subtitle-lrc"]=function(){return new LB};function OB(){}OB.prototype.parseInit=function(){};OB.prototype.setSequenceMode=function(){};OB.prototype.setManifestType=function(){};
|
|
1265
1266
|
OB.prototype.parseMedia=function(a,b,c){var d=wc(a);a=[];if(""==d)return a;var e=ch(d,"tt");if(!e)throw new U(2,2,2005,"Failed to parse TTML.");d=nh(e,"body")[0];if(!d)return[];var f=vh(e,PB,"frameRate"),g=vh(e,PB,"subFrameRate"),h=vh(e,PB,"frameRateMultiplier"),k=vh(e,PB,"tickRate"),l=vh(e,PB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=vh(e,QB,"extent");if("default"!=m&&"preserve"!=m)throw new U(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new RB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
|
|
1266
1267
|
{wc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=nh(e,"metadata")[0])?g.children:[];h=nh(e,"style");e=nh(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next()){var u=r.value;r=new Kd;var v=u.attributes["xml:id"];if(v){r.id=v;var w=null;n&&(w=SB.exec(n)||TB.exec(n));v=w?Number(w[1]):null;w=w?Number(w[2]):null;var A,y=UB(u,h,"extent");if(y){var C=(A=SB.exec(y))||TB.exec(y);null!=C&&(r.width=Number(C[1]),r.height=Number(C[2]),A||(null!=v&&(r.width=100*r.width/v),null!=w&&(r.height=
|
|
1267
1268
|
100*r.height/w)),r.widthUnits=A||null!=v?Ld:0,r.heightUnits=A||null!=w?Ld:0)}if(u=UB(u,h,"origin"))if(C=(A=SB.exec(u))||TB.exec(u),null!=C)r.viewportAnchorX=Number(C[1]),r.viewportAnchorY=Number(C[2]),A?y||(r.width=100-r.viewportAnchorX,r.widthUnits=Ld,r.height=100-r.viewportAnchorY,r.heightUnits=Ld):(null!=w&&(r.viewportAnchorY=100*r.viewportAnchorY/w),null!=v&&(r.viewportAnchorX=100*r.viewportAnchorX/v)),r.viewportAnchorUnits=A||null!=v?Ld:0}else r=null;r&&k.push(r)}if(kh(d,"p").length)throw new U(2,
|
|
@@ -1280,11 +1281,11 @@ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.inclu
|
|
|
1280
1281
|
function hC(a,b,c){a=XB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=uh(a[e],"urn:ebu:tt:style",c);f||(f=vh(a[e],QB,c));f||(f=gC(a[e],b,c));f&&(d=f)}return d}function XB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?uh(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}
|
|
1281
1282
|
function ZB(a,b,c,d){a=YB(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 YB(a,b){var c=iC(a.attributes.begin,b),d=iC(a.attributes.end,b);a=iC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1282
1283
|
function iC(a,b){var c=null;if(jC.test(a)){a=jC.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(kC.test(a))c=lC(kC,a);else if(mC.test(a))c=lC(mC,a);else if(nC.test(a))a=nC.exec(a),c=Number(a[1])/b.frameRate;else if(oC.test(a))a=oC.exec(a),c=Number(a[1])/b.g;else if(pC.test(a))c=lC(pC,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1283
|
-
function lC(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)}
|
|
1284
|
+
function lC(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)}Q("shaka.text.TtmlTextParser",OB);OB.prototype.parseMedia=OB.prototype.parseMedia;OB.prototype.setManifestType=OB.prototype.setManifestType;OB.prototype.setSequenceMode=OB.prototype.setSequenceMode;OB.prototype.parseInit=OB.prototype.parseInit;
|
|
1284
1285
|
function RB(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]))}
|
|
1285
1286
|
var SB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,eC=/^(\d{1,4}(?:\.\d+)?|100)%$/,dC=/^(\d+px|\d+em|\d*\.?\d+c)$/,TB=/^(\d+)px (\d+)px$/,jC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,kC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,mC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,nC=/^(\d*(?:\.\d*)?)f$/,oC=/^(\d*(?:\.\d*)?)t$/,pC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),cC={left:Xd,center:"center",right:"end",start:Xd,
|
|
1286
1287
|
end:"end"},bC={left:"line-left",center:"center",right:"line-right"},PB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],QB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],WB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Oe["application/ttml+xml"]=function(){return new OB};function qC(){this.g=new OB}qC.prototype.parseInit=function(a){var b=!1;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).box("minf",Ug).box("stbl",Ug).W("stsd",Wg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};qC.prototype.setSequenceMode=function(){};qC.prototype.setManifestType=function(){};
|
|
1287
|
-
qC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Pg).box("mdat",Zg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new U(2,2,2007);return f};
|
|
1288
|
+
qC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Pg).box("mdat",Zg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new U(2,2,2007);return f};Q("shaka.text.Mp4TtmlParser",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;Oe['application/mp4; codecs="stpp"']=function(){return new qC};
|
|
1288
1289
|
Oe['application/mp4; codecs="stpp.ttml"']=function(){return new qC};Oe['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new qC};Oe['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new qC};Oe['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new qC};Oe['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new qC};Oe['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new qC};Oe['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new qC};function rC(){this.h=!1;this.g="UNKNOWN"}rC.prototype.parseInit=function(){};rC.prototype.setSequenceMode=function(a){this.h=a};rC.prototype.setManifestType=function(a){this.g=a};
|
|
1289
1290
|
rC.prototype.parseMedia=function(a,b){a=wc(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 U(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 U(2,2,2E3);a=sC(new Lp(a[1]));if(null==a)throw new U(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
|
|
1290
1291
|
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Lp(e);var f=new Kd;Op(e);Mp(e);for(var g=Op(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
|
|
@@ -1301,53 +1302,53 @@ zC(g.fontSize,d.fontSize),d.textShadow=zC(g.textShadow,d.textShadow),d.fontWeigh
|
|
|
1301
1302
|
if(!f)break;if(f=sC(new Lp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(ih(a)||1==e.length&&ih(e[0]))for(c=lh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ce(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())yC(a.value,d,c)}
|
|
1302
1303
|
function uC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Td:a.textAlign=ee[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"==
|
|
1303
1304
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sd);else if(d=/^region:(.*)$/.exec(b)){if(b=AC(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=ge[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Wd,a.line=Number(c[1]),c[2]&&(a.lineAlign=ge[c[2].toUpperCase()])}
|
|
1304
|
-
function AC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function sC(a){a=Np(a,wC);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)}
|
|
1305
|
+
function AC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function sC(a){a=Np(a,wC);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}Q("shaka.text.VttTextParser",rC);rC.prototype.parseMedia=rC.prototype.parseMedia;rC.prototype.setManifestType=rC.prototype.setManifestType;rC.prototype.setSequenceMode=rC.prototype.setSequenceMode;rC.prototype.parseInit=rC.prototype.parseInit;var wC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1305
1306
|
Oe["text/vtt"]=function(){return new rC};Oe['text/vtt; codecs="vtt"']=function(){return new rC};Oe['text/vtt; codecs="wvtt"']=function(){return new rC};function BC(){this.g=null}BC.prototype.parseInit=function(a){var b=this,c=!1;(new Pg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).W("mdhd",function(d){d=aj(d.reader,d.version);b.g=d.timescale}).box("minf",Ug).box("stbl",Ug).W("stsd",Wg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new U(2,2,2008);if(!c)throw new U(2,2,2008);};BC.prototype.setSequenceMode=function(){};BC.prototype.setManifestType=function(){};
|
|
1306
1307
|
BC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new U(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Pg).box("moof",Ug).box("traf",Ug).W("tfdt",function(C){g=!0;c=$i(C.reader,C.version).baseMediaDecodeTime}).W("tfhd",function(C){l=Zi(C.reader,C.flags).Od}).W("trun",function(C){h=!0;d=bj(C.reader,C.version,C.flags).$h}).box("mdat",Zg(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new U(2,2,2008);a=c;for(var m=new Mg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1307
1308
|
p.value;var r=p.Sg||l,u=p.kf?c+p.kf:a;a=u+(r||0);var v=0;do{var w=m.T();v+=w;var A=m.T(),y=null;"vttc"==Tg(A)?8<w&&(y=m.Hb(w-8)):m.skip(w-8);r&&y&&(w=CC(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(We)};function CC(a,b,c){var d,e,f;(new Pg).box("payl",Zg(function(g){d=wc(g)})).box("iden",Zg(function(g){e=wc(g)})).box("sttg",Zg(function(g){f=wc(g)})).parse(a);return d?DC(d,e,f,b,c):null}
|
|
1308
|
-
function DC(a,b,c,d,e){d=new Rd(d,e,"");vC(a,d,new Map);b&&(d.id=b);if(c)for(a=new Lp(c),b=Op(a);b;)uC(d,b,[]),Mp(a),b=Op(a);return d}
|
|
1309
|
-
function FC(a){a=Np(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)}
|
|
1310
|
-
function HC(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}
|
|
1309
|
+
function DC(a,b,c,d,e){d=new Rd(d,e,"");vC(a,d,new Map);b&&(d.id=b);if(c)for(a=new Lp(c),b=Op(a);b;)uC(d,b,[]),Mp(a),b=Op(a);return d}Q("shaka.text.Mp4VttParser",BC);BC.prototype.parseMedia=BC.prototype.parseMedia;BC.prototype.setManifestType=BC.prototype.setManifestType;BC.prototype.setSequenceMode=BC.prototype.setSequenceMode;BC.prototype.parseInit=BC.prototype.parseInit;Oe['application/mp4; codecs="wvtt"']=function(){return new BC};function EC(){}EC.prototype.parseInit=function(){};EC.prototype.setSequenceMode=function(){};EC.prototype.setManifestType=function(){};EC.prototype.parseMedia=function(a){var b=wc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Lp(c[0]),e=FC(d),f=Np(d,/,/g);d=FC(d);if(null==e||null==f||null==d)throw new U(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Rd(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1310
|
+
function FC(a){a=Np(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}Q("shaka.text.SbvTextParser",EC);EC.prototype.parseMedia=EC.prototype.parseMedia;EC.prototype.setManifestType=EC.prototype.setManifestType;EC.prototype.setSequenceMode=EC.prototype.setSequenceMode;EC.prototype.parseInit=EC.prototype.parseInit;Oe["text/x-subviewer"]=function(){return new EC};function GC(){this.g=new rC}GC.prototype.parseInit=function(){};GC.prototype.setSequenceMode=function(){};GC.prototype.setManifestType=function(){};GC.prototype.parseMedia=function(a,b,c){a=wc(a);a=HC(a);a=Gb(Ac(a));return this.g.parseMedia(a,b,c)};
|
|
1311
|
+
function HC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}Q("shaka.text.SrtTextParser",GC);GC.srt2webvtt=HC;GC.prototype.parseMedia=GC.prototype.parseMedia;
|
|
1311
1312
|
GC.prototype.setManifestType=GC.prototype.setManifestType;GC.prototype.setSequenceMode=GC.prototype.setSequenceMode;GC.prototype.parseInit=GC.prototype.parseInit;Oe["text/srt"]=function(){return new GC};function IC(){}IC.prototype.parseInit=function(){};IC.prototype.setSequenceMode=function(){};IC.prototype.setManifestType=function(){};
|
|
1312
1313
|
IC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=wc(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=JC.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(f=b.next();!f.done;f=b.next())if(a=f.value,!/^\s*;/.test(a)&&(f=KC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(LC);else if("Style"==a){a=f.split(LC);f={};for(var g=0;g<e.length&&
|
|
1313
1314
|
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;a={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;a={Gf:a.Gf},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=KC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(LC);else if("Dialogue"==f){g=g.split(LC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=MC(f.Start);var k=MC(f.End);g=new Rd(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Gf=f.Style;(f=d.find(function(l){return function(m){return m.Name==
|
|
1314
1315
|
l.Gf}}(a)))&&NC(g,f);e.push(g)}return e};
|
|
1315
1316
|
function NC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=OC(c))a.color=c;if(c=b.BackColour)if(c=OC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Yd;a.textAlign="start";break;case 2:a.displayAlign=Yd;a.textAlign=Td;break;case 3:a.displayAlign=Yd;a.textAlign="end";
|
|
1316
1317
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Td;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Td;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1317
|
-
function OC(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function MC(a){a=PC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}
|
|
1318
|
+
function OC(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function MC(a){a=PC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}Q("shaka.text.SsaTextParser",IC);IC.prototype.parseMedia=IC.prototype.parseMedia;IC.prototype.setManifestType=IC.prototype.setManifestType;IC.prototype.setSequenceMode=IC.prototype.setSequenceMode;IC.prototype.parseInit=IC.prototype.parseInit;
|
|
1318
1319
|
var JC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,KC=/^\s*([^:]+):\s*(.*)/,LC=/\s*,\s*/,PC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Oe["text/x-ssa"]=function(){return new IC};function QC(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Pe:c,ia:a}:null}function RC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,cb:"mp4a.40."+e}}
|
|
1319
1320
|
function SC(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}
|
|
1320
1321
|
function TC(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,
|
|
1321
1322
|
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 UC(a){this.i=a;this.h=0;this.g=new Map}q=UC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?td(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Ke(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1322
1323
|
q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Yi(e),g=f.length;g<e.length&&!SC(e,g);g++);a=1E3*c.endTime;f=Xi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=RC(e,g);if(!f)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=QC(e,g);if(!k)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));var l=k.Pe+k.ia;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1323
1324
|
k.Pe,g+l),size:k.ia,duration:1024,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:a,rb:h},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=lx(d),this.g.set(c,b));c=Cx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};
|
|
1324
|
-
|
|
1325
|
+
Q("shaka.transmuxer.AacTransmuxer",UC);UC.prototype.transmux=UC.prototype.transmux;UC.prototype.getOriginalMimeType=UC.prototype.getOriginalMimeType;UC.prototype.convertCodecs=UC.prototype.convertCodecs;UC.prototype.isSupported=UC.prototype.isSupported;UC.prototype.destroy=UC.prototype.destroy;le("audio/aac",function(){return new UC("audio/aac")},re);function VC(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,
|
|
1325
1326
|
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,ya:a,ia:e}}
|
|
1326
1327
|
function WC(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 XC(a){this.i=a;this.h=0;this.g=new Map}q=XC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?td(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};
|
|
1327
1328
|
q.transmux=function(a,b,c,d){a=Gb(a);for(var e=Yi(a),f=e.length;f<a.length&&!WC(a,f);f++);var g=1E3*c.endTime;e=Xi(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=VC(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ya;k.push({data:a.subarray(f,f+l.ia),size:l.ia,duration:1536,
|
|
1328
|
-
wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});f+=l.ia}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,ub:[],ya:h,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:a,rb:k},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=lx(d),this.g.set(c,b));c=Cx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};
|
|
1329
|
+
wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});f+=l.ia}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,ub:[],ya:h,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:a,rb:k},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=lx(d),this.g.set(c,b));c=Cx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};Q("shaka.transmuxer.Ac3Transmuxer",XC);XC.prototype.transmux=XC.prototype.transmux;
|
|
1329
1330
|
XC.prototype.getOriginalMimeType=XC.prototype.getOriginalMimeType;XC.prototype.convertCodecs=XC.prototype.convertCodecs;XC.prototype.isSupported=XC.prototype.isSupported;XC.prototype.destroy=XC.prototype.destroy;le("audio/ac3",function(){return new XC("audio/ac3")},re);function YC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new hj(a.subarray(b+2));jj(c,2);jj(c,3);var d=kj(c,11)+1<<1,e=kj(c,2);if(3==e){e=kj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=kj(c,2);var g=kj(c,3),h=kj(c,1);c=kj(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,ya:a,ia:d}};function ZC(a){this.i=a;this.h=0;this.g=new Map}q=ZC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?td(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};
|
|
1330
1331
|
q.transmux=function(a,b,c,d){a=Gb(a);for(var e=Yi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Xi(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=YC(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ya;k.push({data:a.subarray(f,f+l.ia),
|
|
1331
|
-
size:l.ia,duration:1536,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});f+=l.ia}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,ub:[],ya:h,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:a,rb:k},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=lx(d),this.g.set(c,b));c=Cx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};
|
|
1332
|
+
size:l.ia,duration:1536,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});f+=l.ia}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,ub:[],ya:h,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:a,rb:k},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=lx(d),this.g.set(c,b));c=Cx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};Q("shaka.transmuxer.Ec3Transmuxer",ZC);ZC.prototype.transmux=ZC.prototype.transmux;
|
|
1332
1333
|
ZC.prototype.getOriginalMimeType=ZC.prototype.getOriginalMimeType;ZC.prototype.convertCodecs=ZC.prototype.convertCodecs;ZC.prototype.isSupported=ZC.prototype.isSupported;ZC.prototype.destroy=ZC.prototype.destroy;le("audio/ec3",function(){return new ZC("audio/ec3")},re);function $C(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 hj(b.data),d=sj(c);sj(c);sj(c);mj(c);if(aD.includes(d)&&(d=V(c),3===d&&jj(c,1),mj(c),mj(c),jj(c,1),oj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)oj(c)&&(6>e?tj(c,16):tj(c,64))}mj(c);d=V(c);if(0===d)V(c);else if(1===d)for(jj(c,1),mj(c),mj(c),d=V(c),e=0;e<d;e++)mj(c);mj(c);jj(c,1);var f=V(c),g=V(c),h=kj(c,1);0===h&&jj(c,1);jj(c,1);var k=0,l=0,m=0,n=0;
|
|
1333
1334
|
oj(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(oj(c)&&oj(c)){var p=sj(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=kj(c,16),e=kj(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],
|
|
1334
1335
|
k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ma:a,Sa:d,Ua:e}}
|
|
1335
1336
|
function bD(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=uj(new hj(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?
|
|
1336
1337
|
{data:Kc.apply(Ec,x(c)),Zd:b}:null}var aD=[100,110,122,244,44,83,86,118,128,138,139,134];function cD(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=dD(b.fullData);a=eD(c.fullData);var f=fD(d.fullData);b=gD(b.fullData,c.fullData,d.fullData,{Kg:e.Kg,gh:e.gh,ng:a.ng,og:a.og,hg:a.hg,mg:a.mg,ig:a.ig,jg:a.jg,kg:a.kg,lg:a.lg,ag:a.ag,cg:a.cg,dg:a.dg,eg:a.eg,fg:a.fg,gg:a.gg,Yf:a.Yf,Ye:a.Ye,Wf:a.Wf,Tf:a.Tf,Sf:a.Sf,Ng:f.Ng});return{height:a.height,width:a.width,
|
|
1337
1338
|
Ma:b,Sa:a.nk,Ua:a.lk}}function dD(a){var b=new hj(a,!0);sj(b);sj(b);kj(b,4);kj(b,2);kj(b,6);a=kj(b,3);b=oj(b);return{Kg:a+1,gh:b}}
|
|
1338
|
-
function eD(a){a=new hj(a,!0);sj(a);sj(a);var b=0,c=0,d=0,e=0;kj(a,4);var f=kj(a,3);oj(a);for(var g=kj(a,2),h=kj(a,1),k=kj(a,5),l=sj(a),m=sj(a),n=sj(a),p=sj(a),r=sj(a),u=sj(a),v=sj(a),w=sj(a),A=sj(a),y=sj(a),C=sj(a),z=[],B=[],D=0;D<f;D++)z.push(oj(a)),B.push(oj(a));if(0<f)for(D=f;8>D;D++)kj(a,2);for(D=0;D<f;D++)z[D]&&kj(a,88),B[D]&&sj(a);V(a);z=V(a);3==z&&kj(a,1);B=V(a);D=V(a);oj(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var K=V(a),
|
|
1339
|
-
V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(oj(a)&&oj(a))for(
|
|
1340
|
-
|
|
1341
|
-
kj(a,4);kj(a,5);kj(a,5);kj(a,5)}for(
|
|
1339
|
+
function eD(a){a=new hj(a,!0);sj(a);sj(a);var b=0,c=0,d=0,e=0;kj(a,4);var f=kj(a,3);oj(a);for(var g=kj(a,2),h=kj(a,1),k=kj(a,5),l=sj(a),m=sj(a),n=sj(a),p=sj(a),r=sj(a),u=sj(a),v=sj(a),w=sj(a),A=sj(a),y=sj(a),C=sj(a),z=[],B=[],D=0;D<f;D++)z.push(oj(a)),B.push(oj(a));if(0<f)for(D=f;8>D;D++)kj(a,2);for(D=0;D<f;D++)z[D]&&kj(a,88),B[D]&&sj(a);V(a);z=V(a);3==z&&kj(a,1);B=V(a);D=V(a);oj(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var K=V(a),G=V(a),I=V(a);if(oj(a))for(var J=0;J<=f;J++)V(a),V(a),V(a);else V(a),
|
|
1340
|
+
V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(oj(a)&&oj(a))for(J=0;4>J;J++)for(var H=0;H<(3===J?2:6);H++)if(oj(a)){var L=Math.min(64,1<<4+(J<<1));1<J&&nj(a);for(var N=0;N<L;N++)nj(a)}else V(a);oj(a);oj(a);oj(a)&&(sj(a),V(a),V(a),oj(a));J=V(a);for(L=H=0;L<J;L++)if(N=!1,0!==L&&(N=oj(a)),N){L===J&&V(a);oj(a);V(a);for(var M=N=0;M<=H;M++){var P=oj(a),T=!1;P||(T=oj(a));(P||T)&&N++}H=N}else{M=V(a);N=V(a);H=M+N;for(P=0;P<M;P++)V(a),oj(a);for(M=0;M<N;M++)V(a),oj(a)}if(oj(a))for(J=V(a),H=0;H<J;H++){for(L=0;L<
|
|
1341
|
+
I+4;L++)kj(a,1);kj(a,1)}J=I=1;H=0;oj(a);oj(a);if(oj(a)){oj(a)&&(L=sj(a),N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],M=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<L&&16>=L?(I=N[L-1],J=M[L-1]):255===L&&(I=kj(a,16),J=kj(a,16)));oj(a)&&oj(a);oj(a)&&(kj(a,3),oj(a),oj(a)&&(sj(a),sj(a),sj(a)));oj(a)&&(V(a),V(a));oj(a);oj(a);oj(a);if(L=oj(a))V(a),V(a),V(a),V(a);if(oj(a)&&(kj(a,32),kj(a,32),oj(a)&&V(a),oj(a))){M=!1;L=oj(a);N=oj(a);if(L||N){if(M=oj(a))sj(a),kj(a,5),oj(a),kj(a,5);kj(a,4);kj(a,4);M&&
|
|
1342
|
+
kj(a,4);kj(a,5);kj(a,5);kj(a,5)}for(P=0;P<=f;P++){var R=!0;T=1;oj(a)||(R=oj(a));var la=!1;R?V(a):la=oj(a);la||(T=V(a)+1);if(L){for(R=0;R<T;R++)V(a),V(a),M&&(V(a),V(a));oj(a)}if(N){for(R=0;R<T;R++)V(a),V(a),M&&(V(a),V(a));oj(a)}}}oj(a)&&(oj(a),oj(a),oj(a),H=V(a),V(a),V(a),V(a),V(a))}return{hg:C,ng:g,og:h,mg:k,ig:l,jg:m,kg:n,lg:p,ag:r,cg:u,dg:v,eg:w,fg:A,gg:y,Ye:H,Yf:0,Wf:z,Tf:K,Sf:G,width:B-(b+c)*(1===z||2===z?2:1),height:D-(d+e)*(1===z?2:1),nk:I,lk:J}}
|
|
1342
1343
|
function fD(a){var b=new hj(a,!0);sj(b);sj(b);V(b);V(b);oj(b);oj(b);kj(b,3);oj(b);oj(b);V(b);V(b);nj(b);oj(b);oj(b);oj(b)&&V(b);nj(b);nj(b);oj(b);oj(b);oj(b);oj(b);a=oj(b);b=oj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Ng:c}}
|
|
1343
1344
|
function gD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ng&3)<<6|(d.og?1:0)<<5|d.mg&31;e[2]=d.ig;e[3]=d.jg;e[4]=d.kg;e[5]=d.lg;e[6]=d.ag;e[7]=d.cg;e[8]=d.dg;e[9]=d.eg;e[10]=d.fg;e[11]=d.gg;e[12]=d.hg;e[13]=240|(d.Ye&3840)>>8;e[14]=d.Ye&255;e[15]=252|d.Ng&3;e[16]=252|d.Wf&3;e[17]=248|d.Tf&7;e[18]=248|d.Sf&7;e[19]=0;e[20]=0;e[21]=(d.Yf&3)<<6|(d.Kg&7)<<3|(d.gh?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&
|
|
1344
1345
|
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 hD(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*iD[14*(3===c?3-d:3===d?3:4)+e-1];f=jD[3*(3===c?0:2===c?1:2)+f];c=kD[c][d];var h=lD[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,ia:k,kk:8*c*h}}return null}
|
|
1345
1346
|
function mD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function nD(a,b){if(b+1<a.length&&mD(a,b)){var c=hD(a,b),d=4;c&&c.ia&&(d=c.ia);b+=d;return b===a.length||b+1<a.length&&mD(a,b)}return!1}
|
|
1346
1347
|
var iD=[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],jD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],kD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],lD=[0,1,1,4];function oD(a){this.i=a;this.h=0;this.g=new Map}q=oD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?td(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};
|
|
1347
1348
|
q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Yi(e).length;f<e.length&&!nD(e,f);f++);var g;for(a=[];f<e.length;){var h=hD(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));g||(g=h);f+h.ia<=e.length&&a.push({data:e.subarray(f,f+h.ia),size:h.ia,duration:1152,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});f+=h.ia}if(!g)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));e=9E4*g.kk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1348
|
-
duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:e,rb:a},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=lx(d),this.g.set(c,b));c=Cx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};
|
|
1349
|
-
oD.prototype.destroy=oD.prototype.destroy;le("audio/mpeg",function(){return new oD("audio/mpeg")},re);function pD(a){this.h=a;this.g=null}q=pD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Ke(a).split(","),c=Pc("audio",b);b=Pc("video",b);return!c||b||"mp3"!=
|
|
1350
|
-
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new vj;a=Gb(a);a=this.g.parse(a);if("mp3"!=a.Pd().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=new Uint8Array([]);e=t(a.fc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=hD(a,b))?(b+d.ia<=a.length&&(c=Kc(c,a.subarray(b,b+d.ia))),b+=d.ia):b++;return Promise.resolve(c)};
|
|
1349
|
+
duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.h,baseMediaDecodeTime:e,rb:a},stream:b};d=new Uw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=lx(d),this.g.set(c,b));c=Cx(d);this.h++;b=Kc(b,c);return Promise.resolve(b)};Q("shaka.transmuxer.Mp3Transmuxer",oD);oD.prototype.transmux=oD.prototype.transmux;oD.prototype.getOriginalMimeType=oD.prototype.getOriginalMimeType;oD.prototype.convertCodecs=oD.prototype.convertCodecs;oD.prototype.isSupported=oD.prototype.isSupported;
|
|
1350
|
+
oD.prototype.destroy=oD.prototype.destroy;le("audio/mpeg",function(){return new oD("audio/mpeg")},re);function pD(a){this.h=a;this.g=null}q=pD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Ke(a).split(","),c=Pc("audio",b);b=Pc("video",b);return!c||b||"mp3"!=Fe(c)?!1:td(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};
|
|
1351
|
+
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new vj;a=Gb(a);a=this.g.parse(a);if("mp3"!=a.Pd().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=new Uint8Array([]);e=t(a.fc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=hD(a,b))?(b+d.ia<=a.length&&(c=Kc(c,a.subarray(b,b+d.ia))),b+=d.ia):b++;return Promise.resolve(c)};Q("shaka.transmuxer.MpegTsTransmuxer",pD);pD.prototype.transmux=pD.prototype.transmux;
|
|
1351
1352
|
pD.prototype.getOriginalMimeType=pD.prototype.getOriginalMimeType;pD.prototype.convertCodecs=pD.prototype.convertCodecs;pD.prototype.isSupported=pD.prototype.isSupported;pD.prototype.destroy=pD.prototype.destroy;le("video/mp2t",function(){return new pD("video/mp2t")},qe);/*
|
|
1352
1353
|
@license
|
|
1353
1354
|
MSS Transmuxer
|
|
@@ -1361,26 +1362,26 @@ function rD(a){function b(){this._procFullBox();this.flags&1&&(this._procField("
|
|
|
1361
1362
|
q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return td(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return td(b)||td(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
|
|
1362
1363
|
q.transmux=function(a,b,c){if(!c)return Promise.resolve(Gb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020,c?c.P()[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");
|
|
1363
1364
|
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=
|
|
1364
|
-
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]=tD(u,"traf")+tD(h,"senc")+16);var w=Gb(e.write());return Promise.resolve(w)}catch(A){return A instanceof U?Promise.reject(A):Promise.reject(new U(2,3,3022,c?c.P()[0]:null))}};function tD(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}
|
|
1365
|
+
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]=tD(u,"traf")+tD(h,"senc")+16);var w=Gb(e.write());return Promise.resolve(w)}catch(A){return A instanceof U?Promise.reject(A):Promise.reject(new U(2,3,3022,c?c.P()[0]:null))}};function tD(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}Q("shaka.transmuxer.MssTransmuxer",qD);qD.prototype.transmux=qD.prototype.transmux;
|
|
1365
1366
|
qD.prototype.getOriginalMimeType=qD.prototype.getOriginalMimeType;qD.prototype.convertCodecs=qD.prototype.convertCodecs;qD.prototype.isSupported=qD.prototype.isSupported;qD.prototype.destroy=qD.prototype.destroy;var sD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);le("mss/audio/mp4",function(){return new qD("mss/audio/mp4")},re);le("mss/video/mp4",function(){return new qD("mss/video/mp4")},re);function uD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=uD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1366
|
-
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=Ke(c).split(",");c=Pc("audio",d);d=Pc("video",d);if(c&&(c=
|
|
1367
|
+
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=Ke(c).split(",");c=Pc("audio",d);d=Pc("video",d);if(c&&(c=Fe(c),!vD.includes(c))||d&&(c=Fe(d),!wD.includes(c)))return!1;if(b)return td(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return td(b)||td(a)};
|
|
1367
1368
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Ke(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return nf(c,"audio/mp4")}).map(mf).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1368
1369
|
q.transmux=function(a,b,c,d,e){var f=Gb(a);if("audio"==e&&!Cj(f)){for(var g=Yi(f),h=g.length;h<f.length;h++)if(nD(f,h))return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));for(h=g.length;h<f.length;h++)if(SC(f,h))return this.h||(this.h=new UC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.P()[0]:null))}this.j?this.j.clearData():this.j=new vj;var k=this.j.parse(f),l=[],m=k.Pd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.cd();
|
|
1369
1370
|
if(!v.length)throw new U(2,3,3023,c?c.P()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var C=bD(y);if(C){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:C.data,size:C.data.byteLength,duration:z,wb:Math.round((A.pts||0)-(A.dts||0)),flags:{xb:0,ob:0,mb:0,ib:0,jb:C.Zd?2:1,yb:C.Zd?0:1}})}}var B=$C(u);if(!B||null==r)throw new U(2,3,3018,c?c.P()[0]:null);b.height=B.height;
|
|
1370
|
-
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],ya:new Uint8Array([]),Ma:B.Ma,Sa:B.Sa,Ua:B.Ua,data:{Ib:this.g,baseMediaDecodeTime:r,rb:p},stream:b};break;case "hvc":var D=[],K=null,
|
|
1371
|
-
|
|
1372
|
-
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ia.data,size:Ia.data.byteLength,duration:Pa,wb:Math.round((
|
|
1373
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var db=[],Da,$a=null,xb=t(k.fc()),ad=xb.next();!ad.done;ad=xb.next()){var
|
|
1374
|
-
ob:0,mb:0,ib:0,jb:2,yb:0}});Rc+=
|
|
1375
|
-
duration:1024,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),dh+=1024/Da.sampleRate*9E4}var qj=Da.sampleRate,rj=$a/9E4*qj;n={id:b.id,type:"audio",codecs:Da.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:qj,duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:rj,rb:db},stream:b};break;case "ac3":for(var eh=[],
|
|
1376
|
-
(bk=Sn.pts);for(var
|
|
1377
|
-
Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:PG,rb:eh},stream:b};break;case "ec3":for(var Ww=[],ck=0,Un=new Uint8Array([]),dk=null,Xw=t(k.fc()),Vn=Xw.next();!Vn.done;Vn=Xw.next()){var Wn=Vn.value,Xn=Wn.data;null==dk&&null!==Wn.pts&&(dk=Wn.pts);for(var
|
|
1378
|
-
|
|
1379
|
-
|
|
1371
|
+
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],ya:new Uint8Array([]),Ma:B.Ma,Sa:B.Sa,Ua:B.Ua,data:{Ib:this.g,baseMediaDecodeTime:r,rb:p},stream:b};break;case "hvc":var D=[],K=null,G=[],I=k.cd();if(!I.length)throw new U(2,3,3023,c?c.P()[0]:null);for(var J=0;J<I.length;J++){var H=I[J],L=H.nalus;G.push.apply(G,x(L));for(var N=!1,M=[],P=!1,T=t(L),R=T.next();!R.done;R=T.next()){var la=R.value;switch(la.type){case 1:case 0:var ra=
|
|
1372
|
+
P=!0;break;case 19:case 20:case 21:N=ra=P=!0;break;case 32:ra=!0;break;case 33:ra=!0;break;case 34:ra=!0;break;case 35:P=ra=!0;break;case 39:case 40:ra=!0;break;default:ra=!1}if(P&&ra){var Ca=la.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=Ca>>24&255;Fa[1]=Ca>>16&255;Fa[2]=Ca>>8&255;Fa[3]=Ca&255;M.push(Fa);M.push(la.fullData)}}var Ia=M.length?{data:Kc.apply(Ec,x(M)),Zd:N}:null;if(Ia){null==K&&null!=H.dts&&(K=H.dts);var Pa=void 0;Pa=J+1<I.length?(I[J+1].dts||0)-(H.dts||0):1<I.length?(H.dts||0)-(I[J-
|
|
1373
|
+
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ia.data,size:Ia.data.byteLength,duration:Pa,wb:Math.round((H.pts||0)-(H.dts||0)),flags:{xb:0,ob:0,mb:0,ib:0,jb:Ia.Zd?2:1,yb:Ia.Zd?0:1}})}}var Ja=cD(G);if(!Ja||null==K)throw new U(2,3,3018,c?c.P()[0]:null);b.height=Ja.height;b.width=Ja.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],ya:new Uint8Array([]),Ma:Ja.Ma,Sa:Ja.Sa,Ua:Ja.Ua,data:{Ib:this.g,baseMediaDecodeTime:K,rb:D},stream:b}}n&&
|
|
1374
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var db=[],Da,$a=null,xb=t(k.fc()),ad=xb.next();!ad.done;ad=xb.next()){var ze=ad.value,Fd=ze.data;if(Fd){var Rc=0;Da=RC(Fd,Rc);if(!Da)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=Da.sampleRate;b.channelsCount=Da.channelCount;null==$a&&null!==ze.pts&&($a=ze.pts);for(;Rc<Fd.length;){var Ae=QC(Fd,Rc);if(Ae){var Be=Ae.Pe+Ae.ia;Rc+Be<=Fd.length&&db.push({data:Fd.subarray(Rc+Ae.Pe,Rc+Be),size:Ae.ia,duration:1024,wb:0,flags:{xb:0,
|
|
1375
|
+
ob:0,mb:0,ib:0,jb:2,yb:0}});Rc+=Be}else Rc++}}}if(!Da||null==$a){if(!k.cd().length)throw new U(2,3,3018,c?c.P()[0]:null);$a=9E4*c.startTime;var Ce=Pc("audio",b.codecs.split(","));if(!Ce||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.P()[0]:null);Da={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,cb:Ce};var Gd=TC(Ce,b.channelsCount);if(!Gd)throw new U(2,3,3018,c?c.P()[0]:null);for(var pj=$a+9E4*(c.endTime-c.startTime),dh=$a;dh<pj;)db.push({data:Gd,size:Gd.byteLength,
|
|
1376
|
+
duration:1024,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),dh+=1024/Da.sampleRate*9E4}var qj=Da.sampleRate,rj=$a/9E4*qj;n={id:b.id,type:"audio",codecs:Da.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:qj,duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:rj,rb:db},stream:b};break;case "ac3":for(var eh=[],De=0,rc=new Uint8Array([]),bk=null,Vw=t(k.fc()),Rn=Vw.next();!Rn.done;Rn=Vw.next()){var Sn=Rn.value,Tn=Sn.data;null==bk&&null!==Sn.pts&&
|
|
1377
|
+
(bk=Sn.pts);for(var Nf=0;Nf<Tn.length;){var $d=VC(Tn,Nf);$d?(b.audioSamplingRate=$d.sampleRate,b.channelsCount=$d.channelCount,De=$d.sampleRate,rc=$d.ya,eh.push({data:Tn.subarray(Nf,Nf+$d.ia),size:$d.ia,duration:1536,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),Nf+=$d.ia):Nf++}}if(0==De||0==rc.byteLength||null==bk)throw new U(2,3,3018,c?c.P()[0]:null);var PG=bk/9E4*De;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:De,duration:d,ub:[],ya:rc,Ma:new Uint8Array([]),
|
|
1378
|
+
Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:PG,rb:eh},stream:b};break;case "ec3":for(var Ww=[],ck=0,Un=new Uint8Array([]),dk=null,Xw=t(k.fc()),Vn=Xw.next();!Vn.done;Vn=Xw.next()){var Wn=Vn.value,Xn=Wn.data;null==dk&&null!==Wn.pts&&(dk=Wn.pts);for(var Of=0;Of<Xn.length;){var ae=YC(Xn,Of);ae?(b.audioSamplingRate=ae.sampleRate,b.channelsCount=ae.channelCount,ck=ae.sampleRate,Un=ae.ya,Ww.push({data:Xn.subarray(Of,Of+ae.ia),size:ae.ia,duration:1536,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),Of+=ae.ia):
|
|
1379
|
+
Of++}}if(0==ck||0==Un.byteLength||null==dk)throw new U(2,3,3018,c?c.P()[0]:null);var QG=dk/9E4*ck;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ck,duration:d,ub:[],ya:Un,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:QG,rb:Ww},stream:b};break;case "mp3":for(var Yw=[],ek,fk=null,Zw=t(k.fc()),Yn=Zw.next();!Yn.done;Yn=Zw.next()){var Zn=Yn.value,rh=Zn.data;if(rh){null==fk&&null!==Zn.pts&&(fk=Zn.pts);for(var Ge=0;Ge<rh.length;){var Pf=hD(rh,
|
|
1380
|
+
Ge);Pf?(ek||(ek=Pf),Ge+Pf.ia<=rh.length&&Yw.push({data:rh.subarray(Ge,Ge+Pf.ia),size:Pf.ia,duration:1152,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}}),Ge+=Pf.ia):Ge++}}}if(!ek||null==fk)throw new U(2,3,3018,c?c.P()[0]:null);var $w=ek.sampleRate,RG=fk/9E4*$w;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:$w,duration:d,ub:[],ya:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{Ib:this.g,baseMediaDecodeTime:RG,rb:Yw},stream:b};break;case "opus":var ax=
|
|
1380
1381
|
[],gk=null,cd=k.H;if(!cd)throw new U(2,3,3018,c?c.P()[0]:null);var Hb=[];switch(cd.Ki){case 1:case 2:Hb=[0];break;case 0:Hb=[255,1,1,0,1];break;case 128:Hb=[255,2,0,0,1];break;case 3:Hb=[1,2,1,0,2,1];break;case 4:Hb=[1,2,2,0,1,2,3];break;case 5:Hb=[1,3,2,0,4,1,2,3];break;case 6:Hb=[1,4,2,0,4,1,2,3,5];break;case 7:Hb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Hb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Hb=[1,1,2,0,1];break;case 131:Hb=[1,1,3,0,1,2];break;case 132:Hb=[1,1,4,0,1,2,3];break;case 133:Hb=[1,1,5,
|
|
1381
|
-
0,1,2,3,4];break;case 134:Hb=[1,1,6,0,1,2,3,4,5];break;case 135:Hb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Hb=[1,1,8,0,1,2,3,4,5,6,7]}var bx=new Uint8Array([0,cd.channelCount,0,0,cd.sampleRate>>>24&255,cd.sampleRate>>>17&255,cd.sampleRate>>>8&255,cd.sampleRate>>>0&255,0,0].concat(x(Hb)));for(var cx=cd.sampleRate,dx=t(k.fc()),$n=dx.next();!$n.done;$n=dx.next()){var ao=$n.value,
|
|
1382
|
-
Id=sh+2,hk=0;255===
|
|
1383
|
-
Ua:0,data:{Ib:this.g,baseMediaDecodeTime:UG,rb:ax},stream:b}}n&&(l.push(n),n=null)}}catch(bo){return bo&&3023==bo.code?Promise.resolve(new Uint8Array([])):Promise.reject(bo)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));var fx=new Uw(l),co=b.id+"_"+c.i;if(this.i.has(co))var eo=this.i.get(co);else eo=lx(fx),this.i.set(co,eo);var VG=Cx(fx);this.g++;var WG=Kc(eo,VG);return Promise.resolve(WG)};
|
|
1382
|
+
0,1,2,3,4];break;case 134:Hb=[1,1,6,0,1,2,3,4,5];break;case 135:Hb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Hb=[1,1,8,0,1,2,3,4,5,6,7]}var bx=new Uint8Array([0,cd.channelCount,0,0,cd.sampleRate>>>24&255,cd.sampleRate>>>17&255,cd.sampleRate>>>8&255,cd.sampleRate>>>0&255,0,0].concat(x(Hb)));for(var cx=cd.sampleRate,dx=t(k.fc()),$n=dx.next();!$n.done;$n=dx.next()){var ao=$n.value,Qf=ao.data;null==gk&&null!==ao.pts&&(gk=ao.pts);for(var sh=0;sh<Qf.length;){for(var SG=0!==(Qf[sh+1]&16),TG=0!==(Qf[sh+1]&8),
|
|
1383
|
+
Id=sh+2,hk=0;255===Qf[Id];)hk+=255,Id+=1;hk+=Qf[Id];Id+=1;Id+=SG?2:0;Id+=TG?2:0;var ex=Qf.slice(Id,Id+hk);ax.push({data:ex,size:ex.byteLength,duration:960,wb:0,flags:{xb:0,ob:0,mb:0,ib:0,jb:2,yb:0}});sh=Id+hk}}if(0==bx.byteLength||null==gk)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=cd.sampleRate;b.channelsCount=cd.channelCount;var UG=gk/9E4*cx;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:cx,duration:d,ub:[],ya:bx,Ma:new Uint8Array([]),Sa:0,
|
|
1384
|
+
Ua:0,data:{Ib:this.g,baseMediaDecodeTime:UG,rb:ax},stream:b}}n&&(l.push(n),n=null)}}catch(bo){return bo&&3023==bo.code?Promise.resolve(new Uint8Array([])):Promise.reject(bo)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));var fx=new Uw(l),co=b.id+"_"+c.i;if(this.i.has(co))var eo=this.i.get(co);else eo=lx(fx),this.i.set(co,eo);var VG=Cx(fx);this.g++;var WG=Kc(eo,VG);return Promise.resolve(WG)};Q("shaka.transmuxer.TsTransmuxer",uD);uD.prototype.transmux=uD.prototype.transmux;
|
|
1384
1385
|
uD.prototype.getOriginalMimeType=uD.prototype.getOriginalMimeType;uD.prototype.convertCodecs=uD.prototype.convertCodecs;uD.prototype.isSupported=uD.prototype.isSupported;uD.prototype.destroy=uD.prototype.destroy;var vD=["aac","ac-3","ec-3","mp3","opus"],wD=["avc","hevc"];le("video/mp2t",function(){return new uD("video/mp2t")},pe);/*
|
|
1385
1386
|
@license
|
|
1386
1387
|
EME Encryption Scheme Polyfill
|
|
@@ -1392,17 +1393,17 @@ function zD(){yD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncr
|
|
|
1392
1393
|
function AD(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),E(e,yD.call(c,a,b),2);d=e.h;if(BD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=yD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=CD;return e.return(CD.call(c,
|
|
1393
1394
|
a,b))})}
|
|
1394
1395
|
function CD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=DD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=ED(h.videoCapabilities,d),l=ED(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1395
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,yD.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new FD(p,r,u))})}function ED(a,b){return a?a.filter(function(c){return GD(c.encryptionScheme,b)}):a}
|
|
1396
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,yD.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new FD(p,r,u))})}function ED(a,b){return a?a.filter(function(c){return GD(c.encryptionScheme,b)}):a}Q("EmeEncryptionSchemePolyfill",xD);xD.install=zD;function HD(){}var ID;
|
|
1396
1397
|
function JD(){ID||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ID=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=KD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1397
1398
|
function KD(a){var b=this,c,d,e;return O(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(f,ID.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&BD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ID,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1398
1399
|
navigator.mediaCapabilities.decodingInfo=LD;if(d){f.B(3);break}e=c;return E(f,MD(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(LD.call(b,a))}})}
|
|
1399
1400
|
function LD(a){var b=this,c,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=DD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},GD(d,g)&&GD(c,g))?E(m,ID.call(b,a),2):m.return(h);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1400
1401
|
new FD(k.keySystemAccess,c,d);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return E(m,MD(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1401
1402
|
function MD(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
1402
|
-
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}
|
|
1403
|
+
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}Q("McEncryptionSchemePolyfill",HD);HD.install=JD;function FD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
|
|
1403
1404
|
FD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};FD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
|
|
1404
1405
|
function DD(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function BD(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
1405
|
-
function GD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(ND||OD)return!0;return!1}function PD(){}function bA(){zD();JD()}
|
|
1406
|
+
function GD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(ND||OD)return!0;return!1}function PD(){}function bA(){zD();JD()}Q("EncryptionSchemePolyfills",PD);PD.install=bA;var OD=navigator.userAgent.includes("CrKey"),ND=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=PD);/*
|
|
1406
1407
|
@license
|
|
1407
1408
|
Copyright 2013 Ali Al Dallal
|
|
1408
1409
|
|
|
@@ -1449,19 +1450,19 @@ D:"Thai"},"th-TH":{C:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u
|
|
|
1449
1450
|
D:"Ukrainian"},ur:{C:"\u0627\u0631\u062f\u0648",D:"Urdu"},"ur-PK":{C:"\u0627\u0631\u062f\u0648",D:"Urdu"},uz:{C:"O'zbek",D:"Uzbek"},"uz-UZ":{C:"O'zbek",D:"Uzbek"},vi:{C:"Ti\u1ebfng Vi\u1ec7t",D:"Vietnamese"},"vi-VN":{C:"Ti\u1ebfng Vi\u1ec7t",D:"Vietnamese"},"xh-ZA":{C:"isiXhosa",D:"Xhosa"},yi:{C:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",D:"Yiddish"},"yi-DE":{C:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",D:"Yiddish (German)"},zh:{C:"\u4e2d\u6587",D:"Chinese"},"zh-HANS":{C:"\u4e2d\u6587\u7b80\u4f53",
|
|
1450
1451
|
D:"Chinese Simplified"},"zh-HANT":{C:"\u4e2d\u6587\u7e41\u9ad4",D:"Chinese Traditional"},"zh-CN":{C:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",D:"Chinese Simplified (China)"},"zh-HK":{C:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",D:"Chinese Traditional (Hong Kong)"},"zh-SG":{C:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",D:"Chinese Simplified (Singapore)"},"zh-TW":{C:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",D:"Chinese Traditional (Taiwan)"},"zu-ZA":{C:"isiZulu",D:"Zulu"}},RD=t(Object.keys(QD)),SD=RD.next();!SD.done;SD=
|
|
1451
1452
|
RD.next()){var TD=SD.value;QD[TD.toLowerCase()]=QD[TD]};function UD(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new od;this.localization=this.controls.qa;this.player=this.controls.bd();this.video=this.controls.lc();this.adManager=this.player.Ie();this.ad=b.getAd();this.eventManager.s(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.s(this.adManager,"ad-stopped",function(){c.ad=null})}
|
|
1452
|
-
UD.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};
|
|
1453
|
+
UD.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};Q("shaka.ui.Element",UD);UD.prototype.release=UD.prototype.release;function VD(a){return WD(a,"shaka-back-to-overflow-button")}function WD(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function XD(a){a&&(a=WD(a,"shaka-chosen-item"))&&a.parentElement.focus()}function YD(){var a=W("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function ZD(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
1453
1454
|
function $D(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function aE(a,b){UD.call(this,a,b);var c=this;this.i=W("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Ub(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=$D(e-d,!1)+" / "+$D(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
|
|
1454
|
-
""))});this.eventManager.s(this.localization,"locale-updated",function(){});this.eventManager.s(this.localization,"locale-changed",function(){});this.eventManager.s(this.adManager,"ad-started",function(){c.g.Pa();c.g.za(.5)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Pa(),this.g.za(.5))}oa(aE,UD);aE.prototype.release=function(){this.g.stop();this.g=null;UD.prototype.release.call(this)};
|
|
1455
|
-
"ad-stopped",function(){c.h.textContent="";ZD(c.g,!1)});this.ad&&cE(this)}oa(bE,UD);function cE(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));ZD(a.g,!0)}}
|
|
1455
|
+
""))});this.eventManager.s(this.localization,"locale-updated",function(){});this.eventManager.s(this.localization,"locale-changed",function(){});this.eventManager.s(this.adManager,"ad-started",function(){c.g.Pa();c.g.za(.5)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Pa(),this.g.za(.5))}oa(aE,UD);aE.prototype.release=function(){this.g.stop();this.g=null;UD.prototype.release.call(this)};Q("shaka.ui.AdCounter",aE);function bE(a,b){UD.call(this,a,b);var c=this;this.g=W("div");this.g.classList.add("shaka-ad-position");ZD(this.g,!1);this.parent.appendChild(this.g);this.h=W("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.s(this.localization,"locale-updated",function(){c.ad&&cE(c)});this.eventManager.s(this.localization,"locale-changed",function(){c.ad&&cE(c)});this.eventManager.s(this.adManager,"ad-started",function(){cE(c)});this.eventManager.s(this.adManager,
|
|
1456
|
+
"ad-stopped",function(){c.h.textContent="";ZD(c.g,!1)});this.ad&&cE(this)}oa(bE,UD);function cE(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));ZD(a.g,!0)}}Q("shaka.ui.AdPosition",bE);function dE(a,b){UD.call(this,a,b);var c=this;this.button=en();this.parent.appendChild(this.button);this.eventManager.s(this.localization,"locale-updated",function(){c.g()});this.eventManager.s(this.localization,"locale-changed",function(){c.g()});this.eventManager.s(this.video,"play",function(){c.g();c.h()});this.eventManager.s(this.video,"pause",function(){c.g();c.h()});this.eventManager.s(this.video,"seeking",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-paused",function(){c.g();
|
|
1456
1457
|
c.h()});this.eventManager.s(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.s(this.button,"click",function(){c.ad&&c.ad.isLinear()?eE(c.controls):fE(c.controls)});this.ad&&(this.g(),this.h())}oa(dE,UD);dE.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};
|
|
1457
|
-
dE.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};dE.prototype.g=function(){};dE.prototype.h=function(){};
|
|
1458
|
-
!1)});this.eventManager.s(window,"click",function(){ZD(c.g,!1)});iE(this)}oa(hE,UD);hE.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];UD.prototype.release.call(this)};function jE(a,b){kE.set(a,b)}function iE(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=kE.get(c);d?a.i.push(d.create(a.g,a.controls)):Ya("Unrecognized context menu element:",c)}}
|
|
1458
|
+
dE.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};dE.prototype.g=function(){};dE.prototype.h=function(){};Q("shaka.ui.PlayButton",dE);function gE(a,b){dE.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}oa(gE,dE);gE.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};gE.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};Q("shaka.ui.BigPlayButton",gE);function hE(a,b){UD.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.s(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";ZD(c.g,!0)}else ZD(c.g,
|
|
1459
|
+
!1)});this.eventManager.s(window,"click",function(){ZD(c.g,!1)});iE(this)}oa(hE,UD);hE.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];UD.prototype.release.call(this)};function jE(a,b){kE.set(a,b)}function iE(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=kE.get(c);d?a.i.push(d.create(a.g,a.controls)):Ya("Unrecognized context menu element:",c)}}Q("shaka.ui.ContextMenu",hE);
|
|
1459
1460
|
hE.registerElement=jE;var kE=new Map;function lE(a,b){UD.call(this,a,b);var c=this;this.m=null;this.o=!1;this.j=new Ub(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.qg()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.o=!1;c.h.textContent="0s"});this.g=W("div");this.parent.appendChild(this.g);this.eventManager.s(this.g,"touchend",function(d){c.controls.mc()&&(c.controls.Kd()?(d.preventDefault(),c.controls.Dc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.o)?
|
|
1460
|
-
c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.V(1)):(c.o=!0,c.m=Date.now(),c.j.V(1))))});this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}oa(lE,UD);
|
|
1461
|
+
c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.V(1)):(c.o=!0,c.m=Date.now(),c.j.V(1))))});this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}oa(lE,UD);Q("shaka.ui.HiddenSeekButton",lE);function mE(a,b){lE.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}oa(mE,lE);Q("shaka.ui.HiddenFastForwardButton",mE);function nE(a,b){lE.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}oa(nE,lE);Q("shaka.ui.HiddenRewindButton",nE);function oE(a,b,c,d){UD.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.h=!1;this.bar=document.createElement("input");this.G=new Ub(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
|
|
1461
1462
|
this.parent.appendChild(this.container);this.eventManager.s(this.bar,"mousedown",function(f){e.controls.mc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.s(this.bar,"touchstart",function(f){e.controls.mc()&&(e.h=!0,pE(e,f),e.onChangeStart());f.stopPropagation()});this.eventManager.s(this.bar,"input",function(){e.onChange()});this.eventManager.s(this.bar,"touchmove",function(f){e.h&&(pE(e,f),e.onChange());f.stopPropagation()});this.eventManager.s(this.bar,"touchend",function(f){e.h&&
|
|
1462
1463
|
(e.h=!1,pE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.s(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,pE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.s(this.bar,"mouseup",function(f){e.h&&(e.h=!1,e.onChangeEnd());f.stopPropagation()});this.eventManager.s(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.s(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}oa(oE,UD);q=oE.prototype;
|
|
1463
1464
|
q.release=function(){this.G&&(this.G.stop(),this.G=null);UD.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.h||(this.h=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.G.V(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
|
|
1464
|
-
q.setValue=function(a){this.h||(this.bar.value=a)};function pE(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}
|
|
1465
|
+
q.setValue=function(a){this.h||(this.bar.value=a)};function pE(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}Q("shaka.ui.RangeElement",oE);oE.prototype.setValue=oE.prototype.setValue;oE.prototype.getValue=oE.prototype.getValue;oE.prototype.changeTo=oE.prototype.changeTo;oE.prototype.onChangeEnd=oE.prototype.onChangeEnd;
|
|
1465
1466
|
oE.prototype.onChange=oE.prototype.onChange;oE.prototype.onChangeStart=oE.prototype.onChangeStart;oE.prototype.setRange=oE.prototype.setRange;function qE(a,b){oE.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.F=W("div");this.F.classList.add("shaka-ad-markers");this.container.insertBefore(this.F,this.container.childNodes[0]);this.H=this.controls.g;this.o=new Ub(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.I=new Ub(function(){rE(c)});this.K=!1;this.i=W("div");this.i.id="shaka-player-ui-thumbnail-container";
|
|
1466
1467
|
this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.u=W("div");this.u.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.u);this.container.appendChild(this.i);this.j=this.l=null;this.J=!1;this.m=new Ub(function(){sE(c)});this.A=[];this.eventManager.s(this.localization,"locale-updated",function(){return tE(c)});this.eventManager.s(this.localization,"locale-changed",function(){return tE(c)});this.eventManager.s(this.adManager,"ad-started",
|
|
1467
1468
|
function(){uE(c)||ZD(c.container,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){uE(c)&&ZD(c.container,!0)});this.eventManager.s(this.adManager,"ad-cue-points-changed",function(d){c.A=d.cuepoints;vE(c)});this.eventManager.s(this.player,"unloading",function(){c.A=[];vE(c);c.j&&(c.j.abort(),c.j=null);c.l=null;sE(c)});this.eventManager.s(this.bar,"mousemove",function(d){if(c.player.Je().length){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;wE(c,d,Math.round(f+
|
|
@@ -1477,9 +1478,9 @@ a.j=a.player.hc().request(r,u,{type:1});return E(B,a.j.promise,7);case 7:v=B.h;a
|
|
|
1477
1478
|
a.g.onload=function(){p.startsWith("blob:")&&URL.revokeObjectURL(p)};a.i.insertBefore(a.g,a.i.firstChild);case 3:z=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+z*g.positionX+"px",a.g.style.top="-"+z*g.positionY+"px",a.g.style.transform="scale("+z+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
1478
1479
|
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",F(B)}})}
|
|
1479
1480
|
function xE(a){var b=a.player.Je();if(!b.length)return null;for(var c={},d=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Cf:c.Cf,Af:c.Af},e=d.next())if(c.Cf=e.value,c.Af=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Cf&&g.bandwidth<.01*f.Af}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b.find(function(f){return"application/mp4"==f.mimeType&&
|
|
1480
|
-
"mjpg"==f.codecs})||b[0]}function sE(a){a.i.style.visibility="hidden";a.u.textContent=""}function yE(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}
|
|
1481
|
+
"mjpg"==f.codecs})||b[0]}function sE(a){a.i.style.visibility="hidden";a.u.textContent=""}function yE(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}Q("shaka.ui.SeekBar",qE);function zE(){}zE.prototype.create=function(a,b){return new qE(a,b)};qE.Factory=zE;function AE(a,b){UD.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");ZD(this.h,!1);this.j.appendChild(this.h);this.g=en();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;ZD(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);BE(this);this.i=new Ub(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1481
1482
|
d:(c.i.stop(),ZD(c.h,!1))});this.eventManager.s(this.localization,"locale-updated",function(){BE(c)});this.eventManager.s(this.localization,"locale-changed",function(){BE(c)});this.eventManager.s(this.adManager,"ad-started",function(){CE(c)});this.eventManager.s(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),ZD(c.h,!1))});this.eventManager.s(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;ZD(c.g,!1);ZD(c.h,!1)});this.eventManager.s(this.g,
|
|
1482
|
-
"click",function(){c.ad.skip()});this.ad&&CE(this)}oa(AE,UD);AE.prototype.release=function(){this.i.stop();this.i=null;UD.prototype.release.call(this)};function BE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function CE(a){a.ad.isSkippable()&&(ZD(a.g,!0),ZD(a.h,!0),a.h.textContent="",a.i.Pa(),a.i.za(.5))}
|
|
1483
|
+
"click",function(){c.ad.skip()});this.ad&&CE(this)}oa(AE,UD);AE.prototype.release=function(){this.i.stop();this.i=null;UD.prototype.release.call(this)};function BE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function CE(a){a.ad.isSkippable()&&(ZD(a.g,!0),ZD(a.h,!0),a.h.textContent="",a.i.Pa(),a.i.za(.5))}Q("shaka.ui.SkipAdButton",AE);/*
|
|
1483
1484
|
@license
|
|
1484
1485
|
glMatrix: https://github.com/toji/gl-matrix/
|
|
1485
1486
|
Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
|
|
@@ -1614,7 +1615,7 @@ a.Ka("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1614
1615
|
["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.Ka("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
|
|
1615
1616
|
["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
|
|
1616
1617
|
["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
|
|
1617
|
-
["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.vh(navigator.languages||[]);return a}
|
|
1618
|
+
["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.vh(navigator.languages||[]);return a}Q("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.yg;Z.prototype.incrementPitch=Z.prototype.xg;
|
|
1618
1619
|
Z.prototype.incrementYaw=Z.prototype.zg;Z.prototype.toggleStereoscopicMode=Z.prototype.qd;Z.prototype.setVRFieldOfView=Z.prototype.Ak;Z.prototype.getVRFieldOfView=Z.prototype.vj;Z.prototype.getVRNorth=Z.prototype.wj;Z.prototype.isPlayingVR=Z.prototype.Qb;Z.prototype.canPlayVR=Z.prototype.Vf;Z.prototype.hideUI=Z.prototype.Dj;Z.prototype.showUI=Z.prototype.Bk;Z.prototype.isOpaque=Z.prototype.mc;Z.prototype.hideAdUI=Z.prototype.Kh;Z.prototype.showAdUI=Z.prototype.mi;Z.prototype.togglePiP=Z.prototype.oe;
|
|
1619
1620
|
Z.prototype.isPiPEnabled=Z.prototype.Se;Z.prototype.isPiPAllowed=Z.prototype.Re;Z.prototype.toggleFullScreen=Z.prototype.qf;Z.prototype.isFullScreenEnabled=Z.prototype.fd;Z.prototype.isFullScreenSupported=Z.prototype.Yd;Z.prototype.hideSettingsMenus=Z.prototype.Dc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Kd;Z.prototype.setLastTouchEventTime=Z.prototype.gi;Z.prototype.getDisplayTime=Z.prototype.qg;Z.prototype.isCastAllowed=Z.prototype.Ej;Z.prototype.setSeeking=Z.prototype.bh;
|
|
1620
1621
|
Z.prototype.isSeeking=Z.prototype.Kj;Z.prototype.getConfig=Z.prototype.Wi;Z.prototype.getClientSideAdContainer=Z.prototype.Vi;Z.prototype.getServerSideAdContainer=Z.prototype.pj;Z.prototype.getControlsContainer=Z.prototype.Yi;Z.prototype.getLocalPlayer=Z.prototype.ej;Z.prototype.getPlayer=Z.prototype.bd;Z.prototype.getLocalVideo=Z.prototype.fj;Z.prototype.getVideo=Z.prototype.lc;Z.prototype.getVideoContainer=Z.prototype.yj;Z.prototype.getLocalization=Z.prototype.gj;Z.prototype.getCastProxy=Z.prototype.Ti;
|
|
@@ -1622,9 +1623,9 @@ Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.proto
|
|
|
1622
1623
|
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);JF(this);this.eventManager.s(this.localization,"locale-updated",function(){KF(c)});this.eventManager.s(this.localization,"locale-changed",function(){KF(c)});this.eventManager.s(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&ZD(c.g,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){ZD(c.g,!0)});this.eventManager.s(this.controls,"submenuopen",function(){ZD(c.h,!1)});this.eventManager.s(this.h,"touchstart",function(d){c.controls.gi(Date.now());
|
|
1623
1624
|
d.stopPropagation()});this.eventManager.s(this.g,"click",function(){LF(c)});KF(this);this.ad&&this.ad.isLinear()&&ZD(this.g,!1)}oa(IF,UD);IF.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];UD.prototype.release.call(this)};function MF(a,b){NF.set(a,b)}
|
|
1624
1625
|
function JF(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,NF.get(c)?(c=NF.get(c),a.i.push(c.create(a.h,a.controls))):Ya("Unrecognized overflow menu element requested:",c)}function LF(a){if(a.controls.Kd())a.controls.Dc();else{ZD(a.h,!0);dF(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};jb(a.h.childNodes,b)&&kb(a.h.childNodes,b)[0].focus()}}function KF(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1625
|
-
|
|
1626
|
+
Q("shaka.ui.OverflowMenu",IF);IF.registerElement=MF;function OF(){}OF.prototype.create=function(a,b){return new IF(a,b)};jF("overflow_menu",new OF);var NF=new Map;function PF(a,b){UD.call(this,a,b);var c=this;this.g=en();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);
|
|
1626
1627
|
this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);QF(this);RF(this);this.eventManager.s(this.localization,"locale-updated",function(){QF(c)});this.eventManager.s(this.localization,"locale-changed",function(){QF(c)});this.eventManager.s(this.g,"click",function(){c.controls.lc().webkitShowPlaybackTargetPicker()});a=this.controls.lc();this.eventManager.s(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1627
|
-
c.player.Rd()==gp;ZD(c.g,"available"==d.availability&&e)});this.eventManager.s(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){RF(c)})}oa(PF,UD);function RF(a){var b=a.controls.lc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function QF(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}
|
|
1628
|
+
c.player.Rd()==gp;ZD(c.g,"available"==d.availability&&e)});this.eventManager.s(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){RF(c)})}oa(PF,UD);function RF(a){var b=a.controls.lc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function QF(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}Q("shaka.ui.AirPlayButton",PF);function SF(){}SF.prototype.create=function(a,b){return new PF(a,b)};MF("airplay",new SF);
|
|
1628
1629
|
jF("airplay",new SF);function TF(a,b,c,d){d=void 0===d?null:d;this.i=a;this.j=b;this.h=UF(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Bg()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);this.configure({});c.controls||a.dh(b);b.ui=this;c.ui=this}q=TF.prototype;q.destroy=function(){var a=this;return O(function(b){if(1==b.g)return a.g?E(b,a.g.destroy(),2):b.B(2);if(4!=b.g)return a.g=null,a.i?E(b,a.i.destroy(),4):b.B(4);a.i=null;F(b)})};
|
|
1629
1630
|
q.Bg=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:hc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=UF(this);lm(a,this.h,UF(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=mm(a,b));lm(this.h,a,UF(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new S("uiupdated"))};q.Xi=function(){return this.g};
|
|
1630
1631
|
q.xk=function(a){this.g.Yg(a)};
|
|
@@ -1637,44 +1638,44 @@ g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.a
|
|
|
1637
1638
|
XF("shaka-ui-load-failed",aG),B.return();case 5:r=p.next();B.B(4);break;case 2:XF("shaka-ui-loaded"),F(B)}})}function XF(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1638
1639
|
function $F(a,b,c,d){var e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:e=new X;f=new TF(e,a,b,d);e.qh(c);g="";h=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(g=a.dataset.shakaPlayerCastReceiverId,h="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(g=b.dataset.shakaPlayerCastReceiverId,h="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);g.length&&f.configure({castReceiverAppId:g,castAndroidReceiverCompatible:h});
|
|
1639
1640
|
b.controls&&f.g.di(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");m=t(b.querySelectorAll("source"));n=m.next();case 2:if(n.done){r.B(4);break}p=n.value;ta(r,5);return E(r,f.g.bd().load(p.getAttribute("src")),7);case 7:r.B(4);break;case 5:wa(r);case 3:n=m.next();r.B(2);break;case 4:return E(r,e.vc(b),0)}})}
|
|
1640
|
-
function ZF(a,b,c){var d=null,e=t(b);for(b=e.next();!b.done;b=e.next())if(b=b.value,b.parentElement==a){d=b;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));e=null;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,b.parentElement==a){e=b;break}e||(e=document.createElement("canvas"),e.classList.add("shaka-vr-canvas-container"),a.appendChild(e));return{Ph:d,xi:e}}
|
|
1641
|
+
function ZF(a,b,c){var d=null,e=t(b);for(b=e.next();!b.done;b=e.next())if(b=b.value,b.parentElement==a){d=b;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));e=null;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,b.parentElement==a){e=b;break}e||(e=document.createElement("canvas"),e.classList.add("shaka-vr-canvas-container"),a.appendChild(e));return{Ph:d,xi:e}}Q("shaka.ui.Overlay",TF);TF.prototype.setEnabled=TF.prototype.xk;
|
|
1641
1642
|
TF.prototype.getControls=TF.prototype.Xi;TF.prototype.configure=TF.prototype.configure;TF.prototype.getConfiguration=TF.prototype.getConfiguration;TF.prototype.isMobile=TF.prototype.Bg;TF.prototype.destroy=TF.prototype.destroy;var VF=0;TF.TrackLabelFormat={LANGUAGE:VF,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var YF=0,aG=1;TF.FailReasonCode={NO_BROWSER_SUPPORT:YF,PLAYER_FAILED_TO_LOAD:aG};
|
|
1642
|
-
"complete"==document.readyState?O(function(a){if(1==a.g)return E(a,Promise.resolve(),2);WF();F(a)}):window.addEventListener("load",WF);function bG(a,b,c,d,e,f,g,h){function k(K){var
|
|
1643
|
+
"complete"==document.readyState?O(function(a){if(1==a.g)return E(a,Promise.resolve(),2);WF();F(a)}):window.addEventListener("load",WF);function bG(a,b,c,d,e,f,g,h){function k(K){var G="";5<=K&&(G=" "+f.resolve("SURROUND"));return G}function l(K,G,I,J){K=[K,G];h&&null!=J&&K.push(J);I&&3==g&&K.push(I);return K.join(": ")}function m(K){return"variant"==K.type?K.audioRoles?K.audioRoles.join(", "):void 0:K.roles.join(", ")}var n=a.find(function(K){return 1==K.active}),p=VD(b);fn(b);b.appendChild(p);p=new Map;for(var r=t(a),u=r.next();!u.done;u=r.next())u=u.value,p.has(u.language)||p.set(u.language,new Set),p.get(u.language).add(m(u));
|
|
1643
1644
|
p=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";r={};a=t(a);for(u=a.next();!u.done;r={Kb:r.Kb},u=a.next()){r.Kb=u.value;u=r.Kb.language;var v=r.Kb.forced,w=f.resolve("SUBTITLE_FORCED"),A=m(r.Kb),y=r.Kb.label,C=r.Kb.channelsCount,z=l(u,A,y,C);if(!p.has(z)){p.add(z);var B=en();B.addEventListener("click",function(K){return function(){c(K.Kb)}}(r));var D=W("span");B.appendChild(D);D.textContent=cG(u,f);switch(g){case VF:h&&(D.textContent+=k(C));v&&(D.textContent+=" ("+w+")");break;case 1:h&&
|
|
1644
1645
|
(D.textContent+=k(C));A?D.textContent=A:(Ya("Track #"+r.Kb.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");v&&(D.textContent+=" ("+w+")");break;case 2:h&&(D.textContent+=k(C));A&&(D.textContent+=": "+A);v&&(D.textContent+=" ("+w+")");break;case 3:y?D.textContent=y:(Ya("Track #"+r.Kb.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&z==n&&(B.appendChild(YD()),D.classList.add("shaka-chosen-item"),B.ariaSelected=
|
|
1645
1646
|
"true",e.textContent=D.textContent);b.appendChild(B)}}}function cG(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=dd(a);return a in QD?QD[a].C:c in QD?QD[c].C+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function dG(a,b,c){UD.call(this,a,b);var d=this;eG(this,c);fG(this);gG(this);this.eventManager.s(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new S("submenuopen")),ZD(d.menu,!0),XD(d.menu)):ZD(d.menu,!1)})}oa(dG,UD);
|
|
1646
1647
|
function eG(a,b){a.button=en();a.button.classList.add("shaka-overflow-button");a.icon=W("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=W("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=W("span");b.appendChild(a.nameSpan);a.currentSelection=W("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
|
|
1647
1648
|
function fG(a){a.menu=W("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=en();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.s(a.backButton,"click",function(){a.controls.Dc()});var b=W("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1648
|
-
W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function gG(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.s(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}ZD(a.parent,!0);jb(a.parent.childNodes,b)&&kb(a.parent.childNodes,b)[0].focus();dF(a.controls)}))}
|
|
1649
|
+
W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function gG(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.s(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}ZD(a.parent,!0);jb(a.parent.childNodes,b)&&kb(a.parent.childNodes,b)[0].focus();dF(a.controls)}))}Q("shaka.ui.SettingsMenu",dG);function hG(a,b){dG.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.s(this.localization,"locale-updated",function(){iG(c)});this.eventManager.s(this.localization,"locale-changed",function(){iG(c)});this.eventManager.s(this.player,"loading",function(){jG(c)});this.eventManager.s(this.player,"trackschanged",function(){jG(c)});this.eventManager.s(this.player,
|
|
1649
1650
|
"variantchanged",function(){kG(c)});iG(this);kG(this)}oa(hG,dG);
|
|
1650
1651
|
function kG(a){var b=a.player.Db();bG(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.lf(c.language,c.roles[0],c.channelsCount):a.player.lf(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);XD(a.menu);a.controls.dispatchEvent(new S("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);ZD(a.button,2<a.menu.getElementsByTagName("button").length)}
|
|
1651
|
-
function jG(a){var b=0<a.player.Db().length;ZD(a.button,b);kG(a)}function iG(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}
|
|
1652
|
+
function jG(a){var b=0<a.player.Db().length;ZD(a.button,b);kG(a)}function iG(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}Q("shaka.ui.AudioLanguageSelection",hG);function lG(){}lG.prototype.create=function(a,b){return new hG(a,b)};MF("language",new lG);jF("language",new lG);function mG(a,b){UD.call(this,a,b);var c=this;this.h=this.controls.F;this.g=en();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
|
|
1652
1653
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);nG(this);oG(this);this.eventManager.s(this.localization,"locale-updated",function(){nG(c)});this.eventManager.s(this.localization,"locale-changed",function(){nG(c)});this.eventManager.s(this.g,"click",function(){pG(c)});this.eventManager.s(this.controls,"caststatuschanged",function(){oG(c)})}oa(mG,UD);
|
|
1653
1654
|
function pG(a){var b;O(function(c){if(1==c.g){if(a.h.Oa())return a.h.ni(),c.B(0);ta(c,3);a.g.disabled=!0;return E(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new S("error",(new Map).set("detail",b)));F(c)})}function oG(a){var b=a.h.Uf()&&a.controls.na,c=a.h.Oa();ZD(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");qG(a)}
|
|
1654
|
-
function qG(a){a.j.textContent=a.h.Oa()?a.h.hf():a.localization.resolve("OFF")}function nG(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");qG(a)}
|
|
1655
|
-
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Oc(d);c.g.setAttribute("shaka-status",d+"x")}})}oa(sG,UD);function tG(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}
|
|
1655
|
+
function qG(a){a.j.textContent=a.h.Oa()?a.h.hf():a.localization.resolve("OFF")}function nG(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");qG(a)}Q("shaka.ui.CastButton",mG);function rG(){}rG.prototype.create=function(a,b){return new mG(a,b)};MF("cast",new rG);jF("cast",new rG);function sG(a,b){UD.call(this,a,b);var c=this;this.g=en();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);tG(this);this.h=this.controls.g.fastForwardRates;this.eventManager.s(this.localization,"locale-updated",function(){tG(c)});this.eventManager.s(this.localization,"locale-changed",function(){tG(c)});
|
|
1656
|
+
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Oc(d);c.g.setAttribute("shaka-status",d+"x")}})}oa(sG,UD);function tG(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}Q("shaka.ui.FastForwardButton",sG);function uG(){}uG.prototype.create=function(a,b){return new sG(a,b)};jF("fast_forward",new uG);function vG(a,b){UD.call(this,a,b);var c=this;this.h=this.controls.o;this.g=en();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");wG(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);xG(this);this.eventManager.s(this.localization,"locale-updated",function(){xG(c)});this.eventManager.s(this.localization,"locale-changed",function(){xG(c)});this.eventManager.s(this.g,"click",function(){return O(function(d){return E(d,
|
|
1656
1657
|
c.controls.qf(),0)})});this.eventManager.s(document,"fullscreenchange",function(){c.g.textContent=c.controls.fd()?"fullscreen_exit":"fullscreen";xG(c)});this.eventManager.s(this.h,"loadedmetadata",function(){wG(c)});this.eventManager.s(this.h,"loadeddata",function(){wG(c)})}oa(vG,UD);function wG(a){a.controls.Yd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function xG(a){a.g.ariaLabel=a.localization.resolve(a.controls.fd()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1657
|
-
|
|
1658
|
+
Q("shaka.ui.FullscreenButton",vG);function yG(){}yG.prototype.create=function(a,b){return new vG(a,b)};jF("fullscreen",new yG);function zG(a,b){UD.call(this,a,b);var c=this;this.g=en();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=W("span");this.l.classList.add("shaka-current-selection-span");
|
|
1658
1659
|
a.appendChild(this.l);this.g.appendChild(a);AG(this);this.parent.appendChild(this.g);this.eventManager.s(this.localization,"locale-updated",function(){AG(c)});this.eventManager.s(this.localization,"locale-changed",function(){AG(c)});this.eventManager.s(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Pa();c.h.za(1)});this.m=this.video.loop;this.h=new Ub(function(){c.m!=c.video.loop&&(AG(c),c.m=c.video.loop)});this.h.za(1)}oa(zG,UD);
|
|
1659
|
-
zG.prototype.release=function(){this.h.stop();this.h=null;UD.prototype.release.call(this)};function AG(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}
|
|
1660
|
+
zG.prototype.release=function(){this.h.stop();this.h=null;UD.prototype.release.call(this)};function AG(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}Q("shaka.ui.LoopButton",zG);function BG(){}BG.prototype.create=function(a,b){return new zG(a,b)};MF("loop",new BG);jF("loop",new BG);jE("loop",new BG);function CG(a,b){UD.call(this,a,b);var c=this;this.g=en();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);DG(this);EG(this);this.eventManager.s(this.localization,"locale-updated",function(){DG(c)});this.eventManager.s(this.localization,"locale-changed",function(){DG(c)});this.eventManager.s(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
|
|
1660
1661
|
this.eventManager.s(this.video,"volumechange",function(){DG(c);EG(c)});this.eventManager.s(this.adManager,"ad-volume-changed",function(){DG(c);EG(c)});this.eventManager.s(this.adManager,"ad-muted",function(){DG(c);EG(c)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.ad=null;DG(c);EG(c)})}oa(CG,UD);function DG(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1661
|
-
function EG(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}
|
|
1662
|
+
function EG(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}Q("shaka.ui.MuteButton",CG);function FG(){}FG.prototype.create=function(a,b){return new CG(a,b)};jF("mute",new FG);function GG(a,b){UD.call(this,a,b);var c=this;this.l=this.controls.o;this.g=en();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
|
|
1662
1663
|
W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);HG(this);this.parent.appendChild(this.g);this.controls.Re()||ZD(this.g,!1);this.eventManager.s(this.localization,"locale-updated",function(){HG(c)});this.eventManager.s(this.localization,"locale-changed",function(){HG(c)});this.eventManager.s(this.g,"click",function(){c.controls.oe()});this.eventManager.s(this.l,"enterpictureinpicture",function(){IG(c)});this.eventManager.s(this.l,"leavepictureinpicture",
|
|
1663
1664
|
function(){JG(c)});this.eventManager.s(this.controls,"caststatuschanged",function(){KG(c)});this.eventManager.s(this.player,"trackschanged",function(){KG(c)});"documentPictureInPicture"in window&&this.eventManager.s(window.documentPictureInPicture,"enter",function(d){IG(c);c.eventManager.oa(d.window,"pagehide",function(){JG(c)})})}oa(GG,UD);
|
|
1664
1665
|
function IG(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function JG(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
|
|
1665
|
-
function HG(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Se();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function KG(a){O(function(b){if(!a.controls.Re())return ZD(a.g,!1),a.controls.Se()?E(b,a.controls.oe(),0):b.B(0);if(!a.player||!a.player.ed())return ZD(a.g,!0),b.B(0);ZD(a.g,!1);return a.controls.Se()?E(b,a.controls.oe(),0):b.B(0)})}
|
|
1666
|
+
function HG(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Se();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function KG(a){O(function(b){if(!a.controls.Re())return ZD(a.g,!1),a.controls.Se()?E(b,a.controls.oe(),0):b.B(0);if(!a.player||!a.player.ed())return ZD(a.g,!0),b.B(0);ZD(a.g,!1);return a.controls.Se()?E(b,a.controls.oe(),0):b.B(0)})}Q("shaka.ui.PipButton",GG);
|
|
1666
1667
|
function LG(){}LG.prototype.create=function(a,b){return new GG(a,b)};MF("picture_in_picture",new LG);jF("picture_in_picture",new LG);jE("picture_in_picture",new LG);function MG(a,b){dG.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.s(this.localization,"locale-updated",function(){NG(c)});this.eventManager.s(this.localization,"locale-changed",function(){NG(c)});this.eventManager.s(this.player,"loaded",function(){OG(c,c.player.Ra())});this.eventManager.s(this.player,"ratechange",function(){OG(c,
|
|
1667
1668
|
c.player.Ra())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));NG(this);XG(this);OG(this,this.player.Ra())}oa(MG,dG);function NG(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
|
|
1668
1669
|
function OG(a,b){var c=WD(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(YD()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1669
|
-
"x")}function XG(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={zd:b.zd},d=c.next()){b.zd=d.value;d=en();var e=W("span");e.textContent=b.zd;d.appendChild(e);a.eventManager.s(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.zd);a.video.defaultPlaybackRate=a.g.get(f.zd)}}(b));a.menu.appendChild(d)}XD(a.menu)}
|
|
1670
|
+
"x")}function XG(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={zd:b.zd},d=c.next()){b.zd=d.value;d=en();var e=W("span");e.textContent=b.zd;d.appendChild(e);a.eventManager.s(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.zd);a.video.defaultPlaybackRate=a.g.get(f.zd)}}(b));a.menu.appendChild(d)}XD(a.menu)}Q("shaka.ui.PlaybackRateSelection",MG);function YG(){}YG.prototype.create=function(a,b){return new MG(a,b)};MF("playback_rate",new YG);jF("playback_rate",new YG);function ZG(a,b){UD.call(this,a,b);var c=this;this.g=en();this.g.classList.add("shaka-current-time");$G(this,"0:00");this.parent.appendChild(this.g);this.eventManager.s(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Ta().end)});this.eventManager.s(this.player,"loading",function(){ZD(c.g,!0)});this.eventManager.s(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.qg(),f=c.player.Ta(),g=f.end-f.start;c.player.U()?(e=Math.max(0,Math.floor(f.end-
|
|
1670
1671
|
e)),g=3600<=g,1<=e||d?($G(c,"- "+$D(e,g)),c.g.disabled=!1):($G(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=g,e=$D(Math.max(0,e-f.start),d),g&&(e+=" / "+$D(g,d)),$G(c,e),c.g.disabled=!0)});this.eventManager.s(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.s(this.adManager,"ad-started",function(){ZD(c.g,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){ZD(c.g,!0)})}oa(ZG,UD);
|
|
1671
|
-
function $G(a,b){b!=a.g.textContent&&(a.g.textContent=b)}
|
|
1672
|
+
function $G(a,b){b!=a.g.textContent&&(a.g.textContent=b)}Q("shaka.ui.PresentationTimeTracker",ZG);function aH(){}aH.prototype.create=function(a,b){return new ZG(a,b)};jF("time_and_duration",new aH);function bH(a,b){UD.call(this,a,b);var c=this;this.g=en();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
|
|
1672
1673
|
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);cH(this);this.eventManager.s(this.localization,"locale-updated",function(){cH(c)});this.eventManager.s(this.localization,"locale-changed",function(){cH(c)});var d=this.controls.u;this.eventManager.s(this.g,"click",function(){d.g?VE(d.g):Ya("Not playing VR content")});this.eventManager.s(d,"vrstatuschanged",function(){ZD(c.g,c.controls.Qb())});ZD(this.g,this.controls.Qb())}oa(bH,UD);
|
|
1673
|
-
function cH(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}
|
|
1674
|
+
function cH(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}Q("shaka.ui.RecenterVRButton",bH);function dH(){}dH.prototype.create=function(a,b){return new bH(a,b)};MF("recenter_vr",new dH);jF("recenter_vr",new dH);function eH(a,b){UD.call(this,a,b);var c=this;this.g=en();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");a="cast";(b=mc())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
|
|
1674
1675
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;fH(this);ZD(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.s(this.localization,"locale-updated",function(){fH(c)}),this.eventManager.s(this.localization,"locale-changed",function(){fH(c)}),this.eventManager.s(this.controls,"caststatuschanged",function(){gH(c)}),this.eventManager.s(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.s(this.video.remote,
|
|
1675
1676
|
"connect",function(){gH(c)}),this.eventManager.s(this.video.remote,"connecting",function(){gH(c)}),this.eventManager.s(this.video.remote,"disconnect",function(){gH(c)}),this.eventManager.s(this.player,"loaded",function(){gH(c)}),gH(this))}oa(eH,UD);eH.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});UD.prototype.release.call(this)};
|
|
1676
1677
|
function gH(a){var b,c;O(function(d){switch(d.g){case 1:if(a.controls.F.Uf()&&a.controls.na){ZD(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.B(0);break}if("disconnected"==a.video.remote.state){b=function(e){a.player?ZD(a.g,a.player.Rd()==gp&&e):ZD(a.g,!1)};ta(d,7);if(-1==a.h){d.B(9);break}return E(d,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){d.B(0);break}return E(d,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;d.B(0);break;case 10:a.h=-1;
|
|
1677
|
-
case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),E(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),F(d)}})}function fH(a){var b=a.localization.resolve("CAST"),c=mc();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}
|
|
1678
|
+
case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),E(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),F(d)}})}function fH(a){var b=a.localization.resolve("CAST"),c=mc();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}Q("shaka.ui.RemoteButton",eH);function hH(){}hH.prototype.create=function(a,b){return new eH(a,b)};MF("remote",new hH);jF("remote",new hH);function iH(a,b){dG.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.s(this.localization,"locale-updated",function(){jH(c)});this.eventManager.s(this.localization,"locale-changed",function(){jH(c)});this.eventManager.s(this.player,"loading",function(){kH(c)});this.eventManager.s(this.player,"variantchanged",function(){kH(c)});this.eventManager.s(this.player,
|
|
1678
1679
|
"trackschanged",function(){kH(c)});this.eventManager.s(this.player,"abrstatuschanged",function(){kH(c)});kH(this)}oa(iH,dG);
|
|
1679
1680
|
function kH(a){var b=[];a.player.Rd()!=gp&&(b=a.player.Db());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=a.player.ed()?b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==k.bandwidth})==l}):
|
|
1680
1681
|
1<[].concat(x(new Set(b.map(function(k){return k.audioId})))).length?b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l}):b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.bandwidth==k.bandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l});a.player.ed()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):
|
|
@@ -1682,24 +1683,24 @@ b.sort(function(k,l){return l.height==k.height||null==k.height||null==l.height?l
|
|
|
1682
1683
|
var h=W("span");h.textContent=!a.player.ed()&&e.Tb.height&&e.Tb.width?lH(e.Tb,b):e.Tb.bandwidth?Math.round(e.Tb.bandwidth/1E3)+" kbits/s":"Unknown";g.appendChild(h);d||e.Tb!=c||(g.ariaSelected="true",g.appendChild(YD()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=en();e.classList.add("shaka-enable-abr-button");a.eventManager.s(e,"click",function(){a.player.configure({abr:{enabled:!0}});kH(a)});a.g=W("span");a.g.classList.add("shaka-auto-span");
|
|
1683
1684
|
a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(YD()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);XD(a.menu);a.controls.dispatchEvent(new S("resolutionselectionupdated"));jH(a);ZD(a.button,1<b.length)}
|
|
1684
1685
|
function lH(a,b){var c=a.height||0,d=a.width||0,e=c;d/c>16/9&&(e=Math.round(9*d/16));c=e+"p";2160==e&&(c="4K");(e=a.frameRate)&&(50<=e||20>=e)&&(c+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)c+=" (HDR)";"CH-STEREO"==a.videoLayout&&(c+=" (3D)");b.some(function(f){return f!=a&&f.height==a.height})&&(c+=" ("+Math.round((a.videoBandwidth||a.bandwidth)/1E3)+" kbits/s)");return c}
|
|
1685
|
-
function jH(a){var b=a.player.ed()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}
|
|
1686
|
+
function jH(a){var b=a.player.ed()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}Q("shaka.ui.ResolutionSelection",iH);function mH(){}
|
|
1686
1687
|
mH.prototype.create=function(a,b){return new iH(a,b)};MF("quality",new mH);jF("quality",new mH);function nH(a,b){UD.call(this,a,b);var c=this;this.g=en();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);oH(this);this.h=this.controls.g.rewindRates;this.eventManager.s(this.localization,"locale-updated",function(){oH(c)});this.eventManager.s(this.localization,"locale-changed",function(){oH(c)});
|
|
1687
|
-
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Oc(d);c.g.setAttribute("shaka-status",d+"x")}})}oa(nH,UD);function oH(a){a.g.ariaLabel=a.localization.resolve("REWIND")}
|
|
1688
|
-
qH.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
|
|
1688
|
+
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ra())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Oc(d);c.g.setAttribute("shaka-status",d+"x")}})}oa(nH,UD);function oH(a){a.g.ariaLabel=a.localization.resolve("REWIND")}Q("shaka.ui.RewindButton",nH);function pH(){}pH.prototype.create=function(a,b){return new nH(a,b)};jF("rewind",new pH);function qH(a,b){dE.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}oa(qH,dE);qH.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
|
|
1689
|
+
qH.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};Q("shaka.ui.SmallPlayButton",qH);function rH(){}rH.prototype.create=function(a,b){return new qH(a,b)};jF("play_pause",new rH);function sH(a,b){UD.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}oa(sH,UD);Q("shaka.ui.Spacer",sH);function tH(){}tH.prototype.create=function(a,b){return new sH(a,b)};jF("spacer",new tH);function uH(a,b){function c(k){return $D(h.g[k],!1)+" (m)"}function d(k){return Math.round(h.g[k]/1E3)+" (kbits/s)"}function e(k){return h.g[k].toFixed(2)+" (s)"}function f(k){return h.g[k]+" (frames)"}function g(k){return h.g[k]+" (px)"}UD.call(this,a,b);var h=this;this.i=en();this.i.classList.add("shaka-statistics-button");this.j=W("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=W("label");a.classList.add("shaka-overflow-button-label");
|
|
1689
1690
|
this.o=W("span");a.appendChild(this.o);this.m=W("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=W("div");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");this.h.classList.add("shaka-statistics-container");this.h.classList.add("shaka-hidden");this.controls.h.appendChild(this.h);this.F=[];this.G=["stateHistory","switchHistory"];this.g=this.player.getStats();
|
|
1690
1691
|
this.u={};this.A={width:g,height:g,completionPercent:function(k){return h.g[k]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f,stallsDetected:function(k){return h.g[k]+" (stalls)"},gapsJumped:function(k){return h.g[k]+" (gaps)"},bytesDownloaded:function(k){k=parseInt(h.g[k],10);return 1E6<k?(k/1E6).toFixed(2)+
|
|
1691
1692
|
"MB":1E3<k?(k/1E3).toFixed(2)+"KB":k+"B"}};this.l=new Ub(function(){h.g=h.player.getStats();for(var k=t(h.F),l=k.next();!l.done;l=k.next()){l=l.value;var m=h.u[l];m.textContent=h.A[l](l);m&&m.parentElement&&ZD(m.parentElement,!isNaN(h.g[l]))}});vH(this);wH(this);this.eventManager.s(this.localization,"locale-updated",function(){vH(h)});this.eventManager.s(this.localization,"locale-changed",function(){vH(h)});this.eventManager.s(this.i,"click",function(){ZD(h.parent,!1);h.h.classList.contains("shaka-hidden")?
|
|
1692
1693
|
(h.j.textContent="insert_chart",h.l.za(.1),ZD(h.h,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),ZD(h.h,!1));vH(h)})}oa(uH,UD);function vH(a){a.o.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}
|
|
1693
|
-
function wH(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.G.includes(c)){var d=a,e=W("div"),f=W("label");f.textContent=c+":";e.appendChild(f);f=W("span");f.textContent=d.A[c](c);e.appendChild(f);d.u[c]=f;d=e;a.h.appendChild(d);a.F.push(c);ZD(d.parentElement,!isNaN(a.g[c]))}else Ya("Unrecognized statistic element:",c)}uH.prototype.release=function(){this.l.stop();this.l=null;UD.prototype.release.call(this)};
|
|
1694
|
+
function wH(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.G.includes(c)){var d=a,e=W("div"),f=W("label");f.textContent=c+":";e.appendChild(f);f=W("span");f.textContent=d.A[c](c);e.appendChild(f);d.u[c]=f;d=e;a.h.appendChild(d);a.F.push(c);ZD(d.parentElement,!isNaN(a.g[c]))}else Ya("Unrecognized statistic element:",c)}uH.prototype.release=function(){this.l.stop();this.l=null;UD.prototype.release.call(this)};Q("shaka.ui.StatisticsButton",uH);
|
|
1694
1695
|
function xH(){}xH.prototype.create=function(a,b){return new uH(a,b)};MF("statistics",new xH);jE("statistics",new xH);function yH(a,b){dG.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Hc()?this.button.ariaPressed="true":this.button.ariaPressed="false";zH(this);this.eventManager.s(this.localization,"locale-updated",function(){AH(c);BH(c)});this.eventManager.s(this.localization,"locale-changed",function(){AH(c);BH(c)});this.eventManager.s(this.player,
|
|
1695
1696
|
"loading",function(){CH(c)});this.eventManager.s(this.player,"texttrackvisibility",function(){DH(c);BH(c)});this.eventManager.s(this.player,"textchanged",function(){BH(c)});this.eventManager.s(this.player,"trackschanged",function(){CH(c)});DH(this);AH(this);BH(this);CH(this)}oa(yH,dG);function zH(a){var b=en();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(YD());a.g=W("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1696
1697
|
function DH(a){a.player.Hc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new S("captionselectionupdated"))}
|
|
1697
1698
|
function BH(a){var b=a.player.kc();bG(b,a.menu,function(c){return EH(a,c)},a.player.Hc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=en();b.classList.add("shaka-turn-captions-off-button");a.eventManager.s(b,"click",function(){a.player.pf(!1);BH(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Hc()||(b.ariaSelected="true",b.appendChild(YD()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1698
1699
|
a.button.setAttribute("shaka-status",a.currentSelection.textContent);XD(a.menu);a.controls.dispatchEvent(new S("captionselectionupdated"))}function EH(a,b){return O(function(c){a.player.Vg(b);return E(c,a.player.pf(!0),0)})}
|
|
1699
|
-
function AH(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function CH(a){var b=0<a.player.kc().length;ZD(a.button,b);BH(a)}
|
|
1700
|
+
function AH(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function CH(a){var b=0<a.player.kc().length;ZD(a.button,b);BH(a)}Q("shaka.ui.TextSelection",yH);function FH(){}FH.prototype.create=function(a,b){return new yH(a,b)};MF("captions",new FH);jF("captions",new FH);function GH(a,b){UD.call(this,a,b);var c=this;this.g=en();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
|
|
1700
1701
|
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);HH(this);this.eventManager.s(this.localization,"locale-updated",function(){HH(c)});this.eventManager.s(this.localization,"locale-changed",function(){HH(c)});var d=this.controls.u;this.eventManager.s(this.g,"click",function(){d.qd()});this.eventManager.s(d,"vrstatuschanged",function(){ZD(c.g,c.controls.Qb())});ZD(this.g,this.controls.Qb())}oa(GH,UD);
|
|
1701
|
-
function HH(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}
|
|
1702
|
+
function HH(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}Q("shaka.ui.ToggleStereoscopicButton",GH);function IH(){}IH.prototype.create=function(a,b){return new GH(a,b)};MF("toggle_stereoscopic",new IH);jF("toggle_stereoscopic",new IH);function JH(a,b){oE.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.s(this.video,"volumechange",function(){return KH(c)});this.eventManager.s(this.adManager,"ad-volume-changed",function(){return LH(c)});this.eventManager.s(this.adManager,"ad-muted",function(){return LH(c)});this.eventManager.s(this.adManager,"ad-stopped",function(){return KH(c)});this.eventManager.s(this.localization,"locale-updated",function(){return MH(c)});
|
|
1702
1703
|
this.eventManager.s(this.localization,"locale-changed",function(){return MH(c)});KH(this);MH(this);if(this.ad)this.onChange()}oa(JH,oE);JH.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function KH(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);NH(a)}function LH(a){var b=a.ad.getVolume();a.setValue(100*b);NH(a)}
|
|
1703
|
-
function NH(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function MH(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}
|
|
1704
|
+
function NH(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function MH(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}Q("shaka.ui.VolumeBar",JH);function OH(){}OH.prototype.create=function(a,b){return new JH(a,b)};jF("volume",new OH);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1704
1705
|
|
|
1705
1706
|
//# sourceMappingURL=shaka-player.ui.map
|