shaka-player 4.9.0 → 4.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.d.ts +0 -1
- package/dist/shaka-player.compiled.debug.d.ts +0 -1
- package/dist/shaka-player.compiled.debug.externs.js +0 -1
- package/dist/shaka-player.compiled.debug.js +184 -183
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.externs.js +0 -1
- package/dist/shaka-player.compiled.js +287 -286
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.d.ts +0 -1
- package/dist/shaka-player.ui.debug.d.ts +0 -1
- package/dist/shaka-player.ui.debug.externs.js +0 -1
- package/dist/shaka-player.ui.debug.js +94 -92
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +0 -1
- package/dist/shaka-player.ui.js +552 -551
- package/dist/shaka-player.ui.map +3 -3
- package/lib/media/content_workarounds.js +4 -2
- package/lib/media/media_source_engine.js +66 -31
- package/lib/player.js +5 -5
- package/lib/transmuxer/aac_transmuxer.js +4 -2
- package/lib/transmuxer/ac3_transmuxer.js +2 -1
- package/lib/transmuxer/ec3_transmuxer.js +2 -1
- package/lib/transmuxer/mp3_transmuxer.js +4 -2
- package/lib/transmuxer/mpeg_ts_transmuxer.js +2 -1
- package/lib/transmuxer/mss_transmuxer.js +4 -2
- package/lib/transmuxer/ts_transmuxer.js +44 -24
- package/lib/util/error.js +10 -8
- package/lib/util/object_utils.js +1 -2
- package/package.json +1 -1
- package/ui/audio_language_selection.js +4 -0
- package/ui/resolution_selection.js +4 -0
- package/ui/text_selection.js +4 -0
package/dist/shaka-player.ui.js
CHANGED
|
@@ -15,18 +15,18 @@ ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
15
15
|
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ha="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ia;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ia=Object.setPrototypeOf;else{var ja;a:{var ka={a:!0},ma={};try{ma.__proto__=ka;ja=ma.a;break a}catch(a){}ja=!1}ia=ja?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var na=ia;
|
|
18
|
-
function oa(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(na)na(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ol=b.prototype}function pa(){this.
|
|
18
|
+
function oa(a,b){a.prototype=ha(b.prototype);a.prototype.constructor=a;if(na)na(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ol=b.prototype}function pa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function qa(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}pa.prototype.u=function(a){this.h=a};
|
|
19
19
|
function ra(a,b){a.i={Ah:b,Kh:!0};a.g=a.m||a.j}pa.prototype.return=function(a){this.i={return:a};this.g=this.j};function E(a,b,c){a.g=c;return{value:b}}pa.prototype.B=function(a){this.g=a};function F(a){a.g=0}function sa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a,b){a.m=0;a.j=b||0}function ua(a,b,c){a.g=b;a.m=c||0}function va(a,b){a.m=b||0;b=a.i.Ah;a.i=null;return b}function wa(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function xa(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Kh?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Aa(a){this.g=new pa;this.h=a}function Ba(a,b){qa(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ea(a)}
|
|
21
|
-
function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.
|
|
21
|
+
function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ra(a.g,g),Ea(a)}a.g.l=null;d.call(a.g,f);return Ea(a)}function Ea(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ra(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Kh)throw b.Ah;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Fa(a){this.next=function(b){qa(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Ea(a));return b};this.throw=function(b){qa(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.u):(ra(a.g,b),b=Ea(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Ga(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
23
23
|
function O(a){return Ga(new Fa(new Aa(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
24
|
-
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.
|
|
24
|
+
ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
|
|
25
25
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.G(g):this.m(g)}};
|
|
26
26
|
b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.A()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
|
|
27
|
-
function(){if(this.
|
|
27
|
+
function(){if(this.s)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.A=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
28
28
|
b.prototype.J=function(g){var h=this.j();g.ye(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.ye(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.ye=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
29
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.
|
|
29
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).ye(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){p[u]=v;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).ye(n(p.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
31
31
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ja(k,
|
|
@@ -79,17 +79,17 @@ function Fb(a,b,c){c=void 0===c?Infinity:c;return Ib(a,void 0===b?0:b,c,Uint8Arr
|
|
|
79
79
|
P("shaka.util.BufferUtils",Cb);Cb.toDataView=Kb;Cb.toUint16=Jb;Cb.toUint8=Fb;Cb.toArrayBuffer=Gb;Cb.equal=Db;function U(a,b,c){var d=Ha.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(Lb)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," ")};P("shaka.util.Error",U);var Lb=!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};
|
|
80
80
|
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,
|
|
81
81
|
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
|
|
82
|
-
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,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Ob.prototype.tickAfter=Ob.prototype.
|
|
82
|
+
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_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,
|
|
83
|
+
DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
|
|
84
|
+
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,
|
|
85
|
+
AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,
|
|
86
|
+
OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,
|
|
87
|
+
CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,
|
|
88
|
+
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 Mb(a){this.h=a;this.g=void 0}Mb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Nb(a){this.h=a;this.g=null}Nb.prototype.U=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};Nb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Ob(a){this.h=a;this.g=null}Ob.prototype.La=function(){this.stop();this.h();return this};Ob.prototype.U=function(a){var b=this;this.stop();this.g=(new Nb(function(){b.h()})).U(a);return this};Ob.prototype.xa=function(a){var b=this;this.stop();this.g=(new Nb(function(){b.g.U(a);b.h()})).U(a);return this};Ob.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};P("shaka.util.Timer",Ob);Ob.prototype.stop=Ob.prototype.stop;Ob.prototype.tickEvery=Ob.prototype.xa;
|
|
89
|
+
Ob.prototype.tickAfter=Ob.prototype.U;Ob.prototype.tickNow=Ob.prototype.La;function Pb(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Qb(a){return""!=Rb().canPlayType(a)}function Sb(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Tb(){return navigator.userAgent.match(/Edge\//)?!0:!1}function Ub(){return Vb("Xbox One")}function Wb(){return Vb("Tizen")}function Xb(){return Vb("Tizen 3")}function Yb(){return Vb("Tizen 2")}function Zb(){return Vb("Web0S")}function $b(){return Zb()&&38===ac()}
|
|
90
90
|
function bc(){return Vb("CrKey")}function ac(){if(!Vb("Chrome")||Tb())return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function cc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Wb()&&!Vb("PC=EOS")&&!Vb("PC=APL")&&!Vb("VirginMedia")&&!dc()&&!ec()&&!Vb("AFT")&&!Vb("WPE")}function fc(){return Vb("PlayStation 5")}function ec(){return Vb("PlayStation 4")}function gc(){return Vb("Hisense")||Vb("VIDAA")}
|
|
91
91
|
function dc(){return Vb("SOPOpenBrowser")}function hc(){if(!cc())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 ic(){return Wb()||Zb()||Ub()||ec()||fc()||Vb("AFT")||Vb("PC=EOS")||Vb("PC=APL")||Vb("VirginMedia")||dc()||Vb("WPE")||bc()||gc()?!0:!1}function Vb(a){return(navigator.userAgent||"").includes(a)}
|
|
92
|
-
function Rb(){if(jc)return jc;kc||(kc=new Ob(function(){jc=null}));(jc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(jc=document.createElement("video"));kc.
|
|
92
|
+
function Rb(){if(jc)return jc;kc||(kc=new Ob(function(){jc=null}));(jc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(jc=document.createElement("video"));kc.U(1);return jc}
|
|
93
93
|
function lc(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r;return O(function(u){switch(u.g){case 1:a={width:Infinity,height:Infinity};if(bc()){m=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;sa(u,15);if(!(n=m)){u.B(17);break}return E(u,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(Wb()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
94
94
|
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(v){Ya("Tizen: Error detecting screen size, default screen size 1920x1080.")}u.B(3);break}if(Ub()){c=new Windows.Media.Protection.ProtectionCapabilities;d=Windows.Media.Protection.ProtectionCapabilityResult;e=null;try{do e=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',
|
|
95
95
|
"com.microsoft.playready.recommendation");while(e===d.maybe)}catch(v){e=d.notSupported}e===d.probably?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);u.B(3);break}if(Zb()){try{f=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,f.screenWidth),a.height=Math.max(1080,f.screenHeight)}catch(v){Ya("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}u.B(3);break}if(gc()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?
|
|
@@ -106,7 +106,7 @@ function Bc(a){var b=Fb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c
|
|
|
106
106
|
function Ec(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
|
|
107
107
|
function Fc(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=yc(Ac(h),!1));var l=g;22!=l.length&&(l=yc(Ac(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:Fb(sc(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
108
108
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Gc(a,b){if(1==b.length)return b[0];a=Hc(a,b);if(null!=a)return a;throw new U(2,4,4025,b);}function Hc(a,b){for(var c=t(Ic[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==Jc?"":null}
|
|
109
|
-
function Kc(a,b){var c=[];a=t(Ic[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 Jc="text",Lc={ua:"video"
|
|
109
|
+
function Kc(a,b){var c=[];a=t(Ic[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 Jc="text",Lc={ua:"video",aa:"audio",Ca:Jc,Jf:"image",Fk:"application"},Ic={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Mc(){}function Nc(a,b){a=Pc(a);b=Pc(b);return a.split("-")[0]==b.split("-")[0]}function Qc(a,b){a=Pc(a);b=Pc(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Rc(a,b){a=Pc(a);b=Pc(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
|
|
110
110
|
function Pc(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=Sc.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function Tc(a,b){var c=Uc(a),d=Uc(b);return a!=c&&b!=d&&c==d}function Vc(a,b){a=Pc(a);b=Pc(b);return b==a?4:Qc(b,a)?3:Rc(b,a)?2:Qc(a,b)?1:0}
|
|
111
111
|
function Uc(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Sc.get(a)||a}function Wc(a){return a.language?Pc(a.language):a.audio&&a.audio.language?Pc(a.audio.language):a.video&&a.video.language?Pc(a.video.language):"und"}
|
|
112
112
|
function Xc(a,b){a=Pc(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(Pc(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,Qc(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Rc(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Qc(a,b))return b;return null}P("shaka.util.LanguageUtils",Mc);Mc.findClosestLocale=Xc;Mc.getLocaleForVariant=Wc;
|
|
@@ -122,8 +122,8 @@ q.Fa=function(a,b,c){a=Pc(a);void 0===c&&(c=ad);var d=this.h.get(a)||new Map;b.f
|
|
|
122
122
|
q.Wi=function(){return this.g};
|
|
123
123
|
function Zc(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={Uc:f.Uc},h=g.next()){f.Uc=h.value;e.add(f.Uc);e.add(Uc(f.Uc));h=kb(b.keys(),function(l){return function(m){return Tc(m,l.Uc)}}(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 Uc(m)==l.Uc}}(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);
|
|
124
124
|
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,bd(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new T("missing-localizations",d)))}function bd(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)}P("shaka.ui.Localization",Yc);Yc.prototype.getCurrentLocales=Yc.prototype.Wi;
|
|
125
|
-
Yc.prototype.resolve=Yc.prototype.resolve;Yc.prototype.resolveDictionary=Yc.prototype.fk;Yc.prototype.insert=Yc.prototype.Fa;Yc.prototype.changeLocale=Yc.prototype.qh;Yc.prototype.release=Yc.prototype.release;var ad=1;Yc.ConflictResolution={USE_OLD:0,USE_NEW:ad};Yc.UNKNOWN_LOCALES="unknown-locales";Yc.UNKNOWN_LOCALIZATION="unknown-localization";Yc.MISSING_LOCALIZATIONS="missing-localizations";Yc.LOCALE_CHANGED="locale-changed";Yc.LOCALE_UPDATED="locale-updated";function cd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}cd.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 dd(a){return a.h/(1-Math.pow(a.g,a.i))};function ed(){this.h=new cd(2);this.j=new cd(5);this.g=0;this.i=128E3;this.l=16E3}ed.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)};ed.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)}};ed.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(dd(this.h),dd(this.j))};function fd(){this.g=new fb}q=fd.prototype;q.release=function(){this.qb();this.g=null};q.
|
|
126
|
-
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.Wa();this.g.g={}}};P("shaka.util.EventManager",fd);fd.prototype.removeAll=fd.prototype.qb;fd.prototype.unlisten=fd.prototype.Wa;fd.prototype.listenOnce=fd.prototype.na;fd.prototype.listen=fd.prototype.
|
|
125
|
+
Yc.prototype.resolve=Yc.prototype.resolve;Yc.prototype.resolveDictionary=Yc.prototype.fk;Yc.prototype.insert=Yc.prototype.Fa;Yc.prototype.changeLocale=Yc.prototype.qh;Yc.prototype.release=Yc.prototype.release;var ad=1;Yc.ConflictResolution={USE_OLD:0,USE_NEW:ad};Yc.UNKNOWN_LOCALES="unknown-locales";Yc.UNKNOWN_LOCALIZATION="unknown-localization";Yc.MISSING_LOCALIZATIONS="missing-localizations";Yc.LOCALE_CHANGED="locale-changed";Yc.LOCALE_UPDATED="locale-updated";function cd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}cd.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 dd(a){return a.h/(1-Math.pow(a.g,a.i))};function ed(){this.h=new cd(2);this.j=new cd(5);this.g=0;this.i=128E3;this.l=16E3}ed.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)};ed.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)}};ed.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(dd(this.h),dd(this.j))};function fd(){this.g=new fb}q=fd.prototype;q.release=function(){this.qb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new gd(a,b,c,d),this.g.push(b,a))};q.na=function(a,b,c,d){function e(g){f.Wa(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.Wa=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.Wa(),this.g.remove(b,e))}};
|
|
126
|
+
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.Wa();this.g.g={}}};P("shaka.util.EventManager",fd);fd.prototype.removeAll=fd.prototype.qb;fd.prototype.unlisten=fd.prototype.Wa;fd.prototype.listenOnce=fd.prototype.na;fd.prototype.listen=fd.prototype.o;fd.prototype.release=fd.prototype.release;function gd(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=hd(a,d);this.target.addEventListener(b,c,this.g)}
|
|
127
127
|
gd.prototype.Wa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function hd(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 id(a)?b:b.capture||!1}
|
|
128
128
|
function id(a){var b=jd;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}jd=b}return b||!1}var jd=void 0;function kd(a){if(ld.has(a))return ld.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);ld.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),ld.set(a,b),b):!1}function md(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var ld=new Map;function nd(a,b){this.g=a;this.h=b}nd.prototype.toString=function(){return"v"+this.g+"."+this.h};function od(a,b){var c=new nd(5,0),d=pd,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function qd(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 rd(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 pd=null;function sd(){}sd.prototype.extract=function(){};sd.prototype.decode=function(){return[]};sd.prototype.clear=function(){};sd.prototype.getStreams=function(){return[]};function td(){}td.prototype.init=function(){};td.prototype.parse=function(){return[]};function ud(){}ud.prototype.init=function(){};ud.prototype.i=function(){};ud.prototype.g=function(){};ud.prototype.j=function(){};P("shaka.media.IClosedCaptionParser",ud);function vd(a){this.l=new td;if(a=wd[a.toLowerCase()])this.l=a();this.h=new sd;if(a=xd)this.h=a()}vd.prototype.init=function(a,b){void 0!==b&&b||(this.g(),this.l.init(a))};vd.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=Fb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
129
129
|
vd.prototype.g=function(){this.h.clear()};vd.prototype.j=function(){return this.h.getStreams()};P("shaka.media.ClosedCaptionParser",vd);vd.findDecoder=function(){return xd};vd.unregisterDecoder=function(){xd=null};vd.registerDecoder=function(a){xd=a};vd.findParser=function(a){return wd[a]};vd.unregisterParser=function(a){delete wd[a]};vd.registerParser=function(a,b){wd[a]=b};var wd={},xd=null;function yd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function zd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Ad(a,b,c){c||(c=yd);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={wf:d.wf},e=a.next()){d.wf=e.value;e=b.findIndex(function(f){return function(g){return c(f.wf,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
@@ -138,12 +138,12 @@ function pe(a,b,c){var d=[b];qe.forEach(function(e,f){var g=a[f];"codecs"==f?me.
|
|
|
138
138
|
function se(a){var b=te(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"===
|
|
139
139
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function ze(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=te(c.value),b.push(c[0]);return b.sort().join(",")}function Ae(a){return a.split(";")[0]}
|
|
140
140
|
function Be(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ce(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function te(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}P("shaka.util.MimeUtils",ke);ke.getFullTypeWithAllCodecs=ne;ke.getFullType=le;
|
|
141
|
-
var qe=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),me=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Ee(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.
|
|
141
|
+
var qe=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),me=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Ee(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.s=new Map}function Fe(a){return Ge[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!xd:!1}Ee.prototype.destroy=function(){this.j=this.i=null;this.s.clear();return Promise.resolve()};
|
|
142
142
|
function He(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(Fb(b)),p.return();f=a.F?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Fb(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)})}
|
|
143
|
-
Ee.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 Ie(a,b,c){a.l=b;a.m=c}function Je(a,b,c){a.G=b;if(b=a.
|
|
143
|
+
Ee.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 Ie(a,b,c){a.l=b;a.m=c}function Je(a,b,c){a.G=b;if(b=a.s.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
144
144
|
function Ke(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ke(a,d.value,c)}
|
|
145
|
-
function Le(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,[]);Ke(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.
|
|
146
|
-
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}P("shaka.text.TextEngine",Ee);Ee.prototype.destroy=Ee.prototype.destroy;Ee.findParser=function(a){return Ge[a]};Ee.unregisterParser=function(a){delete Ge[a]};Ee.registerParser=function(a,b){Ge[a]=b};var Ge={};function Me(a,b){return a.concat(b)}function Ne(){}function Oe(a){return null!=a};function Pe(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
|
|
145
|
+
function Le(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,[]);Ke(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.s.has(f)||a.s.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.s.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
146
|
+
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}P("shaka.text.TextEngine",Ee);Ee.prototype.destroy=Ee.prototype.destroy;Ee.findParser=function(a){return Ge[a]};Ee.unregisterParser=function(a){delete Ge[a]};Ee.registerParser=function(a,b){Ge[a]=b};var Ge={};function Me(a,b){return a.concat(b)}function Ne(){}function Oe(a){return null!=a};function Pe(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 Qe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Re(){}
|
|
147
147
|
function Se(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Te(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 z=v.next();!z.done;A={Hd:A.Hd},z=v.next())A.Hd=z.value,z=d.filter(function(y){return function(B){return y.Hd.decodingInfos[0][B]}}(A)).length,z>u?(u=z,w=[A.Hd]):z==u&&w.push(A.Hd);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=
|
|
148
148
|
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=se(m.codecs),p=se(g.codecs);n==p&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(u,
|
|
149
149
|
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=md();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=se(m.codecs),p=se(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=se(m.codecs),p=se(g.codecs),n==p&&g.bandwidth>m.bandwidth&&(l.push(g),r.push(g.id)))}else l.push(g),
|
|
@@ -182,45 +182,45 @@ function uf(a){var b=a.language;return{id:rf(a),active:!1,type:"",bandwidth:0,la
|
|
|
182
182
|
originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function wf(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function xf(a){return a.filter(function(b){return wf(b)})}
|
|
183
183
|
function yf(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=Xc(Pc(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Pc(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=zf(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(Me,[]);return a.length?
|
|
184
184
|
zf(e,a[0]):e}function zf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function cf(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"}P("shaka.util.StreamUtils",Re);Re.meetsRestrictions=Ve;
|
|
185
|
-
var hf={},sf=0,lf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),mf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Af(){var a=this;this.u=null;this.l=!1;this.i=new ed;this.H=new fd;navigator.connection&&navigator.connection.addEventListener&&this.H.
|
|
186
|
-
b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}q=Af.prototype;q.stop=function(){this.u=null;this.l=!1;this.
|
|
187
|
-
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.m.clientHeight*d);c=Math.min(c,this.m.clientWidth*d)}var e=this.
|
|
188
|
-
this.
|
|
185
|
+
var hf={},sf=0,lf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),mf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Af(){var a=this;this.u=null;this.l=!1;this.i=new ed;this.H=new fd;navigator.connection&&navigator.connection.addEventListener&&this.H.o(navigator.connection,"change",function(){if(a.l&&a.g.useNetworkInformation){a.i=new ed;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.s=[];this.F=1;this.I=!1;this.h=this.m=this.g=this.A=null;this.G=new Ob(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
186
|
+
b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}q=Af.prototype;q.stop=function(){this.u=null;this.l=!1;this.s=[];this.F=1;this.m=this.A=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop();this.j=null};q.release=function(){this.H.release();this.G=null};q.init=function(a){this.u=a};
|
|
187
|
+
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.m.clientHeight*d);c=Math.min(c,this.m.clientWidth*d)}var e=this.s.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
|
|
188
|
+
this.s);d=e;a&&e.length!=this.s.length&&(d=this.s.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=Bf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Cf(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=Bf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Bf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
189
189
|
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=e)}this.A=Date.now();return c};q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.A&&this.l&&Ef(this))};
|
|
190
|
-
q.trySuggestStreams=function(){null!=this.A&&this.l&&Ef(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.j?this.j.getBandwidthEstimate(a):a};q.setVariants=function(a){this.
|
|
191
|
-
q.setMediaElement=function(a){var b=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.
|
|
190
|
+
q.trySuggestStreams=function(){null!=this.A&&this.l&&Ef(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.j?this.j.getBandwidthEstimate(a):a};q.setVariants=function(a){this.s=a};q.playbackRateChanged=function(a){this.F=a};
|
|
191
|
+
q.setMediaElement=function(a){var b=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.U(Ff)}),this.h.observe(this.m))};q.setCmsdManager=function(a){this.j=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
192
192
|
function Ef(a){if(!a.I){var b=a.i;if(!(b.g>=b.i))return;a.I=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function Bf(a,b,c,d,e){if(a.j){var f=a.j.Fh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ve(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
193
193
|
function Cf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}P("shaka.abr.SimpleAbrManager",Af);Af.prototype.configure=Af.prototype.configure;Af.prototype.setCmsdManager=Af.prototype.setCmsdManager;Af.prototype.setMediaElement=Af.prototype.setMediaElement;Af.prototype.playbackRateChanged=Af.prototype.playbackRateChanged;Af.prototype.setVariants=Af.prototype.setVariants;
|
|
194
194
|
Af.prototype.getBandwidthEstimate=Af.prototype.getBandwidthEstimate;Af.prototype.trySuggestStreams=Af.prototype.trySuggestStreams;Af.prototype.segmentDownloaded=Af.prototype.segmentDownloaded;Af.prototype.disable=Af.prototype.disable;Af.prototype.enable=Af.prototype.enable;Af.prototype.chooseVariant=Af.prototype.chooseVariant;Af.prototype.init=Af.prototype.init;Af.prototype.release=Af.prototype.release;Af.prototype.stop=Af.prototype.stop;var Ff=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{kl:"reload",wi:"smooth"});function Gf(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)}Gf.prototype.add=function(a,b,c){return Hf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
195
195
|
function Hf(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&&!If(e,f)||!Jf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||If(a,b))&&Jf(a.roles,b.roles)));return d?!1:!0}Gf.prototype.values=function(){return this.g.values()};
|
|
196
196
|
function If(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ze(d)});b=b.codecs.split(",").map(function(d){return ze(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 Jf(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 Kf(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 Lf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Kf.prototype.create=function(a){var b=this,c="smooth"==this.h&&md(),d=a.filter(function(e){return Hf(b.i,e,!c,b.g)});return d.length?new Gf(d[0],d,!c,this.g):this.j.create(a)};
|
|
197
|
-
function Lf(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.
|
|
198
|
-
Lf.prototype.create=function(a){var b=[];b=Qf(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Rf(b,this.A);a.length&&(b=a);this.l&&(a=Sf(b,this.l),a.length&&(b=a));this.i&&(a=Tf(b,this.i),a.length&&(b=a));this.h&&(a=Uf(b,this.h),a.length&&(b=a));this.g&&(a=Vf(b,this.g),a.length&&(b=a));this.j&&(a=Wf(b,this.j),a.length&&(b=a));a=Xf(b,this.F);a.length&&(b=a);return new Gf(b[0],b,!("smooth"==this.m&&md()),this.
|
|
197
|
+
function Lf(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.s=void 0===l?!1:l}
|
|
198
|
+
Lf.prototype.create=function(a){var b=[];b=Qf(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Rf(b,this.A);a.length&&(b=a);this.l&&(a=Sf(b,this.l),a.length&&(b=a));this.i&&(a=Tf(b,this.i),a.length&&(b=a));this.h&&(a=Uf(b,this.h),a.length&&(b=a));this.g&&(a=Vf(b,this.g),a.length&&(b=a));this.j&&(a=Wf(b,this.j),a.length&&(b=a));a=Xf(b,this.F);a.length&&(b=a);return new Gf(b[0],b,!("smooth"==this.m&&md()),this.s)};
|
|
199
199
|
function Qf(a,b){b=Pc(b);var c=Xc(b,a.map(function(d){return Wc(d)}));return c?a.filter(function(d){return c==Wc(d)}):[]}function Rf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Vf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Wf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
200
|
-
function Uf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Tf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Sf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Xf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Yf(){this.g=Zf;this.i=(new Map).set(Zf,2).set($f,1);this.h=0}function ag(a,b,c){a.i.set(Zf,c).set($f,b)}var $f=0,Zf=1;function bg(a,b){var c=cg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.
|
|
201
|
-
function dg(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.
|
|
200
|
+
function Uf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Tf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Sf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Xf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Yf(){this.g=Zf;this.i=(new Map).set(Zf,2).set($f,1);this.h=0}function ag(a,b,c){a.i.set(Zf,c).set($f,b)}var $f=0,Zf=1;function bg(a,b){var c=cg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
201
|
+
function dg(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.s);return E(d,new Promise(function(e){(new Ob(e)).U(c/1E3)}),2)}a.h*=a.m;F(d)})}function cg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function eg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}eg.prototype.resolve=function(){};eg.prototype.reject=function(){};function fg(a,b){this.promise=a;this.i=b;this.g=!1}function gg(a){return new fg(Promise.reject(a),function(){return Promise.resolve()})}function hg(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new fg(a,function(){return Promise.resolve()})}function ig(a){return new fg(Promise.resolve(a),function(){return Promise.resolve()})}function jg(a){return new fg(a,function(){return a.catch(function(){})})}fg.prototype.abort=function(){this.g=!0;return this.i()};
|
|
202
202
|
function kg(a){return new fg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}fg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
203
203
|
fg.prototype.Na=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=lg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new eg,g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new fg(f,function(){return d()})};
|
|
204
|
-
function lg(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()}}}P("shaka.util.AbortableOperation",fg);fg.prototype.chain=fg.prototype.Na;fg.prototype["finally"]=fg.prototype.finally;fg.all=kg;fg.prototype.abort=fg.prototype.abort;fg.notAbortable=jg;fg.completed=ig;fg.aborted=hg;fg.failed=gg;function mg(){this.g=[]}function ng(a,b){a.g.push(b.finally(function(){zd(a.g,b)}))}mg.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 og(a,b,c,d,e,f){gb.call(this);this.i=!1;this.m=new mg;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.
|
|
204
|
+
function lg(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()}}}P("shaka.util.AbortableOperation",fg);fg.prototype.chain=fg.prototype.Na;fg.prototype["finally"]=fg.prototype.finally;fg.all=kg;fg.prototype.abort=fg.prototype.abort;fg.notAbortable=jg;fg.completed=ig;fg.aborted=hg;fg.failed=gg;function mg(){this.g=[]}function ng(a,b){a.g.push(b.finally(function(){zd(a.g,b)}))}mg.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 og(a,b,c,d,e,f){gb.call(this);this.i=!1;this.m=new mg;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.s=this.u=!1}oa(og,gb);q=og.prototype;q.Ug=function(a){this.u=a};q.Vg=function(a){this.s=a};function pg(a,b,c,d){c=c||qg;var e=rg[a];if(!e||c>=e.priority)rg[a]={priority:c,Ye:b,Uj:void 0===d?!1:d}}
|
|
205
205
|
function sg(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.Xj=function(a){this.g.add(a)};q.Ak=function(a){this.g.delete(a)};q.Hi=function(){this.g.clear()};q.Yj=function(a){this.h.add(a)};q.Bk=function(a){this.h.delete(a)};q.Ii=function(){this.h.clear()};
|
|
206
206
|
function tg(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()};
|
|
207
207
|
q.request=function(a,b,c){var d=this,e=new ug;if(this.i){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new vg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Pe(b.retryParameters):cg();b.uris=Pe(b.uris);f=wg(this,a,b,c);var g=f.Na(function(){return xg(d,a,b,c,new bg(b.retryParameters,!1),0,null,e)}),h=g.Na(function(p){return yg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
208
208
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Na(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.xj||!d.l||u.fromCache||"HEAD"==b.method||a!=zg||d.l(u.timeMs,u.data.byteLength,Ag(c));d.G&&d.G(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new vg(n.promise,function(){return n.abort()},e);ng(this.m,f);return f};
|
|
209
209
|
function wg(a,b,c,d){function e(h){f=f.Na(function(){c.body&&(c.body=Gb(c.body));return h(b,c,d)})}var f=ig(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.Na(void 0,function(h){if(h instanceof U&&7001==h.code)throw h;throw new U(2,1,1006,h);})}
|
|
210
|
-
function xg(a,b,c,d,e,f,g,h){a.u&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.
|
|
211
|
-
var y=n(c.uris[f],c,b,function(D,G,K){r&&r.stop();u&&u.
|
|
210
|
+
function xg(a,b,c,d,e,f,g,h){a.u&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new mb(c.uris[f]),l=k.Rb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),nb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=rg[l])?l.Ye:null;if(!n)return gg(new U(2,1,1E3,k));var p=l.Uj,r=null,u=null,v=!1,w=!1,A;return jg(dg(e)).Na(function(){if(a.i)return hg();A=Date.now();var z=0;c.requestStartTime=Date.now();
|
|
211
|
+
var y=n(c.uris[f],c,b,function(D,G,K){r&&r.stop();u&&u.U(C/1E3);a.l&&b==zg&&(z++,c.packetNumber=z,a.l(D,G,Ag(d),c),m=!0,h.g=K)},function(D){a.j&&a.j(D,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return y;var B=c.retryParameters.connectionTimeout;B&&(r=new Ob(function(){v=!0;y.abort()}),r.U(B/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Ob(function(){v=!0;y.abort()}));return y}).Na(function(z){r&&r.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-A);var y={response:z,
|
|
212
212
|
xj:m};!w&&a.j&&a.j(z.headers,c,b);return y},function(z){r&&r.stop();u&&u.stop();if(a.A){var y=null,B=0;z instanceof U&&(y=z,1001==z.code&&(B=z.data[1]));a.A(c,y,B,v)}if(a.i)return hg();v&&(z=new U(1,1,1003,c.uris[f],b));if(z instanceof U){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity)return y=(new Map).set("error",z),y=new T("retry",y),a.dispatchEvent(y),f=(f+1)%c.uris.length,xg(a,b,c,d,e,f,z,h)}throw z;})}
|
|
213
213
|
function yg(a,b,c,d){var e=ig(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Af:f.Af},g=a.next())f.Af=g.value,e=e.Na(function(h){return function(){var k=c.response;k.data&&(k.data=Gb(k.data));return h.Af(b,k,d)}}(f));return e.Na(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 Ag(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.ce)return!1}return!0}P("shaka.net.NetworkingEngine",og);
|
|
214
214
|
og.prototype.request=og.prototype.request;og.prototype.destroy=og.prototype.destroy;og.makeRequest=tg;og.defaultRetryParameters=function(){return cg()};og.prototype.clearAllResponseFilters=og.prototype.Ii;og.prototype.unregisterResponseFilter=og.prototype.Bk;og.prototype.registerResponseFilter=og.prototype.Yj;og.prototype.clearAllRequestFilters=og.prototype.Hi;og.prototype.unregisterRequestFilter=og.prototype.Ak;og.prototype.registerRequestFilter=og.prototype.Xj;og.unregisterScheme=function(a){delete rg[a]};
|
|
215
215
|
og.registerScheme=pg;og.prototype.setForceHTTPS=og.prototype.Vg;og.prototype.setForceHTTP=og.prototype.Ug;function ug(){this.g=0}og.NumBytesRemainingClass=ug;function vg(a,b,c){fg.call(this,a,b);this.h=c}oa(vg,fg);og.PendingRequest=vg;var zg=1;og.RequestType={MANIFEST:0,SEGMENT:zg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};og.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var qg=3;
|
|
216
|
-
og.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:qg};var rg={};function Bg(a){this.g=!1;this.h=new eg;this.i=a}Bg.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 Cg(a,b){if(a.g){if(b instanceof U&&7003==b.code)throw b;throw new U(2,7,7003,b);}};function Dg(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Eg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Fg(a,b){this.h=Kb(a);this.i=b==Gg;this.g=0}q=Fg.prototype;q.Aa=function(){return this.g<this.h.byteLength};q.Oa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.
|
|
216
|
+
og.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:qg};var rg={};function Bg(a){this.g=!1;this.h=new eg;this.i=a}Bg.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 Cg(a,b){if(a.g){if(b instanceof U&&7003==b.code)throw b;throw new U(2,7,7003,b);}};function Dg(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Eg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Fg(a,b){this.h=Kb(a);this.i=b==Gg;this.g=0}q=Fg.prototype;q.Aa=function(){return this.g<this.h.byteLength};q.Oa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.X=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Hg();}};q.Ka=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Hg();}};q.T=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Hg();}};
|
|
217
217
|
q.Th=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Hg();}};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 Hg();}if(2097151<b)throw new U(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Qb=function(a){if(this.g+a>this.h.byteLength)throw Hg();var b=Fb(this.h,this.g,a);this.g+=a;return b};
|
|
218
218
|
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Hg();this.g+=a};q.gk=function(a){if(this.g<a)throw Hg();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Hg();this.g=a};q.Jc=function(){for(var a=this.g;this.Aa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Fb(this.h,a,this.g-a);this.g+=1;return oc(a)};function Hg(){return new U(2,3,3E3)}P("shaka.util.DataViewReader",Fg);Fg.prototype.readTerminatedString=Fg.prototype.Jc;Fg.prototype.seek=Fg.prototype.seek;Fg.prototype.rewind=Fg.prototype.gk;
|
|
219
|
-
Fg.prototype.skip=Fg.prototype.skip;Fg.prototype.readBytes=Fg.prototype.Qb;Fg.prototype.readUint64=Fg.prototype.md;Fg.prototype.readInt32=Fg.prototype.Th;Fg.prototype.readUint32=Fg.prototype.
|
|
220
|
-
q.kd=function(a,b,c,d){var e=b.Oa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.
|
|
221
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Oa(),b.getLength()-b.Oa()))}};function Ng(a){for(var b=Og(a);a.reader.Aa()&&!a.parser.g;)a.parser.kd(a.start+b,a.reader,a.partialOkay)}function Pg(a){for(var b=Og(a),c=a.reader.
|
|
219
|
+
Fg.prototype.skip=Fg.prototype.skip;Fg.prototype.readBytes=Fg.prototype.Qb;Fg.prototype.readUint64=Fg.prototype.md;Fg.prototype.readInt32=Fg.prototype.Th;Fg.prototype.readUint32=Fg.prototype.T;Fg.prototype.readUint16=Fg.prototype.Ka;Fg.prototype.readUint8=Fg.prototype.X;Fg.prototype.getLength=Fg.prototype.getLength;Fg.prototype.getPosition=Fg.prototype.Oa;Fg.prototype.hasMoreData=Fg.prototype.Aa;var Gg=1;Fg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Gg};function Ig(){this.i=[];this.h=[];this.g=!1}q=Ig.prototype;q.box=function(a,b){a=Jg(a);this.i[a]=Kg;this.h[a]=b;return this};q.V=function(a,b){a=Jg(a);this.i[a]=Lg;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Fg(a,0);for(this.g=!1;a.Aa()&&!this.g;)this.kd(0,a,b,c)};
|
|
220
|
+
q.kd=function(a,b,c,d){var e=b.Oa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.T(),g=b.T(),h=Mg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Oa()+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]==Lg){if(d&&b.Oa()+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.Oa(),b=0<d?b.Qb(d):new Uint8Array(0),b=new Fg(b,0),l({name:h,parser:this,
|
|
221
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Oa(),b.getLength()-b.Oa()))}};function Ng(a){for(var b=Og(a);a.reader.Aa()&&!a.parser.g;)a.parser.kd(a.start+b,a.reader,a.partialOkay)}function Pg(a){for(var b=Og(a),c=a.reader.T(),d=0;d<c&&(a.parser.kd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Qg(a){var b=Og(a);for(a.reader.skip(78);a.reader.Aa()&&!a.parser.g;)a.parser.kd(a.start+b,a.reader,a.partialOkay)}
|
|
222
222
|
function Rg(a){var b=Og(a);a.reader.skip(8);var c=a.reader.Ka();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Aa()&&!a.parser.g;)a.parser.kd(a.start+b,a.reader,a.partialOkay)}function Sg(a){return function(b){a(b.reader.Qb(b.reader.getLength()-b.reader.Oa()))}}function Jg(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 Mg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
223
|
-
function Og(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",Ig);Ig.headerSize=Og;Ig.typeToString=Mg;Ig.allData=Sg;Ig.audioSampleEntry=Rg;Ig.visualSampleEntry=Qg;Ig.sampleDescription=Pg;Ig.children=Ng;Ig.prototype.parseNext=Ig.prototype.kd;Ig.prototype.parse=Ig.prototype.parse;Ig.prototype.stop=Ig.prototype.stop;Ig.prototype.fullBox=Ig.prototype.
|
|
223
|
+
function Og(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",Ig);Ig.headerSize=Og;Ig.typeToString=Mg;Ig.allData=Sg;Ig.audioSampleEntry=Rg;Ig.visualSampleEntry=Qg;Ig.sampleDescription=Pg;Ig.children=Ng;Ig.prototype.parseNext=Ig.prototype.kd;Ig.prototype.parse=Ig.prototype.parse;Ig.prototype.stop=Ig.prototype.stop;Ig.prototype.fullBox=Ig.prototype.V;Ig.prototype.box=Ig.prototype.box;var Kg=0,Lg=1;function Tg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ig).box("moov",Ng).box("moof",Ng).V("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Bc(c.reader.Qb(16)));if(0<c.version){d=c.reader.T();for(var e=0;e<d;e++){var f=Bc(c.reader.Qb(16));b.h.push(f)}}}}).parse(a)}
|
|
224
224
|
function Ug(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=Kb(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=Ac(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
225
225
|
@license
|
|
226
226
|
tXml
|
|
@@ -231,60 +231,60 @@ function Vg(a,b){a=rc(a);return Wg(a,b)}function Wg(a,b){a=Xg(a);return!b&&a.len
|
|
|
231
231
|
function Xg(a){function b(e,f){f=void 0===f?!1:f;for(var g=[];a[d];)if(60==a.charCodeAt(d)){if(47===a.charCodeAt(d+1)){f=d+2;d=a.indexOf(">",d);f=a.substring(f,d);var h=f.indexOf(e);if(-1==h){var k=e.indexOf(".");0<k&&(h=f.indexOf(e.substring(0,k)))}if(-1==h)throw e=a.substring(0,d).split("\n"),Error("Unexpected close tag\nLine: "+(e.length-1)+"\nColumn: "+(e[e.length-1].length+1)+"\nChar: "+a[d]);d+1&&(d+=1);break}else if(33===a.charCodeAt(d+1)){if(45==a.charCodeAt(d+2)){for(;-1!==d&&(62!==a.charCodeAt(d)||
|
|
232
232
|
45!=a.charCodeAt(d-1)||45!=a.charCodeAt(d-2)||-1==d);)d=a.indexOf(">",d+1);-1===d&&(d=a.length)}else if(91===a.charCodeAt(d+2)&&91===a.charCodeAt(d+8)&&"cdata"===a.substr(d+3,5).toLowerCase()){h=a.indexOf("]]\x3e",d);-1==h?(g.push(a.substr(d+9)),d=a.length):(g.push(a.substring(d+9,h)),d=h+3);continue}d++;continue}a:{k=f;d++;var l=c(),m={};for(h=[];62!==a.charCodeAt(d)&&a[d];){var n=a.charCodeAt(d);if(64<n&&91>n||96<n&&123>n){n=c();for(var p=a.charCodeAt(d);p&&39!==p&&34!==p&&!(64<p&&91>p||96<p&&123>
|
|
233
233
|
p)&&62!==p;)d++,p=a.charCodeAt(d);var r=d+1;d=a.indexOf(a[d],r);r=a.slice(r,d);if(39===p||34===p){if(-1===d){k={tagName:l,attributes:m,children:h,parent:null};for(l=0;l<h.length;l++)"string"!==typeof h[l]&&(h[l].parent=k);h=k;break a}}else r=null,d--;n.startsWith("xmlns:")&&Zg.set(r,n.split(":")[1]);"tt"===l&&"xml:space"===n&&"preserve"===r&&(k=!0);m[n]=r}d++}47!==a.charCodeAt(d-1)?(d++,h=b(l,k)):d++;k={tagName:l,attributes:m,children:h,parent:null};l=h.length;for(m=0;m<l;m++)n=h[m],"string"!==typeof n?
|
|
234
|
-
n.parent=k:m==l-1&&"\n"==n&&h.pop();h=k}g.push(h);if("string"===typeof h)break;"?"===h.tagName[0]&&h.children&&(g.push.apply(g,x(h.children)),h.children=[])}else h=d,d=a.indexOf("<",d)-1,-2===d&&(d=a.length),h=a.slice(h,d+1),f?0<h.length&&g.push(h):g.length&&1==h.length&&"\n"==h[0]?g.push(h):0<h.trim().length&&g.push(h),d++;return g}function c(){for(var e=d;-1==="\r\n\t>/= ".indexOf(a[d])&&a[d];)d++;return a.slice(e,d)}var d=0;return b("")}function
|
|
234
|
+
n.parent=k:m==l-1&&"\n"==n&&h.pop();h=k}g.push(h);if("string"===typeof h)break;"?"===h.tagName[0]&&h.children&&(g.push.apply(g,x(h.children)),h.children=[])}else h=d,d=a.indexOf("<",d)-1,-2===d&&(d=a.length),h=a.slice(h,d+1),f?0<h.length&&g.push(h):g.length&&1==h.length&&"\n"==h[0]?g.push(h):0<h.trim().length&&g.push(h),d++;return g}function c(){for(var e=d;-1==="\r\n\t>/= ".indexOf(a[d])&&a[d];)d++;return a.slice(e,d)}var d=0;return b("")}function $g(a){return"string"===typeof a}
|
|
235
235
|
function ch(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function dh(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function eh(a){if("string"===typeof a)return vc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:vc(a)}
|
|
236
236
|
function fh(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=eh(a))&&(a=a.trim());return a}function gh(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())gh(d.value,b,c)}return c}function hh(a,b){a=dh(a,b);return 1!=a.length?null:a[0]}function ih(a,b,c){a=jh(a,b,c);return 1!=a.length?null:a[0]}
|
|
237
237
|
function kh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function lh(a,b,c){b=Yg(b);return a.attributes[b+":"+c]||null}function jh(a,b,c){b=Yg(b);var d=[];if(a.children){a=t(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function mh(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=lh(a,d.value,c))return d;return null}
|
|
238
|
-
function
|
|
238
|
+
function nh(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function qh(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
239
239
|
function rh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function sh(a){a=Number(a);return 0===a%1?a:null}function th(a){a=Number(a);return 0===a%1&&0<a?a:null}function uh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function vh(a){a=Number(a);return isNaN(a)?null:a}function wh(a){return a?"true"===a.toLowerCase():!1}
|
|
240
240
|
function xh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
241
241
|
function yh(a){var b=[];a=vc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,position:f?Number(f[1])-1:null,ic:c.split("/@")[1]||null})}else c.startsWith("@")&&b.length&&(b[b.length-1].ic=c.slice(1))}return b}
|
|
242
242
|
function zh(a,b){var c=yh(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.ic)?Ah(a[c],e,d,fh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}function Ah(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
243
|
-
function Bh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&Bh(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=Bh(b,!1,!0),d.appendChild(c);return d}var Zg=new Map([]);function Ch(a){var b=this;this.G=a;this.J=new Set;this.m=this.u=null;this.
|
|
244
|
-
function Fh(a){return O(function(b){switch(b.g){case 1:return a.F.release(),a.F=null,a.l.reject(),a.L.stop(),a.L=null,a.N.stop(),a.N=null,E(b,Gh(a),2);case 2:if(!a.m){b.B(3);break}sa(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:va(b);case 5:a.m=null;case 3:a.g=null,a.J.clear(),a.u=null,a.A=new Map,a.h=null,a.
|
|
245
|
-
function Hh(a,b,c){a.
|
|
243
|
+
function Bh(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&Bh(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=Bh(b,!1,!0),d.appendChild(c);return d}var Zg=new Map([]);function Ch(a){var b=this;this.G=a;this.J=new Set;this.m=this.u=null;this.ea=this.$=!1;this.K=0;this.g=null;this.F=new fd;this.i=new Map;this.A=new Map;this.l=new eg;this.h=null;this.s=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.Y=new Map;this.ba=new Map;this.N=new Ob(function(){return Dh(b)});this.R=!1;this.O=[];this.S=!1;this.L=new Ob(function(){Eh(b)});this.l.catch(function(){});this.j=new Bg(function(){return Fh(b)});this.Z=!1;this.H=this.I=null}q=Ch.prototype;q.destroy=function(){return this.j.destroy()};
|
|
244
|
+
function Fh(a){return O(function(b){switch(b.g){case 1:return a.F.release(),a.F=null,a.l.reject(),a.L.stop(),a.L=null,a.N.stop(),a.N=null,E(b,Gh(a),2);case 2:if(!a.m){b.B(3);break}sa(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:va(b);case 5:a.m=null;case 3:a.g=null,a.J.clear(),a.u=null,a.A=new Map,a.h=null,a.s=function(){},a.G=null,a.Z=!1,a.I=null,F(b)}})}q.configure=function(a){this.h=a;this.L&&this.L.xa(this.h.updateExpirationTime)};
|
|
245
|
+
function Hh(a,b,c){a.ea=!0;a.A=new Map;a.R=c;return Ih(a,b)}function Jh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.R=0<a.A.size;return Ih(a,b)}
|
|
246
246
|
function Kh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Lh(a,g,[])}
|
|
247
247
|
function Ih(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z;return O(function(y){if(1==y.g){if(c=Mh(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=Dg(a.h.servers),Nh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Oh(m),p=t(n),r=p.next();!r.done;r=p.next())u=r.value,k.add(u);v=t(k);for(r=v.next();!r.done;r=
|
|
248
|
-
v.next())w=r.value,Ph(w,Dg(a.h.servers),Dg(a.h.advanced||{}),a.h.keySystemsMapping);return E(y,af(b,a.
|
|
249
|
-
function Qh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.I){c.B(2);break}return E(c,a.I,3);case 3:return Cg(a.j),c.return();case 2:return sa(c,4),a.I=a.m.setMediaKeys(a.u),E(c,a.I,6);case 6:ua(c,5);break;case 4:b=va(c),a.
|
|
250
|
-
q.wc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.u)return b.F.na(a,"encrypted",function(){b.
|
|
251
|
-
b.A.size?E(c,Qh(b),2):c.B(2)}Uh(b).catch(function(){});b.H||b.A.size||b.h.parseInbandPsshEnabled||b.F.
|
|
248
|
+
v.next())w=r.value,Ph(w,Dg(a.h.servers),Dg(a.h.advanced||{}),a.h.keySystemsMapping);return E(y,af(b,a.R,a.Z,a.h.preferredKeySystems),2)}A=g||Object.keys(a.h.servers).length;if(!A)return a.$=!0,y.return(Promise.resolve());z=Lh(a,void 0,b);return y.return(g?z:z.catch(function(){}))})}
|
|
249
|
+
function Qh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.I){c.B(2);break}return E(c,a.I,3);case 3:return Cg(a.j),c.return();case 2:return sa(c,4),a.I=a.m.setMediaKeys(a.u),E(c,a.I,6);case 6:ua(c,5);break;case 4:b=va(c),a.s(new U(2,6,6003,b.message));case 5:Cg(a.j),F(c)}})}function Rh(a,b){return O(function(c){if(1==c.g)return E(c,Qh(a),2);Sh(a,b.initDataType,Fb(b.initData));F(c)})}
|
|
250
|
+
q.wc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.u)return b.F.na(a,"encrypted",function(){b.s(new U(2,6,6010))}),c.return();b.m=a;b.F.na(b.m,"play",function(){for(var d=t(b.O),e=d.next();!e.done;e=d.next())Th(b,e.value);b.S=!0;b.O=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.F.o(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Gh(b)});b.H=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.H||"com.apple.fps"!==b.g.keySystem||
|
|
251
|
+
b.A.size?E(c,Qh(b),2):c.B(2)}Uh(b).catch(function(){});b.H||b.A.size||b.h.parseInbandPsshEnabled||b.F.o(b.m,"encrypted",function(d){return Rh(b,d)});F(c)})};
|
|
252
252
|
function Vh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=tg([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.G.bc.request(5,b);return E(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);ua(g,4);break;case 3:throw e=va(g),new U(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
253
253
|
sa(g,6);return E(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=va(g),new U(2,6,6004,f.message);}})}function Wh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Xh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Cb=new eg,d.push(e.Cb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);F(f)})}
|
|
254
254
|
function Uh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.B(2);a.A.forEach(function(h,k){Xh(a,k,h)});return E(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Yh(a))return g.return(a.l);a.l=new eg;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Sh(a,f.initDataType,f.initData);Zh(a)&&a.l.resolve();return g.return(a.l)})}
|
|
255
255
|
function Sh(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Zh(a)&&(a.l.resolve(),a.l=new eg,a.l.catch(function(){}));$h(a,b,c,a.g.sessionType)}}function ai(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function bi(a){a=a.i.keys();a=hb(a,function(b){return b.sessionId});return Array.from(a)}
|
|
256
|
-
q.kg=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.Nd=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.Fe=function(){return Eg(this.
|
|
256
|
+
q.kg=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.Nd=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.Fe=function(){return Eg(this.ba)};
|
|
257
257
|
function Lh(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(z){switch(z.g){case 1:d=new Map;if(c.length){e=ci(a,c,d);z.B(2);break}return E(z,di(a,b),3);case 3:e=z.h;case 2:f=e;if(!f)throw new U(2,6,6001);Cg(a.j);sa(z,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 y=
|
|
258
|
-
f.keySystem;var B=d.get(f.keySystem);var C=[],D=[],G=[],K=[],I=[],J=new Set;ei(B,C,D,K,G,I,J);var H=a.
|
|
258
|
+
f.keySystem;var B=d.get(f.keySystem);var C=[],D=[],G=[],K=[],I=[],J=new Set;ei(B,C,D,K,G,I,J);var H=a.R?"persistent-license":"temporary";y={keySystem:y,encryptionScheme:C[0],licenseServerUri:D[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||H,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:K[0],serverCertificateUri:G[0],initData:I,keyIds:J};B=t(B);
|
|
259
259
|
for(C=B.next();!C.done;C=B.next())C=C.value,C.distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(y.persistentStateRequired=C.persistentStateRequired);B=y}else B=f.keySystem,y=b.get(f.keySystem),C=[],D=[],G=[],K=[],I=[],J=new Set,ei(y.drmInfos,C,D,K,G,I,J),B={keySystem:B,encryptionScheme:C[0],licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,
|
|
260
260
|
sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:K[0],serverCertificateUri:G[0],initData:I,keyIds:J};a.g=B;if(!a.g.licenseServerUri)throw new U(2,6,6012,a.g.keySystem);return E(z,f.createMediaKeys(),6);case 6:u=z.h;Cg(a.j);a.u=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.u)){z.B(7);break}sa(z,8);return E(z,a.u.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
|
|
261
|
-
10);case 10:v=z.h;if("usable"!=v)throw new U(2,6,6018);Cg(a.j);ua(z,7,4);break;case 8:w=va(z,4);if(w instanceof U)throw w;throw new U(2,6,6019,w.message);case 7:return a
|
|
261
|
+
10);case 10:v=z.h;if("usable"!=v)throw new U(2,6,6018);Cg(a.j);ua(z,7,4);break;case 8:w=va(z,4);if(w instanceof U)throw w;throw new U(2,6,6019,w.message);case 7:return a.$=!0,E(z,Vh(a),11);case 11:Cg(a.j);ua(z,0);break;case 4:A=va(z);Cg(a.j,A);a.g=null;a.J.clear();if(A instanceof U)throw A;throw new U(2,6,6002,A.message);}})}
|
|
262
262
|
function ci(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Oh(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={zf:d.zf},e=a.next())for(d.zf=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==
|
|
263
263
|
l.zf}}(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}
|
|
264
264
|
function di(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(1==b.size&&b.has(""))throw new U(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){A.B(4);break}k=h.value;if(!b.has(k)){A.B(3);break}l=b.get(k);sa(A,6);return E(A,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
265
265
|
A.h,A.return(c);case 6:va(A);case 7:Cg(a.j);case 3:h=g.next();A.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){A.B(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();A.B(9);break}u=h.value;v=b.get(u);w=v.drmInfos.some(function(z){return!!z.licenseServerUri});if(w!=p){A.B(13);break}sa(A,15);return E(A,navigator.requestMediaKeySystemAccess(u,[v]),17);case 17:return c=A.h,A.return(c);case 15:va(A);case 16:Cg(a.j);case 13:h=r.next();A.B(12);break;case 11:return A.return(c)}})}
|
|
266
|
-
function Mh(a){a=Dg(a.h.clearKeys);return 0==a.size?null:Fc(a)}function fi(a){Zh(a)&&a.l.resolve()}function gi(a,b){(new Ob(function(){b.loaded=!0;fi(a)})).
|
|
267
|
-
function Xh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.u.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.
|
|
268
|
-
d.load(b),4);case 4:return g=m.h,Cg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.
|
|
269
|
-
function $h(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.
|
|
270
|
-
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.
|
|
266
|
+
function Mh(a){a=Dg(a.h.clearKeys);return 0==a.size?null:Fc(a)}function fi(a){Zh(a)&&a.l.resolve()}function gi(a,b){(new Ob(function(){b.loaded=!0;fi(a)})).U(hi)}
|
|
267
|
+
function Xh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.u.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.F.o(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(n):Th(a,n)});a.F.o(d,"keystatuseschange",function(n){return ii(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Gg:Infinity,Cb:null,type:"persistent-license"};a.i.set(d,f);sa(m,2);return E(m,
|
|
268
|
+
d.load(b),4);case 4:return g=m.h,Cg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.s(new U(h,6,6013)),f.loaded=!0),gi(a,f),fi(a),m.return(d);case 2:k=va(m),Cg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.s(new U(l,6,6005,k.message)),f.loaded=!0,fi(a);case 3:return m.return(Promise.resolve())}})}
|
|
269
|
+
function $h(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.s(new U(2,6,6005,f.message));return}a.F.o(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(f):Th(a,f)});a.F.o(e,"keystatuseschange",function(f){return ii(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Gg:Infinity,Cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof U||(b=new U(2,6,6016,f));a.s(b);return}a.h.logLicenseExchange&&yc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
270
|
+
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.s(new U(2,6,6006,f.message,f,h))}})}
|
|
271
271
|
function Th(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&yc(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=tg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
|
|
272
272
|
f.headers[h];if(ai(a.g.keySystem)){var A=pc(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Wg(A,"PlayReadyKeyMessage");var z=gh(A,"HttpHeader");z=t(z);for(var y=z.next();!y.done;y=z.next()){var B=y.value;y=gh(B,"name")[0];B=gh(B,"value")[0];g.headers[eh(y)]=eh(B)}A=gh(A,"Challenge")[0];g.body=zc(eh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();sa(w,2);m=a.G.bc.request(2,g);return E(w,m.promise,4);case 4:l=w.h;ua(w,3);break;case 2:n=va(w);if(a.j.g)return w.return();
|
|
273
|
-
p=new U(2,6,6007,n);1==a.i.size?(a.
|
|
273
|
+
p=new U(2,6,6007,n);1==a.i.size?(a.s(p),d&&d.Cb&&d.Cb.reject(p)):(d&&d.Cb&&d.Cb.reject(p),a.i.delete(c),Zh(a)&&(a.l.resolve(),a.N.U(.1)));return w.return();case 3:if(a.j.g)return w.return();a.K+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&yc(l.data);sa(w,5);return E(w,c.update(l.data),7);case 7:ua(w,6);break;case 5:return r=va(w),u=new U(2,6,6008,r.message),a.s(u),d&&d.Cb&&d.Cb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new T("drmsessionupdate");a.G.onEvent(v);d&&(d.Cb&&d.Cb.resolve(),
|
|
274
274
|
gi(a,d));F(w)}})}
|
|
275
|
-
function ii(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(ai(a.g.keySystem)&&16==g.byteLength&&(Sb()||ec())){h=Kb(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=Bc(g).slice(0,32);a.
|
|
276
|
-
(a.l.resolve(),a.N.
|
|
275
|
+
function ii(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(ai(a.g.keySystem)&&16==g.byteLength&&(Sb()||ec())){h=Kb(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=Bc(g).slice(0,32);a.Y.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Cb&&(a.i.delete(b),b.close().catch(function(){}));Zh(a)&&
|
|
276
|
+
(a.l.resolve(),a.N.U(ji))}function Dh(a){var b=a.Y,c=a.ba;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.s(new U(2,6,6014));a.G.We(Eg(c))}
|
|
277
277
|
function ki(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I;return O(function(J){if(1==J.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready 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":c,"com.microsoft.playready.recommendation":c,"com.chromecast.playready":c};
|
|
278
278
|
e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(H,L){var M,N,Q,S,R,la,za,Na;return O(function(Da){switch(Da.g){case 1:return sa(Da,2),E(Da,L.createMediaKeys(),4);case 4:ua(Da,3);break;case 2:return va(Da),Da.return();case 3:N=
|
|
279
279
|
(M=L.getConfiguration().sessionTypes)?M.includes("persistent-license"):!1,Xb()&&(N=!1),Q=L.getConfiguration().videoCapabilities,S=L.getConfiguration().audioCapabilities,R={persistentState:N,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(H)&&k.get(H)?R=k.get(H):k.set(H,R),(la=Q[0].encryptionScheme)&&!R.encryptionSchemes.includes(la)&&R.encryptionSchemes.push(la),(za=Q[0].robustness)&&!R.videoRobustnessLevels.includes(za)&&R.videoRobustnessLevels.push(za),(Na=S[0].robustness)&&
|
|
280
280
|
!R.audioRobustnessLevels.includes(Na)&&R.audioRobustnessLevels.push(Na),F(Da)}})};m=function(H,L,M,N){var Q,S,R,la,za,Na,Da,Oa,Va;return O(function(Ia){switch(Ia.g){case 1:sa(Ia,2);Q=Pe(g);S=t(Q.videoCapabilities);for(R=S.next();!R.done;R=S.next())la=R.value,la.encryptionScheme=L,la.robustness=M;za=t(Q.audioCapabilities);for(R=za.next();!R.done;R=za.next())Na=R.value,Na.encryptionScheme=L,Na.robustness=N;Da=Pe(Q);Da.persistentState="required";Da.sessionTypes=["persistent-license"];Oa=[Da,Q];return E(Ia,
|
|
281
281
|
navigator.requestMediaKeySystemAccess(H,Oa),4);case 4:return Va=Ia.h,E(Ia,l(H,Va),5);case 5:ua(Ia,0);break;case 2:va(Ia),F(Ia)}})};n=function(H,L,M,N){var Q,S,R;return O(function(la){switch(la.g){case 1:return sa(la,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:H,video:{encryptionScheme:L,robustness:M},audio:{encryptionScheme:L,robustness:N}}},
|
|
282
282
|
E(la,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return S=la.h,R=S.keySystemAccess,E(la,l(H,R),5);case 5:ua(la,0);break;case 2:va(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(z=A.value,y=t(a),r=y.next();!r.done;r=y.next())B=r.value,"org.w3.clearkey"===B&&hc()||(v.push(m(B,z,"","")),v.push(n(B,z,"","")));C=t(a);for(r=C.next();!r.done;r=C.next())for(D=r.value,G=t(d[D]||[]),K=G.next();!K.done;K=G.next())I=K.value,
|
|
283
|
-
v.push(m(D,null,I,"")),v.push(m(D,null,"",I)),v.push(n(D,null,I,"")),v.push(n(D,null,"",I));return E(J,Promise.all(v),2)}return J.return(Eg(k))})}function li(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Ob(e)).
|
|
284
|
-
function Gh(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 sa(g,2),a.
|
|
283
|
+
v.push(m(D,null,I,"")),v.push(m(D,null,"",I)),v.push(n(D,null,I,"")),v.push(n(D,null,"",I));return E(J,Promise.all(v),2)}return J.return(Eg(k))})}function li(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Ob(e)).U(mi)}),sa(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);va(c);F(c)})}
|
|
284
|
+
function Gh(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 sa(g,2),a.ea||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,li(e),5):E(g,e.remove(),5);if(2!=g.g)return ua(g,0);va(g);F(g)})})),0)})}function ni(a,b){return a.length&&b.length&&a!==b?0<oi(a,b).length:!0}
|
|
285
285
|
function oi(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||
|
|
286
286
|
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}
|
|
287
|
-
function Oh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Eh(a){a.i.forEach(function(b,c){var d=b.Gg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Gg=e)})}function Zh(a){a=a.i.values();return ib(a,function(b){return b.loaded})}function Yh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.
|
|
287
|
+
function Oh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Eh(a){a.i.forEach(function(b,c){var d=b.Gg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Gg=e)})}function Zh(a){a=a.i.values();return ib(a,function(b){return b.loaded})}function Yh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Y.get(c.value))return!1;return!0}
|
|
288
288
|
function Nh(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)}
|
|
289
289
|
function ei(a,b,c,d,e,f,g){var h=[],k={};a=t(a);for(var l=a.next();!l.done;k={Ba:k.Ba},l=a.next()){k.Ba=l.value;b.includes(k.Ba.encryptionScheme)||b.push(k.Ba.encryptionScheme);"org.w3.clearkey"==k.Ba.keySystem&&k.Ba.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(k.Ba.licenseServerUri)||h.push(k.Ba.licenseServerUri):c.includes(k.Ba.licenseServerUri)||c.push(k.Ba.licenseServerUri);e.includes(k.Ba.serverCertificateUri)||e.push(k.Ba.serverCertificateUri);k.Ba.serverCertificate&&
|
|
290
290
|
(d.some(function(p){return function(r){return Db(r,p.Ba.serverCertificate)}}(k))||d.push(k.Ba.serverCertificate));if(k.Ba.initData){l={};for(var m=t(k.Ba.initData),n=m.next();!n.done;l={oe:l.oe},n=m.next())l.oe=n.value,f.some(function(p){return function(r){var u=p.oe;return r.keyId&&r.keyId==u.keyId?!0:r.initDataType==u.initDataType&&Db(r.initData,u.initData)}}(l))||f.push(l.oe)}if(k.Ba.keyIds)for(l=t(k.Ba.keyIds),m=l.next();!m.done;m=l.next())g.add(m.value)}if(1==h.length)c.push(h[0]);else if(0<
|
|
@@ -299,18 +299,18 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
299
299
|
function ri(a,b,c){this.h=a;this.i=b;this.g=c}function si(a,b){return O(function(c){if(1==c.g)return E(c,Xe(a.g,b,a.h.drm.preferredKeySystems),2);Se(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(wf))throw new U(2,4,4032);return c.return(ti(a,b))})}
|
|
300
300
|
function ti(a,b){var c=We(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,ui(a,d.keySystem,f.video),ui(a,d.keySystem,f.audio);vi(a,b)}return c}function ui(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,Sh(a.g,e.initDataType,e.initData)}}}
|
|
301
301
|
function vi(a,b){a=a.g?a.g.Fe():{};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?wi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
302
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var wi=["output-restricted","internal-error"];function xi(){}function yi(a,b){if(b){var c=zi[b.toLowerCase()];if(c)return c}throw new U(2,4,4E3,a,b);}P("shaka.media.ManifestParser",xi);xi.unregisterParserByMime=function(a){delete zi[a]};xi.registerParserByMime=function(a,b){zi[a]=b};xi.registerParserByExtension=function(){od("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};xi.AccessibilityPurpose={Hl:"visually impaired",Tk:"hard of hearing"};var zi={};function Ai(a){function
|
|
303
|
-
function(l){
|
|
304
|
-
a=Bi(a,
|
|
302
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var wi=["output-restricted","internal-error"];function xi(){}function yi(a,b){if(b){var c=zi[b.toLowerCase()];if(c)return c}throw new U(2,4,4E3,a,b);}P("shaka.media.ManifestParser",xi);xi.unregisterParserByMime=function(a){delete zi[a]};xi.registerParserByMime=function(a,b){zi[a]=b};xi.registerParserByExtension=function(){od("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};xi.AccessibilityPurpose={Hl:"visually impaired",Tk:"hard of hearing"};var zi={};function Ai(a,b){function c(){e=!0}function d(l){g.push(l);Ng(l)}a=Fb(a);var e=!1,f,g=[],h=[];(new Ig).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).V("stsd",function(l){f=l;g.push(l);Pg(l)}).V("encv",c).V("enca",c).V("dvav",function(l){h.push({box:l,Ab:1701733238})}).V("dva1",function(l){h.push({box:l,Ab:1701733238})}).V("dvh1",function(l){h.push({box:l,Ab:1701733238})}).V("dvhe",function(l){h.push({box:l,Ab:1701733238})}).V("hev1",function(l){h.push({box:l,Ab:1701733238})}).V("hvc1",
|
|
303
|
+
function(l){h.push({box:l,Ab:1701733238})}).V("avc1",function(l){h.push({box:l,Ab:1701733238})}).V("avc3",function(l){h.push({box:l,Ab:1701733238})}).V("ac-3",function(l){h.push({box:l,Ab:1701733217})}).V("ec-3",function(l){h.push({box:l,Ab:1701733217})}).V("ac-4",function(l){h.push({box:l,Ab:1701733217})}).V("mp4a",function(l){h.push({box:l,Ab:1701733217})}).parse(a);if(e)return a;if(0==h.length||!f)throw eb(Bc(a)),new U(2,3,3019,b);h.reverse();b=t(h);for(var k=b.next();!k.done;k=b.next())k=k.value,
|
|
304
|
+
a=Bi(a,f,k.box,g,k.Ab);return a}
|
|
305
305
|
function Bi(a,b,c,d,e){var f=Ci.value(),g=a.subarray(c.start,c.start+c.size),h=Kb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Kb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Di(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Ub()?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,Di(e,d.start,d.size+k.byteLength);k=Kb(e,b.start);b=Og(b);a=k.getUint32(b);
|
|
306
|
-
k.setUint32(b,a+1);return e}function Di(a,b,c){a=Kb(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 Ci=new Mb(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 Ei(a,b,c,d,e,f,g){this.
|
|
306
|
+
k.setUint32(b,a+1);return e}function Di(a,b,c){a=Kb(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 Ci=new Mb(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 Ei(a,b,c,d,e,f,g){this.P=a;this.Va=b;this.za=c;this.Dg=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}Ei.prototype.Nb=function(){return this.Va};Ei.prototype.Lb=function(){return this.za};Ei.prototype.Qd=function(){return this.g};function Fi(a,b){return a===b?!0:a&&b?a.Nb()==b.Nb()&&a.Lb()==b.Lb()&&Bd(a.P().sort(),b.P().sort())&&Db(a.Qd(),b.Qd()):a==b}P("shaka.media.InitSegmentReference",Ei);
|
|
307
307
|
Ei.prototype.getEndByte=Ei.prototype.Lb;Ei.prototype.getStartByte=Ei.prototype.Nb;
|
|
308
|
-
function Gi(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?Hi:r;this.startTime=a;this.i=this.endTime=b;this.G=c;this.Va=d;this.za=e;this.sa=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.j=0;this.
|
|
309
|
-
a.next())b.value.Ph();this.
|
|
308
|
+
function Gi(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?Hi:r;this.startTime=a;this.i=this.endTime=b;this.G=c;this.Va=d;this.za=e;this.sa=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.j=0;this.s=void 0===v?!1:v;this.Oe=this.ce=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
309
|
+
a.next())b.value.Ph();this.s&&this.g.length&&this.g[this.g.length-1].Oh();this.F=this.mimeType=this.codecs=null}q=Gi.prototype;q.P=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.Yi=function(){return this.endTime};q.Nb=function(){return this.Va};q.Lb=function(){return this.za};q.qj=function(){return this.tilesLayout};q.pj=function(){return this.A};q.Cc=function(){return this.status};q.Nj=function(){this.status=Ii};q.Cg=function(){this.preload=!0};q.Fj=function(){return this.preload};
|
|
310
310
|
q.Qe=function(){this.l=!1};q.Cj=function(){return this.l};q.Ph=function(){this.ce=!0};q.Ej=function(){return this.ce};q.Oh=function(){this.Oe=!0};q.Dj=function(){return this.Oe};q.Nh=function(){this.m=!0};q.yj=function(){return this.m};q.di=function(a){this.u=a};q.oj=function(){return this.u};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=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.i+=a};
|
|
311
311
|
q.$g=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.wk=function(a){this.F=a};q.Qd=function(){return this.F};function Ji(a,b){a.sa=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ji(c.value,b)}P("shaka.media.SegmentReference",Gi);Gi.prototype.getSegmentData=Gi.prototype.Qd;Gi.prototype.setSegmentData=Gi.prototype.wk;Gi.prototype.syncAgainst=Gi.prototype.$g;Gi.prototype.offset=Gi.prototype.offset;
|
|
312
312
|
Gi.prototype.getThumbnailSprite=Gi.prototype.oj;Gi.prototype.setThumbnailSprite=Gi.prototype.di;Gi.prototype.hasByterangeOptimization=Gi.prototype.yj;Gi.prototype.markAsByterangeOptimization=Gi.prototype.Nh;Gi.prototype.isLastPartial=Gi.prototype.Dj;Gi.prototype.markAsLastPartial=Gi.prototype.Oh;Gi.prototype.isPartial=Gi.prototype.Ej;Gi.prototype.markAsPartial=Gi.prototype.Ph;Gi.prototype.isIndependent=Gi.prototype.Cj;Gi.prototype.markAsNonIndependent=Gi.prototype.Qe;Gi.prototype.isPreload=Gi.prototype.Fj;
|
|
313
|
-
Gi.prototype.markAsPreload=Gi.prototype.Cg;Gi.prototype.markAsUnavailable=Gi.prototype.Nj;Gi.prototype.getStatus=Gi.prototype.Cc;Gi.prototype.getTileDuration=Gi.prototype.pj;Gi.prototype.getTilesLayout=Gi.prototype.qj;Gi.prototype.getEndByte=Gi.prototype.Lb;Gi.prototype.getStartByte=Gi.prototype.Nb;Gi.prototype.getEndTime=Gi.prototype.Yi;Gi.prototype.getStartTime=Gi.prototype.getStartTime;Gi.prototype.getUris=Gi.prototype.
|
|
313
|
+
Gi.prototype.markAsPreload=Gi.prototype.Cg;Gi.prototype.markAsUnavailable=Gi.prototype.Nj;Gi.prototype.getStatus=Gi.prototype.Cc;Gi.prototype.getTileDuration=Gi.prototype.pj;Gi.prototype.getTilesLayout=Gi.prototype.qj;Gi.prototype.getEndByte=Gi.prototype.Lb;Gi.prototype.getStartByte=Gi.prototype.Nb;Gi.prototype.getEndTime=Gi.prototype.Yi;Gi.prototype.getStartTime=Gi.prototype.getStartTime;Gi.prototype.getUris=Gi.prototype.P;var Hi=0,Ii=1;Gi.Status={Gk:Hi,Fl:Ii,Zk:2};function Ki(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Li(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Mi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Ni(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}
|
|
314
314
|
function Oi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ni(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ni(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};/*
|
|
315
315
|
@license
|
|
316
316
|
Shaka Player
|
|
@@ -322,9 +322,9 @@ function Ti(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
322
322
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=oc(Fb(a.data,1,d));a=oc(Fb(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=oc(Fb(a.data,1,d));a=oc(Fb(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=oc(Fb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
323
323
|
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=Gb(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=oc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=oc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Gb(a.data),b):null}
|
|
324
324
|
function Ui(a){for(var b=0,c=[];Qi(a,b);){var d=Si(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=Si(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ti(e))&&c.push(f);b+=e.size+10}Ri(a,b)&&(b+=10)}return c}function Vi(a,b){for(var c=b=void 0===b?0:b,d=0;Qi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Si(a,b+6),Ri(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}P("shaka.util.Id3Utils",Pi);Pi.getID3Data=Vi;
|
|
325
|
-
Pi.getID3Frames=Ui;function Wi(a,b){var c=null,d=null,e=null,f=a.
|
|
326
|
-
function Zi(a,b,c){var d=a.
|
|
327
|
-
function $i(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.
|
|
325
|
+
Pi.getID3Frames=Ui;function Wi(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,wh:c,Mi:d,Jl:e}}function Xi(a,b){return 1==b?(b=a.T(),a=a.T(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.T()}}function Yi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.T();a.skip(4);a=a.Ka();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
326
|
+
function Zi(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={Ng:null,sampleSize:null,cf:null};c&256&&(h.Ng=a.T());c&512&&(h.sampleSize=a.T());c&1024&&a.skip(4);c&2048&&(h.cf=0==b?a.T():a.Th());e.push(h)}return{Nl:d,Wh:e,Li:f}}
|
|
327
|
+
function $i(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.T();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ka()+a.Ka()/16;a=a.Ka()+a.Ka()/16;return{trackId:c,width:b,height:a}}function aj(a){a=a.T();return{cb:Mg(a)}}function bj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function cj(a){return(10>a?"0":"")+a};/*
|
|
328
328
|
|
|
329
329
|
Copyright Brightcove, Inc.
|
|
330
330
|
|
|
@@ -340,16 +340,16 @@ function $i(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.S();1=
|
|
|
340
340
|
See the License for the specific language governing permissions and
|
|
341
341
|
limitations under the License.
|
|
342
342
|
*/
|
|
343
|
-
function dj(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=Fb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function ej(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Fg(c,0)).
|
|
343
|
+
function dj(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=Fb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function ej(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Fg(c,0)).T(),a.g=8*d,a.i-=d)}function fj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;ej(a)}a.h<<=b;a.g-=b}
|
|
344
344
|
function gj(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&&ej(a);c=b-c;return 0<c?d<<c|gj(a,c):d}function kj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;ej(a);return b+kj(a)}function lj(a){fj(a,1+kj(a))}function V(a){var b=kj(a);return gj(a,b+1)-1}function mj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function nj(a){return 1===gj(a,1)}function oj(a){return gj(a,8)}
|
|
345
|
-
function pj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=mj(a),d=(c+d+256)%256),c=0===d?c:d}function qj(a){oj(a);V(a);return V(a)}P("shaka.util.ExpGolomb",dj);function rj(){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.
|
|
345
|
+
function pj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=mj(a),d=(c+d+256)%256),c=0===d?c:d}function qj(a){oj(a);V(a);return V(a)}P("shaka.util.ExpGolomb",dj);function rj(){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.s=this.u=null}q=rj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
346
346
|
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,sj(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,Le:-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<
|
|
347
347
|
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=qc(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=
|
|
348
348
|
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.H={channelCount:0===(u&15)?2:u&15,Gi: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.Le&&(g.Le=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");
|
|
349
349
|
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.K=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.F=f.audio,this.A=f.audioCodec);-1!=f.Le&&(this.G=f.Le);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.F:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
350
350
|
break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
351
|
-
function tj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=uj(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.
|
|
352
|
-
a.
|
|
351
|
+
function tj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=uj(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=uj(d,
|
|
352
|
+
a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.Tj=function(a){od("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Jg(a)};
|
|
353
353
|
q.Jg=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Cc(b.data,p),b.fullData=Cc(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Cc(b.data,k),b.fullData=Cc(b.fullData,k)));if(n>=e-f)return h;
|
|
354
354
|
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Cc(b.data,a),b.fullData=Cc(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Cc.apply(wc,x(c.value)),(c=tj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Ui(c.data),dts:c.dts,pts:c.pts});return a};
|
|
355
355
|
q.jc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Cc.apply(wc,x(c.value)),e=tj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Cc(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
@@ -361,117 +361,118 @@ n=0;nj(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)
|
|
|
361
361
|
function vj(a){var b={height:null,width:null,cb:null};a=a.Je();if(!a.length)return b;a=a.find(function(B){return 33==B.type});if(!a)return b;var c=new dj(a.fullData,!0);oj(c);oj(c);gj(c,4);var d=gj(c,3);nj(c);var e=gj(c,2),f=gj(c,1),g=gj(c,5),h=gj(c,32);a=oj(c);for(var k=oj(c),l=oj(c),m=oj(c),n=oj(c),p=oj(c),r=oj(c),u=[],v=[],w=0;w<d;w++)u.push(nj(c)),v.push(nj(c));if(0<d)for(w=d;8>w;w++)gj(c,2);for(w=0;w<d;w++)u[w]&&gj(c,88),v[w]&&oj(c);V(c);d=V(c);3==d&&gj(c,1);u=V(c);v=V(c);var A=w=0,z=0,y=0;nj(c)&&
|
|
362
362
|
(w+=V(c),A+=V(c),z+=V(c),y+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(z+y)*(1===d?2:1));c=function(B){for(var C=0,D=0;32>D;D++)C|=(B>>D&1)<<31-D;return C>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+r;p&&(e+="."+p.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
363
363
|
a.toString(16).toUpperCase());b.cb=e;return b}function uj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function yj(a){return 0>sj(a)?!1:!0}function sj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}P("shaka.util.TsParser",rj);rj.syncOffset=sj;rj.probe=yj;rj.prototype.getVideoInfo=rj.prototype.qg;rj.prototype.getVideoResolution=rj.prototype.vj;rj.prototype.getVideoNalus=rj.prototype.Je;
|
|
364
|
-
rj.prototype.getCodecs=rj.prototype.Md;rj.prototype.getStartTime=rj.prototype.getStartTime;rj.prototype.getVideoData=rj.prototype.cd;rj.prototype.getAudioData=rj.prototype.jc;rj.prototype.getMetadata=rj.prototype.getMetadata;rj.prototype.parseNalus=rj.prototype.Jg;rj.prototype.parseAvcNalus=rj.prototype.Tj;rj.prototype.parse=rj.prototype.parse;rj.prototype.clearData=rj.prototype.clearData;rj.Timescale=9E4;var xj=[100,110,122,244,44,83,86,118,128,138,139,134];function zj(a,b,c){this.g=null;this.
|
|
364
|
+
rj.prototype.getCodecs=rj.prototype.Md;rj.prototype.getStartTime=rj.prototype.getStartTime;rj.prototype.getVideoData=rj.prototype.cd;rj.prototype.getAudioData=rj.prototype.jc;rj.prototype.getMetadata=rj.prototype.getMetadata;rj.prototype.parseNalus=rj.prototype.Jg;rj.prototype.parseAvcNalus=rj.prototype.Tj;rj.prototype.parse=rj.prototype.parse;rj.prototype.clearData=rj.prototype.clearData;rj.Timescale=9E4;var xj=[100,110,122,244,44,83,86,118,128,138,139,134];function zj(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&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,od("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"),
|
|
365
365
|
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 Aj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
366
|
-
zj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Bj(a,b,c){var d=Cj,e=Dj;switch(b.mimeType){case "video/webm":d=Ej;break;case "video/mp4":d=Fj}switch(c){case "DASH":e=Gj;break;case "HLS":e=Hj}a.g&&(a.
|
|
367
|
-
function Jj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o
|
|
368
|
-
function Mj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g)return a.createSegmentIndex?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=Lc;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.Ca){if(m=le(h,k),!Fe(m))return r.return(!1)}else if(b==c.ua?k=df(k):b==c
|
|
366
|
+
zj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Bj(a,b,c){var d=Cj,e=Dj;switch(b.mimeType){case "video/webm":d=Ej;break;case "video/mp4":d=Fj}switch(c){case "DASH":e=Gj;break;case "HLS":e=Hj}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",zj);zj.prototype.release=zj.prototype.release;var Cj=0,Ej=1,Fj=2,Hj=0,Gj=1,Dj=-1;function Ij(a,b,c,d){var e=this;this.i=a;this.A=null;this.H=b;this.h={};this.I={};this.oa={};this.g=null;this.Z=!1;this.ra=c||function(){};this.R=d||null;this.j={};this.s=new fd;this.m={};this.J=null;this.N=new eg;this.O="";this.$=!1;this.l=Jj(this,this.N);this.G=!1;this.K=new Bg(function(){return Kj(e)});this.F=!1;this.Y="UNKNOWN";this.ya=this.qa=!1;this.ea=new eg;this.u=!1;this.ba=!0;this.L=this.S=null}
|
|
367
|
+
function Jj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.o(c,"startstreaming",function(){a.ba=!0});a.s.o(c,"endstreaming",function(){a.ba=!1});a.s.na(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.s.na(a.i,"playing",function(){a.$=!0});a.O=Lj(c);a.i.src=a.O;return c}c=new MediaSource;a.s.na(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.s.na(a.i,"playing",function(){a.$=!0});a.O=Lj(c);a.i.src=a.O;return c}
|
|
368
|
+
function Mj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g)return a.createSegmentIndex?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=Lc;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.Ca){if(m=le(h,k),!Fe(m))return r.return(!1)}else if(b==c.ua?k=df(k):b==c.aa&&(k=ef(k,h)),n=
|
|
369
369
|
pe(a,h,k),p=ne(h,k),!kd(n)&&!fe(p))return r.return(!1);return r.return(!0)})}q=Ij.prototype;q.destroy=function(){return this.K.destroy()};
|
|
370
|
-
function Kj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(Ne)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new U(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.H&&b.push(a.H.destroy());for(k in a.m)b.push(a.m[k].destroy());return E(l,Promise.all(b),2)}a.
|
|
371
|
-
a.j={};a.
|
|
372
|
-
function Nj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:return e=Lc,f=Ra,g=Sa,E(w,Mj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=le(c.mimeType,d);if(b==e.Ca){Oj(a,h,a.F,c.external);w.B(0);break}k=a.A.forceTransmux;if(!kd(h)||!a.F&&me.includes(h))k=!0;l=ne(c.mimeType,d);if(!k){w.B(4);break}m=Hc(e
|
|
373
|
-
Nj(a,e.ua,c,n),7);case 7:return w.return();case 5:if(p=fe(l))r=p(),a.m[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Cg(a.K);try{v=a.l.addSourceBuffer(u)}catch(A){throw new U(2,3,3015,A,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");}a.F&&(v.mode=Pj);a.o
|
|
374
|
-
q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
375
|
-
function Oj(a,b,c,d){a.g||(a.g=new Ee(a.H),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.
|
|
370
|
+
function Kj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(Ne)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new U(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.H&&b.push(a.H.destroy());for(k in a.m)b.push(a.m[k].destroy());return E(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.H=null;a.h={};a.m={};a.J=null;
|
|
371
|
+
a.j={};a.R=null;a.L=null;F(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Lc,E(m,e.N,2);case 2:e.F=b,e.Y=c,e.qa=d,e.ya=!e.F&&"HLS"==e.Y&&!e.qa,e.L=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.B(0);break}k=h.value;l=a.get(k);return E(m,Nj(e,k,l,l.codecs),6);case 6:e.u?(e.j[f.aa]=[],e.j[f.ua]=[]):e.j[k]=[],h=g.next(),m.B(3)}})};
|
|
372
|
+
function Nj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:return e=Lc,f=Ra,g=Sa,E(w,Mj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=le(c.mimeType,d);if(b==e.Ca){Oj(a,h,a.F,c.external);w.B(0);break}k=a.A.forceTransmux;if(!kd(h)||!a.F&&me.includes(h))k=!0;l=ne(c.mimeType,d);if(!k){w.B(4);break}m=Hc(e.aa,(d||"").split(","));n=Hc(e.ua,(d||"").split(","));if(!m||!n){w.B(5);break}a.u=!0;return E(w,Nj(a,e.aa,c,m),6);case 6:return E(w,
|
|
373
|
+
Nj(a,e.ua,c,n),7);case 7:return w.return();case 5:if(p=fe(l))r=p(),a.m[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Cg(a.K);try{v=a.l.addSourceBuffer(u)}catch(A){throw new U(2,3,3015,A,"The mediaSource_ status was "+a.l.readyState+" expected 'open'",null);}a.F&&(v.mode=Pj);a.s.o(v,"error",function(){var A=a.j[b][0];A.p.reject(new U(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.s.o(v,"updateend",function(){return Qj(a,b)});a.h[b]=v;a.I[b]=h;a.oa[b]=!!c.drmInfos.length;
|
|
374
|
+
F(w)}})}q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
375
|
+
function Oj(a,b,c,d){a.g||(a.g=new Ee(a.H),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.Z;a=a.Y;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Ge[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):od("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):od("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.F=d)}
|
|
376
376
|
function Rj(a){return a.G?!1:a.l?"ended"==a.l.readyState:!0}function Zj(a,b){a.G||!Object.keys(a.h).length?a=null:b==Jc?a=a.g.g:(a=ak(a,b),a=!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function bk(a,b){return a.G?null:b==Jc?a.g.h:Ki(ak(a,b))}function ck(a,b,c){if(a.G)return 0;if(b==Jc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=ak(a,b);return Mi(a,c)}
|
|
377
377
|
q.Kb=function(){var a={total:this.G?[]:Ni(this.i.buffered),audio:this.G?[]:Ni(ak(this,"audio")),video:this.G?[]:Ni(ak(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 ak(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
378
|
-
function dk(a,b,c,d,e,f){var g=null,h=Fb(c);if(me.includes(e))f=Ui(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.ra([{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.sa&&d.sa.timescale){var k=d.sa.timescale;if(!isNaN(k)){var l=0,m=!1;(new Ig).box("moof",Ng).box("traf",Ng).
|
|
378
|
+
function dk(a,b,c,d,e,f){var g=null,h=Fb(c);if(me.includes(e))f=Ui(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.ra([{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.sa&&d.sa.timescale){var k=d.sa.timescale;if(!isNaN(k)){var l=0,m=!1;(new Ig).box("moof",Ng).box("traf",Ng).V("tfdt",function(n){l=Xi(n.reader,
|
|
379
379
|
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!yj(h)||(a.L?a.L.clearData():a.L=new rj,h=a.L.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ra(h,f,d?d.endTime:null));return g}
|
|
380
|
-
function ek(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,A,z,y,B;return O(function(C){switch(C.g){case 1:m=Lc;if(b!=m.Ca){C.B(2);break}if(!a.F){C.B(3);break}return E(C,a.
|
|
381
|
-
case 6:if(!a.h[b])return C.return();p=a.h[b].timestampOffset;r=a.I[b];a.m[b]&&(r=a.m[b].getOriginalMimeType());d&&(u=dk(a,b,c,d,r,p),null!=u&&(v=d.startTime-u,w=Math.abs(p-v),(.001<=w||g||h)&&(!k||0<v||!p)&&(p=v,a.ya&&(fk(a,b,function(){return gk(a,b)}),fk(a,b,function(){return hk(a,b,p)}))),A=b==m.ua||!(m.ua in a.h),a.F&&A&&a.
|
|
382
|
-
h));if(!a.m[b]){C.B(9);break}return E(C,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=C.h;case 9:return c=ik(a,c,d?d.startTime:null,b),d&&a.F&&b!=m.Ca&&(g||h)&&(B=d.startTime,fk(a,b,function(){return gk(a,b)}),fk(a,b,function(){return hk(a,b,B)})),E(C,fk(a,b,function(){var D=c;if("video"==b&&a.
|
|
383
|
-
q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Lc,a==e.Ca?E(f,d.g.remove(b,c),0):E(f,fk(d,a,function(){return lk(d,a,b,c)}),4)):d.u?E(f,fk(d,e
|
|
384
|
-
q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Lc,a==c.Ca?d.return():E(d,fk(b,a,function(){b.i.currentTime-=.001;Qj(b,a)}),2)):b.u?E(d,fk(b,c
|
|
385
|
-
function nk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Lc;if(b==l.Ca)return f||(a.g.u=c),Ie(a.g,d,e),p.return();m=[];return E(p,ok(a,b,g,h,k),2)}n=p.h;n||(m.push(fk(a,b,function(){return gk(a,b)})),a.u&&m.push(fk(a,l
|
|
386
|
-
l
|
|
387
|
-
|
|
388
|
-
function
|
|
389
|
-
function
|
|
390
|
-
|
|
391
|
-
function
|
|
392
|
-
function
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
q.
|
|
399
|
-
q.
|
|
400
|
-
q.
|
|
380
|
+
function ek(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,A,z,y,B;return O(function(C){switch(C.g){case 1:m=Lc;if(b!=m.Ca){C.B(2);break}if(!a.F){C.B(3);break}return E(C,a.ea,4);case 4:n=C.h,a.g.u=n;case 3:return E(C,He(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.P()[0]:null),5);case 5:return C.return();case 2:if(l||!a.u){C.B(6);break}return E(C,ek(a,m.aa,c,d,e,f,g,h,k,!0),7);case 7:return E(C,ek(a,m.ua,c,d,e,f,g,h,k,!0),8);case 8:return C.return();
|
|
381
|
+
case 6:if(!a.h[b])return C.return();p=a.h[b].timestampOffset;r=a.I[b];a.m[b]&&(r=a.m[b].getOriginalMimeType());d&&(u=dk(a,b,c,d,r,p),null!=u&&(v=d.startTime-u,w=Math.abs(p-v),(.001<=w||g||h)&&(!k||0<v||!p)&&(p=v,a.ya&&(fk(a,b,function(){return gk(a,b)},null),fk(a,b,function(){return hk(a,b,p)},null))),A=b==m.ua||!(m.ua in a.h),a.F&&A&&a.ea.resolve(p)));f&&b==m.ua&&(a.g||Oj(a,"application/cea-608",a.F,!1),a.J||(z=r.split(";",1)[0],a.J=new vd(z)),d?(y=a.J.i(c),y.length&&Le(a.g,y,d.startTime,d.endTime,
|
|
382
|
+
p)):a.J.init(c,h));if(!a.m[b]){C.B(9);break}return E(C,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=C.h;case 9:return c=ik(a,c,d?d.startTime:null,b,d?d.P()[0]:null),d&&a.F&&b!=m.Ca&&(g||h)&&(B=d.startTime,fk(a,b,function(){return gk(a,b)},null),fk(a,b,function(){return hk(a,b,B)},null)),E(C,fk(a,b,function(){var D=c;if("video"==b&&a.R){var G=a.R;G.g&&G.g.appendBuffer(D,"video",G.s,-p)}a.h[b].appendBuffer(D)},d?d.P()[0]:null),11);case 11:F(C)}})}
|
|
383
|
+
function jk(a,b){var c=bk(a,"video")||0;Je(a.g,b,c)}function kk(a){a.g&&Je(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Lc,a==e.Ca?E(f,d.g.remove(b,c),0):E(f,fk(d,a,function(){return lk(d,a,b,c)},null),4)):d.u?E(f,fk(d,e.aa,function(){return lk(d,e.aa,b,c)},null),0):f.B(0)})};
|
|
384
|
+
function mk(a,b){var c;return O(function(d){return 1==d.g?(c=Lc,b==c.Ca?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,fk(a,b,function(){return lk(a,b,0,a.l.duration)},null),4)):a.u?E(d,fk(a,c.aa,function(){return lk(a,c.aa,0,a.l.duration)},null),0):d.B(0)})}q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Lc,a==c.Ca?d.return():E(d,fk(b,a,function(){b.i.currentTime-=.001;Qj(b,a)},null),2)):b.u?E(d,fk(b,c.aa,function(){var e=c.aa;b.i.currentTime-=.001;Qj(b,e)},null),0):d.B(0)})};
|
|
385
|
+
function nk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Lc;if(b==l.Ca)return f||(a.g.u=c),Ie(a.g,d,e),p.return();m=[];return E(p,ok(a,b,g,h,k),2)}n=p.h;n||(m.push(fk(a,b,function(){return gk(a,b)},null)),a.u&&m.push(fk(a,l.aa,function(){return gk(a,l.aa)},null)));f||(m.push(fk(a,b,function(){return hk(a,b,c)},null)),a.u&&m.push(fk(a,l.aa,function(){return hk(a,l.aa,c)},null)));m.push(fk(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=
|
|
386
|
+
d;Qj(a,b)},null));a.u&&m.push(fk(a,l.aa,function(){var r=l.aa;a.h[r].appendWindowStart=0;a.h[r].appendWindowEnd=e;a.h[r].appendWindowStart=d;Qj(a,r)},null));return E(p,Promise.all(m),0)})}
|
|
387
|
+
function pk(a,b,c){var d;return O(function(e){if(1==e.g){d=Lc;if(b==d.Ca)return e.return();b==d.ua&&(a.ea=new eg);fk(a,b,function(){return gk(a,b)},null);a.u&&fk(a,d.aa,function(){return gk(a,d.aa)},null);return E(e,fk(a,b,function(){return hk(a,b,c)},null),2)}return a.u?E(e,fk(a,d.aa,function(){return hk(a,d.aa,c)},null),0):e.B(0)})}q.endOfStream=function(a){var b=this;return O(function(c){return E(c,qk(b,function(){Rj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};
|
|
388
|
+
q.sb=function(a){var b=this;return O(function(c){return E(c,qk(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new eg,uri:null};b.j[d].unshift(e)}b.l.duration=a;b.S=a}),0)})};q.getDuration=function(){return this.l.duration};function lk(a,b,c,d){d<=c?Qj(a,b):a.h[b].remove(c,d)}function gk(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Qj(a,b)}
|
|
389
|
+
function hk(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Qj(a,b)}function Qj(a,b){if(!a.G){var c=a.j[b][0];c&&(c.p.resolve(),rk(a,b))}}function fk(a,b,c,d){Cg(a.K);c={start:c,p:new eg,uri:d};a.j[b].push(c);1==a.j[b].length&&sk(a,b);return c.p}
|
|
390
|
+
function qk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Cg(a.K);c=[];d={};for(e in a.h)d.yd=new eg,f={start:function(m){return function(){return m.yd.resolve()}}(d),p:d.yd,uri:null},a.j[e].push(f),c.push(d.yd),1==a.j[e].length&&f.start(),d={yd:d.yd};sa(l,2);return E(l,Promise.all(c),4);case 4:ua(l,3);break;case 2:throw g=va(l),g;case 3:return sa(l,5,6),E(l,b(),6);case 6:wa(l);for(h in a.h)rk(a,h);xa(l,0);break;case 5:throw k=va(l),new U(2,3,3015,k,a.i.error||"No error in the media element",
|
|
391
|
+
null);}})}function rk(a,b){a.j[b].shift();sk(a,b)}function sk(a,b){var c=a.j[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)),rk(a,b)}}function ik(a,b,c,d,e){var f=a.oa[d];a.A.insertFakeEncryptionInInit&&null==c&&f&&(Wb()||Ub()||dc())&&"mp4"==re(a.I[d])&&(b=Ai(b,e));return b}
|
|
392
|
+
function tk(a,b,c,d){return fk(a,b,function(){b!==Jc&&(md()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.I[b]=c),Qj(a,b))},null)}
|
|
393
|
+
function uk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I;return O(function(J){switch(J.g){case 1:c=Lc;a.G=!0;a.u=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.$&&(a.i.autoplay=!1);ta(J,2);a.s.qb();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(Ne)),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.l.removeSourceBuffer(v)}catch(H){}}return E(J,
|
|
394
|
+
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.N=new eg,a.l=Jj(a,a.N),E(J,a.N,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.S)&&a.S&&(a.l.duration=a.S),A=new eg,z=a.l.sourceBuffers,y=b.size,B=0,C=function(){B++;B===y&&(A.resolve(),a.s.Wa(z,"addsourcebuffer",C))},a.s.o(z,"addsourcebuffer",C),D=t(b.keys()),G=D.next();case 6:if(G.done)return a.i.currentTime=d,E(J,A,2);K=G.value;I=b.get(K);return E(J,Nj(a,K,I,I.codecs),9);case 9:a.u?(a.j[c.aa]=[],a.j[c.ua]=[]):a.j[K]=[];G=D.next();J.B(6);
|
|
395
|
+
break;case 2:wa(J),a.G=!1,Cg(a.K),a.s.na(a.i,"canplaythrough",function(){a.K.g||(a.i.autoplay=e,f||a.i.play())}),xa(J,0)}})}function vk(a,b){return qk(a,function(){return uk(a,b)})}
|
|
396
|
+
function ok(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,y;return O(function(B){if(1==B.g){f=Lc;if(b==f.Ca)return B.return(!1);g=ze(Be(a.I[b]));h=Ae(a.I[b]);l=!1;m=le(c,d);n=a.A.forceTransmux;if(!kd(m)||!a.F&&me.includes(m))n=!0;n&&(p=ne(c,d),r=fe(p))&&(k=r(),u=Hc(f.aa,(d||"").split(",")),v=Hc(f.ua,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.aa&&(w=u),m=k.convertCodecs(b,ne(c,w))):m=k.convertCodecs(b,p));A=ze(Be(m));z=Ae(m);if(g===A&&h===z)return B.return(!1);y=!0;if(a.u||l&&k&&!a.m[b])y=!1;if(y&&"smooth"===
|
|
397
|
+
a.A.codecSwitchingStrategy&&md())return E(B,tk(a,b,m,k),3);k&&k.destroy();return E(B,vk(a,e),3)}return B.return(!0)})}function wk(a,b,c,d){if(b==Jc)var e=!1;else{e=ze(Be(a.I[b]));var f=Ae(a.I[b]),g=le(c,d),h=a.A.forceTransmux;if(!kd(g)||!a.F&&me.includes(g))h=!0;c=ne(c,d);h&&(h=fe(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ze(Be(g));g=Ae(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!md()||a.u:!1}var Lj=window.URL.createObjectURL,Pj="sequence";function xk(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.s=!1;this.F=null}q=xk.prototype;q.getDuration=function(){return this.j};q.ej=function(){return this.g};q.ci=function(a){this.i=a};q.sb=function(a){this.j=a};q.ij=function(){return this.i};q.Zh=function(a){this.A=a};q.Mc=function(a){this.H=a};q.hf=function(a){this.m=a};q.Ie=function(){return this.m};q.Sg=function(a){this.u=a};q.Xi=function(){return this.u};
|
|
398
|
+
q.Sh=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Ve(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.s&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
399
|
+
q.ae=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.Ve(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.s&&(this.i=d-this.h-this.g)}};q.Pe=function(){this.s=!0};q.Hj=function(){return this.s};q.ai=function(a){this.F=a};q.$i=function(){return this.F};
|
|
400
|
+
q.Ve=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Eg=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.W=function(){return Infinity==this.j&&!this.H};q.Fc=function(){return Infinity!=this.j&&!this.H};q.Db=function(){return Math.max(this.I,this.lc()-this.m)};q.gi=function(a){this.I=a};
|
|
401
|
+
q.lc=function(){return this.W()||this.Fc()?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.Pd=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.lc()-this.m+a,this.Mb()))};q.Bc=function(){return this.Pd(0)};q.Mb=function(){return Math.max(0,this.lc()-(this.W()||this.Fc()?this.u:0))};q.ni=function(){return null==this.i||null!=this.h&&this.G?!1:!0};
|
|
401
402
|
q.Yh=function(a){this.J=a};P("shaka.media.PresentationTimeline",xk);xk.prototype.setAvailabilityTimeOffset=xk.prototype.Yh;xk.prototype.usingPresentationStartTime=xk.prototype.ni;xk.prototype.getSeekRangeEnd=xk.prototype.Mb;xk.prototype.getSeekRangeStart=xk.prototype.Bc;xk.prototype.getSafeSeekRangeStart=xk.prototype.Pd;xk.prototype.getSegmentAvailabilityEnd=xk.prototype.lc;xk.prototype.setUserSeekStart=xk.prototype.gi;xk.prototype.getSegmentAvailabilityStart=xk.prototype.Db;
|
|
402
|
-
xk.prototype.isInProgress=xk.prototype.Fc;xk.prototype.isLive=xk.prototype.
|
|
403
|
+
xk.prototype.isInProgress=xk.prototype.Fc;xk.prototype.isLive=xk.prototype.W;xk.prototype.offset=xk.prototype.offset;xk.prototype.notifyMaxSegmentDuration=xk.prototype.Eg;xk.prototype.notifyMinSegmentStartTime=xk.prototype.Ve;xk.prototype.getInitialProgramDateTime=xk.prototype.$i;xk.prototype.setInitialProgramDateTime=xk.prototype.ai;xk.prototype.isStartTimeLocked=xk.prototype.Hj;xk.prototype.lockStartTime=xk.prototype.Pe;xk.prototype.notifySegments=xk.prototype.ae;xk.prototype.notifyTimeRange=xk.prototype.Sh;
|
|
403
404
|
xk.prototype.getDelay=xk.prototype.Xi;xk.prototype.setDelay=xk.prototype.Sg;xk.prototype.getSegmentAvailabilityDuration=xk.prototype.Ie;xk.prototype.setSegmentAvailabilityDuration=xk.prototype.hf;xk.prototype.setStatic=xk.prototype.Mc;xk.prototype.setClockOffset=xk.prototype.Zh;xk.prototype.getPresentationStartTime=xk.prototype.ij;xk.prototype.setDuration=xk.prototype.sb;xk.prototype.setPresentationStartTime=xk.prototype.ci;xk.prototype.getMaxSegmentDuration=xk.prototype.ej;
|
|
404
|
-
xk.prototype.getDuration=xk.prototype.getDuration;function yk(a,b,c){this.j=c;this.l=a;this.u=zk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.
|
|
405
|
-
function Dk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=zk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.
|
|
406
|
-
null!=d&&(0!=d||a.
|
|
407
|
-
function Kk(a,b){0<a.g.readyState?Lk(a.i,b):Ek(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ik(a,a.j())})}function Ik(a,b){.001>Math.abs(a.g.currentTime-b)?Mk(a):(a.h.na(a.g,"seeking",function(){Mk(a)}),Lk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Mk(a){a.
|
|
405
|
+
xk.prototype.getDuration=xk.prototype.getDuration;function yk(a,b,c){this.j=c;this.l=a;this.u=zk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.A=b;this.i=function(){}}yk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function Ak(a,b){a.i=b}function Bk(a){this.g=a}function zk(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(Ni(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 Ck(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.F=b;this.u=c;this.l=new fd;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.s=!1;this.l.o(a,"waiting",function(){return Dk(f)});this.m=(new Ob(function(){Dk(f)})).xa(this.u.gapJumpTimerTime)}Ck.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};Ck.prototype.Hg=function(){this.s=!0;Dk(this)};
|
|
406
|
+
function Dk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=zk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new T("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Oi(c,b,a.u.gapDetectionThreshold),
|
|
407
|
+
null!=d&&(0!=d||a.s))){e=c.start(d);if(Tb()||Ub())e=Math.ceil(100*(e+.01))/100;e>=a.F.Mb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.A(new T("gapjumped")))}}}};function Ek(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Fk.value().get(b),c.na(a,b,d))}var Fk=new Mb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Gk(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new fd;this.i=new Hk(a);Ek(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ik(e,e.j())})}Gk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Jk(a){return a.s?a.g.currentTime:a.j()}
|
|
408
|
+
function Kk(a,b){0<a.g.readyState?Lk(a.i,b):Ek(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ik(a,a.j())})}function Ik(a,b){.001>Math.abs(a.g.currentTime-b)?Mk(a):(a.h.na(a.g,"seeking",function(){Mk(a)}),Lk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Mk(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
|
|
408
409
|
function Hk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Ob(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Hk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Lk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.xa(.1)};function Nk(a){this.g=a;this.j=!1;this.h=null;this.i=new fd}q=Nk.prototype;q.Kf=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Ek(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Lf=function(a){this.h=this.j?this.h:a};q.we=function(){return(this.j?this.g.currentTime:this.h)||0};q.kh=function(){return 0};
|
|
409
410
|
q.jh=function(){return 0};q.Rh=function(){};
|
|
410
|
-
function Ok(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.
|
|
411
|
+
function Ok(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.A=e;this.u=null;this.s=Pk(a,c,f);this.j=new Ck(a,b.presentationTimeline,c,this.s,f);this.h=new Gk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Jk(g.h);h=Qk(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Kk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
411
412
|
g.g.Bc():g.g.Mb():0>h&&(h=g.g.Mb()+h);return Rk(g,Sk(g,h))});this.m=new Ob(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Jk(g.h),k=g.g.Bc(),l=g.g.Mb();3>l-k&&(k=l-3);h<k&&(h=Qk(g,h),g.i.currentTime=h)}})}q=Ok.prototype;q.Kf=function(){this.m.xa(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};q.Lf=function(a){Kk(this.h,a)};
|
|
412
|
-
q.we=function(){var a=Jk(this.h);return 0<this.i.readyState&&!this.i.paused?Sk(this,a):a};q.kh=function(){return this.
|
|
413
|
+
q.we=function(){var a=Jk(this.h);return 0<this.i.readyState&&!this.i.paused?Sk(this,a):a};q.kh=function(){return this.s?this.s.s:0};q.jh=function(){return this.j.G};q.Rh=function(){this.j.Hg()};function Rk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
413
414
|
function Qk(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bc(),f=a.g.Mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Pd(c),k=a.g.Pd(d);c=a.g.Pd(c+d);return b>=g?Rk(a,b):b>f?f:b<e?Li(a.i.buffered,k)?k:c:b>=h||Li(a.i.buffered,b)?b:c}function Sk(a,b){var c=a.g.Bc();if(b<c)return c;a=a.g.Mb();return b>a?a:b}
|
|
414
|
-
function Pk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new yk(new Bk(a),b.stallThreshold,c);Ak(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Tk(a){this.g=a;this.m=null;this.j=0;this.
|
|
415
|
-
q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};q.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.
|
|
416
|
-
q.Se=function(a){if(!this.
|
|
417
|
-
q.Xc=function(a,b,c){c=void 0===c?!1:c;if(!this.
|
|
418
|
-
q.mf=function(a,b){var c=this;this.
|
|
415
|
+
function Pk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new yk(new Bk(a),b.stallThreshold,c);Ak(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Tk(a){this.g=a;this.m=null;this.j=0;this.s=!1}q=Tk.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.j};q.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.Oj=function(){this.s=!0};q.Yc=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
416
|
+
q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};q.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
417
|
+
q.Se=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};q.Zd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Se(a);this.eb(b)};q.eb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
418
|
+
q.Xc=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Gi(a.startTime,b,a.G,a.Va,a.za,a.sa,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.j=a.j,this.g[this.g.length-1]=b)}};
|
|
419
|
+
q.mf=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new Ob(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.xa(a))};Tk.prototype[Symbol.iterator]=function(){return this.Wb(0)};
|
|
419
420
|
Tk.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;d--;var e=this.get(d+1),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}d++;f=g-1;break}}return new Uk(this,d,f,c)};function Vk(a,b,c){a=new Gi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Tk([a])}
|
|
420
421
|
P("shaka.media.SegmentIndex",Tk);Tk.forSingleSegment=Vk;Tk.prototype.getIteratorForTime=Tk.prototype.Wb;Tk.prototype.updateEvery=Tk.prototype.mf;Tk.prototype.fit=Tk.prototype.Xc;Tk.prototype.evict=Tk.prototype.eb;Tk.prototype.mergeAndEvict=Tk.prototype.Zd;Tk.prototype.offset=Tk.prototype.offset;Tk.prototype.get=Tk.prototype.get;Tk.prototype.find=Tk.prototype.find;Tk.prototype.markImmutable=Tk.prototype.Oj;Tk.prototype.release=Tk.prototype.release;Tk.prototype.getNumEvicted=Tk.prototype.getNumEvicted;
|
|
421
|
-
Tk.prototype.getNumReferences=Tk.prototype.getNumReferences;function Uk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Uk.prototype.gf=function(a){this.reverse=a};Uk.prototype.Ki=function(){return this.h};Uk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.
|
|
422
|
-
Uk.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.
|
|
422
|
+
Tk.prototype.getNumReferences=Tk.prototype.getNumReferences;function Uk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Uk.prototype.gf=function(a){this.reverse=a};Uk.prototype.Ki=function(){return this.h};Uk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.s&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
423
|
+
Uk.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.s&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};P("shaka.media.SegmentIterator",Uk);Uk.prototype.next=Uk.prototype.next;Uk.prototype.current=Uk.prototype.current;Uk.prototype.currentPosition=Uk.prototype.Ki;
|
|
423
424
|
Uk.prototype.setReverse=Uk.prototype.gf;function Wk(){Tk.call(this,[]);this.h=[]}oa(Wk,Tk);q=Wk.prototype;q.clone=function(){var a=new Wk;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.Yc=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Yc(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};
|
|
424
425
|
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.Se=function(){};q.eb=function(){};q.Zd=function(){};q.Xc=function(){};q.mf=function(){};P("shaka.media.MetaSegmentIndex",Wk);Wk.prototype.updateEvery=Wk.prototype.mf;Wk.prototype.fit=Wk.prototype.Xc;Wk.prototype.mergeAndEvict=Wk.prototype.Zd;Wk.prototype.evict=Wk.prototype.eb;Wk.prototype.merge=Wk.prototype.Se;
|
|
425
|
-
Wk.prototype.offset=Wk.prototype.offset;Wk.prototype.get=Wk.prototype.get;Wk.prototype.find=Wk.prototype.find;Wk.prototype.forEachTopLevelReference=Wk.prototype.Yc;Wk.prototype.release=Wk.prototype.release;function Xk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.He();this.h=new Ob(function(){b.g.Qh(.25*b.i)})}Xk.prototype.release=function(){this.set(this.Ac());this.h&&(this.h.stop(),this.h=null);this.g=null};Xk.prototype.set=function(a){this.i=a;Yk(this)};Xk.prototype.Ac=function(){return this.g.Ac()};function Yk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.He()!=b&&a.g.Wg(b);return}catch(c){}a.h.xa(.25);0!=a.g.He()&&a.g.Wg(0)};function Zk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Ob(function(){$k(b,!1)})).xa(.25)}Zk.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 $k(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function al(){this.g=null;this.h=[]}function bl(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 cl(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 dl(){this.i=this.h=null;this.g=[]}function el(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 fl(){this.xe=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.
|
|
426
|
+
Wk.prototype.offset=Wk.prototype.offset;Wk.prototype.get=Wk.prototype.get;Wk.prototype.find=Wk.prototype.find;Wk.prototype.forEachTopLevelReference=Wk.prototype.Yc;Wk.prototype.release=Wk.prototype.release;function Xk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.He();this.h=new Ob(function(){b.g.Qh(.25*b.i)})}Xk.prototype.release=function(){this.set(this.Ac());this.h&&(this.h.stop(),this.h=null);this.g=null};Xk.prototype.set=function(a){this.i=a;Yk(this)};Xk.prototype.Ac=function(){return this.g.Ac()};function Yk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.He()!=b&&a.g.Wg(b);return}catch(c){}a.h.xa(.25);0!=a.g.He()&&a.g.Wg(0)};function Zk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Ob(function(){$k(b,!1)})).xa(.25)}Zk.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 $k(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function al(){this.g=null;this.h=[]}function bl(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 cl(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 dl(){this.i=this.h=null;this.g=[]}function el(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 fl(){this.xe=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.s=NaN;this.g=new al;this.h=new dl};function gl(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function hl(a,b){a.j=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
426
427
|
function il(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.Wb(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.za&&(c=!1);2==d.Cc()&&(c=!1);c&&d.sa&&jl(a,d.sa);c&&!a.g.has(d)&&(c=new kl(a.j),ll(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.ce&&d.Oe)break;d=b.next().value}ml(a)}}}
|
|
427
428
|
function jl(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return Fi(d,b)})){var c=new kl(a.j);ll(c,b,a.h);a.i.set(b,c)}}function nl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&ol(a,c)}function pl(a){nl(a,a.g);nl(a,a.i);a.l=0}gl.prototype.eb=function(a,b){b=void 0===b?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&ol(this,d);b&&ml(this)};
|
|
428
429
|
function ml(a){for(var b=Array.from(a.g.keys()),c={},d=t(a.i.keys()),e=d.next();!e.done;c={pe:c.pe},e=d.next())c.pe=e.value,b.some(function(f){return function(g){return Fi(g.sa,f.pe)}}(c))||ol(a,c.pe)}function ql(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&ol(a,d)}ml(a)}function rl(a,b){b&&b!==a.h&&(pl(a),a.h=b)}function ol(a,b){var c=a.g;b instanceof Ei&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function kl(a){this.g=a;this.Xe=this.Zg=null}
|
|
429
430
|
function ll(a,b,c){var d=new Uint8Array(0);a.Xe=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Cc(d,e):d=e,a.Zg?E(f,a.Zg(d),3):f.B(0);d=new Uint8Array(0);F(f)})})}kl.prototype.abort=function(){this.Xe&&this.Xe.abort()};function sl(a){gb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Ob(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new T("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).xa(2)}oa(sl,gb);sl.prototype.release=function(){this.g.clear();this.h.stop();gb.prototype.release.call(this)};function tl(a){gb.call(this);this.g=new Map;this.h=a}oa(tl,gb);tl.prototype.release=function(){this.g.clear();gb.prototype.release.call(this)};function ul(a,b){var c=a.g.get(b);c||(c={ge:[],uh:null,contentType:b},a.g.set(b,c));return c}function vl(a,b,c){var d=ul(a,b.contentType);wl(a,d);a={Dg:b,position:c};d=d.ge;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
430
431
|
tl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.ge;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Dg;break a}}d=null}if(e=d)e=c.uh,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
431
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.uh=d,JSON.stringify(d),c=new T("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function wl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.ge;b.ge=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.ge=[]};function xl(a,b,c,d,e){a=tg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function yl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.F=1;this.u=this.j=null;this.J=0;this.H=!1;this.i=new Map;this.G=!1;this.K=null;this.A=!1;this.l=new Bg(function(){return zl(c)});this.L=Date.now()/1E3;this.
|
|
432
|
-
function zl(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Al(e),b.push(Bl(e));f=t(a.
|
|
433
|
-
q.configure=function(a){this.h=a;this.K=new bg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.
|
|
434
|
-
b.
|
|
435
|
-
function Fl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Lc,a.J++,d=a.J,sa(l,2),E(l,mk(a.g.
|
|
436
|
-
function Jl(a,b){var c=0>a.g.Ua(),d=a.i.get("video");d&&d.
|
|
432
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.uh=d,JSON.stringify(d),c=new T("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function wl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.ge;b.ge=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.ge=[]};function xl(a,b,c,d,e){a=tg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function yl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.F=1;this.u=this.j=null;this.J=0;this.H=!1;this.i=new Map;this.G=!1;this.K=null;this.A=!1;this.l=new Bg(function(){return zl(c)});this.L=Date.now()/1E3;this.s=new Map;this.I={projection:null,hfov:null}}q=yl.prototype;q.destroy=function(){return this.l.destroy()};
|
|
433
|
+
function zl(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Al(e),b.push(Bl(e));f=t(a.s.values());for(g=f.next();!g.done;g=f.next())h=g.value,pl(h);return E(k,Promise.all(b),2)}a.i.clear();a.s.clear();a.g=null;a.m=null;a.h=null;F(k)})}
|
|
434
|
+
q.configure=function(a){this.h=a;this.K=new bg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.ka&&(pl(b.ka),b.ka=null);b=t(this.s.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,pl(this.s.get(c)),this.s.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Jc))&&
|
|
435
|
+
b.ka&&(pl(b.ka),b.ka=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ka&&(pl(b.ka),b.ka=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ka?(ql(c.ka,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.ka=null)):0<a.segmentPrefetchLimit&&(c.ka=Cl(this,c.stream));a.disableAudioPrefetch||Dl(this)};q.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,El(b,a||new Map),2);Cg(b.l);b.G=!0;F(c)})};
|
|
436
|
+
function Fl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Lc,a.J++,d=a.J,sa(l,2),E(l,mk(a.g.ia,c.Ca),4);case 4:ua(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=le(b.mimeType,b.codecs),Oj(a.g.ia,f,a.m.sequenceMode,b.external),g=a.g.ia.H,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.J==d&&(k=Gl(a,b),a.i.set(c.Ca,k),Hl(a,k,0)),F(l)}})}function Il(a){var b=a.i.get(Jc);b&&(Al(b),Bl(b).catch(function(){}),a.i.delete(Jc));a.u=null}
|
|
437
|
+
function Jl(a,b){var c=0>a.g.Ua(),d=a.i.get("video");d&&d.ma&&d.ma.gf(c);(d=a.i.get("audio"))&&d.ma&&d.ma.gf(c);(d=a.i.get(Jc))&&d.ma&&d.ma.gf(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Lc&&(Kl(a,b,!1,0,!1),c.Lc=d);else if(b=c.Lc)c.Lc=null,Kl(a,b,!0,0,!1)}function Ll(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.G&&(b.video&&Kl(a,b.video,c,d,e,f),b.audio&&Kl(a,b.audio,c,d,e,f))}
|
|
437
438
|
function Ml(a,b){O(function(c){if(1==c.g)return a.u=b,a.G?b.segmentIndex?c.B(2):E(c,b.createSegmentIndex(),2):c.return();Kl(a,b,!0,0,!1);F(c)})}
|
|
438
|
-
function Kl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Jc?g&&(g.Lc&&(b.trickModeVideo?(g.Lc=b,b=b.trickModeVideo):g.Lc=null),g.stream!=b||e)&&(a.
|
|
439
|
+
function Kl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Jc?g&&(g.Lc&&(b.trickModeVideo?(g.Lc=b,b=b.trickModeVideo):g.Lc=null),g.stream!=b||e)&&(a.s.has(b)?g.ka=a.s.get(b):g.ka&&rl(g.ka,b),b.type==Jc&&(e=le(b.mimeType,b.codecs),Oj(a.g.ia,e,a.m.sequenceMode,b.external)),a.s.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ma=null,g.lh=!!f,c&&(g.Jd?g.qf=!0:g.pb?(g.rc=!0,g.Be=d,g.qf=!0):(Al(g),Nl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Ol(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
439
440
|
Fl(a,b)}
|
|
440
|
-
function Ol(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.Bb)return e.return();c=b.stream;d=b.Bb;return c.segmentIndex?e.B(2):E(e,c.createSegmentIndex(),2)}if(b.Bb!=d||b.stream!=c)return e.return();var f=a.g.Ge();var g=bk(a.g.
|
|
441
|
+
function Ol(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.Bb)return e.return();c=b.stream;d=b.Bb;return c.segmentIndex?e.B(2):E(e,c.createSegmentIndex(),2)}if(b.Bb!=d||b.stream!=c)return e.return();var f=a.g.Ge();var g=bk(a.g.ia,b.type),h=b.stream.segmentIndex.find(b.mb?b.mb.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.za?k.za-k.Va:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.sa)&&(h+=(k.za?k.za-k.Va:null)||0),k=a.g.getBandwidthEstimate(),f=
|
|
441
442
|
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Bb.h.g>h?!0:!1):f=!1;f&&b.Bb.abort();F(e)})}
|
|
442
|
-
q.ie=function(){if(this.g)for(var a=this.g.Ge(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.
|
|
443
|
-
function Pl(a,b){b.Jd||b.rc||(b.pb?(b.rc=!0,b.Be=0):null==Zj(a.g.
|
|
444
|
-
function El(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Lc;if(!a.j)throw new U(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c
|
|
445
|
-
b.get(l.id),hl(n,function(r,u,v){return Ql(r,u,v||null,a.h.retryParameters,a.g.bc)}),m.
|
|
446
|
-
function Cl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Jc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Jc&&a.h.disableTextPrefetch)return null;if(a.
|
|
447
|
-
function Dl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={fb:d.fb},f=e.next())if(d.fb=f.value,d.fb.audio)if(a.
|
|
448
|
-
(d.fb.audio.segmentIndex||d.fb.audio.createSegmentIndex(),a.
|
|
443
|
+
q.ie=function(){if(this.g)for(var a=this.g.Ge(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.ma&&(e=c.ma.current());if(!e||e.startTime>a||e.endTime<a)c.ma=null;e=this.g.ia;e.G?e=!1:d==Jc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=ak(e,d),e=Li(e,a));e||((null!=bk(this.g.ia,d)||c.pb)&&Pl(this,c),c.Bb&&(c.Bb.abort(),c.Bb=null),d===Jc&&(d=this.g.ia,d.J&&d.J.g()),c.ie=!0)}};
|
|
444
|
+
function Pl(a,b){b.Jd||b.rc||(b.pb?(b.rc=!0,b.Be=0):null==Zj(a.g.ia,b.type)?null==b.Sb&&Hl(a,b,0):(Al(b),Nl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
445
|
+
function El(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Lc;if(!a.j)throw new U(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.aa,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ua,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Ca,a.u),e.add(a.u));f=a.g.ia;return E(p,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}Cg(a.l);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Gl(a,l),b.has(l.id)&&(n=
|
|
446
|
+
b.get(l.id),hl(n,function(r,u,v){return Ql(r,u,v||null,a.h.retryParameters,a.g.bc)}),m.ka=n),a.i.set(k,m),Hl(a,m,0));F(p)})}function Gl(a,b){return{stream:b,type:b.type,ma:null,ka:Cl(a,b),mb:null,Hc:null,Ag:null,yg:null,xg:null,Lc:null,endOfStream:!1,pb:!1,Sb:null,rc:!1,Be:0,qf:!1,Jd:!1,ie:!0,Lg:!1,Sd:!1,Bb:null}}
|
|
447
|
+
function Cl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Jc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Jc&&a.h.disableTextPrefetch)return null;if(a.s.has(b))return a.s.get(b);var c=a.i.get(b.type);return(c=c&&c.ka)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new gl(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ql(d,e,f||null,a.h.retryParameters,a.g.bc)}):null}
|
|
448
|
+
function Dl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={fb:d.fb},f=e.next())if(d.fb=f.value,d.fb.audio)if(a.s.has(d.fb.audio)){if(f=a.s.get(d.fb.audio),ql(f,b),!(0<b&&c.some(function(h){return function(k){return Nc(h.fb.audio.language,k)}}(d)))){var g=a.i.get(d.fb.audio.type);f!==(g&&g.ka)&&pl(f);a.s.delete(d.fb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Nc(h.fb.audio.language,k)}}(d))||!(f=Cl(a,d.fb.audio))||
|
|
449
|
+
(d.fb.audio.segmentIndex||d.fb.audio.createSegmentIndex(),a.s.set(d.fb.audio,f))}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.ia.sb(a):this.g.ia.sb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
449
450
|
function Rl(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Cg(a.l);if(b.pb||null==b.Sb||b.Jd)return h.return();b.Sb=null;if(!b.rc){h.B(2);break}return E(h,Nl(a,b,b.qf,b.Be),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return E(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.pb||b.Sb||Hl(a,b,0),h.return();case 4:sa(h,6);d=Sl(a,b);null!=d&&(Hl(a,b,d),b.Sd=!1);ua(h,7);break;case 6:return e=
|
|
450
|
-
va(h),E(h,Tl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.G||!f.every(function(k){return k.endOfStream})){h.B(0);break}return E(h,a.g.
|
|
451
|
-
function Sl(a,b){if(Ul(b))return jk(a.g.
|
|
452
|
-
!0,"video"==b.type&&(a=a.i.get(Jc))&&Ul(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Vl(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,Ul(h)||h.
|
|
453
|
-
return null}function Vl(a,b,c,d){if(b.
|
|
454
|
-
function Wl(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:e=Lc;f=b.stream;g=b.
|
|
455
|
-
sa(J,2);n=Yl(n,C);D=!1;G=0;(new Ig).box("mdat",function(H){G=H.size+H.start;D=!0}).parse(n,!1,!0);if(!D){J.B(4);break}K=n.subarray(0,G);n=n.subarray(G);return E(J,Zl(a,b,c,f,d,K,!0),5);case 5:b.
|
|
456
|
-
return a.A?B.return():b.rc?(b.pb=!1,Hl(a,b,0),B.return()):E(B,Zl(a,b,c,f,d,w),10);case 10:b.
|
|
457
|
-
b,y),B.B(0);else return b.Sd=!0,1==y.category&&b.
|
|
451
|
+
va(h),E(h,Tl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.G||!f.every(function(k){return k.endOfStream})){h.B(0);break}return E(h,a.g.ia.endOfStream(),10);case 10:Cg(a.l),g=a.g.ia.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.sb(g),F(h)}})}
|
|
452
|
+
function Sl(a,b){if(Ul(b))return jk(a.g.ia,b.stream.originalId||""),null;b.type==Jc&&kk(a.g.ia);if(!a.g.ia.ba&&b.type!=Jc)return a.h.updateIntervalSeconds/2;var c=a.g.Ge();if("audio"===b.type)for(var d=t(a.s.keys()),e=d.next();!e.done;e=d.next())e=a.s.get(e.value),e.eb(c,!0),il(e,c);d=b.mb?b.mb.endTime:c;e=ck(a.g.ia,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=bk(a.g.ia,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
453
|
+
!0,"video"==b.type&&(a=a.i.get(Jc))&&Ul(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Vl(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,Ul(h)||h.ma&&!h.ma.current()||(f=Math.min(f,h.mb?h.mb.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ka&&b.ma&&!a.s.has(b.stream)&&(b.ka.eb(c),il(b.ka,e.startTime));Wl(a,b,c,e).catch(function(){});
|
|
454
|
+
return null}function Vl(a,b,c,d){if(b.ma)return b.ma.current();if(b.mb||d)return b.ma=b.stream.segmentIndex.Wb(b.mb?b.mb.endTime:d,!1,0>a.g.Ua()),b.ma&&b.ma.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ua();var f=null;d&&(b.ma=b.stream.segmentIndex.Wb(e,!1,a),f=b.ma&&b.ma.next().value);f||(b.ma=b.stream.segmentIndex.Wb(c,!1,a),f=b.ma&&b.ma.next().value);return f}
|
|
455
|
+
function Wl(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:e=Lc;f=b.stream;g=b.ma;b.pb=!0;sa(B,2);if(2==d.Cc())throw new U(1,1,1011);return E(B,Xl(a,b,d),4);case 4:Cg(a.l);if(a.A)return B.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(C){var D,G,K,I;return O(function(J){switch(J.g){case 1:if(p)return J.return();r=!0;Cg(a.l);if(a.A)return J.return();
|
|
456
|
+
sa(J,2);n=Yl(n,C);D=!1;G=0;(new Ig).box("mdat",function(H){G=H.size+H.start;D=!0}).parse(n,!1,!0);if(!D){J.B(4);break}K=n.subarray(0,G);n=n.subarray(G);return E(J,Zl(a,b,c,f,d,K,!0),5);case 5:b.ka&&b.ma&&il(b.ka,d.startTime,!0);case 4:ua(J,0);break;case 2:u=I=va(J),F(J)}})},E(B,$l(a,b,d,v),9);l=$l(a,b,d);return E(B,l,7);case 7:m=B.h;Cg(a.l);if(a.A)return B.return();Cg(a.l);return b.rc?(b.pb=!1,Hl(a,b,0),B.return()):E(B,Zl(a,b,c,f,d,m),6);case 9:w=B.h;if(u)throw u;if(r){B.B(10);break}p=!0;Cg(a.l);
|
|
457
|
+
return a.A?B.return():b.rc?(b.pb=!1,Hl(a,b,0),B.return()):E(B,Zl(a,b,c,f,d,w),10);case 10:b.ka&&b.ma&&il(b.ka,d.startTime,!0);case 6:Cg(a.l);if(a.A)return B.return();b.mb=d;g.next();b.pb=!1;b.Lg=!1;A=a.g.ia.Kb();z=A[b.type];cb(JSON.stringify(z));b.rc||a.g.Hg(d,b.stream);Hl(a,b,0);ua(B,0);break;case 2:y=va(B);Cg(a.l,y);if(a.A)return B.return();b.pb=!1;if(7001==y.code)b.pb=!1,Al(b),Hl(a,b,0),B.B(0);else if(b.type==e.Ca&&a.h.ignoreTextStreamFailures)a.i.delete(e.Ca),B.B(0);else if(3017==y.code)am(a,
|
|
458
|
+
b,y),B.B(0);else return b.Sd=!0,1==y.category&&b.ka&&ol(b.ka,d),y.severity=2,E(B,Tl(a,b,y),0)}})}function bm(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=Fb(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))})}
|
|
458
459
|
function Yl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function am(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Lg})){if(0<a.h.maxDisabledTime&&a.g.Ce(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.Sd=!0;a.A=!0;a.g.onError(c);return}b.Lg=!0}Hl(a,b,4)}
|
|
459
|
-
function Xl(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=Lc;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=ze(b.stream.codecs);k=Ae(b.stream.mimeType);l=c.timestampOffset;if(l==b.Ag&&f==b.yg&&g==b.xg&&h==b.zg&&k==b.Lh){w.B(2);break}m=b.zg&&b.Lh&&wk(a.g.
|
|
460
|
-
function(){var A,z,y;return O(function(B){if(1==B.g)return A=new Map,a.j.audio&&A.set(d
|
|
461
|
-
2),E(K,r,4);case 4:return A=K.h,Cg(a.l),z=null,y=new Map,B={projection:null,hfov:null},C=new Ig,C.box("moov",Ng).box("trak",Ng).box("mdia",Ng).
|
|
462
|
-
Ng).box("proj",Ng).
|
|
463
|
-
b.type,c.startTime))),E(w,Promise.all(e),0)}})}
|
|
464
|
-
function Zl(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 Ig;l&&k.
|
|
465
|
-
z+e.timestampOffset,y=D-e.startTime,B=u.reader.
|
|
466
|
-
w||(w=Ui(u),w.length&&e&&a.g.Sj([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.
|
|
467
|
-
a.H=!0}});(l||m)&&k.parse(f);return E(r,dm(a,b,c),2);case 2:return Cg(a.l),n=b.ie,b.ie=!1,p=b.lh,b.lh=!1,E(r,a.g.oh(b.type,f),3);case 3:return E(r,ek(a.g.
|
|
460
|
+
function Xl(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=Lc;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=ze(b.stream.codecs);k=Ae(b.stream.mimeType);l=c.timestampOffset;if(l==b.Ag&&f==b.yg&&g==b.xg&&h==b.zg&&k==b.Lh){w.B(2);break}m=b.zg&&b.Lh&&wk(a.g.ia,b.type,k,h);if(!m){w.B(3);break}n=null;b.type===d.ua?n=a.i.get(d.aa):b.type===d.aa&&(n=a.i.get(d.ua));if(!n){w.B(3);break}return E(w,Bl(n).catch(function(){}),5);case 5:n.Hc=null,Pl(a,n);case 3:return p=
|
|
461
|
+
function(){var A,z,y;return O(function(B){if(1==B.g)return A=new Map,a.j.audio&&A.set(d.aa,a.j.audio),a.j.video&&A.set(d.ua,a.j.video),sa(B,2),b.yg=f,b.xg=g,b.zg=h,b.Lh=k,b.Ag=l,z=a.m.sequenceMode||"HLS"==a.m.type,E(B,nk(a.g.ia,b.type,l,f,g,z,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,A),4);if(2!=B.g)return ua(B,0);y=va(B);b.yg=null;b.xg=null;b.zg=null;b.Ag=null;throw y;})},E(w,p(),2);case 2:return Fi(c.sa,b.Hc)||(b.Hc=c.sa,c.l&&c.sa&&(r=$l(a,b,c.sa),u=function(){var A,z,y,B,C,D,G;return O(function(K){switch(K.g){case 1:return sa(K,
|
|
462
|
+
2),E(K,r,4);case 4:return A=K.h,Cg(a.l),z=null,y=new Map,B={projection:null,hfov:null},C=new Ig,C.box("moov",Ng).box("trak",Ng).box("mdia",Ng).V("mdhd",function(I){z=Yi(I.reader,I.version).timescale}).box("hdlr",function(I){I=I.reader;I.skip(8);switch(I.Jc()){case "soun":y.set(d.aa,z);break;case "vide":y.set(d.ua,z)}z=null}).box("minf",Ng).box("stbl",Ng).V("stsd",Pg).box("encv",Qg).box("avc1",Qg).box("avc3",Qg).box("hev1",Qg).box("hvc1",Qg).box("dvav",Qg).box("dva1",Qg).box("dvh1",Qg).box("dvhe",
|
|
463
|
+
Qg).box("vexu",Ng).box("proj",Ng).V("prji",function(I){I=I.reader.Jc();B.projection=I}).box("hfov",function(I){I=I.reader.T()/1E3;B.hfov=I}).parse(A),cm(a,B),y.has(b.type)?c.sa.timescale=y.get(b.type):null!=z&&(c.sa.timescale=z),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(K,a.g.oh(b.type,A),5);case 5:return E(K,ek(a.g.ia,b.type,A,null,b.stream,D),6);case 6:ua(K,0);break;case 2:throw G=va(K),b.Hc=null,G;}})},a.g.Qj(c.startTime,c.sa),e.push(u()))),a.m.sequenceMode&&(v=b.mb?b.mb.j:null,
|
|
464
|
+
c.j!=v&&e.push(pk(a.g.ia,b.type,c.startTime))),E(w,Promise.all(e),0)}})}
|
|
465
|
+
function Zl(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 Ig;l&&k.V("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.Jc();var A=u.reader.Jc();var z=u.reader.T();var y=u.reader.T();var B=u.reader.T();var C=u.reader.T();var D=e.startTime+y/z}else z=u.reader.T(),D=u.reader.md()/
|
|
466
|
+
z+e.timestampOffset,y=D-e.startTime,B=u.reader.T(),C=u.reader.T(),w=u.reader.Jc(),A=u.reader.Jc();u=u.reader.Qb(u.reader.getLength()-u.reader.Oa());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Rj():(v=(new Map).set("detail",{startTime:D,endTime:D+B/z,schemeIdUri:w,value:A,timescale:z,presentationTimeDelta:y,eventDuration:B,id:C,messageData:u}),v=new T("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
467
|
+
w||(w=Ui(u),w.length&&e&&a.g.Sj([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.V("prft",function(u){if(!a.H&&e.sa.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.sa.timescale*1E3)});v=new T("prft",v);a.g.onEvent(v);
|
|
468
|
+
a.H=!0}});(l||m)&&k.parse(f);return E(r,dm(a,b,c),2);case 2:return Cg(a.l),n=b.ie,b.ie=!1,p=b.lh,b.lh=!1,E(r,a.g.oh(b.type,f),3);case 3:return E(r,ek(a.g.ia,b.type,f,e,d,h,n,p,g),4);case 4:Cg(a.l),F(r)}})}function dm(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=Zj(a.g.ia,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.ia.remove(b.type,e,e+g),2)}Cg(a.l);F(h)})}
|
|
468
469
|
function Ul(a){return a&&a.type==Jc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
469
|
-
function $l(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Qd())return l.return(e);f=null;if(b.
|
|
470
|
-
function Ql(a,b,c,d,e){var f=a instanceof Gi?a:void 0,g=f?1:0;a=xl(a.
|
|
471
|
-
function Nl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.rc=!1,b.qf=!1,b.Be=0,b.Jd=!0,b.mb=null,b.Hc=null,b.
|
|
472
|
-
function Hl(a,b,c){var d=b.type;if(d!=Jc||a.i.has(d))b.Sb=(new Nb(function(){var e;return O(function(f){if(1==f.g)return sa(f,2),E(f,Rl(a,b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);F(f)})})).
|
|
470
|
+
function $l(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Qd())return l.return(e);f=null;if(b.ka){var m=b.ka,n=m.g;c instanceof Ei&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Zg=d),f=m.Xe):f=null}f||(f=Ql(c,b.stream,d||null,a.h.retryParameters,a.g.bc));g=0;b.ma&&(g=b.ma.h);b.Bb=f;return E(l,f.promise,2);case 2:h=l.h;b.Bb=null;k=h.data;if(!c.aesKey){l.B(3);break}return E(l,bm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
471
|
+
function Ql(a,b,c,d,e){var f=a instanceof Gi?a:void 0,g=f?1:0;a=xl(a.P(),a.Va,a.za,d,c);a.contentType=b.type;return e.request(zg,a,{type:g,stream:b,segment:f})}
|
|
472
|
+
function Nl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.rc=!1,b.qf=!1,b.Be=0,b.Jd=!0,b.mb=null,b.Hc=null,b.ma=null,b.ka&&!a.s.has(b.stream)&&pl(b.ka),d?(e=a.g.Ge(),f=a.g.ia.getDuration(),E(g,a.g.ia.remove(b.type,e+d,f),3)):E(g,mk(a.g.ia,b.type),4);if(3!=g.g)return Cg(a.l),c?E(g,a.g.ia.flush(b.type),3):g.B(3);Cg(a.l);b.Jd=!1;b.endOfStream=!1;b.pb||b.Sb||Hl(a,b,0);F(g)})}
|
|
473
|
+
function Hl(a,b,c){var d=b.type;if(d!=Jc||a.i.has(d))b.Sb=(new Nb(function(){var e;return O(function(f){if(1==f.g)return sa(f,2),E(f,Rl(a,b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);F(f)})})).U(c)}function Al(a){null!=a.Sb&&(a.Sb.stop(),a.Sb=null)}function Bl(a){return O(function(b){return a.Bb?E(b,a.Bb.abort(),0):b.B(0)})}
|
|
473
474
|
function Tl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,dg(a.K),2);Cg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Ce(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
|
|
474
|
-
function em(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=Lc;if(e=a.i.get(d
|
|
475
|
+
function em(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=Lc;if(e=a.i.get(d.aa))e.Hc=null,Pl(a,e),Bl(e).catch(function(){});if(f=a.i.get(d.ua))f.Hc=null,Pl(a,f),Bl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.aa,a.j.audio);a.j.video&&g.set(d.ua,a.j.video);return E(h,vk(a.g.ia,g),2)}return h.return(!0)})}
|
|
475
476
|
function cm(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 T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.I=b}};function fm(){}
|
|
476
477
|
function gm(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]=Pe(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Pe(n)),m=gm(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),
|
|
477
478
|
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 hm(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 im(a,b){return a&&b}
|
|
@@ -496,18 +497,18 @@ restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPix
|
|
|
496
497
|
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(tm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
497
498
|
function um(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 gm(a,b,c||qm(),d,"")}
|
|
498
499
|
function tm(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=Xc(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Pc(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-
|
|
499
|
-
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!=Jc&&"image"!=c.type||b.push(c);return b}function rm(a){return im([a],a)}function sm(a){return im([a],a)}P("shaka.util.PlayerConfiguration",pm);pm.mergeConfigObjects=um;pm.createDefault=qm;function vm(a,b,c,d,e){gb.call(this);this.L=a;this.
|
|
500
|
-
[];this.I=[]}oa(vm,gb);function wm(a,b,c){(a=b?a.I:a.J)?a.push(c):c()}function xm(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 ym(a,b){a.O=b;a.
|
|
501
|
-
function Cm(a){a.
|
|
502
|
-
q.start=function(){var a=this,b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return sa(c,3),E(c,Em(a),5);case 5:if(a.m)return c.return();a.oa.resolve();return E(c,Fm(a),6);case 6:if(a.m)return c.return();a.
|
|
503
|
-
a.g.manifest.dash.enableAudioGroups));if(a.Za){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.ib){d=a.h.presentationTimeline.
|
|
500
|
+
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!=Jc&&"image"!=c.type||b.push(c);return b}function rm(a){return im([a],a)}function sm(a){return im([a],a)}P("shaka.util.PlayerConfiguration",pm);pm.mergeConfigObjects=um;pm.createDefault=qm;function vm(a,b,c,d,e){gb.call(this);this.L=a;this.S=b;this.Sa=e.networkingEngine;this.Y=d;this.s=null;this.Zb=c;this.Ma=0;this.Xb=e.Wc;this.u=e.Lj;this.Yb=e.Mj;this.g=e.config;this.j=this.F=this.h=null;this.qa=!1;this.G=e.Wj;this.Da=!1;this.l=null;this.ba=!1;this.i=this.A=null;this.$=!1;this.K=new Map;this.Ia=!1;this.Xa=e.Vj;this.Z=new fl;this.oa=new eg;this.ea=new eg;this.N=new eg;this.H=new eg;this.H.catch(function(){});this.O=null;this.m=!1;this.ib=e.Fi;this.ra=null;this.Za=e.Ei;this.R=!1;this.J=
|
|
501
|
+
[];this.I=[]}oa(vm,gb);function wm(a,b,c){(a=b?a.I:a.J)?a.push(c):c()}function xm(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 ym(a,b){a.O=b;a.R=!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=vm.prototype;q.getStartTime=function(){return this.Y};q.$c=function(){return this.L};q.mg=function(){return this.h};function zm(a){a.$=!0;return a.i}function Am(a){a.qa=!0;return a.j}function Bm(a){a.Da=!0;return a.G}q.getStats=function(){return this.Z};
|
|
502
|
+
function Cm(a){a.ba=!0;return a.l}function Dm(a){a.Ia=!0;return a.K}
|
|
503
|
+
q.start=function(){var a=this,b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return sa(c,3),E(c,Em(a),5);case 5:if(a.m)return c.return();a.oa.resolve();return E(c,Fm(a),6);case 6:if(a.m)return c.return();a.ea.resolve();a.s||(a.s=new Lf(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,
|
|
504
|
+
a.g.manifest.dash.enableAudioGroups));if(a.Za){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.ib){d=a.h.presentationTimeline.W();var e=xf(a.h.variants);e=a.s.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ra=e,e.video&&Gm(a,e.video,d),e.audio&&Gm(a,e.audio,d)}return E(c,void 0,7);case 7:if(a.m)return c.return();a.N.resolve();ua(c,0);break;case 3:throw b=va(c),a.H.reject(b),b;}})};
|
|
504
505
|
q.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):gb.prototype.dispatchEvent.call(this,a)};q.onError=function(a){2===a.severity&&(this.H.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Hm(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
|
|
505
|
-
function Em(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Hm(a,"manifest-parser");a.j||(a.F=yi(a.L,a.
|
|
506
|
+
function Em(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Hm(a,"manifest-parser");a.j||(a.F=yi(a.L,a.S),a.j=a.F(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Hm(a,"manifest");if(a.h)return g.B(2);c=a;return E(g,a.j.start(a.L,a.Yb),3)}2!=g.g&&(c.h=g.h);d=new T("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new U(2,4,4036);Im(a.h);e=Date.now()/1E3;f=e-b;a.Z.H=f;F(g)})}
|
|
506
507
|
function Fm(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:Hm(a,"drm-engine");a.Ma=Date.now()/1E3;a.l=a.Xb();a.u.g=a.l;a.l.configure(a.g.drm);var k=a.u;b=We(a.h.variants,k.h.restrictions,k.i);return E(h,si(a.u,a.h),2);case 2:c=h.h;if(!b&&!c){h.B(3);break}d=new T("trackschanged",void 0);return E(h,Promise.resolve(),4);case 4:a.dispatchEvent(d);case 3:return e=xf(a.h.variants),E(h,Jh(a.l,e,a.h.offlineSessionIds),5);case 5:return E(h,si(a.u,a.h),6);case 6:f=h.h;if(!f){h.B(0);break}g=new T("trackschanged",
|
|
507
508
|
void 0);return E(h,Promise.resolve(),8);case 8:a.dispatchEvent(g),F(h)}})}q.configure=function(a,b){a=hm(a,b);um(this.g,a)};q.getConfiguration=function(){return Pe(this.g)};
|
|
508
|
-
function Gm(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 gl(d,b,function(l,m,n){return Ql(l,m,n||null,a.g.streaming.retryParameters,a.Sa)}),a.K.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.
|
|
509
|
-
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.m=!0;if(!a.j||a.qa){e.B(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a
|
|
510
|
-
function Im(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}P("shaka.media.PreloadManager",vm);vm.prototype.destroy=vm.prototype.destroy;vm.prototype.waitForFinish=vm.prototype.Ek;function Jm(a,b){gb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Rc:null,Qc:Km,Ec:function(d,e){return Lm(c,"enter",d,e)}},{Rc:Mm,Qc:Km,Ec:function(d,e){return Lm(c,"enter",d,e)}},{Rc:Nm,Qc:Km,Ec:function(d,e){return Lm(c,"enter",d,e)}},{Rc:Km,Qc:Mm,Ec:function(d,e){return Lm(c,"exit",d,e)}},{Rc:Km,Qc:Nm,Ec:function(d,e){return Lm(c,"exit",d,e)}},{Rc:Mm,Qc:Nm,Ec:function(d,e){return Lm(c,"skip",d,e)}},{Rc:Nm,Qc:Mm,Ec:function(d,e){return Lm(c,"skip",d,e)}}];this.h=new fd;this.h.
|
|
509
|
+
function Gm(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 gl(d,b,function(l,m,n){return Ql(l,m,n||null,a.g.streaming.retryParameters,a.Sa)}),a.K.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.Y||0;(h=(g=b.segmentIndex.Wb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.sa&&jl(e,h.sa):il(e,h.startTime));F(k)})}q.Ek=function(){return Promise.race([this.N,this.H])};
|
|
510
|
+
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.m=!0;if(!a.j||a.qa){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.G&&!a.Da&&a.G.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.Ia)for(b=t(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,pl(d);F(e)}})};
|
|
511
|
+
function Im(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}P("shaka.media.PreloadManager",vm);vm.prototype.destroy=vm.prototype.destroy;vm.prototype.waitForFinish=vm.prototype.Ek;function Jm(a,b){gb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Rc:null,Qc:Km,Ec:function(d,e){return Lm(c,"enter",d,e)}},{Rc:Mm,Qc:Km,Ec:function(d,e){return Lm(c,"enter",d,e)}},{Rc:Nm,Qc:Km,Ec:function(d,e){return Lm(c,"enter",d,e)}},{Rc:Km,Qc:Mm,Ec:function(d,e){return Lm(c,"exit",d,e)}},{Rc:Km,Qc:Nm,Ec:function(d,e){return Lm(c,"exit",d,e)}},{Rc:Mm,Qc:Nm,Ec:function(d,e){return Lm(c,"skip",d,e)}},{Rc:Nm,Qc:Mm,Ec:function(d,e){return Lm(c,"skip",d,e)}}];this.h=new fd;this.h.o(this.i,
|
|
511
512
|
"regionremove",function(d){c.g.delete(d.region)})}oa(Jm,gb);Jm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;gb.prototype.release.call(this)};Jm.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?Mm:a>d.endTime?Nm:Km;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Rc==e&&h.Qc==f&&h.Ec(d,b)}}};
|
|
512
513
|
function Lm(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Mm=1,Km=2,Nm=3;function Om(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)).ob.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Pm[d])return m.return(e);f=0;g=tg([a],c);sa(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ua(m,3);break;case 2:k=va(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?
|
|
513
514
|
e.toLowerCase().split(";").shift():"")}})}
|
|
@@ -519,8 +520,8 @@ q.append=function(a){var b=Sm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];v
|
|
|
519
520
|
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&&(Um(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"};
|
|
520
521
|
function Vm(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
521
522
|
function Um(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}P("shaka.text.SimpleTextDisplayer",Tm);Tm.prototype.setTextVisibility=Tm.prototype.setTextVisibility;Tm.prototype.isTextVisible=Tm.prototype.isTextVisible;Tm.prototype.destroy=Tm.prototype.destroy;Tm.prototype.append=Tm.prototype.append;Tm.prototype.remove=Tm.prototype.remove;Tm.prototype.configure=Tm.prototype.configure;function Wm(){}q=Wm.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",Wm);Wm.prototype.setTextVisibility=Wm.prototype.setTextVisibility;Wm.prototype.isTextVisible=Wm.prototype.isTextVisible;Wm.prototype.destroy=Wm.prototype.destroy;Wm.prototype.append=Wm.prototype.append;Wm.prototype.remove=Wm.prototype.remove;Wm.prototype.configure=Wm.prototype.configure;function Xm(){}function W(a){return document.createElement(a)}function Ym(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Zm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Xm);Xm.removeAllChildren=Zm;function $m(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||od("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.G=(new Ob(function(){d.A.paused||an(d)})).xa(c&&
|
|
522
|
-
c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new fd;this.j.
|
|
523
|
-
q.append=function(a){var b=[].concat(x(this.h)),c={};a=t(a);for(var d=a.next();!d.done;c={me:c.me},d=a.next())c.me=d.value,b.some(function(e){return function(f){return Rd(f,e.me)}}(c))||this.h.push(c.me);an(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.
|
|
523
|
+
c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new fd;this.j.o(document,"fullscreenchange",function(){an(d,!0)});this.j.o(this.A,"seeking",function(){an(d,!0)});this.j.o(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){an(d,!0)}),this.s.observe(this.g));this.F=new Map}q=$m.prototype;q.configure=function(a){this.G&&this.G.xa(a.captionsUpdatePeriod)};
|
|
524
|
+
q.append=function(a){var b=[].concat(x(this.h)),c={};a=t(a);for(var d=a.next();!d.done;c={me:c.me},d=a.next())c.me=d.value,b.some(function(e){return function(f){return Rd(f,e.me)}}(c))||this.h.push(c.me);an(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.s&&(this.s.disconnect(),this.s=null);return Promise.resolve()};
|
|
524
525
|
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});an(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function bn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
525
526
|
function cn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.si:null;l&&(g.push(l.Uf),l.Kc&&g.push(l.Kc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?bn(a,n)||(f=!0):(dn(a,k,e),l=a.i.get(k),n=l.si,f=!0));0<k.nestedCues.length&&n&&cn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
|
|
526
527
|
r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.Kc?(d.Kc.contains(c)&&d.Kc.removeChild(c),c.appendChild(d.Kc),d.Kc.appendChild(d.Uf)):c.appendChild(d.Uf)}}function an(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.F.values());for(var d=b.next();!d.done;d=b.next())Zm(d.value);Zm(a.g);a.i.clear();a.F.clear()}a.m&&cn(a,a.h,a.g,c,[])}}
|
|
@@ -545,107 +546,107 @@ function qn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round
|
|
|
545
546
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function vn(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=qn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
546
547
|
function rn(a,b){if(!b||a.includes("offline:"))return a;a=new mb(a);a.g.set("CMCD",b);return a.toString()}var pn="m",nn="a",tn="v",on="av",xn="i",zn="c",yn="tt";P("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",wi:"s",OTHER:"o"});function Dn(a){this.h=a;this.g=null}q=Dn.prototype;q.configure=function(a){this.h=a};q.Fh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(En)?1E3*this.g.get(En):null};q.Eh=function(){return this.h.enabled&&this.g&&this.g.has(Fn)?1E3*this.g.get(Fn):null};q.jj=function(){return this.h.enabled&&this.g&&this.g.has(Gn)?this.g.get(Gn):null};q.kj=function(){return this.h.enabled&&this.g&&this.g.has(Hn)?this.g.get(Hn):null};
|
|
547
548
|
q.getBandwidthEstimate=function(a){var b=this.Eh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function In(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",Dn);Dn.prototype.getBandwidthEstimate=Dn.prototype.getBandwidthEstimate;Dn.prototype.getRoundTripTime=Dn.prototype.kj;Dn.prototype.getResponseDelay=Dn.prototype.jj;Dn.prototype.getEstimatedThroughput=Dn.prototype.Eh;
|
|
548
|
-
Dn.prototype.getMaxBitrate=Dn.prototype.Fh;var Fn="etp",En="mb",Gn="rd",Hn="rtt";function Wn(){this.g=null;this.h=[]}function Xn(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)})}Wn.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=Yn;this.bf=this.h=null;this.
|
|
549
|
-
this.Ef=[];this.u=null;this.Da=new Lf(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.Sa=this.g.preferredTextLanguage;this.be=this.g.preferredTextRole;this.$d=this.g.preferForcedSubs;this.Yd=[];b&&b(this);this.
|
|
550
|
-
this.I=ao(this);this.I.Ug(this.g.streaming.forceHTTP);this.I.Vg(this.g.streaming.forceHTTPS);this.If=this.oa=this.A=null;this.Hf=new Ob(function(){return O(function(d){if(1==d.g)return c.oa?E(d,c.wc(c.If,!0),3):d.B(0);if(4!=d.g)return E(d,c.load(c.oa),4);c.If.play();c.oa=null;F(d)})});bo&&(this.A=bo(),this.A.configure(this.g.ads),this.Yb.
|
|
551
|
-
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.Hf.stop();if(c.oa)return h.B(0);c.If=c.h;g=c;return E(h,c.xh(!0),3)}g.oa=h.h;F(h)})}),this.Yb.
|
|
552
|
-
this.wc(a,!0))}oa(X,gb);function fo(a){null!=a.L&&(Aj(a.L),a.L.release(),a.L=null)}function go(a,b){if(b.lcevc.enabled){var c=a.xb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Sb()||Tb())&&(b.mediaSource.forceTransmux||Ya("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));fo(a);null==a.L&&(a.L=new zj(a.h,a.ih,b.lcevc),a.H&&(a.H.
|
|
553
|
-
q.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==io)return g.return();fo(a);b=a.detach();a.l=io;return E(g,b,2);case 2:c=[];d=t(a.Ef);for(e=d.next();!e.done;e=d.next())f=e.value,f.m||c.push(f.destroy());a.Ef=[];return E(g,Promise.all(c),3);case 3:a.rf&&(a.rf.release(),a.rf=null);a.Zb&&(a.Zb.release(),a.Zb=null);a.m&&(a.m.release(),a.m=null);a.Ia&&(a.Ia.release(),a.Ia=null);a.Yb&&(a.Yb.release(),a.Yb=null);a.ra=null;a.g=null;a.u=null;a.bf=null;a.
|
|
554
|
-
null;if(!a.I){g.B(4);break}return E(g,a.I.destroy(),5);case 5:a.I=null;case 4:a.
|
|
549
|
+
Dn.prototype.getMaxBitrate=Dn.prototype.Fh;var Fn="etp",En="mb",Gn="rd",Hn="rtt";function Wn(){this.g=null;this.h=[]}function Xn(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)})}Wn.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=Yn;this.bf=this.h=null;this.ba=!1;this.rf=new fd;this.Zb=new fd;this.m=new fd;this.Ia=new fd;this.Yb=new fd;this.G=this.H=this.F=this.I=null;this.tf=0;this.S=new Wn;this.ea=this.hh=this.Y=this.i=this.Ma=this.K=this.j=this.ib=this.L=this.ih=this.Z=this.R=this.Xb=this.N=this.lf=this.J=this.Za=null;this.Xa=!1;this.ra=this.s=null;this.Gf=1E9;this.fe=[];this.O=NaN;this.g=Zn(this);this.$={width:Infinity,height:Infinity};this.Ze=new ri(this.g,this.$,null);
|
|
550
|
+
this.Ef=[];this.u=null;this.Da=new Lf(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.Sa=this.g.preferredTextLanguage;this.be=this.g.preferredTextRole;this.$d=this.g.preferForcedSubs;this.Yd=[];b&&b(this);this.R=$n(this);this.Z=new Dn(this.g.cmsd);
|
|
551
|
+
this.I=ao(this);this.I.Ug(this.g.streaming.forceHTTP);this.I.Vg(this.g.streaming.forceHTTPS);this.If=this.oa=this.A=null;this.Hf=new Ob(function(){return O(function(d){if(1==d.g)return c.oa?E(d,c.wc(c.If,!0),3):d.B(0);if(4!=d.g)return E(d,c.load(c.oa),4);c.If.play();c.oa=null;F(d)})});bo&&(this.A=bo(),this.A.configure(this.g.ads),this.Yb.o(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();
|
|
552
|
+
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.Hf.stop();if(c.oa)return h.B(0);c.If=c.h;g=c;return E(h,c.xh(!0),3)}g.oa=h.h;F(h)})}),this.Yb.o(this.A,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Hf.U(.1)}));this.rf.o(window,"online",function(){co(c);c.Mg()});this.nf=new Ob(function(){return eo(c)});this.qa=null;a&&(od("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
|
|
553
|
+
this.wc(a,!0))}oa(X,gb);function fo(a){null!=a.L&&(Aj(a.L),a.L.release(),a.L=null)}function go(a,b){if(b.lcevc.enabled){var c=a.xb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Sb()||Tb())&&(b.mediaSource.forceTransmux||Ya("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));fo(a);null==a.L&&(a.L=new zj(a.h,a.ih,b.lcevc),a.H&&(a.H.R=a.L))}else fo(a)}function ho(a,b){return new T(a,b)}q=X.prototype;
|
|
554
|
+
q.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==io)return g.return();fo(a);b=a.detach();a.l=io;return E(g,b,2);case 2:c=[];d=t(a.Ef);for(e=d.next();!e.done;e=d.next())f=e.value,f.m||c.push(f.destroy());a.Ef=[];return E(g,Promise.all(c),3);case 3:a.rf&&(a.rf.release(),a.rf=null);a.Zb&&(a.Zb.release(),a.Zb=null);a.m&&(a.m.release(),a.m=null);a.Ia&&(a.Ia.release(),a.Ia=null);a.Yb&&(a.Yb.release(),a.Yb=null);a.ra=null;a.g=null;a.u=null;a.bf=null;a.R=null;a.Z=
|
|
555
|
+
null;if(!a.I){g.B(4);break}return E(g,a.I.destroy(),5);case 5:a.I=null;case 4:a.s&&(a.s.release(),a.s=null),gb.prototype.release.call(a),F(g)}})};
|
|
555
556
|
function jo(){window.Promise||Ya("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Vb("Trident/"))return!1;var a=hc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Pb()?!0:Qb("application/x-mpegurl")}function ko(a,b){a.dispatchEvent(ho("onstatechange",(new Map).set("state",b)))}
|
|
556
|
-
q.wc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==io)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return E(g,c.detach(),2);case 2:return E(g,lo(c,"attach"),4);case 4:if(g.h)return g.return();sa(g,5,6);d||(ko(c,"attach"),e=function(){var h=mo(c);h&&no(c,h)},c.Zb.
|
|
557
|
-
}})};q.mh=function(a){this.ih=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==io)throw new U(2,7,7E3);return E(c,b.Oc(!1,a),2)}if(3!=c.g)return E(c,lo(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Zb.qb(),b.h=null),ko(b,"detach"),b.A&&!a&&b.A.release()}finally{b.
|
|
557
|
+
q.wc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==io)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return E(g,c.detach(),2);case 2:return E(g,lo(c,"attach"),4);case 4:if(g.h)return g.return();sa(g,5,6);d||(ko(c,"attach"),e=function(){var h=mo(c);h&&no(c,h)},c.Zb.o(a,"error",e),c.h=a);if(!b||!Pb()||c.H){g.B(6);break}return E(g,oo(c),6);case 6:wa(g);c.S.release();xa(g,0);break;case 5:return f=va(g),E(g,c.detach(),10);case 10:throw f;
|
|
558
|
+
}})};q.mh=function(a){this.ih=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==io)throw new U(2,7,7E3);return E(c,b.Oc(!1,a),2)}if(3!=c.g)return E(c,lo(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Zb.qb(),b.h=null),ko(b,"detach"),b.A&&!a&&b.A.release()}finally{b.S.release()}F(c)})};function lo(a,b){var c;return O(function(d){return 1==d.g?(c=++a.tf,E(d,Xn(a.S,b),2)):c!=a.tf?(a.S.release(),d.return(!0)):d.return(!1)})}
|
|
558
559
|
q.Oc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:return c.l!=io&&(c.l=Yn),E(p,lo(c,"unload"),2);case 2:if(p.h)return p.return();ta(p,3);c.Xa=!1;ko(c,"unload");a&&!Pb()&&(a=!1);fo(c);d=c.Yd.map(function(r){return r()});c.Yd=[];return E(p,Promise.all(d),5);case 5:c.dispatchEvent(ho("unloading"));c.Xb&&(c.Xb.release(),c.Xb=null);c.h&&(c.m.qb(),c.Ia.qb());c.nf.stop();c.Za&&(c.Za.release(),c.Za=null);c.lf&&(c.lf.stop(),c.lf=null);
|
|
559
|
-
if(!c.K){p.B(6);break}return E(p,c.K.stop(),7);case 7:c.K=null,c.Ma=null;case 6:if(!c.
|
|
560
|
-
new Promise(function(r){return(new Ob(r)).
|
|
561
|
-
k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(hf={},qi.clear());c.i=null;c.u=new fl;c.Ff=null;c.fe=[];c.O=NaN;po(c);case 3:wa(p);c.
|
|
562
|
-
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==io)throw new U(2,7,7E3);e=null;f="";a instanceof vm?(e=a,f=e.$c()||""):f=a||"";return E(A,Xn(d.
|
|
563
|
-
2),E(B,Xn(d.
|
|
564
|
-
A.h;if(!e){d.u=new fl;A.B(11);break}ym(e,d);d.u=e.getStats();return E(A,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Zb:Date.now()/1E3;d.u=e?e.getStats():new fl;d.
|
|
565
|
-
19);case 19:d.g=e.getConfiguration();d.Ze=e.u;d.Ma=e.F;d.K=Am(e);d.Xb=Bm(e);d.ib=e.Xa;d.i=e.mg();if(p=e.
|
|
566
|
-
"function"!=typeof d.
|
|
560
|
+
if(!c.K){p.B(6);break}return E(p,c.K.stop(),7);case 7:c.K=null,c.Ma=null;case 6:if(!c.s){p.B(8);break}return E(p,c.s.stop(),8);case 8:if(!c.j){p.B(10);break}return E(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.J&&(c.J.release(),c.J=null);c.G&&(c.G.release(),c.G=null);if(!c.H){p.B(12);break}return E(p,c.H.destroy(),13);case 13:c.H=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.oa&&!b&&(c.oa.destroy(),c.oa=null);b||c.Hf.stop();c.Z&&(c.Z.g=null);c.h&&Zm(c.h);if(!c.h||!c.h.src){p.B(14);break}return E(p,
|
|
561
|
+
new Promise(function(r){return(new Ob(r)).U(.1)}),15);case 15:c.h.removeAttribute("src"),c.h.load();case 14:if(!c.F){p.B(16);break}return E(p,c.F.destroy(),17);case 17:c.F=null;case 16:c.qa&&c.Y!=c.qa.$c()&&(c.qa.m||c.qa.destroy(),c.qa=null);c.Y=null;c.hh=null;c.N=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=
|
|
562
|
+
k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(hf={},qi.clear());c.i=null;c.u=new fl;c.Ff=null;c.fe=[];c.O=NaN;po(c);case 3:wa(p);c.S.release();xa(p,4);break;case 4:if(a&&Pb()&&!c.H)return E(p,oo(c),0);p.B(0)}})};q.Dk=function(a){this.ea=a};
|
|
563
|
+
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==io)throw new U(2,7,7E3);e=null;f="";a instanceof vm?(e=a,f=e.$c()||""):f=a||"";return E(A,Xn(d.S,"load"),2);case 2:d.S.release();if(!d.h)throw new U(2,7,7002);if(!d.Y){A.B(3);break}d.Y=f;return E(A,d.Oc(!1),3);case 3:g=++d.tf;h=function(){return O(function(z){if(1==z.g)return d.tf==g?z.B(0):e?E(z,e.destroy(),3):z.B(3);throw new U(2,7,7E3);})};k=function(z,y){return O(function(B){switch(B.g){case 1:return ta(B,
|
|
564
|
+
2),E(B,Xn(d.S,y),4);case 4:return E(B,h(),5);case 5:return E(B,z(),6);case 6:return E(B,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:wa(B),d.S.release(),xa(B,0)}})};sa(A,5,6);null==b&&e&&(b=e.getStartTime());d.ea=b;d.Xa=!1;d.dispatchEvent(ho("loading"));if(e){c=e.S;A.B(8);break}if(c){A.B(8);break}return E(A,k(function(){return O(function(z){if(1==z.g)return E(z,qo(d,f),2);c=z.h;F(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){ym(e,d);d.u=e.getStats();A.B(11);break}return E(A,ro(d,f,b,c,!0),12);case 12:e=
|
|
565
|
+
A.h;if(!e){d.u=new fl;A.B(11);break}ym(e,d);d.u=e.getStats();return E(A,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Zb:Date.now()/1E3;d.u=e?e.getStats():new fl;d.Y=f;d.hh=c||null;if(m)return E(A,k(function(){return O(function(z){return E(z,so(d,c),0)})},"initializeSrcEqualsDrmInner_"),24);if(d.H){A.B(17);break}return E(A,k(function(){return O(function(z){return E(z,oo(d),0)})},"initializeMediaSourceEngineInner_"),17);case 17:return E(A,k(function(){return e.oa},"waitForManifest"),
|
|
566
|
+
19);case 19:d.g=e.getConfiguration();d.Ze=e.u;d.Ma=e.F;d.K=Am(e);d.Xb=Bm(e);d.ib=e.Xa;d.i=e.mg();if(p=e.s)d.Da=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(to(d),d.configure("manifest.disableVideo",!0));return E(A,k(function(){return e.ea},"waitForDrm"),20);case 20:return d.F=Cm(e),E(A,k(function(){return O(function(z){return E(z,d.F.wc(d.h),0)})},"drmEngine_.attach"),21);case 21:return E(A,k(function(){return e.N},"waitForChooseInitialVariant"),22);case 22:return!(r=e.A)||d.ra&&d.ra==r||(d.s=zm(e),d.ra=e.A,
|
|
567
|
+
"function"!=typeof d.s.setMediaElement&&(od("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(od("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(od("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),
|
|
567
568
|
u=Dm(e),v=e.ra,E(A,k(function(){return O(function(z){return E(z,uo(d,n,v,u),0)})},"loadInner_"),23);case 23:xm(e);A.B(16);break;case 24:return E(A,k(function(){return O(function(z){return E(z,vo(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(ho("loaded"));case 6:wa(A);if(!e){A.B(26);break}return E(A,e.destroy(),26);case 26:d.qa=null;xa(A,0);break;case 5:w=va(A);if(7E3==w.code){A.B(28);break}return E(A,d.Oc(!1),28);case 28:throw w;}})};
|
|
568
569
|
function to(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.zk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?E(e,wo(c),2):3!=e.g?(d=e.h,E(e,c.Oc(a,b),3)):e.return(d)})};
|
|
569
570
|
q.xh=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,wo(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
|
|
570
|
-
function wo(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.K&&a.Ma&&a.
|
|
571
|
+
function wo(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.K&&a.Ma&&a.Y))return e.B(2);c=a.h.currentTime;a.W()&&(c=null);d=Date.now()/1E3;return E(e,xo(a,a.Y,c,a.hh,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.K,h=a.Ma;f.h=a.i;f.j=g;f.F=h;f=b;g=a.ra;f.i=a.s;f.A=g;b.s=a.Da;b.start();a.i=null;a.K=null;a.Ma=null;a.s=null;a.ra=null}return e.return(b)})}
|
|
571
572
|
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,ro(d,a,b,c),2);(e=f.h)?e.start().catch(function(){}):no(d,new U(2,7,7005));return f.return(e)})};
|
|
572
|
-
function ro(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,qo(a,b),3);2!=l.g&&(d=l.h);if(g=yo(a,d))return l.return(null);h=!1;k=!0;e&&(a.
|
|
573
|
-
function xo(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,z,y,B,C,D;return O(function(G){if(1==G.g)return k=null,l=Pe(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.
|
|
573
|
+
function ro(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,qo(a,b),3);2!=l.g&&(d=l.h);if(g=yo(a,d))return l.return(null);h=!1;k=!0;e&&(a.s&&a.ra==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(xo(a,b,c,d||null,f,!e,h,k))})}
|
|
574
|
+
function xo(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,z,y,B,C,D;return O(function(G){if(1==G.g)return k=null,l=Pe(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.R&&k.m?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(K,I){m()?k.configure(K,I):a.configure(K,I)},Infinity!=a.$.width||Infinity!=a.$.height?G.B(2):E(G,lc(),3);2!=G.g&&(r=G.h,a.$.width=r.width,a.$.height=r.height);u=new ri(l,a.$,null);v={networkingEngine:a.I,
|
|
574
575
|
filter:function(K){var I,J;return O(function(H){if(1==H.g)return E(H,si(u,K),2);if(4!=H.g){I=H.h;if(!I)return H.B(0);J=ho("trackschanged");return E(H,Promise.resolve(),4)}k.dispatchEvent(J);F(H)})},makeTextStreamsForClosedCaptions:function(K){return zo(a,K)},onTimelineRegionAdded:function(K){var I=k.G;a:{var J=t(I.g);for(var H=J.next();!H.done;H=J.next())if(H=H.value,H.schemeIdUri==K.schemeIdUri&&H.id==K.id&&H.startTime==K.startTime&&H.endTime==K.endTime){J=H;break a}J=null}null==J&&(I.g.add(K),K=
|
|
575
|
-
new T("regionadd",new Map([["region",K]])),I.dispatchEvent(K))},onEvent:function(K){return k.dispatchEvent(K)},onError:function(K){return k.onError(K)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){p("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.
|
|
576
|
-
(new Map).set("isLive",a.
|
|
576
|
+
new T("regionadd",new Map([["region",K]])),I.dispatchEvent(K))},onEvent:function(K){return k.dispatchEvent(K)},onError:function(K){return k.onError(K)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){p("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.R&&a.j.updateDuration()},newDrmInfo:function(K){var I=k.l,J=I?I.g:null;J&&I.u&&ui(u,J.keySystem,K)},onManifestUpdated:function(){var K=
|
|
577
|
+
(new Map).set("isLive",a.W());k.dispatchEvent(ho("manifestupdated",K));wm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.W())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}};w=new sl(function(){return a.Qa()});w.addEventListener("regionadd",function(K){var I=K.region;Ao(a,"timelineregionadded",I,k);wm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(I)})});A=null;l.streaming.observeQualityChanges&&(A=new tl(function(){return a.Kb()}),A.addEventListener("qualitychange",function(K){var I=
|
|
577
578
|
K.quality;K=K.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",K);a.dispatchEvent(ho("mediaqualitychanged",I))}));z=!0;y={bc:a.I,onError:function(K){return k.onError(K)},We:function(K){wm(k,!0,function(){a:{var I=ho("keystatuschanged");a.dispatchEvent(I);
|
|
578
579
|
var J=Object.keys(K);I=1==J.length&&"00"==J[0];var H=!1;if(J.length){J=t(a.i.variants);for(var L=J.next();!L.done;L=J.next()){L=L.value;var M=[];L.audio&&M.push(L.audio);L.video&&M.push(L.video);M=t(M);for(var N=M.next();!N.done;N=M.next()){var Q=N.value;N=L.allowedByKeySystem;if(Q.keyIds.size){L.allowedByKeySystem=!0;Q=t(Q.keyIds);for(var S=Q.next();!S.done;S=Q.next())if(S=S.value,(S=K[I?"00":S])||a.F.H)L.allowedByKeySystem=L.allowedByKeySystem&&!!S&&!wi.includes(S)}N!=L.allowedByKeySystem&&(H=!0)}}}if(H&&
|
|
579
580
|
(Bo(a),!Co(a)))break a;(I=a.j.j)&&!I.allowedByKeySystem&&Do(a)}})},onExpirationUpdated:function(K,I){var J=ho("expirationupdated");k.dispatchEvent(J);if((J=k.j)&&J.onExpirationUpdated)J.onExpirationUpdated(K,I)},onEvent:function(K){k.dispatchEvent(K);"drmsessionupdate"==K.type&&z&&(z=!1,K=Date.now()/1E3-k.Ma,(a.u||k.getStats()).j=K,a.L&&Aj(a.L))}};B=ao(a,m);sg(a.I,B);C=function(){return a.Wc(y)};D={config:l,Mj:v,Wj:w,Vj:A,Wc:C,Lj:u,networkingEngine:B,Fi:f,Ei:h};k=new vm(b,d,e,c,D);a.Ef.push(k);return G.return(k)})}
|
|
580
581
|
function qo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Om(b,a.I,c),2);d=e.h;"application/x-mpegurl"==d&&cc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
581
582
|
function yo(a,b){if(!Pb())return!0;if(b){if(""==(a.h||Rb()).canPlayType(b))return!1;if(!(Pb()&&b in zi))return!0;if(Ce(b)){if(a.g.streaming.preferNativeHls)return!0;if(cc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(cc())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
582
|
-
function oo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return ko(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):od("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Ff=b,d=Eo(a.h,c,function(h,k,l){Fo(a,h,k,l)},a.L),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.
|
|
583
|
-
function uo(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I;return O(function(J){switch(J.g){case 1:ko(a,"load");e=a.h;a.J=new Xk({He:function(){return e.playbackRate},Ac:function(){return e.defaultPlaybackRate},Wg:function(H){e.playbackRate=H},Qh:function(H){e.currentTime+=H}});f=function(){return Go(a)};g=function(){return Ho(a)};a.m.
|
|
584
|
-
Io(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.
|
|
585
|
-
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);Io(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);u=function(H){a.G=Oo(a,H);a.Za=Po(a,
|
|
586
|
-
w=a.
|
|
587
|
-
if((D=a.
|
|
588
|
-
4)}L.qa=M.h;F(M)})},a.m.
|
|
583
|
+
function oo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return ko(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):od("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Ff=b,d=Eo(a.h,c,function(h,k,l){Fo(a,h,k,l)},a.L),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.Z=f,E(g,d.N,2);a.H=d;F(g)})}
|
|
584
|
+
function uo(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I;return O(function(J){switch(J.g){case 1:ko(a,"load");e=a.h;a.J=new Xk({He:function(){return e.playbackRate},Ac:function(){return e.defaultPlaybackRate},Wg:function(H){e.playbackRate=H},Qh:function(H){e.currentTime+=H}});f=function(){return Go(a)};g=function(){return Ho(a)};a.m.o(e,"playing",f);a.m.o(e,"pause",f);a.m.o(e,"ended",f);a.m.o(e,"ratechange",g);go(a,a.g);a.Sa=a.g.preferredTextLanguage;a.be=a.g.preferredTextRole;a.$d=a.g.preferForcedSubs;
|
|
585
|
+
Io(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.s.init(function(H,L,M){a.i&&a.j&&H!=a.j.j&&Jo(a,H,!0,void 0===L?!1:L,void 0===M?0:M)});a.s.setMediaElement(e);a.s.setCmsdManager(a.Z);a.j=Ko(a);a.j.configure(a.g.streaming);a.l=Lo;e.textTracks&&a.m.o(e.textTracks,"addtrack",function(H){if(H.track)switch(H=H.track,H.kind){case "chapters":Mo(a,H)}});a.dispatchEvent(ho("streaming"));h=c;(k=a.j.j)||h||(h=No(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(r=
|
|
586
|
+
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);Io(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);u=function(H){a.G=Oo(a,H);a.Za=Po(a,H);Qo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ea);if(k){J.B(4);break}if(!a.g.streaming.startAtSegmentBoundary){J.B(5);break}v=a.i.presentationTimeline;
|
|
587
|
+
w=a.ea||a.h.currentTime;A=v.Bc();z=v.Mb();w<A?w=A:w>z&&(w=z);return E(J,Ro(h,w),6);case 6:y=J.h,u(y);case 5:Jo(a,h,!0,!1,0);case 4:return a.G.Kf(),B=a.mc().find(function(H){return H.active}),B||((C=yf(a.i.textStreams,a.Sa,a.be,a.$d)[0]||null)&&el(a.u.h,C,!0),h&&(C?(h.audio&&So(a,h.audio,C)&&(a.ba=!0),a.ba&&a.H.H.setTextVisibility(!0),To(a)):a.ba=!1),C&&(a.g.streaming.alwaysStreamText||a.Gc())&&Ml(a.j,C)),E(J,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.s.enable(),Uo(a));Bo(a);Co(a);a.i.variants.some(function(H){return H.primary});
|
|
588
|
+
if((D=a.W())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)G=function(){return Vo(a)},a.m.o(e,"timeupdate",G);D||(K=function(){return Wo(a)},a.m.o(e,"timeupdate",K),Wo(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(I=function(){var H,L;return O(function(M){if(1==M.g){H=a.h.duration-a.h.currentTime;if(isNaN(H)||!(H<=a.g.streaming.preloadNextUrlWindow))return M.B(0);a.m.Wa(e,"timeupdate",I);L=a;return E(M,a.preload(a.i.nextUrl),
|
|
589
|
+
4)}L.qa=M.h;F(M)})},a.m.o(e,"timeupdate",I)),a.m.o(e,"ended",function(){a.load(a.qa||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(D);a.Xa=!0;a.m.na(e,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});F(J)}})}
|
|
589
590
|
function so(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Lc,d=Date.now()/1E3,e=!0,a.F=a.Wc({bc:a.I,onError:function(k){no(a,k)},We:function(){},onExpirationUpdated:function(){var k=ho("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:[]},
|
|
590
591
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Ae(b):"",codecs:b?Be(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ua,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(le(g.mimeType,
|
|
591
|
-
g.codecs)),b.startsWith("audio/")?(g.type=c
|
|
592
|
-
function vo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return ko(a,"src-equals"),d=a.h,a.G=new Nk(d),e=!1,a.Yd.push(function(){e=!0}),null!=a.
|
|
593
|
-
"ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.
|
|
594
|
-
a.m.
|
|
595
|
-
"change",A);(new Ob(A)).
|
|
596
|
-
l]),2);if((m=a.
|
|
592
|
+
g.codecs)),b.startsWith("audio/")?(g.type=c.aa,f.audio=g):f.video=g,a.F.Z=!0,E(h,Jh(a.F,[f],[]),2)):E(h,a.F.wc(a.h),0)})}
|
|
593
|
+
function vo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return ko(a,"src-equals"),d=a.h,a.G=new Nk(d),e=!1,a.Yd.push(function(){e=!0}),null!=a.ea&&a.G.Lf(a.ea),a.J=new Xk({He:function(){return d.playbackRate},Ac:function(){return d.defaultPlaybackRate},Wg:function(v){d.playbackRate=v},Qh:function(v){d.currentTime+=v}}),f=a.g.streaming.rebufferingGoal,Qo(a,d,f),g=function(){return Go(a)},h=function(){return Ho(a)},a.m.o(d,"playing",g),a.m.o(d,"pause",g),a.m.o(d,"ended",g),a.m.o(d,
|
|
594
|
+
"ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.o(d.audioTracks,"addtrack",function(){return Bo(a)}),a.m.o(d.audioTracks,"removetrack",function(){return Bo(a)}),a.m.o(d.audioTracks,"change",function(){return Bo(a)})),d.textTracks&&(a.m.o(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "metadata":Xo(a,v);break;case "chapters":Mo(a,v);break;default:Bo(a)}}),a.m.o(d.textTracks,"removetrack",function(){return Bo(a)}),
|
|
595
|
+
a.m.o(d.textTracks,"change",function(){return Bo(a)})),d.src=ln(a.R,a.Y,c),(Wb()||Zb())&&d.load(),"none"!=d.preload&&!d.autoplay&&Ce(c)&&hc()&&d.load(),a.l=Yo,a.dispatchEvent(ho("streaming")),k=new eg,Ek(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.G.Kf();k.resolve()}),Ek(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var v;return O(function(w){if(1==w.g)return Zo(a),v=$o(a),v.find(function(A){return"disabled"!=A.mode})?(0<v.length&&(a.ba=!0),w.B(2)):E(w,new Promise(function(A){a.m.na(d.textTracks,
|
|
596
|
+
"change",A);(new Ob(A)).U(1)}),2);if(e)return w.return();ap(a);F(w)})}),d.error?k.reject(mo(a)):"none"==d.preload&&(Ya('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.na(d,"error",function(){k.reject(mo(a))}),l=new Promise(function(v,w){(new Ob(w)).U(a.g.streaming.loadTimeout)}),E(u,Promise.race([k,
|
|
597
|
+
l]),2);if((m=a.W())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return Vo(a)},a.m.o(d,"timeupdate",n);m||(p=function(){return Wo(a)},a.m.o(d,"timeupdate",p),Wo(a));a.A&&(a.A.onManifestUpdated(m),m&&(r=a.Qa().end,a.m.o(d,"progress",function(){var v=a.Qa().end;r!=v&&(a.A.onManifestUpdated(a.W()),r=v)})));a.Xa=!0;F(u)})}function Zo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.df(b,a.g.preferredVariantRole)}
|
|
597
598
|
function ap(a){var b=a.g.preferredTextLanguage;""!=b&&a.Pg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
598
|
-
function Xo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.
|
|
599
|
+
function Xo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,bp(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Ob(function(){var d=cp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).La().U(.5);a.Yd.push(function(){c.stop()})}}
|
|
599
600
|
function Fo(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())bp(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function bp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(ho("metadata",b))}
|
|
600
|
-
function Mo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ob(function(){b.mode="hidden"})).La().
|
|
601
|
-
function ao(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?wm(b(),!0,e):e()}b||(b=function(){return null});return new og(function(e,f,g,h){var k=b()?b().i:a.
|
|
602
|
-
In(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],In(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(ho("downloadfailed",e))},function(e,f,g){d(function(){var h=a.
|
|
603
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}sn(h,f,{ot:pn,su:!h.i})}}catch(N){Za("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case zg: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.
|
|
604
|
-
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(!Bd(m.
|
|
601
|
+
function Mo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ob(function(){b.mode="hidden"})).La().U(.5);a.Yd.push(function(){c.stop()})}}q.$j=function(){for(var a=this.S;a.g;)a.release()};q.Wc=function(a){return new Ch(a)};
|
|
602
|
+
function ao(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?wm(b(),!0,e):e()}b||(b=function(){return null});return new og(function(e,f,g,h){var k=b()?b().i:a.s;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(ho("downloadheadersreceived",f));d(function(){if(a.Z){var h=a.Z;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],
|
|
603
|
+
In(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],In(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(ho("downloadfailed",e))},function(e,f,g){d(function(){var h=a.R,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)sn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
604
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}sn(h,f,{ot:pn,su:!h.i})}}catch(N){Za("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case zg: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.W()?"l":"v"};n.ot=wn(k);var p=n.ot===tn||n.ot===nn||n.ot===on||n.ot===yn,r=k.stream;if(r){var u=h.h.Ua();if(p&&(n.bl=An(h,r.type),n.ot!==yn)){var v=Bn(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);
|
|
605
|
+
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(!Bd(m.P(),A.P())){var z=A.P()[0],y=f.uris[0],B=new URL(z),C=new URL(y);if(B.origin!==C.origin)var D=z;else{for(var G=B.pathname.split("/").slice(1),K=C.pathname.split("/").slice(1,-1);G[0]===K[0];)G.shift(),K.shift();for(;K.length;)K.shift(),G.unshift("..");D=G.join("/")}n.nor=D}if((A.Va||A.za)&&(m.Va!=A.Va||m.za!=A.za)){var I=A.Va+"-";A.za&&(I+=A.za);n.nrr=I}}}var J=h.h.Ua()||1,H=Bn(h,r.type)||
|
|
605
606
|
500,L=r.bandwidth;var M=L?L*(m.endTime-m.startTime)/1E3/(H/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==yn&&(n.tb=Cn(h,n.ot)/1E3);sn(h,f,n)}}catch(N){Za("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:sn(h,f,{ot:"k"});break;case 4:sn(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.xe=isNaN(f.xe)?e:f.xe+e)})}
|
|
606
607
|
function Oo(a,b){return new Ok(a.h,a.i,a.g.streaming,b,function(){a.Za&&$k(a.Za,!0);a.j&&a.j.ie();a.N&&dp(a)},function(c){return a.dispatchEvent(c)})}
|
|
607
|
-
function Po(a,b){b=new Jm(a.Xb,a.
|
|
608
|
-
function Qo(a,b,c){a.N=new Yf;a.N.g=$f;ag(a.N,c,Math.min(.5,c/2));po(a);a.lf=(new Ob(function(){dp(a)})).xa(.25);a.m.
|
|
609
|
-
function dp(a){switch(a.l){case Yo:if(a.h.ended)var b=!0;else{var c=Ki(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Lo:a:if(a.h.ended||Rj(a.H))b=!0;else{if(a.i.presentationTimeline.
|
|
610
|
-
function $n(a){return new kn({getBandwidthEstimate:function(){return a.
|
|
611
|
-
function Ko(a){return new yl(a.i,{Ge:function(){return a.G?a.G.we():0},getBandwidthEstimate:function(){return a.
|
|
612
|
-
f);a.dispatchEvent(ho("segmentappended",d));a.
|
|
608
|
+
function Po(a,b){b=new Jm(a.Xb,a.W()||0<b);b.addEventListener("enter",function(d){Ao(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ao(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ao(a,"timelineregionenter",e),Ao(a,"timelineregionexit",e))});var c=new Zk(a.h);c.g.add(b);a.ib&&c.g.add(a.ib);return c}
|
|
609
|
+
function Qo(a,b,c){a.N=new Yf;a.N.g=$f;ag(a.N,c,Math.min(.5,c/2));po(a);a.lf=(new Ob(function(){dp(a)})).xa(.25);a.m.o(b,"waiting",function(){return dp(a)});a.m.o(b,"stalled",function(){return dp(a)});a.m.o(b,"canplaythrough",function(){return dp(a)});a.m.o(b,"progress",function(){return dp(a)})}
|
|
610
|
+
function dp(a){switch(a.l){case Yo:if(a.h.ended)var b=!0;else{var c=Ki(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Lo:a:if(a.h.ended||Rj(a.H))b=!0;else{if(a.i.presentationTimeline.W()){c=a.i.presentationTimeline.lc();var d=Ki(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Mi(a.h.buffered,a.h.currentTime);c=a.N;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Zf:$f;c.g=d;(b=b!=d)&&d===Zf&&(c.h=Date.now());b&&po(a)}function Eo(a,b,c,d){return new Ij(a,b,c,d)}
|
|
611
|
+
function $n(a){return new kn({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Kb:function(){return a.Kb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Ua:function(){return a.Ua()},kc:function(){return a.kc()},xb:function(){return a.xb()},W:function(){return a.W()}},a.g.cmcd)}
|
|
612
|
+
function Ko(a){return new yl(a.i,{Ge:function(){return a.G?a.G.we():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Ua:function(){return a.Ua()},ia:a.H,bc:a.I,onError:function(b){return no(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Rj:function(){a.K&&a.K.update&&a.K.update()},Hg:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.G){a.G.Rh();var g=Zj(a.H,f);!a.W()&&a.h.paused&&null!=g&&0<g&&a.G.we()<g&&a.G.Lf(g)}dp(a);d=(new Map).set("start",d).set("end",e).set("contentType",
|
|
613
|
+
f);a.dispatchEvent(ho("segmentappended",d));a.s&&c.fastSwitching&&b.ce&&b.Oe&&a.s.trySuggestStreams()},Qj:function(b,c){(c=c.Dg)&&a.ib&&vl(a.ib,c,b)},oh:function(b,c){var d=a.F;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new Tg(Fb(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Sh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
|
|
613
614
|
return d},Sj:function(b,c,d){Fo(a,b,c,d)},Ce:function(b,c){return a.Ce(b,c)}})}
|
|
614
615
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(od("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(od("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
615
616
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&od("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){od("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
|
|
616
617
|
a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==
|
|
617
618
|
a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&
|
|
618
619
|
(a.drm.retryParameters.baseDelay=100));var d=um(this.g,a,Zn(this));ep(this);return d};
|
|
619
|
-
function ep(a){a.Ze=new ri(a.g,a
|
|
620
|
-
a.Ff!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):od("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.H,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Ff=b;a.j&&(b=a.j,(c=b.i.get(Jc))&&Kl(b,c.stream,!0,0,!0))}else b=a.H.H,b.configure&&b.configure(a.g.textDisplayer);a.
|
|
621
|
-
ag(a.N,b,Math.min(.5,b/2)));a.i&&Io(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.
|
|
620
|
+
function ep(a){a.Ze=new ri(a.g,a.$,a.F);if(a.K){var b=Pe(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.F&&a.F.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=io&&ti(a.Ze,a.i)&&Bo(a)}catch(f){no(a,f)}a.s&&Co(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Do(a)}a.I&&(a.I.Ug(a.g.streaming.forceHTTP),a.I.Vg(a.g.streaming.forceHTTPS));if(a.H)if(a.H.configure(a.g.mediaSource),a.H.Z=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
621
|
+
a.Ff!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):od("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.H,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Ff=b;a.j&&(b=a.j,(c=b.i.get(Jc))&&Kl(b,c.stream,!0,0,!0))}else b=a.H.H,b.configure&&b.configure(a.g.textDisplayer);a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),Uo(a));a.N&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
622
|
+
ag(a.N,b,Math.min(.5,b/2)));a.i&&Io(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.R&&a.R.configure(a.g.cmcd);a.Z&&a.Z.configure(a.g.cmsd)}q.getConfiguration=function(){var a=Zn(this);um(a,this.g,Zn(this));return a};q.gj=function(){var a=Zn(this);um(a,this.g,Zn(this));return jm(this.g,Zn(this))};
|
|
622
623
|
q.Ch=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Qa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.ek=function(){for(var a in this.g)delete this.g[a];um(this.g,Zn(this),Zn(this));ep(this)};q.Od=function(){return this.l};q.ng=function(){return this.i?this.i.type:null};q.fj=function(){return this.h};
|
|
623
|
-
q.kc=function(){return this.I};q.$c=function(){return this.
|
|
624
|
-
q.Qa=function(){if(this.i){if(!this.Xa&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Bc(),end:a.Mb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.wj=function(){this.
|
|
624
|
+
q.kc=function(){return this.I};q.$c=function(){return this.Y};q.De=function(){return this.A?this.A:null};q.W=function(){return this.i?this.i.presentationTimeline.W():this.h&&this.h.src?Infinity==this.h.duration:!1};q.Fc=function(){return this.i?this.i.presentationTimeline.Fc():!1};q.ed=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
|
|
625
|
+
q.Qa=function(){if(this.i){if(!this.Xa&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Bc(),end:a.Mb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.wj=function(){this.W()&&(this.h.currentTime=this.Qa().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.F?this.F.g:null};q.Nd=function(){return this.F?this.F.Nd():Infinity};
|
|
625
626
|
q.kg=function(){return this.F?this.F.kg():[]};q.Fe=function(){return this.F?this.F.Fe():{}};q.Ud=function(){return this.N?this.N.g==$f:!1};q.Ua=function(){return this.h?this.J?this.J.i:1:0};
|
|
626
|
-
q.Nc=function(a){var b=this;0==a?Ya("A trick play rate of 0 is unsupported!"):(this.Ia.qb(),this.h.paused&&this.h.play(),this.J.set(a),this.l==Lo&&(this.
|
|
627
|
-
q.Vc=function(){var a=this.J.Ac();this.l==Yo&&this.J.set(a);this.l==Lo&&(this.J.set(a),this.
|
|
627
|
+
q.Nc=function(a){var b=this;0==a?Ya("A trick play rate of 0 is unsupported!"):(this.Ia.qb(),this.h.paused&&this.h.play(),this.J.set(a),this.l==Lo&&(this.s.playbackRateChanged(a),Jl(this.j,1<Math.abs(a))),this.W()&&this.Ia.o(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Qa(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Vc():Math.floor(c)<=Math.floor(d.start+e)&&b.Vc()}))};
|
|
628
|
+
q.Vc=function(){var a=this.J.Ac();this.l==Yo&&this.J.set(a);this.l==Lo&&(this.J.set(a),this.s.playbackRateChanged(a),Jl(this.j,!1));this.Ia.qb()};
|
|
628
629
|
q.xb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,wf(e)){var f=of(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return vf(g)}):[]};
|
|
629
630
|
q.mc=function(){if(this.i){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=pf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?$o(this).map(function(f){return tf(f)}):[]};q.Ee=function(){var a=this.fe;this.i&&(a=this.i.imageStreams);return a.map(function(b){return qf(b)})};
|
|
630
631
|
q.Ni=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Lo&&b.l!=Yo)return g.return(null);c=b.fe;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):E(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Yc(function(h){var k=fp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.xc;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.pg(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
631
632
|
function fp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{xc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
632
633
|
q.pg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B;return O(function(C){if(1==C.g){if(c.l!=Lo&&c.l!=Yo)return C.return(null);d=c.fe;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?C.B(2):E(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=fp(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.xc;n=l/h.rows;p=h.xc*h.rows;r=g.i-g.startTime;
|
|
633
|
-
u=g.A||r/p;v=g.startTime;A=w=0;1<p&&(z=Math.floor((b-g.startTime)/u),v=g.startTime+z*u,w=z%h.xc*m,A=Math.floor(z/h.xc)*n);y=!1;if(B=g.u)y=!0,n=B.height,w=B.positionX,A=B.positionY,m=B.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.
|
|
634
|
-
q.Qg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.u&&(el(this.u.h,b,!1),Ml(this.j,b),gp(this),this.Sa=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=$o(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,rf(c)==a.id?c.mode=this.
|
|
634
|
+
u=g.A||r/p;v=g.startTime;A=w=0;1<p&&(z=Math.floor((b-g.startTime)/u),v=g.startTime+z*u,w=z%h.xc*m,A=Math.floor(z/h.xc)*n);y=!1;if(B=g.u)y=!0,n=B.height,w=B.positionX,A=B.positionY,m=B.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.P(),width:m,sprite:y})})};
|
|
635
|
+
q.Qg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.u&&(el(this.u.h,b,!1),Ml(this.j,b),gp(this),this.Sa=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=$o(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,rf(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";gp(this)}};
|
|
635
636
|
q.ef=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.g.abr.enabled&&Ya("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&wf(d)&&(Jo(this,d,!1,b,c),this.Da=new Kf(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Co(this))}else if(this.h&&this.h.audioTracks)for(b=
|
|
636
637
|
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,rf(c)==a.id){hp(this,c);break}};q.Pi=function(){return ip(this.xb())};q.nj=function(){return ip(this.mc())};q.Oi=function(){return Array.from(jp(this.xb()))};q.mj=function(){return Array.from(jp(this.mc()))};
|
|
637
638
|
q.df=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.G){this.Da=new Lf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.Da.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
638
639
|
b))c=f;c?(a=of(c),this.ef(a,!0,d)):Do(this)}else this.h&&this.h.audioTracks&&(d=yf(this.xb(),a,b||"",!1)[0])&&this.ef(d)};q.Pg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Sa=a,this.be=b||"",this.$d=c,(a=yf(this.i.textStreams,this.Sa,this.be,this.$d)[0]||null)&&a!=this.j.u&&(el(this.u.h,a,!1),this.g.streaming.alwaysStreamText||this.Gc()))Ml(this.j,a),gp(this)}else(a=yf(this.mc(),a,b||"",c)[0])&&this.Qg(a)};
|
|
639
640
|
q.lk=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.Da=new Lf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Do(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&hp(this,b)}};
|
|
640
|
-
q.Gc=function(){var a=this.
|
|
641
|
+
q.Gc=function(){var a=this.ba;return this.H&&this.l==Lo?this.H.H.isTextVisible():this.h&&this.h.src&&this.h.textTracks?$o(this).some(function(b){return"showing"==b.mode}):a};q.Dh=function(){return this.h&&this.h.src&&this.h.textTracks?kp(this).map(function(a){return tf(a)}):[]};
|
|
641
642
|
q.Ri=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Pc(a),c=kp(this).filter(function(h){return Pc(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
642
643
|
function $o(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function cp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function kp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
643
|
-
q.jf=function(a){a=!!a;if(this.
|
|
644
|
-
q.hj=function(){if(this.G)var a=this.G.we();else{if(null==this.
|
|
645
|
-
q.Ie=function(){return this.
|
|
644
|
+
q.jf=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Lo)this.H.H.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=yf(this.i.textStreams,this.Sa,this.be,this.$d),0<a.length&&(Ml(this.j,a[0]),gp(this))):Il(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=$o(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}To(this)}};
|
|
645
|
+
q.hj=function(){if(this.G)var a=this.G.we();else{if(null==this.ea)return new Date;a=this.ea}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.F||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.Gh=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.F||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
646
|
+
q.Ie=function(){return this.W()?this.i?this.i.presentationTimeline.Ie():null:null};q.Kb=function(){if(this.l==Lo)return this.H.Kb();var a={total:[],audio:[],video:[],text:[]};this.l==Yo&&(a.total=Ni(this.h.buffered));return a};
|
|
646
647
|
q.getStats=function(){if(this.l!=Lo&&this.l!=Yo)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};Go(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
|
|
647
648
|
this.u;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.u.N=this.G.jh(),this.u.O=this.G.kh());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.u.J=Number(c.corruptedVideoFrames)}this.F?(c=this.F,c=c.K?c.K:NaN):c=NaN;this.u.u=c;if(this.l==Lo){c=this.j.j;b=this.j.u;if(c){d=this.J?this.J.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.u.F=e}c&&c.video&&(b=this.u,d=c.video.height||
|
|
648
|
-
NaN,b.
|
|
649
|
+
NaN,b.s=c.video.width||NaN,b.l=d);this.W()&&(c=this.Gh().valueOf()+1E3*a.currentTime,this.u.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.I=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.u.A=c}this.l==Yo&&(c=this.u,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var f=this.u;a=f.s;c=f.l;b=f.F;d=f.K;e=f.L;var g=f.J,h=f.O,k=f.N,l=f.A,m=f.i,n=f.m,p=f.H,r=f.j,u=bl(f.g,"playing"),v=bl(f.g,"paused"),w=bl(f.g,"buffering"),A=f.u,z=f.G,y=f.I,B=f.xe,C=cl(f.g),D=[];
|
|
649
650
|
f=t(f.h.g);for(var G=f.next();!G.done;G=f.next())G=G.value,D.push({timestamp:G.timestamp,id:G.id,type:G.type,fromAdaptation:G.fromAdaptation,bandwidth:G.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:z,maxSegmentDuration:y,bytesDownloaded:B,stateHistory:C,
|
|
650
651
|
switchHistory:D}};
|
|
651
652
|
q.Ai=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:if(h.l!=Lo&&h.l!=Yo)throw new U(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ya("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){B.B(2);break}return E(B,lp(h,a),3);case 3:d=B.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Yo){B.B(4);break}g&&(c="forced");return E(B,mp(h,a,b,c,d,f||"",k),5);case 5:l=Pc(b);m=h.mc();if(n=m.find(function(C){return Pc(C.language)==
|
|
@@ -657,21 +658,21 @@ n.push(w);z={id:c.Gf++,originalId:null,groupId:null,createSegmentIndex:function(
|
|
|
657
658
|
"","")])};c.l==Yo?c.fe.push(z):c.i.imageStreams.push(z);Bo(c);return y.return(qf(z))}})};
|
|
658
659
|
q.zi=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Lo&&d.l!=Yo)throw new U(1,7,7004);if(c){k.B(2);break}return E(k,lp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),E(k,mp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Dh();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return E(k,new Promise(function(l,m){d.m.na(f,"load",l);d.m.na(f,"error",function(){m(new U(1,2,2015))})}),6);case 6:return Bo(d),k.return(h);case 5:throw new U(1,
|
|
659
660
|
2,2012);}})};function lp(a,b){var c;return O(function(d){switch(d.g){case 1:return sa(d,2),E(d,Om(b,a.I,a.g.streaming.retryParameters),4);case 4:c=d.h;ua(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}
|
|
660
|
-
function mp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?E(n,np(a,b,a.I,a.g.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=op(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Lj(l),e="text/vtt");m=document.createElement("track");var p=a.
|
|
661
|
-
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function np(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=zg;f=tg([b],d);f.method="GET";var k=a.
|
|
662
|
-
function op(a,b,c,d){var e=Ge[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Fb(b),b=c.parseMedia(b,a,null),jn(b,d);throw new U(2,2,2014,c);}q.vk=function(a,b){this
|
|
661
|
+
function mp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?E(n,np(a,b,a.I,a.g.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=op(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Lj(l),e="text/vtt");m=document.createElement("track");var p=a.R,r=b;try{if(p.g.enabled){var u=mn(p);u.ot=zn;u.su=!0;var v=qn(u);var w=rn(r,v)}else w=r}catch(A){Za("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=r}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
662
|
+
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function np(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=zg;f=tg([b],d);f.method="GET";var k=a.R;try{k.g.enabled&&sn(k,f,{ot:zn,su:!0})}catch(l){Za("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return E(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
663
|
+
function op(a,b,c,d){var e=Ge[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Fb(b),b=c.parseMedia(b,a,null),jn(b,d);throw new U(2,2,2014,c);}q.vk=function(a,b){this.$.width=a;this.$.height=b};q.Mg=function(a){if(this.l==Lo){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Sd||d.pb||d.Sb||(d.Sd=!1,Hl(b,d,a));b=!0}}else b=!1;return b};
|
|
663
664
|
q.mg=function(){Ya("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.dj=function(){return this.Ma};
|
|
664
|
-
function Zn(a){var b=qm();b.streaming.failureCallback=function(c){if(a.
|
|
665
|
+
function Zn(a){var b=qm();b.streaming.failureCallback=function(c){if(a.W()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Mg(d))}};b.textDisplayFactory=function(){if(a.bf){var c=a.getConfiguration();return new $m(a.h,a.bf,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Tm(a.h,"Shaka Player TextTrack"):new Wm};return b}q.Yg=function(a){this.bf=a};
|
|
665
666
|
function zo(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Wk,l=e.closedCaptions.get(g);h={id:a.Gf++,originalId:g,groupId:null,
|
|
666
667
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Jc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([le(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
667
668
|
function Ro(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(r){if(1==r.g)return k?E(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.Wb(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},E(h,e(c,b),2);if(3!=h.g)return f=h.h,E(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
668
|
-
function po(a){var b=a.Ud();if(a.u&&a.N&&a.G){var c=a.J;c.j=b;Yk(c);a.
|
|
669
|
+
function po(a){var b=a.Ud();if(a.u&&a.N&&a.G){var c=a.J;c.j=b;Yk(c);a.R&&(c=a.R,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Go(a)}b=(new Map).set("buffering",b);a.dispatchEvent(ho("buffering",b))}function Ho(a){var b=a.h.playbackRate;0!=b&&(a.J&&a.J.set(b),b=ho("ratechange"),a.dispatchEvent(b))}
|
|
669
670
|
function Go(a){if(a.u&&a.N){var b=a.u.g,c="playing";a.N.g==$f?c="buffering":a.h.paused?c="paused":a.h.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(ho("statechanged",c)))}}
|
|
670
|
-
function Vo(a){var b=a.h.playbackRate,c=a.
|
|
671
|
+
function Vo(a){var b=a.h.playbackRate,c=a.W();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Ch();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Nc(d):1==e&&b!==a.J.Ac()&&a.Vc()}if(c&&(e=a.Qa(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
|
|
671
672
|
f=a.i.serviceDescription.targetLatency+a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.maxLatency&&(f=a.i.serviceDescription.maxLatency),g=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var h=a.g.streaming.liveSyncMinLatency;var k=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.g.streaming.liveSyncMinLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency-
|
|
672
673
|
a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==Yo){var l=a.h.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.g.streaming.liveSyncPanicMode;l=1E3*a.g.streaming.liveSyncPanicThreshold;var m=Date.now()-a.N.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.Nc(k):f&&g&&c-
|
|
673
674
|
d>f?b!=g&&a.Nc(g):h&&k&&c-d<h?b!=k&&a.Nc(k):b!==a.J.Ac()&&a.Vc()}}function Wo(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.O)?(a.O=c,b=!0):(c=Math.max(a.O,c),a.O!=c&&(a.O=c,b=!0)));if(b){var d;0==a.O?d=ho("started"):25==a.O?d=ho("firstquartile"):50==a.O?d=ho("midpoint"):75==a.O?d=ho("thirdquartile"):100==a.O&&(d=ho("complete"));d&&a.dispatchEvent(d)}}}
|
|
674
|
-
function Co(a){try{vi(a.Ze,a.i)}catch(c){return no(a,c),!1}var b=xf(a.i.variants);b=a.Da.create(b);a.
|
|
675
|
+
function Co(a){try{vi(a.Ze,a.i)}catch(c){return no(a,c),!1}var b=xf(a.i.variants);b=a.Da.create(b);a.s.setVariants(Array.from(b.values()));return!0}function No(a,b){b=void 0===b?!1:b;return Co(a)?a.s.chooseVariant(b):null}
|
|
675
676
|
function eo(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,eb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.nf.stop();d&&Do(a,!0,void 0,!1,!1)}
|
|
676
677
|
function Do(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=No(a);f&&Jo(a,f,e,b,c,d)}function Jo(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Ll(a.j,b,d,e,!0);else{var h=a.u.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Ll(a.j,b,d,e,f,c);d=null;g&&(d=of(g));b=of(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&Bj(a.L,b,a.ng()),c=ho("adaptation",c),pp(a,c)):qp(a,d,b)}}
|
|
677
678
|
function hp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=vf(c);b=vf(b);qp(a,c,b)}function So(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Pc(a.g.preferredTextLanguage);c=Pc(c.language);if(2==a.g.autoShowText)return Nc(c,d);if(3==a.g.autoShowText)return a=Pc(b.language),Nc(c,d)&&!Nc(a,c);Ya("Invalid autoShowText setting!");return!1}function Bo(a){var b=ho("trackschanged");pp(a,b)}
|
|
@@ -679,57 +680,57 @@ function qp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Bj(a.L,c
|
|
|
679
680
|
q.Ce=function(a,b){if(!this.g.abr.enabled||this.l===io||!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.nf.xa(1);b=this.Kb().video.reduce(function(f,g){return f+g.end-g.start},0);Do(this,!0,b,!0,!1);return!0}return!1};
|
|
680
681
|
function no(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==io)return f.return();c=!0;if(!(a.Xa&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.B(2);break}sa(f,3);return E(f,em(a.j),5);case 5:d=f.h;c=!d;ua(f,2);break;case 3:va(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&co(a,!1);e=ho("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);F(f)}})}
|
|
681
682
|
function Ao(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(ho(b,a))}function mo(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)}
|
|
682
|
-
function Io(a,b,c){0<b&&(a.
|
|
683
|
+
function Io(a,b,c){0<b&&(a.W()||a.gi(b));b=a.getDuration();c<b&&(a.W()||a.sb(c))}function pp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=io&&a.dispatchEvent(b);F(c)})}function jp(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(Pc(c.language)):b.add("und");return b}
|
|
683
684
|
function ip(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=Pc(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));
|
|
684
685
|
h.push({language:l,role:m,label:n})}});return h}P("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Yg;X.prototype.getManifestParserFactory=X.prototype.dj;X.prototype.getManifest=X.prototype.mg;X.prototype.retryStreaming=X.prototype.Mg;X.prototype.setMaxHardwareResolution=X.prototype.vk;X.prototype.addChaptersTrack=X.prototype.zi;X.prototype.addThumbnailsTrack=X.prototype.Bi;X.prototype.addTextTrackAsync=X.prototype.Ai;X.prototype.getStats=X.prototype.getStats;
|
|
685
686
|
X.prototype.getBufferedInfo=X.prototype.Kb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Ie;X.prototype.getPresentationStartTimeAsDate=X.prototype.Gh;X.prototype.getPlayheadTimeAsDate=X.prototype.hj;X.prototype.setTextTrackVisibility=X.prototype.jf;X.prototype.getChapters=X.prototype.Ri;X.prototype.getChaptersTracks=X.prototype.Dh;X.prototype.isTextTrackVisible=X.prototype.Gc;X.prototype.selectVariantsByLabel=X.prototype.lk;X.prototype.selectTextLanguage=X.prototype.Pg;
|
|
686
687
|
X.prototype.selectAudioLanguage=X.prototype.df;X.prototype.getTextLanguages=X.prototype.mj;X.prototype.getAudioLanguages=X.prototype.Oi;X.prototype.getTextLanguagesAndRoles=X.prototype.nj;X.prototype.getAudioLanguagesAndRoles=X.prototype.Pi;X.prototype.selectVariantTrack=X.prototype.ef;X.prototype.selectTextTrack=X.prototype.Qg;X.prototype.getThumbnails=X.prototype.pg;X.prototype.getAllThumbnails=X.prototype.Ni;X.prototype.getImageTracks=X.prototype.Ee;X.prototype.getTextTracks=X.prototype.mc;
|
|
687
688
|
X.prototype.getVariantTracks=X.prototype.xb;X.prototype.cancelTrickPlay=X.prototype.Vc;X.prototype.trickPlay=X.prototype.Nc;X.prototype.getPlaybackRate=X.prototype.Ua;X.prototype.isBuffering=X.prototype.Ud;X.prototype.getKeyStatuses=X.prototype.Fe;X.prototype.getActiveSessionsMetadata=X.prototype.kg;X.prototype.getExpiration=X.prototype.Nd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.wj;X.prototype.seekRange=X.prototype.Qa;
|
|
688
|
-
X.prototype.isAudioOnly=X.prototype.ed;X.prototype.isInProgress=X.prototype.Fc;X.prototype.isLive=X.prototype.
|
|
689
|
+
X.prototype.isAudioOnly=X.prototype.ed;X.prototype.isInProgress=X.prototype.Fc;X.prototype.isLive=X.prototype.W;X.prototype.getAdManager=X.prototype.De;X.prototype.getAssetUri=X.prototype.$c;X.prototype.getNetworkingEngine=X.prototype.kc;X.prototype.getMediaElement=X.prototype.fj;X.prototype.getManifestType=X.prototype.ng;X.prototype.getLoadMode=X.prototype.Od;X.prototype.resetConfiguration=X.prototype.ek;X.prototype.getBufferFullness=X.prototype.Ch;X.prototype.getNonDefaultConfiguration=X.prototype.gj;
|
|
689
690
|
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.$j;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.xh;X.prototype.unloadAndSavePreload=X.prototype.zk;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Dk;X.prototype.unload=X.prototype.Oc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.mh;X.prototype.attach=X.prototype.wc;
|
|
690
691
|
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,ki(),3);case 3:b=k.h;case 2:var l={};if(Pb())for(var m in zi)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]=Pb()?!!zi[n]:Qb(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",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(me));
|
|
691
692
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Fe(n)?!0:Pb()?kd(n)||(fe(n)?!0:!1):Qb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,lc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=rp;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=jo;X.setAdManagerFactory=function(a){bo=a};X.registerSupportPlugin=function(a,b){rp[a]=b};X.prototype.destroy=X.prototype.destroy;var io=0,Yn=1,Lo=2,Yo=3;
|
|
692
|
-
X.LoadMode={DESTROYED:io,NOT_LOADED:Yn,MEDIA_SOURCE:Lo,SRC_EQUALS:Yo};X.version="v4.9.
|
|
693
|
+
X.LoadMode={DESTROYED:io,NOT_LOADED:Yn,MEDIA_SOURCE:Lo,SRC_EQUALS:Yo};X.version="v4.9.1";var sp=["4","9"];pd=new function(a){this.g=a;this.i=qd;this.h=rd}(new nd(Number(sp[0]),Number(sp[1])));var rp={},bo=null;function tp(){this.h=[];this.j=this.i=this.g=0};function up(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 fd;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=up.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};
|
|
693
694
|
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)};
|
|
694
695
|
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)};
|
|
695
696
|
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()};
|
|
696
697
|
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};P("shaka.ads.ClientSideAd",up);up.prototype.release=up.prototype.release;
|
|
697
698
|
up.prototype.getPodIndex=up.prototype.getPodIndex;up.prototype.getTimeOffset=up.prototype.getTimeOffset;up.prototype.getMediaUrl=up.prototype.getMediaUrl;up.prototype.getAdvertiserName=up.prototype.getAdvertiserName;up.prototype.getCreativeAdId=up.prototype.getCreativeAdId;up.prototype.getAdId=up.prototype.getAdId;up.prototype.getVastMediaWidth=up.prototype.getVastMediaWidth;up.prototype.getVastMediaHeight=up.prototype.getVastMediaHeight;up.prototype.getVastMediaBitrate=up.prototype.getVastMediaBitrate;
|
|
698
699
|
up.prototype.getDescription=up.prototype.getDescription;up.prototype.getTitle=up.prototype.getTitle;up.prototype.getPositionInSequence=up.prototype.getPositionInSequence;up.prototype.getSequenceLength=up.prototype.getSequenceLength;up.prototype.setMuted=up.prototype.setMuted;up.prototype.resize=up.prototype.resize;up.prototype.isLinear=up.prototype.isLinear;up.prototype.isMuted=up.prototype.isMuted;up.prototype.setVolume=up.prototype.setVolume;up.prototype.getVolume=up.prototype.getVolume;
|
|
699
|
-
up.prototype.play=up.prototype.play;up.prototype.pause=up.prototype.pause;up.prototype.skip=up.prototype.skip;up.prototype.canSkipNow=up.prototype.canSkipNow;up.prototype.getTimeUntilSkippable=up.prototype.getTimeUntilSkippable;up.prototype.isSkippable=up.prototype.isSkippable;up.prototype.isPaused=up.prototype.isPaused;up.prototype.getRemainingTime=up.prototype.getRemainingTime;up.prototype.getMinSuggestedDuration=up.prototype.getMinSuggestedDuration;up.prototype.getDuration=up.prototype.getDuration;function vp(a,b,c,d,e){var f=this;this.
|
|
700
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){wp(f,g)});this.h.
|
|
700
|
+
up.prototype.play=up.prototype.play;up.prototype.pause=up.prototype.pause;up.prototype.skip=up.prototype.skip;up.prototype.canSkipNow=up.prototype.canSkipNow;up.prototype.getTimeUntilSkippable=up.prototype.getTimeUntilSkippable;up.prototype.isSkippable=up.prototype.isSkippable;up.prototype.isPaused=up.prototype.isPaused;up.prototype.getRemainingTime=up.prototype.getRemainingTime;up.prototype.getMinSuggestedDuration=up.prototype.getMinSuggestedDuration;up.prototype.getDuration=up.prototype.getDuration;function vp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new fd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.s,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.1");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,
|
|
701
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){wp(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){xp(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.H=!0})}vp.prototype.configure=function(a){this.u=a};vp.prototype.stop=function(){this.g&&this.g.stop();this.s&&Zm(this.s)};
|
|
701
702
|
vp.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 xp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new T("ad-error",b));yp(a,null);a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
702
|
-
function wp(a,b){a.m(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.
|
|
703
|
-
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}zp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Ap(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.
|
|
704
|
-
a.i.offsetHeight,Ap(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.
|
|
703
|
+
function wp(a,b){a.m(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.F);a.m(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
704
|
+
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}zp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Ap(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Ap(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
705
|
+
a.i.offsetHeight,Ap(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Ap(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.u.skipPlayDetection?a.g.start():a.h.na(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){yp(a,null)}}
|
|
705
706
|
function Ap(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
706
|
-
function zp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new T(d,c))}a.h.
|
|
707
|
-
function(c){b(c,"ad-third-quartile")});a.h.
|
|
708
|
-
a.h.
|
|
709
|
-
a.h.
|
|
710
|
-
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.
|
|
711
|
-
function Bp(a,b){var c=b.getAd();c?(a.j=new up(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new T("ad-started",b)),a.j.isLinear()&&(a.
|
|
712
|
-
function yp(a,b){a.m(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.
|
|
707
|
+
function zp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new T(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){xp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Bp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Bp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
708
|
+
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){yp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){yp(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
709
|
+
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
710
|
+
a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,
|
|
711
|
+
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
712
|
+
function Bp(a,b){var c=b.getAd();c?(a.j=new up(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new T("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.u.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Ya("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
713
|
+
function yp(a,b){a.m(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.u.customPlayheadTracker||a.i.ended||a.i.play())};function Cp(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.m=d;this.l=!1}q=Cp.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};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h.skipOffset?!0:!1};
|
|
713
714
|
q.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var a=this.getRemainingTime()-this.h.skipOffset;return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.l=!0;this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};
|
|
714
715
|
q.isLinear=function(){return this.m};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.j?this.j: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};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};
|
|
715
716
|
q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.j=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",Cp);Cp.prototype.release=Cp.prototype.release;Cp.prototype.getPodIndex=Cp.prototype.getPodIndex;Cp.prototype.getTimeOffset=Cp.prototype.getTimeOffset;Cp.prototype.getMediaUrl=Cp.prototype.getMediaUrl;Cp.prototype.getAdvertiserName=Cp.prototype.getAdvertiserName;
|
|
716
717
|
Cp.prototype.getCreativeAdId=Cp.prototype.getCreativeAdId;Cp.prototype.getAdId=Cp.prototype.getAdId;Cp.prototype.getVastMediaWidth=Cp.prototype.getVastMediaWidth;Cp.prototype.getVastMediaHeight=Cp.prototype.getVastMediaHeight;Cp.prototype.getVastMediaBitrate=Cp.prototype.getVastMediaBitrate;Cp.prototype.getDescription=Cp.prototype.getDescription;Cp.prototype.getTitle=Cp.prototype.getTitle;Cp.prototype.getPositionInSequence=Cp.prototype.getPositionInSequence;Cp.prototype.getSequenceLength=Cp.prototype.getSequenceLength;
|
|
717
718
|
Cp.prototype.setMuted=Cp.prototype.setMuted;Cp.prototype.resize=Cp.prototype.resize;Cp.prototype.isLinear=Cp.prototype.isLinear;Cp.prototype.isMuted=Cp.prototype.isMuted;Cp.prototype.setVolume=Cp.prototype.setVolume;Cp.prototype.getVolume=Cp.prototype.getVolume;Cp.prototype.play=Cp.prototype.play;Cp.prototype.pause=Cp.prototype.pause;Cp.prototype.skip=Cp.prototype.skip;Cp.prototype.canSkipNow=Cp.prototype.canSkipNow;Cp.prototype.getTimeUntilSkippable=Cp.prototype.getTimeUntilSkippable;
|
|
718
|
-
Cp.prototype.isSkippable=Cp.prototype.isSkippable;Cp.prototype.isPaused=Cp.prototype.isPaused;Cp.prototype.getRemainingTime=Cp.prototype.getRemainingTime;Cp.prototype.getMinSuggestedDuration=Cp.prototype.getMinSuggestedDuration;Cp.prototype.getDuration=Cp.prototype.getDuration;function Dp(a,b,c,d){this.F=a;this.L=b;this.h=c;this.l=null;this.
|
|
719
|
-
Dp.prototype.release=function(){this.stop();this.
|
|
720
|
-
function Gp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=tg([b],cg()),d.method="POST",c&&(e=JSON.stringify(c),d.body=sc(e)),f=a.L.request(7,d),sa(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=oc(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new mb(b),m=new mb(k.trackingUrl),a.I=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.
|
|
719
|
+
Cp.prototype.isSkippable=Cp.prototype.isSkippable;Cp.prototype.isPaused=Cp.prototype.isPaused;Cp.prototype.getRemainingTime=Cp.prototype.getRemainingTime;Cp.prototype.getMinSuggestedDuration=Cp.prototype.getMinSuggestedDuration;Cp.prototype.getDuration=Cp.prototype.getDuration;function Dp(a,b,c,d){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.s=new fd}Dp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.Wa(b.target,b.type,b.listener);Ep(this);this.m=[];this.u=[];this.I="";this.R=!0;this.J="";this.A=null;this.j=[];this.O=[];this.H.clear()};
|
|
720
|
+
Dp.prototype.release=function(){this.stop();this.s&&this.s.release()};Dp.prototype.onManifestUpdated=function(a){this.K=a;""!=this.I&&(Fp(this,this.I,this.R),this.R=!1)};Dp.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
721
|
+
function Gp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=tg([b],cg()),d.method="POST",c&&(e=JSON.stringify(c),d.body=sc(e)),f=a.L.request(7,d),sa(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=oc(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new mb(b),m=new mb(k.trackingUrl),a.I=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.S,a.i(new T("ads-loaded",(new Map).set("loadTime",p))),r=new mb(k.manifestUrl),a.l.resolve(l.resolve(r).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
721
722
|
return ua(u,0)}va(u);if(!a.J.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.J);a.l=null;F(u)})}
|
|
722
723
|
function Fp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;O(function(z){if(1==z.g)return d=tg([b],cg()),e=a.L.request(7,d),sa(z,2),E(z,e.promise,4);if(2!=z.g){f=z.h;g=[];h=oc(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),r=p.next();!r.done;r=p.next())for(u=r.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,Hp(a,A);g=a.getCuePoints();a.i(new T("ad-cue-points-changed",
|
|
723
724
|
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",g))),Ep(a),a.j=[];c&&(a.K||0<g.length)&&Ip(a);return ua(z,0)}va(z);F(z)})}
|
|
724
725
|
function Hp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Jp(b);if(d=a.H.get(c))return m.return();e=tg([b.staticResource],cg());f=a.L.request(7,e);sa(m,2);a.H.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=oc(g.data),k=JSON.parse(h),l=k.apps,a.H.set(c,l),ua(m,0);va(m);a.H.delete(c);F(m)})}
|
|
725
|
-
function Jp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Ip(a){Kp(a);a.K||(Lp(a),a.o
|
|
726
|
+
function Jp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Ip(a){Kp(a);a.K||(Lp(a),a.s.o(a.h,"seeked",function(){Lp(a)}),a.s.o(a.h,"ended",function(){Ep(a)}));a.s.o(a.h,"timeupdate",function(){Kp(a)})}
|
|
726
727
|
function Lp(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.O.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
727
728
|
function Kp(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.G,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),Mp(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),Mp(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),Mp(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
728
729
|
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Mp(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Ep(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.O.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Ep(a);a.N=e;a.g=new Cp(g,f+1,e.ads.length,!0,a.h);a.G=g;0===f&&Mp(a,"breakStart");Np(a);break}}}if(!a.g)for(d=
|
|
729
730
|
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.H.get(Jp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Ep(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
|
|
730
731
|
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.F.appendChild(m)}a.N=e;a.g=new Cp(g,f+1,e.ads.length,!1,a.h);a.G=g;0===f&&Mp(a,"breakStart");Np(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
731
|
-
function Ep(a){if(a.g){for(;a.F.lastChild;)a.F.removeChild(a.F.firstChild);a.K||a.O.push(a.G.adId);var b=a.g.l;(void 0===b?0:b)?Mp(a,"skip"):Mp(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.
|
|
732
|
-
function Np(a){var b=!1;a.h.paused?b=!0:(Mp(a,"impression"),Mp(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Mp(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Mp(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Mp(a,"impression"),Mp(a,"start"),b=!1):Mp(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Mp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o
|
|
732
|
+
function Ep(a){if(a.g){for(;a.F.lastChild;)a.F.removeChild(a.F.firstChild);a.K||a.O.push(a.G.adId);var b=a.g.l;(void 0===b?0:b)?Mp(a,"skip"):Mp(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.s.Wa(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Mp(a,"breakEnd");a.g=null;a.G=null;a.N=null}}
|
|
733
|
+
function Np(a){var b=!1;a.h.paused?b=!0:(Mp(a,"impression"),Mp(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Mp(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Mp(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Mp(a,"impression"),Mp(a,"start"),b=!1):Mp(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Mp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target,
|
|
733
734
|
d.type,d.listener)}
|
|
734
735
|
function Mp(a,b){var c=a.G.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.N.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=tg([d],cg()),d.method="POST",a.L.request(7,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break;
|
|
735
736
|
case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "skip":a.i(new T("ad-skipped"));a.i(new T("ad-stopped"));break;case "breakStart":a.F.setAttribute("ad-active","true");break;case "breakEnd":a.F.removeAttribute("ad-active");
|
|
@@ -739,17 +740,17 @@ q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.ge
|
|
|
739
740
|
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};P("shaka.ads.ServerSideAd",Op);Op.prototype.release=Op.prototype.release;Op.prototype.getPodIndex=Op.prototype.getPodIndex;
|
|
740
741
|
Op.prototype.getTimeOffset=Op.prototype.getTimeOffset;Op.prototype.getMediaUrl=Op.prototype.getMediaUrl;Op.prototype.getAdvertiserName=Op.prototype.getAdvertiserName;Op.prototype.getCreativeAdId=Op.prototype.getCreativeAdId;Op.prototype.getAdId=Op.prototype.getAdId;Op.prototype.getVastMediaWidth=Op.prototype.getVastMediaWidth;Op.prototype.getVastMediaHeight=Op.prototype.getVastMediaHeight;Op.prototype.getVastMediaBitrate=Op.prototype.getVastMediaBitrate;Op.prototype.getDescription=Op.prototype.getDescription;
|
|
741
742
|
Op.prototype.getTitle=Op.prototype.getTitle;Op.prototype.getPositionInSequence=Op.prototype.getPositionInSequence;Op.prototype.getSequenceLength=Op.prototype.getSequenceLength;Op.prototype.setMuted=Op.prototype.setMuted;Op.prototype.resize=Op.prototype.resize;Op.prototype.isLinear=Op.prototype.isLinear;Op.prototype.isMuted=Op.prototype.isMuted;Op.prototype.setVolume=Op.prototype.setVolume;Op.prototype.getVolume=Op.prototype.getVolume;Op.prototype.play=Op.prototype.play;Op.prototype.pause=Op.prototype.pause;
|
|
742
|
-
Op.prototype.skip=Op.prototype.skip;Op.prototype.canSkipNow=Op.prototype.canSkipNow;Op.prototype.getTimeUntilSkippable=Op.prototype.getTimeUntilSkippable;Op.prototype.isSkippable=Op.prototype.isSkippable;Op.prototype.isPaused=Op.prototype.isPaused;Op.prototype.getRemainingTime=Op.prototype.getRemainingTime;Op.prototype.getMinSuggestedDuration=Op.prototype.getMinSuggestedDuration;Op.prototype.getDuration=Op.prototype.getDuration;function Pp(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.
|
|
743
|
-
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.
|
|
744
|
-
var f=e.l.currentTime;e.
|
|
745
|
-
this.h.
|
|
746
|
-
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=Pp.prototype;q.configure=function(){};q.stop=function(){this.F="";this.
|
|
747
|
-
function Qp(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.I||a.h.
|
|
743
|
+
Op.prototype.skip=Op.prototype.skip;Op.prototype.canSkipNow=Op.prototype.canSkipNow;Op.prototype.getTimeUntilSkippable=Op.prototype.getTimeUntilSkippable;Op.prototype.isSkippable=Op.prototype.isSkippable;Op.prototype.isPaused=Op.prototype.isPaused;Op.prototype.getRemainingTime=Op.prototype.getRemainingTime;Op.prototype.getMinSuggestedDuration=Op.prototype.getMinSuggestedDuration;Op.prototype.getDuration=Op.prototype.getDuration;function Pp(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.s=null;this.F="";this.G=[];this.h=new fd;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 T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Qp(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
|
|
744
|
+
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Op(f,e.l);e.A&&(e.m.i=e.A);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
|
|
745
|
+
var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))});
|
|
746
|
+
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
|
|
747
|
+
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=Pp.prototype;q.configure=function(){};q.stop=function(){this.F="";this.s=null;this.G=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.G};
|
|
748
|
+
function Qp(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.I||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function Rp(){gb.call(this);this.g=this.h=this.i=null;this.j=new tp;this.m=navigator.language;this.l=null}oa(Rp,gb);q=Rp.prototype;q.setLocale=function(a){this.m=a};q.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new U(2,10,1E4);this.i&&this.i.release();this.i=new vp(a,b,this.m,c,function(e){return Sp(d,e)});this.i.configure(this.l)};
|
|
748
749
|
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 T("ad-stopped"));this.j=new tp};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)};
|
|
749
|
-
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 Dp(a,b,c,function(e){return Sp(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 eg,Gp(d,a,b),d.J=c||"",d.
|
|
750
|
+
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 Dp(a,b,c,function(e){return Sp(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 eg,Gp(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
750
751
|
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new U(1,10,10005);var b=this.h;b.I=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};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 Pp(a,b,this.m,function(d){return Sp(c,d)});this.g.configure(this.l)};
|
|
751
|
-
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.
|
|
752
|
-
(c.I=!0),c.j=new eg,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.
|
|
752
|
+
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.1";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
753
|
+
(c.I=!0),c.j=new eg,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.1";this.g.g.replaceAdTagParameters(a)};
|
|
753
754
|
q.getServerSideCuePoints=function(){od("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)};
|
|
754
755
|
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)};
|
|
755
756
|
function Sp(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)}P("shaka.ads.AdManager",Rp);Rp.prototype.onCueMetadataChange=Rp.prototype.onCueMetadataChange;Rp.prototype.onHlsTimedMetadata=Rp.prototype.onHlsTimedMetadata;Rp.prototype.onDashTimedMetadata=Rp.prototype.onDashTimedMetadata;Rp.prototype.onManifestUpdated=Rp.prototype.onManifestUpdated;
|
|
@@ -763,76 +764,76 @@ function Up(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("
|
|
|
763
764
|
function Vp(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
764
765
|
var Wp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Xp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Yp=["loop","playbackRate"],Zp=["pause","play"],$p={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
765
766
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},aq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},bq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},cq=[["getConfiguration","configure"]],dq=[["isTextTrackVisible","setTextTrackVisibility"]],eq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
766
|
-
fq=["attach","attachCanvas","detach","load","unload"];function gq(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new Ob(b);this.N=c;this.u=!1;this.A=d;this.H=e;this.O=f;this.h=this.m=!1;this.K="";this.
|
|
767
|
-
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;iq.add(this)}q=gq.prototype;q.destroy=function(){iq.delete(this);jq(this);kq&&lq(this);this.l&&(this.l.stop(),this.l=null);this.H=this.A=null;this.h=this.m=!1;this.G=this.F=this.j=this.i=this.g=this.
|
|
768
|
-
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.La();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(iq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new eg;d.u=!0;mq(d,e)}},function(b){for(var c=t(iq),d=c.next();!d.done;d=c.next())d=d.value,nq="available"==b,d.l.La()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});nq&&this.l.
|
|
769
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new eg,this.u=!0,mq(this,a)):kq=null}else window.__onGCastApiAvailable!==pq&&(qq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=pq)};q.Rg=function(a){this.
|
|
767
|
+
fq=["attach","attachCanvas","detach","load","unload"];function gq(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new Ob(b);this.N=c;this.u=!1;this.A=d;this.H=e;this.O=f;this.h=this.m=!1;this.K="";this.s=null;this.F=function(){return hq(h)};this.G=function(k,l){k=Up(l);switch(k.type){case "event":var m=k.targetName,n=Ta(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.N(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new U(p.severity,p.category,
|
|
768
|
+
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;iq.add(this)}q=gq.prototype;q.destroy=function(){iq.delete(this);jq(this);kq&&lq(this);this.l&&(this.l.stop(),this.l=null);this.H=this.A=null;this.h=this.m=!1;this.G=this.F=this.j=this.i=this.g=this.s=null;return Promise.resolve()};q.Ja=function(){return this.h};q.$e=function(){return this.K};
|
|
769
|
+
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.La();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(iq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new eg;d.u=!0;mq(d,e)}},function(b){for(var c=t(iq),d=c.next();!d.done;d=c.next())d=d.value,nq="available"==b,d.l.La()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});nq&&this.l.U(oq);(a=kq)&&
|
|
770
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new eg,this.u=!0,mq(this,a)):kq=null}else window.__onGCastApiAvailable!==pq&&(qq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=pq)};q.Rg=function(a){this.s=a;this.h&&rq(this,{type:"appData",appData:this.s})};
|
|
770
771
|
q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new U(1,8,8E3);if(!nq)throw new U(1,8,8001);if(a.h)throw new U(1,8,8002);a.j=new eg;chrome.cast.requestSession(function(c){return mq(a,c)},function(c){return sq(a,c)});return E(b,a.j,0)})};function tq(a){a.h&&chrome.cast.requestSession(function(b){return mq(a,b)},function(b){return sq(a,b)})}q.Zc=function(){if(this.h){jq(this);if(kq){lq(this);try{kq.stop(function(){},function(){})}catch(a){}kq=null}hq(this)}};
|
|
771
772
|
q.get=function(a,b){var c=this;if("video"==a){if(Zp.includes(b))return function(){return c.Vh.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))}}else if("player"==a){if(bq[b]&&!this.get("player","isLive")())return function(){};if(eq.includes(b))return function(){return c.Vh.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(fq.includes(b))return function(){return c.bk.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if($p[b]||aq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
772
|
-
q.set=function(a,b,c){this.g[a][b]=c;rq(this,{type:"set",targetName:a,property:b,value:c})};function mq(a,b){var c=a.O();kq=b;b.addUpdateListener(a.F);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);hq(a);rq(a,{type:"init",initState:c,appData:a.
|
|
773
|
+
q.set=function(a,b,c){this.g[a][b]=c;rq(this,{type:"set",targetName:a,property:b,value:c})};function mq(a,b){var c=a.O();kq=b;b.addUpdateListener(a.F);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);hq(a);rq(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function sq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new U(2,8,c,b))}
|
|
773
774
|
q.Vh=function(a,b){rq(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.bk=function(a,b){var c=Ha.apply(2,arguments),d=new eg,e=this.J.toString();this.J++;this.i[e]=d;try{rq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function lq(a){var b=kq;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
774
775
|
function hq(a){var b=kq?"connected"==kq.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};jq(a)}a.h=b;a.K=b?kq.receiver.friendlyName:"";a.l.La()}function jq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new U(1,7,7E3))}}function rq(a,b){b=Tp(b);var c=kq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},ab)}catch(d){throw b=new U(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.A("player",c),a.Zc(),b;}}var oq=.02,nq=!1,kq=null,qq=null,iq=new Set;
|
|
775
|
-
function pq(a){qq?window.__onGCastApiAvailable=qq:delete window.__onGCastApiAvailable;qq=null;if(a)for(var b=t(iq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function uq(a,b,c,d){d=void 0===d?!1:d;gb.call(this);var e=this;this.i=a;this.h=b;this.m=this.
|
|
776
|
+
function pq(a){qq?window.__onGCastApiAvailable=qq:delete window.__onGCastApiAvailable;qq=null;if(a)for(var b=t(iq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function uq(a,b,c,d){d=void 0===d?!1:d;gb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.F=d;this.A=new Map;this.g=new gq(c,function(){return vq(e)},function(){return wq(e)},function(f,g){return xq(e,f,g)},function(){return yq(e)},function(){return zq(e)},d);Aq(this)}oa(uq,gb);q=uq.prototype;
|
|
776
777
|
q.destroy=function(a){a&&this.g.Zc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;gb.prototype.release.call(this);return Promise.all(a)};q.nc=function(){return this.l};q.bd=function(){return this.u};q.Pf=function(){return this.g.m&&nq};q.Ja=function(){return this.g.Ja()};q.$e=function(){return this.g.$e()};
|
|
777
778
|
q.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.Oc(),0):b.return()})};q.Rg=function(a){this.g.Rg(a)};q.ji=function(){tq(this.g)};q.Zc=function(){this.g.Zc()};
|
|
778
779
|
q.rh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.Zc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new gq(a,function(){return vq(c)},function(){return wq(c)},function(e,f){return xq(c,e,f)},function(){return yq(c)},function(){return zq(c)},b);c.g.init();F(d)})};
|
|
779
|
-
function Aq(a){a.g.init();a.m=new fd;for(var b=t(Wp),c=b.next();!c.done;c=b.next())a.m.
|
|
780
|
-
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Dq(a,f)}})});Eq(a);a.j=new gb;a.j.pf=a.l;a.
|
|
780
|
+
function Aq(a){a.g.init();a.m=new fd;for(var b=t(Wp),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ja()||(f=Ta(f),a.j.dispatchEvent(f))});for(var d in Ua)a.m.o(a.h,Ua[d],function(f){a.g.Ja()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.vd=e,Object.defineProperty(a.l,b.vd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Bq(a,f.vd)}}(b),set:function(f){return function(g){var h=f.vd;a.g.Ja()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={vd:b.vd};a.u={};Cq(a,
|
|
781
|
+
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Dq(a,f)}})});Eq(a);a.j=new gb;a.j.pf=a.l;a.s=new gb;a.s.pf=a.u}function Eq(a){var b=new Map;Cq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
781
782
|
function Cq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
782
783
|
function zq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.$c(),startTime:null};a.i.pause();for(var c=t(Yp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(cq);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(dq);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function vq(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}
|
|
783
784
|
function wq(a){var b=new T(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
784
785
|
function yq(a){for(var b=t(cq),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(Yp);for(d=c.next();!d.done;d=c.next())d=
|
|
785
786
|
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Yp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(dq);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.jf(h);g&&a.h.Pg(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new T("error",l);a.h.dispatchEvent(l)})}
|
|
786
787
|
function Bq(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.Ja()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ja()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
787
|
-
function Dq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.
|
|
788
|
+
function Dq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.kc()};if("getDrmEngine"==b)return function(){return a.h.F};if("getAdManager"==b)return function(){return a.h.De()};
|
|
788
789
|
if("setVideoContainer"==b)return function(c){return a.h.Yg(c)};if(a.g.Ja()){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.Ja()&&0==Object.keys(a.g.g.video).length&&($p[b]||aq[b])||!a.g.Ja()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
789
|
-
function xq(a,b,c){a.g.Ja()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.
|
|
790
|
-
uq.prototype.getVideo=uq.prototype.nc;uq.prototype.destroy=uq.prototype.destroy;function Fq(a,b,c,d){gb.call(this);var e=this;this.g=a;this.h=b;this.j=new fd;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.
|
|
790
|
+
function xq(a,b,c){a.g.Ja()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}P("shaka.cast.CastProxy",uq);uq.prototype.changeReceiverId=uq.prototype.rh;uq.prototype.forceDisconnect=uq.prototype.Zc;uq.prototype.suggestDisconnect=uq.prototype.ji;uq.prototype.setAppData=uq.prototype.Rg;uq.prototype.cast=uq.prototype.cast;uq.prototype.receiverName=uq.prototype.$e;uq.prototype.isCasting=uq.prototype.Ja;uq.prototype.canCast=uq.prototype.Pf;uq.prototype.getPlayer=uq.prototype.bd;
|
|
791
|
+
uq.prototype.getVideo=uq.prototype.nc;uq.prototype.destroy=uq.prototype.destroy;function Fq(a,b,c,d){gb.call(this);var e=this;this.g=a;this.h=b;this.j=new fd;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.F=!1;this.A=!0;this.u=this.l=null;this.I=new Ob(function(){Gq(e)});Hq(this)}oa(Fq,gb);q=Fq.prototype;q.isConnected=function(){return this.H};q.Bj=function(){return this.s};q.qk=function(a){this.i=a};q.Ji=function(){this.i=null};
|
|
791
792
|
q.rk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.pk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.nk=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
792
|
-
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.
|
|
793
|
+
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.s=!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)})};
|
|
793
794
|
function Hq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Iq(a)};b.onSenderDisconnected=function(){return Iq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Jq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Jq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return Kq(a,
|
|
794
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Lq(a,e)};b.start();b=t(Wp);for(var c=b.next();!c.done;c=b.next())a.j.
|
|
795
|
-
a.j.
|
|
795
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Lq(a,e)};b.start();b=t(Wp);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Mq(a,"video",e)});for(var d in Ua)a.j.o(a.h,Ua[d],function(e){return Mq(a,"player",e)});a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.s=!1;Nq(a)});a.j.o(a.g,"playing",function(){a.s=!1;Nq(a)});a.j.o(a.g,"pause",function(){Nq(a)});a.j.o(a.h,"unloading",function(){a.s=!0;Nq(a)});
|
|
796
|
+
a.j.o(a.g,"ended",function(){(new Ob(function(){a.g&&a.g.ended&&(a.s=!0,Nq(a))})).U(Oq)})}function Iq(a){a.m=0;a.A=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Nq(a)}function Nq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);Pq(a)||Qq(a);F(c)})}
|
|
796
797
|
function Rq(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,sa(r,5),E(r,a.h.load(b.manifest,b.startTime),7)):E(r,Promise.resolve(),3);case 7:ua(r,3);break;case 5:return g=va(r),h=(new Map).set("detail",g),k=new T("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
797
798
|
a.g.autoplay=f;b.manifest&&(a.g.play(),Qq(a));F(r)}})}function Mq(a,b,c){a.h&&(Gq(a),Jq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
798
|
-
function Gq(a){a.I.
|
|
799
|
-
1);Pq(a)}function Pq(a){return a.A&&(a.g.duration||a.h.
|
|
799
|
+
function Gq(a){a.I.U(Sq);for(var b={video:{},player:{}},c=t(Xp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.W())for(var e in bq)0==a.m%bq[e]&&(b.player[e]=a.h[e]());for(var f in $p)0==a.m%$p[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Jq(a,{type:"update",update:b},a.l);for(var g in aq)0==a.m%aq[g]&&(b={player:{}},b.player[g]=a.h[g](),Jq(a,{type:"update",update:b},a.l));a.F&&(a.m+=
|
|
800
|
+
1);Pq(a)}function Pq(a){return a.A&&(a.g.duration||a.h.W())?(Tq(a),a.A=!1,!0):!1}function Tq(a,b){var c={contentId:a.h.$c(),streamType:a.h.W()?"LIVE":"BUFFERED",contentType:""};a.h.W()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Qq(a,void 0===b?0:b,c)}
|
|
800
801
|
function Lq(a,b){var c=Up(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.A=!0;Rq(a,c.initState,c.appData);Gq(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
801
802
|
"player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Uq(a,g,f,null)},function(h){return Uq(a,g,f,h)})}}
|
|
802
803
|
function Kq(a,b){var c=Up(b.data);switch(c.type){case "PLAY":a.g.play();Qq(a);break;case "PAUSE":a.g.pause();Qq(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(),Qq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Qq(a));break;case "STOP":a.h.Oc().then(function(){a.h&&Qq(a)});break;case "GET_STATUS":Tq(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));
|
|
803
804
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Qq(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&&Tq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Jq(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:Jq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
804
|
-
function Uq(a,b,c,d){a.h&&Jq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Jq(a,b,c,d){a.H&&(a=Tp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Qq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.
|
|
805
|
+
function Uq(a,b,c,d){a.h&&Jq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Jq(a,b,c,d){a.H&&(a=Tp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Qq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?Vq:a.h.Ud()?Wq:a.g.paused?Xq:Yq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Jq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
805
806
|
P("shaka.cast.CastReceiver",Fq);Fq.prototype.destroy=Fq.prototype.destroy;Fq.prototype.setContentArtist=Fq.prototype.nk;Fq.prototype.setContentImage=Fq.prototype.pk;Fq.prototype.setContentTitle=Fq.prototype.rk;Fq.prototype.clearContentMetadata=Fq.prototype.Ji;Fq.prototype.setContentMetadata=Fq.prototype.qk;Fq.prototype.isIdle=Fq.prototype.Bj;Fq.prototype.isConnected=Fq.prototype.isConnected;var Sq=.5,Oq=5,Vq="IDLE",Yq="PLAYING",Wq="BUFFERING",Xq="PAUSED";function Zq(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(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=$q(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===
|
|
806
807
|
r||-1===u)p=ar(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,A=v.i,z=v.j,y=v.h;if(w!=h||A!=k||z!=l||y!=m)n.payload&&a.nestedCues.push(n),n=$q(d,e,w,A,z,y),h=w,k=A,l=z,m=y;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=ar(d,e),a.nestedCues.push(n));n=$q(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
807
|
-
function $q(a,b,c,d,e,f){a=new Ed(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function ar(a,b){a=new Ed(a,b,"");a.lineBreak=!0;return a}function br(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function cr(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.
|
|
808
|
-
function hr(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case ir:d=jr.has(c)?jr.get(c):String.fromCharCode(c);break;case kr:d=lr.get(c);break;case mr:a.i[a.g].pop();d=nr.get(c);break;case or:a.i[a.g].pop(),d=pr.get(c)}d&&a.i[a.g].push(new br(d,a.m,a.j,a.
|
|
808
|
+
function $q(a,b,c,d,e,f){a=new Ed(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function ar(a,b){a=new Ed(a,b,"");a.lineBreak=!0;return a}function br(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function cr(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.s="black";dr(this)}function er(a,b,c){var d="CC"+((a.A<<1|a.u)+1),e=new Ed(b,c,"");e.lineInterpretation=1;var f=fr.get(a.g);f&&(e.line=f);return Zq(e,d,a.i,b,c)}function dr(a){gr(a,0,15);a.g=1}
|
|
809
|
+
function hr(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case ir:d=jr.has(c)?jr.get(c):String.fromCharCode(c);break;case kr:d=lr.get(c);break;case mr:a.i[a.g].pop();d=nr.get(c);break;case or:a.i[a.g].pop(),d=pr.get(c)}d&&a.i[a.g].push(new br(d,a.m,a.j,a.s,a.l))}}function qr(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 gr(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
809
810
|
var ir=0,kr=1,mr=2,or=3,jr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),lr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),nr=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
|
|
810
811
|
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),pr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
811
|
-
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),fr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function rr(a,b){this.h=sr;this.
|
|
812
|
-
var sr=0,xr=1,ur=3,vr=4,zr="black green blue cyan red yellow magenta black".split(" "),Ar="white green blue cyan red yellow magenta white_italics".split(" ");function Br(a,b){this.K=b;this.O=a;this.L=this.l=!1;this.m=this.
|
|
813
|
-
function Hr(a,b,c){var d=new Ed(a.j,b,"");d.textAlign=a.H===Ir?"left":a.H===Jr?"right":Id;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.
|
|
812
|
+
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),fr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function rr(a,b){this.h=sr;this.s=new cr(a,b);this.i=new cr(a,b);this.g=this.j=new cr(a,b);this.l=0;this.m=null}function tr(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ur&&a.h!==vr&&(e=er(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,gr(c,0,15),c=a.j,c.g=0<c.h?c.h:0,gr(c,0,15),d.g=15);a.h=ur;d.h=b;return e}function wr(a){a.h=xr;a.g=a.j;a.g.h=0}function yr(a){Za("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=vr}
|
|
813
|
+
var sr=0,xr=1,ur=3,vr=4,zr="black green blue cyan red yellow magenta black".split(" "),Ar="white green blue cyan red yellow magenta white_italics".split(" ");function Br(a,b){this.K=b;this.O=a;this.L=this.l=!1;this.m=this.s=this.I=this.N=this.J=0;this.H=Cr;this.i=[];this.g=this.h=this.j=0;this.G=this.A=!1;this.F="white";this.u="black";Dr(this)}function Dr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Er())}function Er(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Fr(a,b){Gr(a)&&(a.i[a.h][a.g]=new br(b,a.G,a.A,a.u,a.F),a.g++)}function Gr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.s&&0<=a.h&&b}Br.prototype.isVisible=function(){return this.l};
|
|
814
|
+
function Hr(a,b,c){var d=new Ed(a.j,b,"");d.textAlign=a.H===Ir?"left":a.H===Jr?"right":Id;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.N;e.viewportAnchorUnits=a.L?ae:2;switch(a.I){case Kr:e.regionAnchorX=0;e.regionAnchorY=0;break;case Lr:e.regionAnchorX=50;e.regionAnchorY=0;break;case Mr:e.regionAnchorX=100;e.regionAnchorY=0;break;case Nr:e.regionAnchorX=0;e.regionAnchorY=50;break;case Or:e.regionAnchorX=
|
|
814
815
|
50;e.regionAnchorY=50;break;case Pr:e.regionAnchorX=100;e.regionAnchorY=50;break;case Qr:e.regionAnchorX=0;e.regionAnchorY=100;break;case Rr:e.regionAnchorX=50;e.regionAnchorY=100;break;case Sr:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Zq(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Ir=0,Jr=1,Cr=2,Kr=0,Lr=1,Mr=2,Nr=3,Or=4,Pr=5,Qr=6,Rr=7,Sr=8;function Tr(){this.i=[];this.h=null;this.g=0}function Ur(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Vr(a.h)),a.h=null,a.g=0))}function Vr(a){this.g=0;this.h=a}Vr.prototype.Aa=function(){return this.g<this.h.length};Vr.prototype.Oa=function(){return this.g};function Wr(a){if(!a.Aa())throw new U(2,2,3E3);return a.h[a.g++]}Vr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new U(2,2,3E3);this.g+=a};function Xr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
815
816
|
function Yr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Wr(b).value;b=null;c=t(Zr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Hr(e,d,a.i)),Dr(e);return b}if(137===c)for(b=Wr(b).value,b=t(Zr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Wr(b).value;b=null;c=t(Zr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Hr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Wr(b).value;
|
|
816
817
|
b=null;c=t(Zr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Hr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Wr(b).value,$r(a,b,d);if(143===c)return d=$r(a,255,d),as(a),d;if(144===c)b.skip(1),d=Wr(b).value,a.g&&(a.g.A=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=Wr(b).value,c=Wr(b).value,b.skip(1),a.g&&(b=bs((c&48)>>4,(c&12)>>2,c&3),a.g.F=bs((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=Wr(b).value,b=Wr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
817
|
-
b.skip(1),d=Wr(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Br(c,a.i);f.j=d;a.h[c]=f}d=Wr(b).value;f=Wr(b).value;var g=Wr(b).value,h=Wr(b).value,k=Wr(b).value;b=Wr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.A=!1,b.F="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.N=f&127;b.J=g;b.I=(h&240)>>4;b.L=0<(f&128);b.
|
|
818
|
+
b.skip(1),d=Wr(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Br(c,a.i);f.j=d;a.h[c]=f}d=Wr(b).value;f=Wr(b).value;var g=Wr(b).value,h=Wr(b).value,k=Wr(b).value;b=Wr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.A=!1,b.F="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.N=f&127;b.J=g;b.I=(h&240)>>4;b.L=0<(f&128);b.s=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
818
819
|
function Zr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function $r(a,b,c){var d=null;b=t(Zr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Hr(f,c,a.i));a.h[e]=null}return d}function as(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function bs(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return cs[a<<2|b<<1|c]}
|
|
819
|
-
var ds=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),cs="black blue green cyan red magenta yellow white".split(" ");function es(){this.h=[];this.g=[];this.i=new Tr;this.l=0;this.m=new Map([["CC1",new rr(0,0)],["CC2",new rr(0,1)],["CC3",new rr(1,0)],["CC4",new rr(1,1)]]);this.u=this.
|
|
820
|
-
function fs(a){a.
|
|
821
|
-
es.prototype.extract=function(a,b){if(this.F){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.F=!1}a=new Fg(a,0);if(!(8>a.getLength())&&181===a.
|
|
820
|
+
var ds=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),cs="black blue green cyan red magenta yellow white".split(" ");function es(){this.h=[];this.g=[];this.i=new Tr;this.l=0;this.m=new Map([["CC1",new rr(0,0)],["CC2",new rr(0,1)],["CC3",new rr(1,0)],["CC4",new rr(1,1)]]);this.u=this.s=0;this.j=new Map;this.F=!0;this.A=new Set;fs(this)}es.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;fs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())as(b.value)};
|
|
821
|
+
function fs(a){a.s=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=sr,c.g=c.j,c.m=null,dr(c.i),dr(c.j),dr(c.s);a.F=!0}
|
|
822
|
+
es.prototype.extract=function(a,b){if(this.F){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.F=!1}a=new Fg(a,0);if(!(8>a.getLength())&&181===a.X()&&49===a.Ka()&&1195456820===a.T()&&3===a.X()&&(c=a.X(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.X(),f=(e&4)>>2,g=a.X(),h=a.X();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,vb:g,Ub:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
822
823
|
es.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=gs(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Ur(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=hs(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
823
|
-
function gs(a,b){var c=b.type;if(16===(b.vb&112)){var d=b.vb>>3&1;0===c?a.
|
|
824
|
-
"white";e=!1;7>f?d=Ar[f]:7===f&&(e=!0);a=1===(a&1);c.h!==vr&&(f=c.g,c.h===ur&&b!==f.g&&(c=1+b-f.h,qr(f,c,1+f.g-f.h,f.h),gr(f,0,c-1),gr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.
|
|
825
|
-
kr,a);else if(18===(d&246)&&32===(a&224))hr(c.g,d&1?or:mr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Ub){case 32:wr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=tr(c,2,a);break;case 38:d=tr(c,3,a);break;case 39:d=tr(c,4,a);break;case 40:hr(c.g,ir,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:dr(c.
|
|
824
|
+
function gs(a,b){var c=b.type;if(16===(b.vb&112)){var d=b.vb>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.vb&&255===b.Ub||!b.vb&&!b.Ub||!is(b.vb)||!is(b.Ub))return 45<=++a.l&&fs(a),null;a.l=0;b.vb&=127;b.Ub&=127;var e=b.vb;if(1<=e&&15>=e||!b.vb&&!b.Ub)return null;e=null;if(16===(b.vb&112))a:{a.A.add(d),d=b.vb;a=b.Ub;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
825
|
+
"white";e=!1;7>f?d=Ar[f]:7===f&&(e=!0);a=1===(a&1);c.h!==vr&&(f=c.g,c.h===ur&&b!==f.g&&(c=1+b-f.h,qr(f,c,1+f.g-f.h,f.h),gr(f,0,c-1),gr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",hr(c.g,ir,32),d=!1,b=Ar[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=zr[(a&14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))hr(c.g,
|
|
826
|
+
kr,a);else if(18===(d&246)&&32===(a&224))hr(c.g,d&1?or:mr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Ub){case 32:wr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=tr(c,2,a);break;case 38:d=tr(c,3,a);break;case 39:d=tr(c,4,a);break;case 40:hr(c.g,ir,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:dr(c.s);yr(c);break;case 43:yr(c);break;case 44:b=c.i;d=null;c.h!==vr&&(d=er(b,c.l,a));gr(b,0,15);break;case 45:b=c.g;c.h!==ur?d=null:(d=er(b,c.l,a),e=b.g-b.h+1,qr(b,
|
|
826
827
|
e-1,e,b.h),gr(b,0,e-1),gr(b,b.g,15-b.g),c.l=a);break;case 46:gr(c.j,0,15);break;case 47:b=null,c.h!==vr&&(b=er(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,wr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.Ub,hr(c.g,ir,b.vb),hr(c.g,ir,a);return e}
|
|
827
|
-
function hs(a,b){var c=[];try{for(;b.Aa();){var d=Wr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Wr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Xr(e));for(var g=a.j.get(e),h=b.Oa();b.Oa()-h<f;){e=b;var k=Wr(e),l=k.value,m=k.pts;if(16===l){var n=Wr(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:!Gr(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=Hr(r,p,g.i));if(r.h+1>=r.
|
|
828
|
+
function hs(a,b){var c=[];try{for(;b.Aa();){var d=Wr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Wr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Xr(e));for(var g=a.j.get(e),h=b.Oa();b.Oa()-h<f;){e=b;var k=Wr(e),l=k.value,m=k.pts;if(16===l){var n=Wr(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:!Gr(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=Hr(r,p,g.i));if(r.h+1>=r.s){p=r;for(var u=
|
|
828
829
|
0,v=1;16>v;v++,u++)p.i[u]=p.i[v];for(v=0;1>v;v++,u++)p.i[u]=Er()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=Hr(r,p,g.i));r.i[r.h]=Er();r.g=0;break;case 12:r.isVisible()&&(e=Hr(r,p,g.i)),Dr(r),p=r,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Yr(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?Fr(g.g,
|
|
829
830
|
"\u266a"):Fr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Fr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ds.has(e)){var A=ds.get(e);Fr(g.g,A)}else Fr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Fr(g.g,"_"):Fr(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(z){if(z instanceof U&&3E3===z.code)Za("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw z;}return c}function is(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
830
831
|
es.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",es);xd=function(){return new es};function js(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function ks(){this.j=new Map;this.i=this.h=0;this.g=ls}
|
|
831
|
-
ks.prototype.init=function(a){function b(f){f=f.name;f in ms&&(c.g=ms[f])}var c=this,d=[],e=[];(new Ig).box("moov",Ng).box("mvex",Ng).
|
|
832
|
+
ks.prototype.init=function(a){function b(f){f=f.name;f in ms&&(c.g=ms[f])}var c=this,d=[],e=[];(new Ig).box("moov",Ng).box("mvex",Ng).V("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",Ng).V("tkhd",function(f){f=$i(f.reader,f.version);d.push(f.trackId)}).box("mdia",Ng).V("mdhd",function(f){f=Yi(f.reader,f.version);e.push(f.timescale)}).box("minf",Ng).box("stbl",Ng).V("stsd",Pg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
|
|
832
833
|
b).box("dvh1",b).box("dvhe",b).box("encv",Qg).box("sinf",Ng).box("frma",function(f){f=aj(f.reader).cb;f in ms&&(c.g=ms[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new U(2,2,2010);this.g==ls&&Ya("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
833
|
-
ks.prototype.parse=function(a){var b=this;if(this.g==ls)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Ig).box("moof",function(l){f=l.start;g=[];Ng(l)}).box("traf",Ng).
|
|
834
|
+
ks.prototype.parse=function(a){var b=this;if(this.g==ls)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Ig).box("moof",function(l){f=l.start;g=[];Ng(l)}).box("traf",Ng).V("trun",function(l){l=Zi(l.reader,l.version,l.flags);g.push(l)}).V("tfhd",function(l){l=Wi(l.reader,l.flags);d=l.wh||b.h;e=l.Mi||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).V("tfdt",function(l){h=Xi(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Ya("Unable to find base media decode time for CEA captions!"),
|
|
834
835
|
new U(2,2,2010);ns(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
835
|
-
function ns(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Wh});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Li);b.Aa();){g=b.
|
|
836
|
+
function ns(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Wh});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Li);b.Aa();){g=b.T();var p=b.X(),r=null;r=!1;h=1;switch(a.g){case os:r=p&31;r=6==r;break;case ps:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].cf||0),p=(c+p)/d,h=t(js(b.Qb(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?
|
|
836
837
|
c+(n[l].Ng||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",ks);var ls=0,os=1,ps=2,ms={avc1:os,avc3:os,hev1:ps,hvc1:ps,dvav:os,dva1:os,dvh1:ps,dvhe:ps};wd["video/mp4"]=function(){return new ks};function qs(){this.g=null}qs.prototype.init=function(){};qs.prototype.parse=function(a){this.g?this.g.clearData():this.g=new rj;var b=[];a=Fb(a);if(!yj(a))return b;a=this.g.parse(a);var c=a.Md(),d=a.Je();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(js(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
837
838
|
P("shaka.cea.TsCeaParser",qs);wd["video/mp2t"]=function(){return new qs};function rs(a,b,c){var d=ss(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=ts(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"!=
|
|
838
839
|
l.nd});f.length&&(a=us(e,k,f,c,h),0==a.length&&(a=[Ec("",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(Ec(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{vh:h,Kl:e,drmInfos:a,Mf:g,Bh:!0}}
|
|
@@ -853,14 +854,14 @@ function Fs(a,b,c){b=Gs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=hh(d.
|
|
|
853
854
|
function Hs(a,b,c,d,e,f){for(var g=lh(a,"http://www.w3.org/1999/xlink","href"),h=lh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Yg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return gg(new U(2,4,4028));if("onLoad"!=h)return gg(new U(2,4,4027));var p=Dc([d],[g]);return e.request(0,tg(p,b)).Na(function(r){r=Vg(r.data,a.tagName);if(!r)return gg(new U(2,4,4001,g));for(a.children=
|
|
854
855
|
[];r.children.length;){var u=r.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return Is(a,b,c,p[0],e,f+1)})}
|
|
855
856
|
function Is(a,b,c,d,e,f){f=void 0===f?0:f;if(lh(a,"http://www.w3.org/1999/xlink","href")){var g=Hs(a,b,c,d,e,f);c&&(g=g.Na(void 0,function(){return Is(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(ch(a)),l=k.next();!l.done;h={Sc:h.Sc},l=k.next())h.Sc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==lh(h.Sc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Sc}}(h)):"SegmentTimeline"!=h.Sc.tagName&&g.push(Is(h.Sc,b,c,d,e,f));return kg(g).Na(function(){return a})}
|
|
856
|
-
;function Js(a,b,c,d,e,f,g){var h,k=(new Ig).
|
|
857
|
-
function Ks(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.
|
|
857
|
+
;function Js(a,b,c,d,e,f,g){var h,k=(new Ig).V("sidx",function(l){h=Ks(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new U(2,3,3004);}
|
|
858
|
+
function Ks(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.T();if(0==k)throw new U(2,3,3005);if(0==g.version){var l=g.reader.T();var m=g.reader.T()}else l=g.reader.md(),m=g.reader.md();g.reader.skip(2);var n=g.reader.Ka();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.T(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.T();g.reader.skip(4);if(1==r)throw new U(2,3,3006);h.push(new Gi(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Ls(a){this.h=Kb(a);this.g=new Fg(this.h,0)}Ls.prototype.Aa=function(){return this.g.Aa()};
|
|
858
859
|
function Ms(a){var b=Ns(a);if(7<b.length)throw new U(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Ns(a);a:{d=t(Os);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Oa();else{if(8==b.length&&b[1]&224)throw new U(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Oa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Oa();d=Kb(a.h,a.g.Oa(),b);a.g.skip(b);return new Ps(c,
|
|
859
|
-
d)}function Ns(a){var b=a.g.Oa(),c=a.g.
|
|
860
|
+
d)}function Ns(a){var b=a.g.Oa(),c=a.g.X();if(0==c)throw new U(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Os=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Ps(a,b){this.id=a;this.g=b}
|
|
860
861
|
function Qs(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 Rs(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ls(a.g);for(var n=null,p=null;a.Aa();){var r=Ms(a);if(187==r.id){var u=Ss(r);u&&(r=c*u.Ck,u=b+u.Zj,null!=n&&m.push(new Gi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Gi(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
861
862
|
function Ss(a){var b=new Ls(a.g);a=Ms(b);if(179!=a.id)throw new U(2,3,3013);a=Qs(a);b=Ms(b);if(183!=b.id)throw new U(2,3,3012);b=new Ls(b.g);for(var c=0;b.Aa();){var d=Ms(b);if(241==d.id){c=Qs(d);break}}return{Ck:a,Zj:c}};function Ts(a,b,c){b=Fs(a,b,"Initialization");if(!b)return null;var d=a.M.Ta(),e=b.attributes.sourceURL;e&&(d=Dc(d,[vc(e)]));e=0;var f=null;if(b=kh(b,"range",rh))e=b.start,f=b.end;c=new Ei(function(){return d},e,f,Us(a),null,null,c);c.codecs=a.M.codecs;c.mimeType=a.M.mimeType;return c}
|
|
862
863
|
function Vs(a,b,c){var d=Number(Es(a,Ws,"presentationTimeOffset"))||0,e=Es(a,Ws,"timescale"),f=1;e&&(f=th(e)||1);var g=d/f||0,h=Ts(a,Ws,c);Xs(a,h);var k=Qe(a);return{zc:function(){var l=Fs(k,Ws,"RepresentationIndex");var m=k.M.Ta();l&&(l=vc(l.attributes.sourceURL))&&(m=Dc(m,[l]));l=Ys(k);return Zs(k,b,h,m,l.start,l.end,g)}}}
|
|
863
|
-
function Zs(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K;return O(function(I){if(1==I.g)return h=a.presentationTimeline,k=!a.Jb||!a.va.Xd,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.
|
|
864
|
+
function Zs(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K;return O(function(I){if(1==I.g)return h=a.presentationTimeline,k=!a.Jb||!a.va.Xd,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.Va,c.za,!0):null],p=null,E(I,Promise.all(u),2);v=I.h;w=v[0];A=v[1]||null;z=null;y=l-g;B=l;C=m?l+m:Infinity;if("mp4"==n)var J=Js(w,e,d,c,y,B,C);else{J=new Ls(A);if(440786851!=Ms(J).id)throw new U(2,3,3008);var H=Ms(J);if(408125543!=H.id)throw new U(2,
|
|
864
865
|
3,3009);J=H.g.byteOffset;H=new Ls(H.g);for(var L=null;H.Aa();){var M=Ms(H);if(357149030==M.id){L=M;break}}if(!L)throw new U(2,3,3010);L=new Ls(L.g);M=1E6;for(H=null;L.Aa();){var N=Ms(L);if(2807729==N.id)M=Qs(N);else if(17545==N.id)if(4==N.g.byteLength)H=N.g.getFloat32(0);else if(8==N.g.byteLength)H=N.g.getFloat64(0);else throw new U(2,3,3003);}if(null==H)throw new U(2,3,3011);L=M/1E9;H*=L;M=Ms(new Ls(w));if(475249515!=M.id)throw new U(2,3,3007);J=Rs(M,J,L,H,d,c,y,B,C)}z=J;D=t(z);for(G=D.next();!G.done;G=
|
|
865
866
|
D.next())K=G.value,K.codecs=a.M.codecs,K.mimeType=a.M.mimeType;h.ae(z);r=new Tk(z);k&&r.Xc(B,C,!0);return I.return(r)})}function Ws(a){return a.od}function Ys(a){var b=Fs(a,Ws,"RepresentationIndex");a=Es(a,Ws,"indexRange");a=rh(a||"");b&&(a=kh(b,"range",rh,a));return a}function Xs(a,b){$s(a,b);if(!Ys(a))throw new U(2,4,4002);}function $s(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Jc&&"mp4"!=c&&"webm"!=c)throw new U(2,4,4006);if("webm"==c&&!b)throw new U(2,4,4005);}
|
|
866
867
|
function Us(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 at(a,b,c){var d=Ts(a,bt,c),e=ct(a);if(!e.bb&&!e.timeline&&1<e.gd.length)throw new U(2,4,4002);if(!e.bb&&!a.va.duration&&!e.timeline&&1==e.gd.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.Ga.id&&a.M.id&&(g=b[a.Ga.id+","+a.M.id])&&(f=g.segmentIndex);var h=dt(a.va.start,a.va.duration,a.M.Ta,e,d,c,a.M.mimeType,a.M.codecs);b=!f;f?f.Zd(h,a.presentationTimeline.Db()):f=new Tk(h);a.presentationTimeline.ae(h);a.Jb&&a.va.Xd||f.Xc(a.va.start,
|
|
@@ -870,36 +871,36 @@ function et(a){return[a.M.ec,a.Ea.ec,a.Ga.ec].filter(Oe).map(function(b){return
|
|
|
870
871
|
(p=d.segmentIndex);var r=a.va.start,u=a.va.duration?r+a.va.duration:Infinity,v=!(a.Jb&&a.va.Xd);p?(c=p,lt(c,m,r,u,v,l),c.eb(a.presentationTimeline.Db())):p=new mt(m,a.M.id,a.bandwidth,a.M.Ta,r,u,l,v,g,a.M.Og);m.timeline&&"image"!==a.Ea.contentType&&a.presentationTimeline.Sh(m.timeline,r);d&&a.Jb&&(d.segmentIndex=p);return{zc:function(){p instanceof mt&&0==p.getNumReferences()&<(p,m,r,u,v,l);return Promise.resolve(p)}}}function gt(a){return a.qc}
|
|
871
872
|
function it(a){var b=Ds(a,gt),c=Es(a,gt,"media"),d=Es(a,gt,"index");return{bb:b.bb,timescale:b.timescale,je:b.je,dc:b.dc,eh:b.eh,timeline:b.timeline,hd:c&&vc(c),Td:d,mimeType:a.M.mimeType,codecs:a.M.codecs}}function jt(a){var b=a.Td?1:0;b+=a.timeline?1:0;b+=a.bb?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.Td&&(a.timeline=null),a.bb=null);if(!a.Td&&!a.hd)throw new U(2,4,4002);}
|
|
872
873
|
function kt(a,b,c,d,e,f,g){function h(H){var L=(H-v)*u,M=L+b.dc,N=L+n;L=N+u;var Q=Math.min(L,l());N=new Gi(N,Q,function(){var S=M*w;"BigInt"in window&&S>Number.MAX_SAFE_INTEGER&&(S=BigInt(M)*BigInt(w));S=Cs(A,y,H,null,z,S);return Dc(B(),[S])},0,null,d,C,n,l(),[],"",null,null,Hi,f);N.codecs=a.M.codecs;N.mimeType=a.M.mimeType;N.i=L;return N}function k(){var H=[Math.max(m.Db(),n),Math.min(m.lc(),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+
|
|
873
|
-
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.Ga.id,r=a.va.duration,u=b.bb,v=b.je,w=b.timescale,A=b.hd,z=a.bandwidth||null,y=a.M.id,B=a.M.Ta,C=n-b.dc,D=k();c=a.Jb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var G=c;G<=g;++G){var K=h(G);D.push(K)}var I=new Tk(D);D=m.lc()<l();G=m.
|
|
874
|
+
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.Ga.id,r=a.va.duration,u=b.bb,v=b.je,w=b.timescale,A=b.hd,z=a.bandwidth||null,y=a.M.id,B=a.M.Ta,C=n-b.dc,D=k();c=a.Jb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var G=c;G<=g;++G){var K=h(G);D.push(K)}var I=new Tk(D);D=m.lc()<l();G=m.W();if(D||G){var J=Math.max(c,g+1);c=u;a.M.Ya&&(c=.1);I.mf(c,function(){var H=m.Db();I.eb(H);var L=t(k());L.next();L=L.next().value;for(var M=[];J<=L;){var N=
|
|
874
875
|
h(J);M.push(N);J++}return H>l()&&!M.length?null:M})}return Promise.resolve(I)}function ht(a,b){var c=a.M.dd;c||(c=Es(a,gt,"initialization"));if(!c)return null;c=vc(c);var d=a.M.id,e=a.bandwidth||null,f=a.M.Ta;b=new Ei(function(){var g=Cs(c,d,null,null,e,null);return Dc(f(),[g])},0,null,Us(a),null,null,b);b.codecs=a.M.codecs;b.mimeType=a.M.mimeType;return b}
|
|
875
876
|
function mt(a,b,c,d,e,f,g,h,k,l){Tk.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&&nt(this)}oa(mt,Tk);q=mt.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){Tk.prototype.release.call(this);this.h=null};
|
|
876
877
|
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())}};
|
|
877
878
|
function lt(a,b,c,d,e,f){ot(a,f);if(a.h){c=a.h.timeline;a.h.hd=b.hd;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&&nt(a)}function ot(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)&&Ji(c,b)}}
|
|
878
|
-
function nt(a){if(!a.
|
|
879
|
+
function nt(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.eb(a.i)}}q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
|
|
879
880
|
q.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.hd,e=this.h.timeline[a],f=e.kk,g=this.h.eh+e.fh;c=this.i-this.h.dc;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],p=(e.end-e.start)/e.Pb,r={},u=0;u<e.Pb;r={Gd:r.Gd,Cf:r.Cf},u++){var v=e.start+p*u,w=v+p;r.Cf=u+1;r.Gd=null;v=new Gi(this.i+v,this.i+w,function(A){return function(){if(!b.h)return[];
|
|
880
881
|
null==A.Gd&&(A.Gd=pt(b.h.hd,b.H,f,b.F,g,A.Cf,b.G));return A.Gd}}(r),0,null,this.u,c,this.i,this.l,[],"",null,null,Hi,this.A);v.codecs=l;v.mimeType=m;0==this.I?0<u&&v.Qe():0!=u%this.I&&v.Qe();n.push(v)}c=new Gi(this.i+e.start,k,function(){return 0<e.Pb?[]:pt(d,b.H,f,b.F,g,null,b.G)},0,null,this.u,c,this.i,this.l,n,"",null,null,Hi,this.A,0<e.Pb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
|
|
881
882
|
function pt(a,b,c,d,e,f,g){a=Cs(a,b,c,f,d||null,e);return Dc(g(),[a]).map(function(h){return h.toString()})};function qt(a){var b=Ae(a),c=b.split("/")[0];a=Be(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,gh:null,colorGamut:null}}
|
|
882
883
|
function rt(a,b){function c(y){return d(y.name)}function d(y){y=y.toLowerCase();switch(y){case "avc1":case "avc3":f.push(y+".42E01E");h=!0;break;case "hev1":case "hvc1":f.push(y+".1.6.L93.90");h=!0;break;case "dvh1":case "dvhe":f.push(y+".05.04");h=!0;break;case "vp09":f.push(y+".00.10.08");h=!0;break;case "av01":f.push(y+".0.01M.08");h=!0;break;case "mp4a":e.push("mp4a.40.2");g=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(y),g=!0}}var e=[],f=[],g=!1,h=!1,k=null,l=null,m=null,n=
|
|
883
|
-
null,p=null,r=null,u=null,v;(new Ig).box("moov",Ng).box("trak",Ng).
|
|
884
|
-
y.
|
|
885
|
-
y.name;Qg(y)}).box("dva1",function(y){v=y.name;Qg(y)}).box("dvav",function(y){v=y.name;Qg(y)}).box("dvh1",function(y){v=y.name;Qg(y)}).box("dvhe",function(y){v=y.name;Qg(y)}).box("vp09",function(y){v=y.name;Qg(y)}).box("av01",function(y){v=y.name;Qg(y)}).box("avcC",function(y){var B=v||"";switch(v){case "dvav":B="avc3";break;case "dva1":B="avc1"}y=y.reader;y.skip(1);y=B+"."+bj(y.
|
|
886
|
-
"hev1"}var C=y.reader;C.skip(1);y=C.
|
|
887
|
-
y.reader;C.skip(2);y=C.
|
|
884
|
+
null,p=null,r=null,u=null,v;(new Ig).box("moov",Ng).box("trak",Ng).V("tkhd",function(y){y=$i(y.reader,y.version);l=String(y.height);m=String(y.width)}).box("mdia",Ng).V("mdhd",function(y){k=Yi(y.reader,y.version).language}).box("minf",Ng).box("stbl",Ng).V("stsd",Pg).box("mp4a",function(y){var B=y.reader;B.skip(6);B.skip(2);B.skip(8);var C=B.Ka();B.skip(2);B.skip(2);B.skip(2);B=B.Ka()+B.Ka()/65536;n=C;p=B;y.reader.Aa()?Ng(y):c(y)}).box("esds",function(y){y=y.reader;for(var B="mp4a",C,D;y.Aa();){C=
|
|
885
|
+
y.X();for(var G=y.X();G&128;)G=y.X();if(3==C)y.Ka(),G=y.X(),G&128&&y.Ka(),G&64&&y.skip(y.X()),G&32&&y.Ka();else if(4==C)D=y.X(),y.skip(12);else if(5==C)break}D&&(B+="."+bj(D),5==C&&y.Aa()&&(C=y.X(),D=(C&248)>>3,31===D&&y.Aa()&&(D=32+((C&7)<<3)+((y.X()&224)>>5)),B+="."+D));e.push(B);g=!0}).box("ac-3",c).box("ec-3",c).box("opus",c).box("Opus",c).box("fLaC",c).box("avc1",function(y){v=y.name;Qg(y)}).box("avc3",function(y){v=y.name;Qg(y)}).box("hev1",function(y){v=y.name;Qg(y)}).box("hvc1",function(y){v=
|
|
886
|
+
y.name;Qg(y)}).box("dva1",function(y){v=y.name;Qg(y)}).box("dvav",function(y){v=y.name;Qg(y)}).box("dvh1",function(y){v=y.name;Qg(y)}).box("dvhe",function(y){v=y.name;Qg(y)}).box("vp09",function(y){v=y.name;Qg(y)}).box("av01",function(y){v=y.name;Qg(y)}).box("avcC",function(y){var B=v||"";switch(v){case "dvav":B="avc3";break;case "dva1":B="avc1"}y=y.reader;y.skip(1);y=B+"."+bj(y.X())+bj(y.X())+bj(y.X());f.push(y);h=!0}).box("hvcC",function(y){var B=v||"";switch(v){case "dvh1":B="hvc1";break;case "dvhe":B=
|
|
887
|
+
"hev1"}var C=y.reader;C.skip(1);y=C.X();var D=["","A","B","C"][y>>6],G=y&31,K=C.T(),I=(y&32)>>5?"H":"L";y=[C.X(),C.X(),C.X(),C.X(),C.X(),C.X()];C=C.X();for(var J=0,H=0;32>H;H++){J|=K&1;if(31==H)break;J<<=1;K>>=1}B=B+("."+D+G)+("."+bj(J,!0));B+="."+I+C;D="";for(G=y.length;G--;)if((I=y[G])||D)D="."+I.toString(16).toUpperCase()+D;B+=D;f.push(B);h=!0}).box("dvcC",function(y){var B=v||"";switch(v){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var C=
|
|
888
|
+
y.reader;C.skip(2);y=C.X();C=C.X();f.push(B+"."+cj(y>>1&127)+"."+cj(y<<5&32|C>>3&31));h=!0}).V("vpcC",function(y){var B=v||"",C=y.reader;y=C.X();var D=C.X();C=C.X()>>4&15;f.push(B+"."+cj(y)+"."+cj(D)+"."+cj(C));h=!0}).box("av1C",function(y){var B=v||"",C=y.reader;C.skip(1);y=C.X();C=C.X();var D=y>>>5,G=(C&64)>>6;f.push(B+"."+D+"."+cj(y&31)+(C>>>7?"H":"M")+"."+cj(2===D&&G?(C&32)>>5?12:10:G?10:8)+"."+((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+cj(1)+"."+cj(1)+"."+cj(1)+".0");h=!0}).box("enca",Rg).box("encv",
|
|
888
889
|
Qg).box("sinf",Ng).box("frma",function(y){y=aj(y.reader).cb;d(y)}).box("colr",function(y){y=y.reader;var B=null,C=null,D=y.Qb(4);var G=String.fromCharCode(D[0]);G+=String.fromCharCode(D[1]);G+=String.fromCharCode(D[2]);G+=String.fromCharCode(D[3]);if("nclx"===G){switch(y.Ka()){case 1:case 5:case 6:case 7:B="srgb";break;case 9:B="rec2020";break;case 11:case 12:B="p3"}D=y.Ka();y.Ka();switch(D){case 1:case 6:case 13:case 14:case 15:C="SDR";break;case 16:C="PQ";break;case 18:C="HLG"}}r=C;u=B}).parse(a||
|
|
889
890
|
b,!0);if(!e.length&&!f.length)return null;var w=g&&!h,A=new Map;if(h){var z=new vd("video/mp4");a&&z.init(a);z.i(b);a=t(z.j());for(b=a.next();!b.done;b=a.next())b=b.value,A.set(b,b);z.g()}return{type:w?"audio":"video",mimeType:w?"audio/mp4":"video/mp4",codecs:st(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:p,closedCaptions:A,gh:r,colorGamut:u}}
|
|
890
891
|
function st(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ze(d);b.has(e)||(c.push(d),b.add(e))}b=Kc("audio",c);d=Kc("video",c);a=Kc(Jc,c);d=tt(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}function tt(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?kd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
891
|
-
function ut(a){var b=null;(new Ig).box("moov",Ng).box("trak",Ng).box("mdia",Ng).box("minf",Ng).box("stbl",Ng).
|
|
892
|
-
function wt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Dc(a.i,[xt(a,b)]),d=tg(c,a.
|
|
893
|
-
function xt(a,b){if(!a.m.length)return b;b=new mb(b);var c=a.F||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Bb(e)&&qb(b,e);return b.toString()}function yt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Ob(function(){wt(a,d)});if(c=b.TTL)a.G=c;a.g.
|
|
892
|
+
function ut(a){var b=null;(new Ig).box("moov",Ng).box("trak",Ng).box("mdia",Ng).box("minf",Ng).box("stbl",Ng).V("stsd",Pg).box("encv",Qg).box("enca",Rg).box("sinf",Ng).box("schi",Ng).V("tenc",function(c){c=c.reader;c.X();c.X();c.X();c.X();b=Bc(c.Qb(16))}).parse(a,!0);return b};function vt(a){this.s=null;this.A=a;this.I=new mg;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"}vt.prototype.configure=function(a){this.s=a};vt.prototype.destroy=function(){this.A=this.s=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()};vt.prototype.setManifestType=function(a){this.u=a};
|
|
893
|
+
function wt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Dc(a.i,[xt(a,b)]),d=tg(c,a.s.retryParameters),e=a.A.networkingEngine.request(8,d),ng(a.I,e),sa(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=oc(f.data),h=JSON.parse(g),1==h.VERSION&&yt(a,h,f.uri),ua(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Ob(function(){wt(a,b)});a.g.U(a.G);F(l)})}
|
|
894
|
+
function xt(a,b){if(!a.m.length)return b;b=new mb(b);var c=a.F||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Bb(e)&&qb(b,e);return b.toString()}function yt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Ob(function(){wt(a,d)});if(c=b.TTL)a.G=c;a.g.U(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
894
895
|
function zt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}vt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
895
896
|
function At(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={vc:e.vc},g=f.next())if(e.vc=g.value,g=b.get(e.vc))d.push({Kg:e.vc,location:g});else if(g=a.H.find(function(k){return function(l){return l.Uk==k.vc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].ti?(h=new mb(h),ob(h,g["URI-REPLACEMENT"].ti),d.push({Kg:e.vc,location:h.toString()})):d.push({Kg:e.vc,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
896
|
-
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].Kg);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:Dc(a.i,d)};function Bt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.u=this.
|
|
897
|
+
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].Kg);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:Dc(a.i,d)};function Bt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.u=this.s=!1;this.m=new Set}q=Bt.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.tj=function(){return this.j};q.og=function(){return this.l.slice()};q.Zi=function(){return this.i};
|
|
897
898
|
function Ct(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[Dt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Et(n),n]})),l=new Map(h.textStreams.map(function(n){return[Ft(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Gt(n),n]}));if(b){var m=Ht(Jc);l.set(Ft(m),m);m=Ht("image");h.set(Gt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{nh:c,pi:d,ki:e,Jh:f}}
|
|
898
899
|
q.Sf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q,S,R;return O(function(la){if(1==la.g){e=Lc;if(!b&&1==a.length)return f=Ct(a,!1),g=f.nh,h=f.pi,k=f.ki,l=f.Jh,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=Ct(a,!0);v=u.nh;w=u.pi;A=u.ki;z=u.Jh;
|
|
899
900
|
return E(la,Promise.all([It(d,d.h,v,n,Jt,Kt,m),It(d,d.g,w,n,Jt,Kt,m),It(d,d.l,A,n,Jt,Kt,m),It(d,d.i,z,n,Jt,Kt,m)]),2)}y=0;B=[];if(d.g.length&&d.h.length)for(J=t(d.h),H=J.next();!H.done;H=J.next())for(L=H.value,M=t(d.g),N=M.next();!N.done;N=M.next())Q=N.value,S=oi(L.drmInfos,Q.drmInfos),L.drmInfos.length&&Q.drmInfos.length&&!S.length||(R=y++,B.push({id:R,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L,video:Q,bandwidth:(L.bandwidth||0)+(Q.bandwidth||0),drmInfos:S,allowedByApplication:!0,
|
|
900
|
-
allowedByKeySystem:!0,decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,D=t(C),G=D.next();!G.done;G=D.next())K=G.value,I=y++,B.push({id:I,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K.type==e
|
|
901
|
-
function Lt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N;return O(function(Q){switch(Q.g){case 1:b=Lc;if(1==a.length)return Q.return(a[0]);c=a.map(function(S){return new Map(S.filter(function(R){return R.type===b
|
|
902
|
-
f=a.map(function(S){return new Map(S.filter(function(R){return R.type===b.Jf}).map(function(R){return[Gt(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Mt(b.Ca),k.set(Ft(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=Mt(b.Jf),p.set(Gt(r),r);u=new Bt;return E(Q,It(u,[],c,0,Nt,Ot,0),2);case 2:return v=Q.h,E(Q,It(u,[],d,0,Nt,Ot,0),3);case 3:return w=Q.h,E(Q,It(u,[],e,0,Nt,Ot,0),4);case 4:return A=Q.h,E(Q,It(u,[],f,0,Nt,Ot,0),5);case 5:z=Q.h;y=0;if(w.length&&v.length)for(K=
|
|
901
|
+
allowedByKeySystem:!0,decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,D=t(C),G=D.next();!G.done;G=D.next())K=G.value,I=y++,B.push({id:I,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K.type==e.aa?K:null,video:K.type==e.ua?K:null,bandwidth:K.bandwidth||0,drmInfos:K.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=B;F(la)})};
|
|
902
|
+
function Lt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N;return O(function(Q){switch(Q.g){case 1:b=Lc;if(1==a.length)return Q.return(a[0]);c=a.map(function(S){return new Map(S.filter(function(R){return R.type===b.aa}).map(function(R){return[Dt(R),R]}))});d=a.map(function(S){return new Map(S.filter(function(R){return R.type===b.ua}).map(function(R){return[Et(R),R]}))});e=a.map(function(S){return new Map(S.filter(function(R){return R.type===b.Ca}).map(function(R){return[Ft(R),
|
|
903
|
+
R]}))});f=a.map(function(S){return new Map(S.filter(function(R){return R.type===b.Jf}).map(function(R){return[Gt(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Mt(b.Ca),k.set(Ft(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=Mt(b.Jf),p.set(Gt(r),r);u=new Bt;return E(Q,It(u,[],c,0,Nt,Ot,0),2);case 2:return v=Q.h,E(Q,It(u,[],d,0,Nt,Ot,0),3);case 3:return w=Q.h,E(Q,It(u,[],e,0,Nt,Ot,0),4);case 4:return A=Q.h,E(Q,It(u,[],f,0,Nt,Ot,0),5);case 5:z=Q.h;y=0;if(w.length&&v.length)for(K=
|
|
903
904
|
t(v),I=K.next();!I.done;I=K.next())for(J=I.value,H=t(w),L=H.next();!L.done;L=H.next())M=L.value,N=y++,M.variantIds.push(N),J.variantIds.push(N);else for(B=w.concat(v),C=t(B),D=C.next();!D.done;D=C.next())G=D.value,G.variantIds=[y++];return Q.return(w.concat(v).concat(A).concat(z))}})}
|
|
904
905
|
function It(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K;return O(function(I){switch(I.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){I.B(4);break}n=m.value;return E(I,Pt(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())z=A.value,(y=Qt(a,z,c,e,f,h))&&b.push(y);B=t(h);for(u=B.next();!u.done;u=
|
|
905
906
|
B.next())for(C=u.value,D={},G=t(C),A=G.next();!A.done;D={ue:D.ue},A=G.next())if(D.ue=A.value,!Rt(D.ue)&&(K=b.some(function(J){return function(H){return St(a,J.ue,H)}}(D))))throw new U(2,4,4037);return I.return(b)}})}function Pt(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return Tt(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,Ut(b,d+g),2):h.B(2):h.return(!1);Vt(b,d,e,f,g);return h.return(!0)})}
|
|
@@ -913,7 +914,7 @@ d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions|
|
|
|
913
914
|
b)}function Ot(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
914
915
|
function Tt(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=Wt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
915
916
|
function Wt(a,b,c){var d={audio:Dt,video:Et,text:Ft,image:Gt}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return St(a,l,m)},video:function(l,m){return St(a,l,m)},text:Xt,image:Yt}[c.type];for(var g={audio:Zt,video:$t,text:au,image:bu}[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&&!Rt(e)&&b.delete(d(e));return e}
|
|
916
|
-
function cu(a,b){function c(d){if(!du.has(d)){var e=se(d);du.set(d,e)}return du.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}q.Xh=function(a){this.
|
|
917
|
+
function cu(a,b){function c(d){if(!du.has(d)){var e=se(d);du.set(d,e)}return du.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}q.Xh=function(a){this.s=a};q.ei=function(a){this.u=a};function St(a,b,c){return!cu(b,c)&&!a.s||b.drmInfos&&!ni(b.drmInfos,c.drmInfos)?!1:!0}function Xt(a,b){return b.language?a.forced!==b.forced||0==Vc(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Yt(){return!0}
|
|
917
918
|
function Zt(a,b,c){var d=cu(a,b),e=cu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Vc(a.language,b.language);e=Vc(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)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
|
|
918
919
|
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=eu(a.channelsCount,b.channelsCount,c.channelsCount);if(d==fu)return!0;if(d==gu)return!1;d=eu(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==fu?!0:d==gu?!1:a.bandwidth&&hu(a.bandwidth,b.bandwidth,c.bandwidth)==fu?!0:!1}
|
|
919
920
|
function $t(a,b,c){var d=cu(a,b),e=cu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=eu(a.width*a.height,b.width*b.height,c.width*c.height);if(d==fu)return!0;if(d==gu)return!1;if(a.frameRate){d=eu(a.frameRate,b.frameRate,c.frameRate);if(d==fu)return!0;if(d==gu)return!1}return a.bandwidth&&hu(a.bandwidth,b.bandwidth,c.bandwidth)==fu?!0:!1}
|
|
@@ -924,31 +925,31 @@ function Ht(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:functio
|
|
|
924
925
|
function eu(a,b,c){if(b==a&&a!=c)return gu;if(c==a&&a!=b)return fu;if(b>a){if(c<=a||c-a<b-a)return fu;if(c-a>b-a)return gu}else{if(c>a)return gu;if(a-c<a-b)return fu;if(a-c>a-b)return gu}return iu}function hu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?fu:b<a?gu:iu}function Rt(a){switch(a.type){case Jc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
925
926
|
function Et(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Dt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Ft(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
926
927
|
function Gt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}P("shaka.util.PeriodCombiner",Bt);Bt.prototype.setUseStreamOnce=Bt.prototype.ei;Bt.prototype.setAllowMultiTypeVariants=Bt.prototype.Xh;Bt.prototype.combinePeriods=Bt.prototype.Sf;Bt.prototype.getImageStreams=Bt.prototype.Zi;Bt.prototype.getTextStreams=Bt.prototype.og;Bt.prototype.getVariants=Bt.prototype.tj;var fu=1,iu=0,gu=-1,du=new Map;function ju(a,b){var c=new DOMParser,d=ku.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 lu(a,b){try{var c=rc(a);return ju(c,b)}catch(d){return null}}
|
|
927
|
-
var ku=new Mb(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 mu(){var a=this;this.i=this.g=null;this.A=[];this.l=null;this.
|
|
928
|
-
q.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.l&&this.l.presentationTimeline.
|
|
929
|
-
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.i=null;this.A=[];this.l=null;this.u={};this.
|
|
930
|
-
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return sa(c,2),E(c,ou(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.l&&this.l.presentationTimeline.
|
|
928
|
+
var ku=new Mb(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 mu(){var a=this;this.i=this.g=null;this.A=[];this.l=null;this.R=1;this.F=[];this.j={Ue:"",type:"",profiles:[],ac:null,Ya:0,Ta:null,ee:0};this.s=new Map;this.u={};this.N={};this.m=new Bt;this.H=0;this.O=new cd(5);this.I=new Ob(function(){nu(a)});this.L=new mg;this.J=null;this.S=[];this.K=Infinity;this.G=!1;this.h=null}q=mu.prototype;
|
|
929
|
+
q.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.l&&this.l.presentationTimeline.W()&&this.I.La();this.h&&this.h.configure(this.g);this.m&&(this.m.Xh(this.g.dash.multiTypeVariantsAllowed&&md()),this.m.ei(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.i=b,E(e,ou(c),2);d=e.h;c.i&&pu(c,d);if(!c.i)throw new U(2,7,7001);return e.return(c.l)})};
|
|
930
|
+
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.i=null;this.A=[];this.l=null;this.u={};this.s.clear();this.j={Ue:"",type:"",profiles:[],ac:null,Ya:0,Ta:null,ee:0};this.m=null;null!=this.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();return this.L.destroy()};
|
|
931
|
+
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return sa(c,2),E(c,ou(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.l&&this.l.presentationTimeline.W()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.l.presentationTimeline.lc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,pu(this,0))}}};
|
|
931
932
|
q.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
932
933
|
function ou(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=qu(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=At(a.h,"Location",!0),e.length&&(d=e)),f=tg(d,a.g.retryParameters),g=Date.now(),E(m,ru(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.i)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,su(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.O.sample(1,l);return m.return(l)})}
|
|
933
934
|
function su(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=rm;if(f!=g){od("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=lu(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=sc(h.outerHTML)}k=Vg(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=sm;l!=m&&l(k);if("Patch"===d)return v.return(tu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(uu(a,k,c));
|
|
934
935
|
p=a.g.dash.xlinkFailGracefully;r=Is(k,a.g.retryParameters,p,c,a.i.networkingEngine);ng(a.L,r);return E(v,r.promise,2)}u=v.h;return v.return(uu(a,u,c))})}
|
|
935
|
-
function uu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q,S,R,la,za,Na,Da,Oa,Va,Ia,bb,ya,db,Df,Ud,ue,Cd,Oc,ve,we,xe,Dd,hj
|
|
936
|
-
b.attributes.id||"";a.j.ee=kh(b,"publishTime",
|
|
937
|
-
J.next())L=H.value,M=L.attributes.serviceLocation,N=fh(L),M&&N&&(zt(a.h,"BaseURL",M,N),I=!0);I&&a.h||(Q=G.map(fh),K=Dc(d,Q));S=function(){return a.h&&I?At(a.h,"BaseURL"):K?K:[]};a.j.Ta=S;R=0;G&&G.length&&(R=kh(G[0],"availabilityTimeOffset",vh)||0);a.j.Ya=R;la=a.g.dash.ignoreMinBufferTime;za=0;la||(za=kh(b,"minBufferTime",qh)||0);a.H=kh(b,"minimumUpdatePeriod",qh,-1);Na=kh(b,"availabilityStartTime",
|
|
938
|
-
kh(b,"suggestedPresentationDelay",qh));Ia=a.g.dash.ignoreMaxSegmentDuration;bb=null;Ia||(bb=kh(b,"maxSegmentDuration",qh));ya=b.attributes.type||"static";a.j.type=ya;if(a.l)for(db=a.l.presentationTimeline,Df=t(Object.values(a.u)),Ud=Df.next();!Ud.done;Ud=Df.next())ue=Ud.value,ue.segmentIndex&&ue.segmentIndex.eb(db.Db());else Cd=a.g.defaultPresentationDelay||1.5*za,Oc=null!=Va?Va:Cd,db=new xk(Na,Oc,a.g.dash.autoCorrectDrift);db.Mc("static"==ya);(ve=db.
|
|
939
|
-
(Da=a.g.availabilityWindowOverride);null==Da&&(Da=Infinity);db.hf(Da);we=b.attributes.profiles||"";a.j.profiles=we.split(",");xe={Jb:"static"!=ya,presentationTimeline:db,Ga:null,va:null,Ea:null,M:null,bandwidth:0,vg:!1,Ya:R,ac:null,profiles:we.split(",")};Dd=vu(a,xe,S,b);hj=Dd.duration
|
|
940
|
-
db.Eg(bb||1);return E(nc,u,2);case 2:return a.G&&(za=0,jj=null!=Va?Va:a.g.defaultPresentationDelay,db.Sg(jj)),a.l?E(nc,wu(a,Dd.periods,!1),4):E(nc,a.m.Sf(
|
|
936
|
+
function uu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q,S,R,la,za,Na,Da,Oa,Va,Ia,bb,ya,db,Df,Ud,ue,Cd,Oc,ve,we,xe,Dd,hj,ah,ij,jj,bh,ye;return O(function(nc){switch(nc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=dh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=fh(l))p=Dc(d,[n])[0],m&&(a.h?zt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=At(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.j.Ue=
|
|
937
|
+
b.attributes.id||"";a.j.ee=kh(b,"publishTime",nh)||0;a.F=dh(b,"PatchLocation");u=Promise.resolve();if((v=hh(b,"ContentSteering"))&&a.i){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new vt(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=fh(v))(z=kh(v,"queryBeforeStart",wh,!1))?u=wt(a.h,A):wt(a.h,A);y=t(f.keys());for(B=y.next();!B.done;B=y.next())C=B.value,D=f.get(C),zt(a.h,"Location",C,D)}G=dh(b,"BaseURL");I=!1;if(a.h)for(J=t(G),H=J.next();!H.done;H=
|
|
938
|
+
J.next())L=H.value,M=L.attributes.serviceLocation,N=fh(L),M&&N&&(zt(a.h,"BaseURL",M,N),I=!0);I&&a.h||(Q=G.map(fh),K=Dc(d,Q));S=function(){return a.h&&I?At(a.h,"BaseURL"):K?K:[]};a.j.Ta=S;R=0;G&&G.length&&(R=kh(G[0],"availabilityTimeOffset",vh)||0);a.j.Ya=R;la=a.g.dash.ignoreMinBufferTime;za=0;la||(za=kh(b,"minBufferTime",qh)||0);a.H=kh(b,"minimumUpdatePeriod",qh,-1);Na=kh(b,"availabilityStartTime",nh);Da=kh(b,"timeShiftBufferDepth",qh);Oa=a.g.dash.ignoreSuggestedPresentationDelay;Va=null;Oa||(Va=
|
|
939
|
+
kh(b,"suggestedPresentationDelay",qh));Ia=a.g.dash.ignoreMaxSegmentDuration;bb=null;Ia||(bb=kh(b,"maxSegmentDuration",qh));ya=b.attributes.type||"static";a.j.type=ya;if(a.l)for(db=a.l.presentationTimeline,Df=t(Object.values(a.u)),Ud=Df.next();!Ud.done;Ud=Df.next())ue=Ud.value,ue.segmentIndex&&ue.segmentIndex.eb(db.Db());else Cd=a.g.defaultPresentationDelay||1.5*za,Oc=null!=Va?Va:Cd,db=new xk(Na,Oc,a.g.dash.autoCorrectDrift);db.Mc("static"==ya);(ve=db.W())&&!isNaN(a.g.availabilityWindowOverride)&&
|
|
940
|
+
(Da=a.g.availabilityWindowOverride);null==Da&&(Da=Infinity);db.hf(Da);we=b.attributes.profiles||"";a.j.profiles=we.split(",");xe={Jb:"static"!=ya,presentationTimeline:db,Ga:null,va:null,Ea:null,M:null,bandwidth:0,vg:!1,Ya:R,ac:null,profiles:we.split(",")};Dd=vu(a,xe,S,b);hj=Dd.duration;ah=Dd.periods;"static"!=ya&&Dd.yh||db.sb(hj||Infinity);a.K&&!a.G&&(ij=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.G=a.i.isLowLatencyMode());a.G?db.Yh(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.");
|
|
941
|
+
db.Eg(bb||1);return E(nc,u,2);case 2:return a.G&&(za=0,jj=null!=Va?Va:a.g.defaultPresentationDelay,db.Sg(jj)),a.l?E(nc,wu(a,Dd.periods,!1),4):E(nc,a.m.Sf(ah,xe.Jb),6);case 6:a.l={presentationTimeline:db,variants:a.m.j,textStreams:a.m.og(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:za||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:xu(b),nextUrl:yu(b)};if(!db.ni()){nc.B(7);break}bh=dh(b,"UTCTiming");return E(nc,zu(a,S,bh),8);
|
|
941
942
|
case 8:ye=nc.h;if(!a.i)return nc.return();db.Zh(ye);case 7:db.Pe();case 4:a.i.makeTextStreamsForClosedCaptions(a.l),F(nc)}})}function wu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Sf(b,!0,c),2);a.l.variants=a.m.j;d=a.m.og();0<d.length&&(a.l.textStreams=d);a.l.imageStreams=a.m.i;a.i.filter(a.l);F(e)})}
|
|
942
|
-
function tu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J;return O(function(H){if(1==H.g){c=b.attributes.mpdId;d=kh(b,"originalPublishTime",
|
|
943
|
-
L}}else if("type"===n.ic){a.l.presentationTimeline.Mc("static"==p);a.j.type=p;L=t(a.
|
|
944
|
-
gt,"SegmentTimeline").children=[];Au(a,N);a.
|
|
943
|
+
function tu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J;return O(function(H){if(1==H.g){c=b.attributes.mpdId;d=kh(b,"originalPublishTime",nh);if(!c||c!==a.j.Ue||d!==a.j.ee)throw a.F=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(ch(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=yh(l.attributes.sel||""),n=m[m.length-1],p=fh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.ic){r=fh(l)||"";var L=qh(r);if(null!=L){a.j.ac=L;for(var M=t(a.s.values()),N=M.next();!N.done;N=M.next())N.value.ac=
|
|
944
|
+
L}}else if("type"===n.ic){a.l.presentationTimeline.Mc("static"==p);a.j.type=p;L=t(a.s.values());for(M=L.next();!M.done;M=L.next())M.value.Jb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.ic?a.j.ee=nh(p)||0:null===n.ic&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)zh(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,M=t(a.s.keys()),N=M.next();!N.done;N=M.next())if(N=N.value,N.startsWith(L)){var Q=a.s.get(N);Fs(Q,
|
|
945
|
+
gt,"SegmentTimeline").children=[];Au(a,N);a.s.delete(N)}}else if("SegmentTemplate"===n.name){M=yh(l.attributes.sel||"");L=M[M.length-1];if(L.ic){M=Bu(a,M);N=fh(l)||"";Q=t(M);for(var S=Q.next();!S.done;S=Q.next())S=a.s.get(S.value),Ah(S.M.qc,l.tagName,L.ic,N);L=M}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=yh(l.attributes.sel||"");L=Bu(a,L);M=t(L);for(N=M.next();!N.done;N=M.next())N=a.s.get(N.value),N=Fs(N,gt,"SegmentTimeline"),
|
|
945
946
|
Q=dh(N,"S"),zh(Q,l),N.children=Q;z=L;y=t(z);for(w=y.next();!w.done;w=y.next())B=w.value,g.add(B)}C=t(g);for(w=C.next();!w.done;w=C.next())D=w.value,Au(a,D);G=t(f);for(K=G.next();!K.done;K=G.next())I=K.value,e.push.apply(e,x(vu(a,{Jb:"dynamic"==a.j.type,presentationTimeline:a.l.presentationTimeline,Ga:null,va:null,Ea:null,M:null,bandwidth:0,vg:!1,Ya:a.j.Ya,profiles:a.j.profiles,ac:a.j.ac},a.j.Ta,I).periods));return e.length?E(H,wu(a,e,!0),2):H.B(2)}"static"==a.j.type&&(J=a.j.ac,a.l.presentationTimeline.sb(J||
|
|
946
|
-
Infinity));F(H)})}function Bu(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.
|
|
947
|
-
function Au(a,b){var c=a.
|
|
947
|
+
Infinity));F(H)})}function Bu(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.s.values()),e=a.next();!e.done;e=a.next())e=e.value,e.Ga.id===c&&e.Ea.id===d&&e.M.id&&b.push(c+","+e.M.id);return b}
|
|
948
|
+
function Au(a,b){var c=a.s.get(b),d=a.u[b];d.segmentIndex&&d.segmentIndex.eb(a.l.presentationTimeline.Db());try{var e=ft(c,function(f,g,h,k){return Cu(a,f,g,h,k)},a.u,!0,a.g.dash.initialSegmentLimit,a.N,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!=Jc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
948
949
|
function xu(a){var b=hh(a,"ServiceDescription");if(!b)return null;a=hh(b,"Latency");b=hh(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)));
|
|
949
950
|
return c}function yu(a){a=dh(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}
|
|
950
|
-
function vu(a,b,c,d){var e=b.ac;e||(e=kh(d,"mediaPresentationDuration",qh),a.j.ac=e);var f=[],g=0;d=dh(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=kh(k,"start",qh,g),n=k.attributes.id,p=kh(k,"duration",qh),r=null;if(l){var u=kh(l,"start",qh);null!=u&&(r=u-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.J&&null!==n&&null!==m&&m<a.J)||a.
|
|
951
|
-
r&&(a.N[b.Ga.id]=r);if(null==r){g=null;break}g=m+r}}a.
|
|
951
|
+
function vu(a,b,c,d){var e=b.ac;e||(e=kh(d,"mediaPresentationDuration",qh),a.j.ac=e);var f=[],g=0;d=dh(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=kh(k,"start",qh,g),n=k.attributes.id,p=kh(k,"duration",qh),r=null;if(l){var u=kh(l,"start",qh);null!=u&&(r=u-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.J&&null!==n&&null!==m&&m<a.J)||a.S.includes(n)||h+1==d.length){null!==m&&(null===a.J||m>a.J)&&(a.J=m);g=Du(a,b,c,{start:m,duration:r,node:k,Xd:null==r||!l});f.push(g);b.Ga.id&&
|
|
952
|
+
r&&(a.N[b.Ga.id]=r);if(null==r){g=null;break}g=m+r}}a.S=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,yh:!1}:{periods:f,duration:g,yh:!0}}
|
|
952
953
|
function Du(a,b,c,d){b.Ga=Eu(a,d.node,null,c);b.va=d;b.Ga.Ya=b.Ya;b.Ga.id||(b.Ga.id="__shaka_period_"+d.start);var e=dh(d.node,"EventStream");c=b.presentationTimeline.Db();e=t(e);for(var f=e.next();!f.done;f=e.next())Fu(a,d.start,d.duration,f.value,c);c=dh(d.node,"AdaptationSet").map(function(m){return Gu(a,b,m)}).filter(Oe);if(b.Jb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.dk);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);
|
|
953
954
|
}d=c.filter(function(m){return!m.dh});c=c.filter(function(m){return m.dh});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.dh.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={ve:h.ve},l=k.next())h.ve=l.value,h.ve.trickModeVideo=e.streams.find(function(m){return function(n){return se(m.ve.codecs)==se(n.codecs)}}(h))}}}c=Hu(a.g.disableAudio,d,"audio");e=Hu(a.g.disableVideo,d,"video");f=Hu(a.g.disableText,
|
|
954
955
|
d,Jc);d=Hu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.Ga.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Hu(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},[])}
|
|
@@ -958,16 +959,16 @@ w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=n
|
|
|
958
959
|
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 B=t(w),C=B.next();!C.done;C=B.next()){var D=C.value,G=C=void 0;D.includes("=")?(D=D.split("="),C=D[0].startsWith("CC")?D[0]:"CC"+D[0],G=D[1]||"und"):(C="CC"+v,2==w.length?v+=2:v++,G=D);z.set(C,Pc(G))}}else z.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==v)if(v=1,null!=w)for(w=t(w.split(";")),C=w.next();!C.done;C=w.next())C=C.value,
|
|
959
960
|
D=B=void 0,C.includes("=")?(C=C.split("="),B="svc"+C[0],D=C[1].split(",")[0].split(":").pop()):(B="svc"+v,v++,D=C),z.set(B,Pc(D));else z.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?y="visually impaired":"2"==w&&(y="hard of hearing"));if(m)return null;m=dh(c,"ContentProtection");var K=rs(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),I=Pc(b.Ea.language||"und"),J=c.attributes.label;(m=
|
|
960
961
|
dh(c,"Label"))&&m.length&&(m=eh(m[0]))&&(J=m);m=dh(c,"Representation");c=m.map(function(H){if(H=Iu(a,b,K,k,I,J,f,h,z,H,y,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.Ea.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new U(2,4,4003);}if(!b.Ea.contentType||"application"==b.Ea.contentType)for(b.Ea.contentType=Ju(c[0].mimeType,c[0].codecs),l=t(c),v=l.next();!v.done;v=l.next())v.value.type=
|
|
961
|
-
b.Ea.contentType;l=b.Ea.id||"__fake__"+a.
|
|
962
|
+
b.Ea.contentType;l=b.Ea.id||"__fake__"+a.R++;n=t(c);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(K.drmInfos);for(B=w.next();!B.done;B=w.next())B=B.value,B.keyIds=B.keyIds&&v.keyIds?new Set([].concat(x(B.keyIds),x(v.keyIds))):B.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(H){return H.attributes.id}).filter(Oe);return{id:l,contentType:b.Ea.contentType,language:I,Ll:f,streams:c,drmInfos:K.drmInfos,dh:g,dk:m}}
|
|
962
963
|
function Iu(a,b,c,d,e,f,g,h,k,l,m,n){b.M=Eu(a,l,b.Ea,null);var p=b.M.id;a.K=Math.min(a.K,b.M.Ya);if(!Ku(b.M))return null;var r=b.va.start;b.bandwidth=kh(l,"bandwidth",th)||0;var u=b.M.contentType,v=u==Jc||"application"==u;u="image"==u;try{var w=void 0;if(c.Mf){var A=b.M.Ta,z=Dc(A(),[c.Mf.Ij]),y=tg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Mf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var J,H,L;return O(function(M){if(1==M.g)return E(M,ru(a,y,6),2);if(3!=M.g){J=M.h;if(!J.data||
|
|
963
964
|
16!=J.data.byteLength)throw new U(2,4,4049);H={name:"AES-CBC"};L=w;return E(M,window.crypto.subtle.importKey("raw",J.data,H,!0,["decrypt"]),3)}L.cryptoKey=M.h;w.fetchKey=void 0;F(M)})}}}b.M.aesKey=w;A=function(J,H,L,M){return Cu(a,J,H,L,M)};if(b.M.od)var B=Vs(b,A,w);else if(b.M.ec)B=at(b,a.u,w);else if(b.M.qc)B=ft(b,A,a.u,!!a.l,a.g.dash.initialSegmentLimit,a.N,w,n,!1);else{var C=b.va.duration||0,D=b.M.Ta;B={zc:function(){var J=Vk(r,C,D());J.Yc(function(H){H.mimeType=b.M.mimeType;H.codecs=b.M.codecs});
|
|
964
965
|
return Promise.resolve(J)}}}}catch(J){if((v||u)&&4002==J.code)return null;throw J;}n=dh(l,"ContentProtection");n=vs(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;dh(l,"SupplementalProperty").some(function(J){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==J.attributes.schemeIdUri&&"JOC"==J.attributes.value})&&(A=!0);z=!1;v&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var G;if(u&&((l=dh(l,"EssentialProperty").find(function(J){return["http://dashif.org/thumbnail_tile",
|
|
965
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(J.attributes.schemeIdUri)}))&&(G=l.attributes.value),!G))return null;var K;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"))&&(K="PQ");v=b.M.id?b.Ga.id+","+b.M.id:"";a.F.length&&p&&a.
|
|
966
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(J.attributes.schemeIdUri)}))&&(G=l.attributes.value),!G))return null;var K;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"))&&(K="PQ");v=b.M.id?b.Ga.id+","+b.M.id:"";a.F.length&&p&&a.s.set(b.Ga.id+","+p,Lu(b));var I=v&&a.u[v]?a.u[v]:{id:a.R++,originalId:b.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){I.segmentIndex&&
|
|
966
967
|
(I.segmentIndex.release(),I.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.Ea.language,label:f,type:b.Ea.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.M.jd,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:A,
|
|
967
968
|
closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:G,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([le(b.M.mimeType,b.M.codecs)])};I.createSegmentIndex=function(){var J;return O(function(H){if(1==H.g){if(I.segmentIndex)return H.B(0);J=I;return E(H,B.zc(),3)}J.segmentIndex=H.h;F(H)})};v&&b.Jb&&!a.u[v]&&(a.u[v]=I);return I}
|
|
968
969
|
function Lu(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,ec:null,qc:e.qc,Ta:e.Ta,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],
|
|
969
970
|
b[d]={start:e.start,duration:e.duration,node:null,Xd:e.Xd}):b[d]=a[d];return b}function nu(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,sa(d,2),E(d,ou(a),4);case 4:b=d.h;ua(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();pu(a,b);F(d)}})}
|
|
970
|
-
function pu(a,b){if(!(0>a.H)){var c=a.H;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.I.
|
|
971
|
+
function pu(a,b){if(!(0>a.H)){var c=a.H;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.I.U(Math.max(c-b,dd(a.O)))}}
|
|
971
972
|
function Eu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,jd:null,audioSamplingRate:null,Ya:0,Og:0};d=d||c.Ta;var e=b.attributes.id,f=dh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=fh(m);l&&m&&(zt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(fh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=lh(b,
|
|
972
973
|
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=st(m).join(",");n=kh(b,"frameRate",xh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=Mu(dh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=dh(b,"AudioChannelConfiguration");u=Nu(u)||c.jd;var v=kh(b,"audioSamplingRate",uh)||c.audioSamplingRate;k||(k=Ju(l,m));var w=hh(b,"SegmentBase"),A=hh(b,"SegmentTemplate"),z=w?kh(w,"availabilityTimeOffset",vh)||0:0,y=A?kh(A,"availabilityTimeOffset",vh)||0:0,B=f&&f.length?kh(f[0],"availabilityTimeOffset",
|
|
973
974
|
vh)||0:0;z=c.Ya+B+z+y;y=null;(B=hh(b,"SegmentSequenceProperties"))&&(B=hh(B,"SAP"))&&(y=kh(B,"cadence",sh));return{Ta:function(){return Dc(d(),f.length?a.h&&h?At(a.h,e):g?g:[]:[])},od:w||c.od,ec:hh(b,"SegmentList")||c.ec,qc:A||c.qc,width:kh(b,"width",uh)||c.width,height:kh(b,"height",uh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,jd:u,audioSamplingRate:v,Ya:z,dd:null,Og:y||c.Og}}
|
|
@@ -987,28 +988,28 @@ function kv(a,b){b=oc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b
|
|
|
987
988
|
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=lv(a,k),mv.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 Yu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Yu("",d,f)));return new Tu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
988
989
|
g.name&&(g.attributes.push(new Zu("URI",h)),d=!0)}}return new Tu(b,e)}function lv(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 fv(d);var f;(f=hv(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=hv(d,g);)c.push(new Zu(f[1],f[2]||f[3])),gv(d)}return new Uu(a,b,c,e)}
|
|
989
990
|
var mv="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(" "),nv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function ov(){}function pv(a){try{var b=qv(a);return ig({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return gg(c)}}
|
|
990
|
-
function qv(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=zc(a):e=sc(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",ov);ov.parse=pv;pg("data",pv);function rv(){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(Jc,new Map);this.O.set("image",new Map);this.Sa=new Set;this.i=new Map;this.l=null;this.N="";this.Ia=new jv;this.K=-1;this.
|
|
991
|
-
new Map;this.ya=new Map;this.oa=new Map;this.Za=this.G=!1;this.Xa=new cd(5);this.j=null;this.
|
|
992
|
-
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.
|
|
991
|
+
function qv(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=zc(a):e=sc(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",ov);ov.parse=pv;pg("data",pv);function rv(){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(Jc,new Map);this.O.set("image",new Map);this.Sa=new Set;this.i=new Map;this.l=null;this.N="";this.Ia=new jv;this.K=-1;this.Z=Infinity;this.Y=this.ib=!1;this.A=new Ob(function(){sv(a)});this.qa=tv;this.s=null;this.Ma=0;this.m=Infinity;this.Da=this.ra=this.R=0;this.S=new mg;this.H=new Map;this.I=new Map;this.$=new Map;this.ea=new Map;this.L=
|
|
992
|
+
new Map;this.ya=new Map;this.oa=new Map;this.Za=this.G=!1;this.Xa=new cd(5);this.j=null;this.ba=!0}q=rv.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,uv(c,[a]),2)):3!=e.g?(d=e.h,c.N=d.uri,E(e,vv(c,d.data,a),3)):e.return(c.s)})};
|
|
993
|
+
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.Sa.clear();this.s=null;this.i.clear();this.J.clear();this.I.clear();this.u.clear();this.$.clear();this.ea.clear();this.L.clear();this.ya.clear();this.oa.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
993
994
|
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!wv(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(xv(a,g));return E(m,Promise.all(b),2)}yv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Rd});d.length&&!h&&(k=zv,Av(a,k.xi),l=d.map(function(n){return n.$b}),a.l.sb(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
994
995
|
h&&Bv(a);F(m)})};function Cv(a,b){return wv(a)?a.O.get(b.type):b.Re}
|
|
995
|
-
function xv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q;return O(function(S){if(1==S.g){c=[];d=t(b.
|
|
996
|
-
b.
|
|
996
|
+
function xv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q;return O(function(S){if(1==S.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.ze&&(0<=b.Fb&&h.add("_HLS_msn",String(b.Fb)),0<=b.Gb&&h.add("_HLS_part",String(b.Gb))),b.Ae&&h.add("_HLS_skip","YES"),Bb(h)&&qb(g,h),c.push(g.toString());return E(S,uv(a,c,!0),2)}if(3!=S.g){k=S.h;if(!b.stream.segmentIndex)return S.return();l=kv(a.Ia,k.data);if(1!=l.type)throw new U(2,4,4017);m=k.uri;m==k.originalUri||
|
|
997
|
+
b.P().includes(m)||b.Uh.push(m);n=$u(l.g,"EXT-X-DEFINE");p=Dv(a,n,m);r=b.stream;u=Cv(a,b);return E(S,Ev(a,l,r.mimeType,b.P,p),3)}v=S.h;w=v.keyIds;A=v.drmInfos;z=function(R,la){return R.size===la.size&&[].concat(x(R)).every(function(za){return la.has(za)})};z(r.keyIds,w)||(r.keyIds=w,r.drmInfos=A,a.h.newDrmInfo(r));y=Fv(a,l,r,u,p,b.P,b.type);B=y.segments;if(C=y.bandwidth)r.bandwidth=C;r.segmentIndex.Zd(B,a.l.Db());B.length&&(D=cv(l.g,"EXT-X-MEDIA-SEQUENCE",0),K=(G=bv(l.g,"EXT-X-SKIP"))?Number(Y(G,
|
|
997
998
|
"SKIPPED-SEGMENTS")):0,I=Gv(D,B),J=I.Fb,H=I.Gb,b.Fb=J+K,b.Gb=H,L=u.get(D),r.segmentIndex.eb(L));M=B[0];b.Ic=M.startTime;N=B[B.length-1];b.$b=N.endTime;if(Q=bv(l.g,"EXT-X-ENDLIST"))b.Rd=!0;Hv(a,l);F(S)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
998
999
|
function Iv(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=Cv(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.Vf=k;break}}}}if(!(0>a.K))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,Jv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.K-c.Vf,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Kv(a,
|
|
999
1000
|
c,d)}
|
|
1000
|
-
function Lv(a,b){if(Infinity==a.
|
|
1001
|
-
function Kv(a,b,c){b.Ic+=c;b.$b+=c;a=Cv(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.
|
|
1002
|
-
function vv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q,S,R,la,za,Na,Da,Oa,Va,Ia,bb;return O(function(ya){switch(ya.g){case 1:d=kv(a.Ia,b);e=$u(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new xk(null,0);a.l.Mc(!0);k=function(){return[c]};if(1==d.type)return a.
|
|
1001
|
+
function Lv(a,b){if(Infinity==a.Z){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.Z=Math.min(a.Z,d.h))}}b=a.Z;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!Jv(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(Kv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.$g(b)}}}
|
|
1002
|
+
function Kv(a,b,c){b.Ic+=c;b.$b+=c;a=Cv(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()}
|
|
1003
|
+
function vv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q,S,R,la,za,Na,Da,Oa,Va,Ia,bb;return O(function(ya){switch(ya.g){case 1:d=kv(a.Ia,b);e=$u(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new xk(null,0);a.l.Mc(!0);k=function(){return[c]};if(1==d.type)return a.ba=!1,w=$u(d.g,"EXT-X-DEFINE"),A=Dv(a,w,a.N),E(ya,Mv(a,d,k,A),7);Nv(a,e);l=$u(d.g,"EXT-X-MEDIA");m=$u(d.g,"EXT-X-STREAM-INF");n=$u(d.g,"EXT-X-IMAGE-STREAM-INF");p=$u(d.g,"EXT-X-I-FRAME-STREAM-INF");r=$u(d.g,"EXT-X-SESSION-KEY");
|
|
1003
1004
|
u=$u(d.g,"EXT-X-SESSION-DATA");v=$u(d.g,"EXT-X-CONTENT-STEERING");Ov(a,u);return E(ya,Pv(a,v),4);case 4:return Qv(a,m),Rv(a,l),E(ya,Sv(a,m,r,l,k,a.u),5);case 5:return f=ya.h,g=Tv(a,l),E(ya,Uv(a,n,p),6);case 6:h=ya.h;ya.B(3);break;case 7:return z=ya.h,y=z.type,B=z.mimeType,C=z.codecs,D=z.language,G=z.height,K=z.width,I=z.channelCount,J=z.sampleRate,H=z.closedCaptions,L=z.gh,M=z.colorGamut,E(ya,Vv(a,a.F++,A,d,k,C,y,D,!0,"Media Playlist",I,H,null,!1,J,!1,B),8);case 8:N=ya.h,a.i.set(c,N),"video"==y&&
|
|
1004
|
-
Wv(N.stream,K,G,null,L,null,M),f.push({id:0,language:Pc(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==y?N.stream:null,video:"video"==y?N.stream:null,bandwidth:N.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);1==d.type&&(wv(a)&&(Xv(a,d),Q=a.m,a.A.
|
|
1005
|
-
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.
|
|
1005
|
+
Wv(N.stream,K,G,null,L,null,M),f.push({id:0,language:Pc(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==y?N.stream:null,video:"video"==y?N.stream:null,bandwidth:N.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);1==d.type&&(wv(a)&&(Xv(a,d),Q=a.m,a.A.U(Q)),S=Array.from(a.i.values()),Yv(a,S),Bv(a));a.s={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
1006
|
+
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.Y||!a.g.hls.disableCodecGuessing){ya.B(9);break}R=[];la=t(a.s.variants);for(za=la.next();!za.done;za=la.next())Na=za.value,Na.audio&&""===Na.audio.codecs&&R.push(Na.audio.createSegmentIndex()),Na.video&&""===Na.video.codecs&&R.push(Na.video.createSegmentIndex());return E(ya,Promise.all(R),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.s);if(1==f.length){Da=
|
|
1006
1007
|
[];Oa=f[0];Va=t([Oa.video,Oa.audio]);for(Ia=Va.next();!Ia.done;Ia=Va.next())(bb=Ia.value)&&!bb.segmentIndex&&Da.push(bb.createSegmentIndex());if(0<Da.length)return E(ya,Promise.all(Da),0)}ya.B(0)}})}
|
|
1007
|
-
function Mv(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K;return O(function(I){switch(I.g){case 1:e=qt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return I.return(e);f=b.segments[0];g=dv(c(),f.h,d);h=g[0];k=new mb(h);l=k.ob.split(".").pop();if(m=Zv[l])return I.return(qt(m));n=zg;p=null;r=$v(a,b,f.g,c,d);a
|
|
1008
|
+
function Mv(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K;return O(function(I){switch(I.g){case 1:e=qt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return I.return(e);f=b.segments[0];g=dv(c(),f.h,d);h=g[0];k=new mb(h);l=k.ob.split(".").pop();if(m=Zv[l])return I.return(qt(m));n=zg;p=null;r=$v(a,b,f.g,c,d);a.$.clear();if(!r){I.B(2);break}u=xl(r.P(),r.Nb(),r.Lb(),a.g.retryParameters);return E(I,aw(a,u,n,{type:0}),3);case 3:v=I.h,p=v.data;case 2:w=0;A=null;if(z=bv(f.g,"EXT-X-BYTERANGE"))y=
|
|
1008
1009
|
t(bw(null,z.value)),w=y.next().value,A=y.next().value;B=xl(g,w,A,a.g.retryParameters);return E(I,aw(a,B,n,{type:1}),4);case 4:C=I.h;(D=C.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var J=C.data;var H=Fb(J);H=(new rj).parse(H);var L=H.Md();H=H.qg();var M=[],N=!1,Q=!1;switch(L.audio){case "aac":case "aac-loas":M.push("mp4a.40.2");N=!0;break;case "mp3":M.push("mp4a.40.34");N=!0;break;case "ac3":M.push("ac-3");N=!0;break;case "ec3":M.push("ec-3");N=!0;break;
|
|
1009
1010
|
case "opus":M.push("opus"),N=!0}switch(L.video){case "avc":H.cb?M.push(H.cb):M.push("avc1.42E01E");Q=!0;break;case "hvc":H.cb?M.push(H.cb):M.push("hvc1.1.6.L93.90");Q=!0;break;case "av1":M.push("av01.0.01M.08"),Q=!0}if(M.length){L=N&&!Q;N=new Map;if(Q){Q=new vd("video/mp2t");Q.i(J);J=t(Q.j());for(var S=J.next();!S.done;S=J.next())S=S.value,N.set(S,S);Q.g()}H={type:L?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,
|
|
1010
1011
|
closedCaptions:N,gh:null,colorGamut:null}}else H=null;if(G=H)return I.return(G)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(K=rt(p,C.data))return I.return(K);return I.return(e)}})}
|
|
1011
|
-
function Bv(a){if(wv(a)){if(a.qa==cw){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.$b),c=Math.min(c,e.Ic));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.u);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.hf(b)}}else a.l.sb(dw(a));if(!a.l.
|
|
1012
|
+
function Bv(a){if(wv(a)){if(a.qa==cw){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.$b),c=Math.min(c,e.Ic));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.u);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.hf(b)}}else a.l.sb(dw(a));if(!a.l.s)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1012
1013
|
c.h&&a.l.ai(c.h);a.l.Pe()}function Nv(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)}}
|
|
1013
1014
|
function Dv(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}
|
|
1014
1015
|
function Qv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"AUDIO");c=Y(d,"VIDEO");var f=Y(d,"SUBTITLES");d=ew(a,d);if(f){var g=Hc(Jc,d);a.I.set(f,g);zd(d,g)}e&&(f=Hc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=Hc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}}
|
|
@@ -1023,66 +1024,66 @@ function Sv(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q
|
|
|
1023
1024
|
z(m,""):null;bb.B(6);break}return E(bb,ow(a,m,"",e,null,f),9);case 9:r=bb.h;case 6:if(r){if(r.keyIds)for(y=t(r.keyIds),B=y.next();!B.done;B=y.next())C=B.value,h.add(C);g.push(r)}case 4:l=k.next();bb.B(3);break;case 2:D={};G=t(b);for(K=G.next();!K.done;K=G.next())I=K.value,J=Vu(I),D[J]?D[J].push(I):D[J]=[I];H=[];for(L in D)M=D[L],N=M[0],Q=Y(N,"FRAME-RATE"),S=Number(Y(N,"AVERAGE-BANDWIDTH"))||Number(Xu(N,"BANDWIDTH")),R=Y(N,"RESOLUTION"),la=t(R?R.split("x"):[null,null]),za=la.next().value,Na=la.next().value,
|
|
1024
1025
|
Da=Y(N,"VIDEO-RANGE"),(Oa=Y(N,"REQ-VIDEO-LAYOUT"))&&Oa.includes(",")&&(Va=Oa.split(",").filter(function(ya){return"CH-STEREO"==ya||"CH-MONO"==ya}),Oa=Va[0]),Oa=Oa||"CH-MONO",Ia=pw(a,M,d,S),H.push.apply(H,x(qw(a,Ia.audio,Ia.video,S,za,Na,Q,Da,Oa,g,h)));return bb.return(H.filter(function(ya){return null!=ya}))}})}
|
|
1025
1026
|
function pw(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=t(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Y(n,"AUDIO");var p=Y(n,"VIDEO"),r=m||p;r&&(g.includes(r)||g.push(r),(n=Y(n,"PATHWAY-ID"))&&f.set(r,n),m?h=!0:p&&(k=!0))}g.length&&c.length&&(l=c.filter(function(w){return g.includes(Xu(w,"GROUP-ID"))}),lw(a,l,f));l=(f=g.sort().join(","))&&a.J.has(f)?a.J.get(f):[];h?e.audio.push.apply(e.audio,x(l)):k&&e.video.push.apply(e.video,x(l));m=!1;var u=b.map(function(w){return Xu(w,
|
|
1026
|
-
"URI")});k=e.audio.find(function(w){return w&&w.
|
|
1027
|
+
"URI")});k=e.audio.find(function(w){return w&&w.P().find(function(A){return u.includes(A)})});h=ew(a,b[0]);p=Hc("video",h);(r=Hc("audio",h))&&!p?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&r&&p?(k="video",h=[[p,r].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var v=n=r=p=m=null;!l.length&&(c=c.find(function(w){var A=Y(w,"URI")||"",z=Y(w,"TYPE");w=Xu(w,"GROUP-ID");return"SUBTITLES"!=z&&""==A&&g.includes(w)}))&&(m=Y(c,"LANGUAGE"),
|
|
1027
1028
|
p=Y(c,"NAME"),r=rw(c),sw(c),n=Y(c,"CHARACTERISTICS"),v=tw(c));a=uw(a,b,h,k,m,p,r,n,v);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
|
|
1028
|
-
function ew(a,b){var c=Y(b,"CODECS")||"";b=Y(b,"SUPPLEMENTAL-CODECS");a.
|
|
1029
|
+
function ew(a,b){var c=Y(b,"CODECS")||"";b=Y(b,"SUPPLEMENTAL-CODECS");a.Y=0<c.length;a.Y||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return st(a)}function rw(a){return(a=Y(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1029
1030
|
function tw(a){return(a=Y(a,"SAMPLE-RATE"))?parseInt(a,10):null}function sw(a){return(a=Y(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1030
|
-
function qw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Wv(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;r=r?r.
|
|
1031
|
+
function qw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Wv(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;r=r?r.P().sort().join(","):"";var u=f?f.P().sort().join(","):
|
|
1031
1032
|
"";r=r+" - "+u;h&&k&&!ni(n,p)||a.Sa.has(r)||(h={id:a.F++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Sa.add(r))}return e}
|
|
1032
|
-
function Rv(a,b){b=av(b,"CLOSED-CAPTIONS");a.
|
|
1033
|
+
function Rv(a,b){b=av(b,"CLOSED-CAPTIONS");a.ba=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"LANGUAGE");c=Pc(e||"und");e||(e=Y(d,"NAME"))&&(c=e);e=Xu(d,"GROUP-ID");d=Xu(d,"INSTREAM-ID").replace("SERVICE","svc");a.H.get(e)||a.H.set(e,new Map);a.H.get(e).set(d,c)}}
|
|
1033
1034
|
function fw(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Xu(k,"URI");k=Xu(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Xu(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Jc);if(k==Jc)b=Y(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.I.has(l)){b=a.I.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.F++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
1034
1035
|
m=n.next().value;n=n.next().value;(m=c.get(m))&&zt(a.j,l,m,n)}}c=Y(h,"LANGUAGE");f=Y(h,"NAME");m="YES"==Y(h,"DEFAULT");n="audio"==k?rw(h):null;var p="audio"==k?sw(h):!1,r=Y(h,"CHARACTERISTICS"),u="YES"==Y(h,"FORCED");h="audio"==k?tw(h):null;d=kw(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.J.has(g)?a.J.get(g).push(d):a.J.set(g,[d]);a.i.set(e,d);return d}
|
|
1035
1036
|
function jw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Xu(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=kw(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])*
|
|
1036
1037
|
Number(m.split("x")[1]));if(n=Y(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1037
|
-
function uw(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=Xu(r,"URI");r=Y(r,"PATHWAY-ID");a.j&&r&&zt(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.
|
|
1038
|
-
function kw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(C){var D,G,K,I,J,H,L,M,N,Q,S,R,la,za,Na,Da,Oa,Va,Ia,bb;return O(function(ya){switch(ya.g){case 1:return D=Lc,G=z.
|
|
1039
|
-
|
|
1040
|
-
la.mimeType;w.bandwidth=w.bandwidth||la.bandwidth;w.codecs=w.codecs||la.codecs;w.closedCaptions=w.closedCaptions||la.closedCaptions;iw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.
|
|
1041
|
-
Ia=Va.filter(function(db){return db.stream.segmentIndex}),Yv(a,Ia),Bv(a),bb=a.m,0<bb&&a.A.
|
|
1038
|
+
function uw(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=Xu(r,"URI");r=Y(r,"PATHWAY-ID");a.j&&r&&zt(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.ba=!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=Gc(d,c);d=kw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
1039
|
+
function kw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(C){var D,G,K,I,J,H,L,M,N,Q,S,R,la,za,Na,Da,Oa,Va,Ia,bb;return O(function(ya){switch(ya.g){case 1:return D=Lc,G=z.P(),E(ya,uv(a,z.P(),!0),2);case 2:K=ya.h;if(C.aborted)return ya.return();I=K.uri;I==K.originalUri||G.includes(I)||A.push(I);J=kv(a.Ia,K.data);H=$u(J.g,"EXT-X-DEFINE");L=Dv(a,H,I);M=void 0;N=!1;if(!(!a.Y&&a.g.hls.disableCodecGuessing||a.ba&&e==D.ua&&!a.g.hls.disableClosedCaptionsDetection)){ya.B(3);break}a.ba=!1;return E(ya,Mv(a,J,v,L),
|
|
1040
|
+
4);case 4:Q=ya.h,!Q.closedCaptions.size||l&&l.size==Q.closedCaptions.size||(l=Q.closedCaptions,N=!0),!a.Y&&a.g.hls.disableCodecGuessing&&(M=Q.mimeType,d=Q.codecs);case 3:return S=wv(a),E(ya,Vv(a,0,L,J,v,d,e,f,g,h,k,l,m,n,p,r,M),5);case 5:R=ya.h;if(C.aborted)return ya.return();la=R.stream;wv(a)&&!S&&Xv(a,J);z.Ic=R.Ic;z.$b=R.$b;z.Ae=R.Ae;z.ze=R.ze;z.Rd=R.Rd;z.Re=R.Re;z.Fb=R.Fb;z.Gb=R.Gb;z.Bg=!0;w.segmentIndex=la.segmentIndex;w.encrypted=la.encrypted;w.drmInfos=la.drmInfos;w.keyIds=la.keyIds;w.mimeType=
|
|
1041
|
+
la.mimeType;w.bandwidth=w.bandwidth||la.bandwidth;w.codecs=w.codecs||la.codecs;w.closedCaptions=w.closedCaptions||la.closedCaptions;iw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.s&&N&&a.h.makeTextStreamsForClosedCaptions(a.s);if(e==D.ua||e==D.aa)for(za=t(a.i.values()),Na=za.next();!Na.done;Na=za.next())Da=Na.value,Da.Bg||Da.type!=e||(Da.stream.mimeType=la.mimeType,iw(Da.stream));e==D.Ca&&(Oa=la.segmentIndex.get(0))&&Oa.sa&&(w.mimeType="application/mp4",iw(w));vw(a)&&(a.ib?Yv(a,[z]):(a.ib=!0,Va=Array.from(a.i.values()),
|
|
1042
|
+
Ia=Va.filter(function(db){return db.stream.segmentIndex}),Yv(a,Ia),Bv(a),bb=a.m,0<bb&&a.A.U(bb)));F(ya)}})}function v(){return a.j&&1<c.length?At(a.j,b):A.concat(ev([a.N],c,a.u))}var w=ww(a,d,e,f,g,h,k,l,m,n,p,r),A=[],z={stream:w,type:e,Uh:A,P:v,Ic:0,$b:0,Re:new Map,Ae:!1,ze:!1,Rd:!1,Vf:-1,Fb:-1,Gb:-1,Bg:!1},y=null,B=new AbortController;w.createSegmentIndex=function(){if(y)return y;B=new AbortController;return y=new Promise(function(C){C(u(B.signal))})};w.closeSegmentIndex=function(){y&&!w.segmentIndex&&
|
|
1042
1043
|
B.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);y=null};return z}function dw(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.$b));return b}function yv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Yc(function(e){c.push(e)});a.l.ae(c)}
|
|
1043
1044
|
function Yv(a,b){if(!wv(a))for(var c=dw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Xc(0,c);yv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Iv(a,b):(Lv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Iv(a,b))}function Jv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
|
|
1044
|
-
function vw(a){if(!a.
|
|
1045
|
+
function vw(a){if(!a.s)return!1;var b=[],c=[];a=t(a.s.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}
|
|
1045
1046
|
function Vv(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w){var A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q,S,R,la,za,Na,Da;return O(function(Oa){switch(Oa.g){case 1:if(1!=d.type)throw new U(2,4,4017);var Va=bv(d.g,"EXT-X-PLAYLIST-TYPE"),Ia=bv(d.g,"EXT-X-ENDLIST");Ia=Va&&"VOD"==Va.value||Ia;Va=Va&&"EVENT"==Va.value&&!Ia;Va=!Ia&&!Va;Ia?Av(a,tv):Va?Av(a,cw):Av(a,xw);wv(a)&&Hv(a,d);if(w){Oa.B(2);break}return E(Oa,yw(a,g,f,d,c,e),3);case 3:w=Oa.h;case 2:return E(Oa,Ev(a,d,w,e,c),4);case 4:A=Oa.h;z=A.drmInfos;y=A.keyIds;B=A.encrypted;
|
|
1046
1047
|
C=A.Ci;if(B&&!z.length&&!C)throw new U(2,4,4026);D=ww(a,f,g,h,k,l,m,n,p,r,u,v);D.encrypted=B;D.drmInfos=z;D.keyIds=y;D.mimeType=w;iw(D);G=wv(a)?a.O.get(g):new Map;K=Fv(a,d,D,G,c,e,g);I=K.segments;if(J=K.bandwidth)D.bandwidth=J;wv(a)&&Hv(a,d);H=I[0].startTime;L=I[I.length-1];M=L.endTime;N=new Tk(I);D.segmentIndex=N;S=(Q=bv(d.g,"EXT-X-SERVER-CONTROL"))?null!=Wu(Q,"CAN-SKIP-UNTIL"):!1;R=Q?null!=Wu(Q,"CAN-BLOCK-RELOAD"):!1;la=cv(d.g,"EXT-X-MEDIA-SEQUENCE",0);za=Gv(la,I);Na=za.Fb;Da=za.Gb;return Oa.return({stream:D,
|
|
1047
|
-
type:g,Uh:[],
|
|
1048
|
+
type:g,Uh:[],P:e,Ic:H,$b:M,Ae:S,ze:R,Rd:!1,Vf:-1,Fb:Na,Gb:Da,Re:G,Bg:!1})}})}function Gv(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}}
|
|
1048
1049
|
function ww(a,b,c,d,e,f,g,h,k,l,m,n){var p=gw(c,b)||hw(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==Jc?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()},
|
|
1049
1050
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Jc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Pc(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,
|
|
1050
1051
|
fullMimeTypes:new Set};iw(a);return a}
|
|
1051
1052
|
function Ev(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B,C,D,G,K,I,J,H,L,M,N,Q,S;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=$u(k.g,"EXT-X-KEY"),m=null,l.length)for(m=$v(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())r=p.value,f.set(r,m);v=u=!1;w=[];A=new Set;z=t(f);y=z.next();case 2:if(y.done){R.B(4);break}B=y.value;C=t(B);D=C.next().value;G=C.next().value;K=D;I=G;J=Xu(K,"METHOD");if("NONE"==J){R.B(3);break}u=
|
|
1052
1053
|
!0;H=Y(K,"KEYFORMAT")||"identity";L=null;if(mw(J)){v=!0;R.B(3);break}if("identity"!=H){L=(M=nw[H])?M(K,c):null;R.B(6);break}return E(R,ow(a,K,c,d,I,e),8);case 8:L=R.h;case 6:if(L){if(L.keyIds)for(N=t(L.keyIds),Q=N.next();!Q.done;Q=N.next())S=Q.value,A.add(S);w.push(L)}case 3:y=z.next();R.B(2);break;case 4:return R.return({drmInfos:w,keyIds:A,encrypted:u,Ci:v})}})}
|
|
1053
|
-
function zw(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=Ac(g.substr(2));if(16!=h.byteLength)throw new U(2,4,4048);}else f=cv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.
|
|
1054
|
+
function zw(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=Ac(g.substr(2));if(16!=h.byteLength)throw new U(2,4,4048);}else f=cv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ea.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Xu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1054
1055
|
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=dv(d(),Xu(b,"URI"),e),m=l.sort().join(""),a.L.has(m)||(n=tg(l,a.g.retryParameters),p=aw(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;
|
|
1055
|
-
F(w)})};a.
|
|
1056
|
-
function Hv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=bv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=bv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=bv(b.g,"EXT-X-PART-INF"))a.
|
|
1056
|
+
F(w)})};a.ea.set(c,k)}return a.ea.get(c)}
|
|
1057
|
+
function Hv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=bv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=bv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=bv(b.g,"EXT-X-PART-INF"))a.R=Number(Xu(e,"PART-TARGET"));b=bv(b.g,"EXT-X-SERVER-CONTROL");a.G&&a.R?(a.m=a.Za?5*a.R<=c?Math.min(a.R,a.m):Math.min(c,a.m):Math.min(a.R,a.m),a.Da=b?Number(Xu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1057
1058
|
Wu(b,"HOLD-BACK"):null,a.ra=c?Number(c.value):0);a.Ma=Math.max(d,a.Ma)}function Xv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Da)b=a.Da;else if(a.ra)b=a.ra;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Ma*c}a.l.ci(0);a.l.Sg(b);a.l.Mc(!1)}
|
|
1058
|
-
function $v(a,b,c,d,e){var f=bv(c,"EXT-X-MAP");if(!f)return null;var g=Xu(f,"URI"),h=dv(d(),g,e);g=[h.toString(),Y(f,"BYTERANGE","")].join("-");if(!a
|
|
1059
|
+
function $v(a,b,c,d,e){var f=bv(c,"EXT-X-MAP");if(!f)return null;var g=Xu(f,"URI"),h=dv(d(),g,e);g=[h.toString(),Y(f,"BYTERANGE","")].join("-");if(!a.$.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?mw(Xu(m,"METHOD"))&&m.id<f.id&&(k=zw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Aw(h,f,l,k);a.$.set(g,b)}return a.$.get(g)}
|
|
1059
1060
|
function Aw(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 Ei(function(){return a},e,f,null,null,null,d)}
|
|
1060
|
-
function Bw(a,b,c,d,e,f,g,h,k){var l=d.g,m=bv(l,"EXTINF"),n=0,p=0,r=null;d.Pb.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 u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=bv(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=
|
|
1061
|
-
if(!a.G)return null}var A=[];v=!1;var z=null,y=!1,B=!1;if(a.G&&d.Pb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=u,D={},G=0;G<d.Pb.length;D={Dd:D.Dd,re:D.re},G++){var K=d.Pb[G],I=0==G?c:A[A.length-1],J=0==G?e:I.endTime,H=Number(Y(K,"DURATION"))||a.
|
|
1061
|
+
function Bw(a,b,c,d,e,f,g,h,k){var l=d.g,m=bv(l,"EXTINF"),n=0,p=0,r=null;d.Pb.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 u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=bv(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=nh(v.value))}var w=Hi;bv(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.Pb.length)throw new U(2,4,4024,"EXTINF");
|
|
1062
|
+
if(!a.G)return null}var A=[];v=!1;var z=null,y=!1,B=!1;if(a.G&&d.Pb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=u,D={},G=0;G<d.Pb.length;D={Dd:D.Dd,re:D.re},G++){var K=d.Pb[G],I=0==G?c:A[A.length-1],J=0==G?e:I.endTime,H=Number(Y(K,"DURATION"))||a.R;if(H){var L=J+H,M=0,N=null;"EXT-X-PRELOAD-HINT"==K.name?(M=(M=Y(K,"BYTERANGE-START"))?Number(M):0,(I=Y(K,"BYTERANGE-LENGTH"))?N=M+Number(I)-1:M&&(N=Number.MAX_SAFE_INTEGER)):
|
|
1062
1063
|
(M=Y(K,"BYTERANGE"),N=t(bw(I,M)),M=N.next().value,N=N.next().value);D.re=Y(K,"URI");if(D.re){I=Hi;"YES"==Y(K,"GAP")&&(I=2,y=!0);D.Dd=null;var Q=function(R){return function(){null==R.Dd&&(R.Dd=dv(h(),R.re,f));return R.Dd}}(D);n&&0<=M&&null!=N&&(z=Q,v=!0);J=new Gi(J,L,Q,M,N,b,0,0,Infinity,[],"",null,C,I,k);"EXT-X-PRELOAD-HINT"==K.name&&(J.Cg(),B=!0);"YES"!=Y(K,"INDEPENDENT")&&0<G&&J.Qe();A.push(J);C&&(C+=H)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(A.length)n=A[A.length-
|
|
1063
1064
|
1].endTime;else return null;v&&(y||0!=A[0].Va?(v=!1,z=null):A=[]);(m=bv(l,"EXT-X-BYTERANGE"))?(r=t(bw(c,m.value)),p=r.next().value,r=r.next().value):A.length&&(p=A[0].Va,r=A[A.length-1].za);c="";m=null;"image"==g.type&&(c="1x1",g=bv(l,"EXT-X-TILES"))&&(c=Xu(g,"LAYOUT"),(g=Y(g,"DURATION"))&&(m=Number(g)));var S=null;b=new Gi(e,n,function(){if(z)return z();null==S&&(S=dv(h(),d.h,f));return S||[]},p,r,b,0,0,Infinity,A,c,m,u,w,k,0<A.length&&!!d.h);v&&(a.Za=!0,b.Nh(),B&&b.Cg());return b}
|
|
1064
1065
|
function bw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.za+1,d=c+b-1);return[c,d]}
|
|
1065
1066
|
function Fv(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=cv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=cv(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=bv(b.g,"EXT-X-SKIP"),p=n?Number(Y(n,"SKIPPED-SEGMENTS")):0,r=m+p,u=0;wv(a)&&d.has(r)&&(u=d.get(r));0===u&&a.qa==cw&&0<d.size&&!d.has(r)&&(u=a.l.Db());var v=[],w=null;n=[];for(var A=0;A<h.length;A++){var z=h[A],y=0==A?u:w.endTime;r=m+p+A;bv(z.g,"EXT-X-DISCONTINUITY")&&l++;var B=t(z.g);for(var C=B.next();!C.done;C=B.next())C=C.value,"EXT-X-KEY"==C.name&&(mw(Xu(C,"METHOD"))?
|
|
1066
1067
|
k=zw(a,C,b,f,e):k=void 0);d.set(r,y);B=$v(a,b,z.g,f,e);!a.G&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.G=a.h.isLowLatencyMode());if(y=Bw(a,B,w,z,y,e,c,f,k))(w=cv(z.g,"EXT-X-BITRATE"))?n.push({bitrate:w,duration:y.endTime-y.startTime}):n.length&&(w=n.pop(),w.duration+=y.endTime-y.startTime,n.push(w)),w=y,y.j=l,Jv(a,g)&&null!=a.K&&r<a.K||v.push(y)}b=void 0;n.length&&(b=n.reduce(function(D,G){return D+G.duration},0),b=Math.round(n.reduce(function(D,G){return D+G.bitrate*G.duration},0)/
|
|
1067
1068
|
b*1E3));if(n=v.some(function(D){return null!=D.h}))for(c={},d=0;d<v.length;c={ud:c.ud,td:c.td,le:c.le,fc:c.fc,qd:c.qd},d++)if(c.fc=v[d],null==c.fc.h)for(c.td=0,c.ud=d,e=function(D){return function(){var G=v[D.ud];if(G){if(null!=G.h)return G.h+D.td;D.td-=G.endTime-G.startTime;D.ud+=1}return null}}(c),c.qd=0,c.le=d,f=function(D){return function(){var G=v[D.le];if(G){G!=D.fc&&(D.qd+=G.endTime-G.startTime);if(null!=G.h)return G.h+D.qd;--D.le}return null}}(c);null==c.fc.h;)c.fc.h=f(),null==c.fc.h&&(c.fc.h=
|
|
1068
|
-
e());if(n)for(c=t(v),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.
|
|
1069
|
+
e());if(n)for(c=t(v),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.Z;if(n&&Infinity!=c&&!Jv(a,g))for(a=t(v),d=a.next();!d.done;d=a.next())d.value.$g(c);return{segments:v,bandwidth:b}}function gw(a,b){if(a==Jc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
|
|
1069
1070
|
function hw(a){return a==Jc?"text/vtt":Cw[a].mp4}
|
|
1070
1071
|
function yw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z;return O(function(y){switch(y.g){case 1:g=zg;h=Math.trunc((d.segments.length-1)/2);k=dv(f(),d.segments[h].h,e);l=new mb(k[0]);m=l.ob.split(".").pop();n=Cw[b];if((p=n[m])||(p=Zv[m])||(p=gw(b,c)))return y.return(p);u=1;v=tg(k,a.g.retryParameters);sa(y,2);v.method="HEAD";return E(y,aw(a,v,g,{type:u}),4);case 4:w=y.h;r=w.headers["content-type"];ua(y,3);break;case 2:A=va(y);if(!A||1002!=A.code&&1001!=A.code){y.B(3);break}v.method="GET";return E(y,
|
|
1071
1072
|
aw(a,v,g,{type:u}),6);case 6:z=y.h,r=z.headers["content-type"];case 3:return r?y.return(r.split(";")[0]):y.return(hw(b))}})}function Wv(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function uv(a,b,c){return aw(a,tg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1072
|
-
function sv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();sa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();wv(a)&&(d=(c-b)/1E3,a.Xa.sample(1,d),e=a.m,f=Math.max(0,e-dd(a.Xa)),a.A.
|
|
1073
|
-
function wv(a){return a.qa!=tv}function Av(a,b){a.qa=b;a.l&&a.l.Mc(!wv(a));wv(a)||a.A.stop()}function aw(a,b,c,d){if(!a.
|
|
1073
|
+
function sv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();sa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();wv(a)&&(d=(c-b)/1E3,a.Xa.sample(1,d),e=a.m,f=Math.max(0,e-dd(a.Xa)),a.A.U(f));ua(h,3);break;case 2:g=va(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.U(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();F(h)}})}
|
|
1074
|
+
function wv(a){return a.qa!=tv}function Av(a,b){a.qa=b;a.l&&a.l.Mc(!wv(a));wv(a)||a.A.stop()}function aw(a,b,c,d){if(!a.S)throw new U(2,7,7001);b=a.h.networkingEngine.request(c,b,d);ng(a.S,b);return b.promise}function mw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1074
1075
|
function ow(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,y,B;return O(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new U(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new U(2,4,4041);g=Xu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=dv(d(),Xu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Bc(zc(k[0].split("data:text/plain;base64,").pop()));C.B(2);break}m=k.sort().join("");a.ya.has(m)||(n=tg(k,a.g.retryParameters),p=aw(a,n,6),a.ya.set(m,
|
|
1075
|
-
p));return E(C,a.ya.get(m),3);case 3:r=C.h,l=Bc(r.data);case 2:u="00000000000000000000000000000000";if(!e){C.B(4);break}if(a.oa.has(e)){v=a.oa.get(e);C.B(5);break}w=xl(e.
|
|
1076
|
+
p));return E(C,a.ya.get(m),3);case 3:r=C.h,l=Bc(r.data);case 2:u="00000000000000000000000000000000";if(!e){C.B(4);break}if(a.oa.has(e)){v=a.oa.get(e);C.B(5);break}w=xl(e.P(),e.Nb(),e.Lb(),a.g.retryParameters);A=zg;return E(C,aw(a,w,A,{type:0}),6);case 6:z=C.h,v=ut(z.data),a.oa.set(e,v);case 5:v&&(u=v);case 4:return y=new Map,y.set(u,l),B="cenc","SAMPLE-AES"==g&&(B="cbcs"),C.return(Fc(y,B))}})}P("shaka.hls.HlsParser",rv);
|
|
1076
1077
|
var Zv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Cw={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",
|
|
1077
1078
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},nw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new U(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new U(2,4,4041);a=Xu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Ec("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
|
|
1078
1079
|
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Xu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Xu(a,"URI");b=qv(b);b=Fb(b.data);c=Ec("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=Xu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
|
|
1079
1080
|
b&&(c="cbcs");a=Xu(a,"URI");a=qv(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ug(a,b,new Set,0);return Ec("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},tv="VOD",xw="EVENT",cw="LIVE",zv={xi:tv,Ok:xw,Wk:cw};zi["application/x-mpegurl"]=function(){return new rv};zi["application/vnd.apple.mpegurl"]=function(){return new rv};function Dw(a){var b=0,c=Kb(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ew(a){if(a=Fw(a))a:{a=t(gh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=hh(b.value,"LA_URL")){a=eh(b);break a}a=""}else a="";return a}
|
|
1080
|
-
function Fw(a){a=zc(eh(a));a=Dw(a).filter(function(b){return b.type===Gw})[0];if(!a)return null;a=pc(a.value,!0);return(a=Wg(a,"WRMHEADER"))?a:null}var Gw=1,Hw=(new Map).set("com.microsoft.playready",Ew).set("com.microsoft.playready.recommendation",Ew).set("com.microsoft.playready.software",Ew).set("com.microsoft.playready.hardware",Ew);function Iw(a){if(!Jw){Jw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);
|
|
1081
|
+
function Fw(a){a=zc(eh(a));a=Dw(a).filter(function(b){return b.type===Gw})[0];if(!a)return null;a=pc(a.value,!0);return(a=Wg(a,"WRMHEADER"))?a:null}var Gw=1,Hw=(new Map).set("com.microsoft.playready",Ew).set("com.microsoft.playready.recommendation",Ew).set("com.microsoft.playready.software",Ew).set("com.microsoft.playready.hardware",Ew);function Iw(a){if(!Jw){Jw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Kw=Xw("ftyp",b,d,b,c);b=Xw("dref",Yw);Zw=Xw("dinf",b)}this.g=a}
|
|
1081
1082
|
function $w(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Xw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(ax+1));m=Math.floor(m%(ax+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(bx(h,4)),[0,0,0,0],x(bx(n,4)),x(bx(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(bx(k,2)),[0,0],x(bx(l,
|
|
1082
1083
|
2)),[0,0]));h=Xw("tkhd",h);k=Xw;n=g.duration*g.timescale;l=Math.floor(n/(ax+1));n=Math.floor(n%(ax+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(bx(g.timescale,4)),x(bx(l,4)),x(bx(n,4)),x(bx(m,2)),[0,0]));l=Xw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=cx;break;case "audio":m=dx}n=Xw("hdlr",m);a:{switch(g.type){case "video":g=Xw("minf",Xw("vmhd",ex),Zw,fx(g));break a;
|
|
1083
1084
|
case "audio":g=Xw("minf",Xw("smhd",gx),Zw,fx(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Cc.apply(wc,x(b));f=a.g[0];c=Xw;d=f.duration*f.timescale;e=Math.floor(d/(ax+1));d=Math.floor(d%(ax+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(bx(f.timescale,4)),x(bx(e,4)),x(bx(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
1084
|
-
255]));e=Xw("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(bx(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Xw("trex",k),h.call(g,k);a=Cc.apply(wc,x(d));a=Xw("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Cc.apply(wc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(
|
|
1085
|
-
a.byteLength);b.set(
|
|
1085
|
+
255]));e=Xw("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(bx(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Xw("trex",k),h.call(g,k);a=Cc.apply(wc,x(d));a=Xw("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Cc.apply(wc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Kw.byteLength+
|
|
1086
|
+
a.byteLength);b.set(Kw);b.set(a,Kw.byteLength);return b}
|
|
1086
1087
|
function fx(a){var b=Xw,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.Ha.byteLength)var e=Xw("avcC",a.Ha);else{e=Xw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.ub.length;n++){var p=hx(a.ub[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1087
1088
|
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(bx(c,2)),x(bx(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=ix(a);g=new Uint8Array([]);
|
|
1088
1089
|
a.encrypted&&(g=jx(a),d="encv");c=Xw(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Ha.byteLength&&(c=Xw("hvcC",a.Ha)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(bx(d,2)),x(bx(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=ix(a),g=new Uint8Array([]),a.encrypted&&(g=jx(a),e="encv"),c=Xw(e,d,
|
|
@@ -1096,8 +1097,8 @@ function qx(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.valu
|
|
|
1096
1097
|
g,k);e.call(d,b,[f,rx(c)])}return Cc.apply(wc,x(b))}function rx(a){a=(a.data?a.data.rb:[]).map(function(b){return b.data});a=Cc.apply(wc,x(a));return Xw("mdat",a)}function bx(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function hx(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
1097
1098
|
function Xw(a){var b=Ha.apply(1,arguments),c=sx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],sx[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
1098
1099
|
var Jw=!1,ax=Math.pow(2,32)-1,sx={},cx=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),dx=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),mx=new Uint8Array([0,0,0,0,0,0,0,0]),nx=new Uint8Array([0,0,0,0,0,0,0,0]),px=new Uint8Array([0,0,0,0,0,0,0,0]),ox=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ex=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),gx=new Uint8Array([0,
|
|
1099
|
-
0,0,0,0,0,0,0]),lx=new Uint8Array([0,0,0,0,0,0,0,1]),
|
|
1100
|
-
function ux(a){var b;O(function(c){switch(c.g){case 1:return sa(c,2),E(c,vx(a),4);case 4:ua(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();F(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.
|
|
1100
|
+
0,0,0,0,0,0,0]),lx=new Uint8Array([0,0,0,0,0,0,0,1]),Kw=new Uint8Array([]),Yw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Zw=new Uint8Array([]);function tx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.F=new cd(5);this.s=new Ob(function(){ux(a)});this.A=new mg;this.m=new Map}q=tx.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,vx(c),2);if(!c.h)throw new U(2,7,7001);return d.return(c.j)})};
|
|
1101
|
+
function ux(a){var b;O(function(c){switch(c.g){case 1:return sa(c,2),E(c,vx(a),4);case 4:ua(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();F(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.s&&(this.s.stop(),this.s=null);this.m.clear();return this.A.destroy()};
|
|
1101
1102
|
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return sa(c,2),E(c,vx(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);F(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};
|
|
1102
1103
|
function vx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=tg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),ng(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!=rm){od("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=lu(m,"SmoothStreamingMedia");if(!m)throw new U(2,4,4046,
|
|
1103
1104
|
l);n(m);m=sc(m.outerHTML)}var p=Vg(m,"SmoothStreamingMedia");if(!p)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=sm&&l(p);a.i||(a.i=new xk(null,0));if(l=kh(p,"IsLive",wh,!1))throw new U(2,4,4047);a.i.Mc(!l);n=kh(p,"TimeScale",uh,1E7);m=kh(p,"DVRWindowLength",uh);l&&(0===m||isNaN(m))&&(m=Infinity);var r=kh(p,"CanSeek",wh,!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.hf(r);m=kh(p,
|
|
@@ -1115,16 +1116,16 @@ A),w,b,d);w.segmentIndex=new Tk(A);return Promise.resolve()};w.closeSegmentIndex
|
|
|
1115
1116
|
function zx(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;
|
|
1116
1117
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Ax(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 Bx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1117
1118
|
function Cx(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={Cd:g.Cd},h=e.next())g.Cd=h.value,d.push(new Gi(g.Cd.start,g.Cd.end,function(k){return function(){return Dc(a.l,[f.replace("{start time}",String(k.Cd.fh))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",tx);var yx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),xx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1118
|
-
zi["application/vnd.ms-sstr+xml"]=function(){return new tx};function Dx(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=rc(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Ex(){}function Fx(a,b,c,d,e){var f=new Gx;Dg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Hx,h={ph:!1,mi:!1};a=Ix(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 fg(a,function(){h.ph=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Ob(function(){h.mi=!0;g.abort()});k.
|
|
1119
|
+
zi["application/vnd.ms-sstr+xml"]=function(){return new tx};function Dx(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=rc(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Ex(){}function Fx(a,b,c,d,e){var f=new Gx;Dg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Hx,h={ph:!1,mi:!1};a=Ix(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 fg(a,function(){h.ph=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Ob(function(){h.mi=!0;g.abort()});k.U(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1119
1120
|
function Ix(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:return h=Jx,k=Kx,p=n=0,r=Date.now(),sa(B,2),E(B,h(a,c),4);case 4:l=B.h;f(Lx(l.headers));if("HEAD"==c.method){B.B(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(C){function D(){var G,K,I;return O(function(J){switch(J.g){case 1:return sa(J,2),E(J,u.read(),4);case 4:G=J.h;ua(J,3);break;case 2:return va(J),J.return();case 3:if(G.done){J.B(5);break}n+=
|
|
1120
1121
|
G.value.byteLength;if(!g){J.B(5);break}return E(J,g(G.value),5);case 5:K=Date.now();if(100<K-r||G.done)I=G.done?0:w-n,e(K-r,n-p,I),p=n,r=K;G.done?C.close():(C.enqueue(G.value),D());F(J)}})}D()};new k({start:A});return E(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:ua(B,3);break;case 2:z=va(B);if(d.ph)throw new U(1,1,7001,a,b);if(d.mi)throw new U(1,1,1003,a,b);throw new U(1,1,1002,a,z,b);case 3:return y=Lx(l.headers),B.return(Dx(y,m,l.status,a,l.url,b))}})}
|
|
1121
1122
|
function Lx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Mx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",Ex);Ex.isSupported=Mx;Ex.parse=Fx;var Jx=window.fetch,Hx=window.AbortController,Kx=window.ReadableStream,Gx=window.Headers;
|
|
1122
1123
|
Mx()&&(pg("http",Fx,2,!0),pg("https",Fx,2,!0),pg("blob",Fx,2,!0));function Nx(){}
|
|
1123
1124
|
function Ox(a,b,c,d,e){var f=new Px,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=Qx(f);e(r);n=!0}};f.onload=function(r){var u=Qx(f),v=f.response;try{d(Date.now()-g,r.loaded-h,0);var w=Dx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(r){m(new U(1,
|
|
1124
1125
|
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 fg(k,function(){f.abort();return Promise.resolve()})}
|
|
1125
|
-
function Qx(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}P("shaka.net.HttpXHRPlugin",Nx);Nx.parse=Ox;var Px=window.XMLHttpRequest;pg("http",Ox,1,!0);pg("https",Ox,1,!0);pg("blob",Ox,1,!0);function Rx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Sx(a){return a.
|
|
1126
|
+
function Qx(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}P("shaka.net.HttpXHRPlugin",Nx);Nx.parse=Ox;var Px=window.XMLHttpRequest;pg("http",Ox,1,!0);pg("https",Ox,1,!0);pg("blob",Ox,1,!0);function Rx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Sx(a){return a.P().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Va+":"+a.za}function Tx(a,b){return xl(a.g.P(),a.g.Va,a.g.za,b.streaming.retryParameters)};function Ux(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Vx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Ux.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 Wx(a){var b=this;this.s=a;this.j=new Map;this.i=new Bg(function(){return Xx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Ux}Wx.prototype.destroy=function(){return this.i.destroy()};function Yx(a,b,c){a.m=b;a.l=c}function Xx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1126
1127
|
function Zx(a,b,c,d,e,f){Cg(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,$x(a,c),2);h=u.h;if(a.i.g)throw new U(2,9,7001);if(e)for(m in k=Fb(h),l=new Tg(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 ay(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1127
|
-
function $x(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=zg,d=a.
|
|
1128
|
+
function $x(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=zg,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;zd(a.h,e);return g.return(f.data)})};function by(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new eg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}by.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}sa(b,2);return E(b,a.g,4)}if(2!=b.g)return ua(b,0);va(b);F(b)})};
|
|
1128
1129
|
function cy(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)})}})}by.prototype.store=function(){return this.h};by.prototype.promise=function(){return this.g};function dy(a){this.h=a;this.g=[]}dy.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function ey(a,b){return fy(a,b,"readwrite")}function fy(a,b,c){c=a.h.transaction([b],c);var d=new by(c,b);a.g.push(d);d.promise().then(function(){zd(a.g,d)},function(){zd(a.g,d)});return d};function gy(a,b,c){this.h=new dy(a);this.i=b;this.g=c}q=gy.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return hy(this.i)};q.removeSegments=function(a,b){return iy(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,jy(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.sh(e)}))})};q.addManifests=function(){return hy(this.g)};
|
|
1129
1130
|
q.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function ky(a,b,c){a=ey(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=ey(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return iy(this,this.g,a,b)};
|
|
1130
1131
|
q.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,jy(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Kd(e)})))})};q.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=fy(a.h,a.g,"readonly"),c=new Map,E(d,cy(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.Kd(f),2);g=h.h;c.set(e,g);F(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};q.sh=function(a){return a};q.Kd=function(a){return Promise.resolve(a)};
|
|
@@ -1146,7 +1147,7 @@ Ay.prototype.Kd=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[]
|
|
|
1146
1147
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1147
1148
|
function By(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1148
1149
|
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function Cy(){gy.apply(this,arguments)}oa(Cy,gy);q=Cy.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return ky(this,a,b)};q.Kd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Dy(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Dy.prototype;
|
|
1149
|
-
q.init=function(){var a=this,b=new eg,c=!1,d=new Ob(function(){c=!0;b.reject(new U(2,9,9017))});d.
|
|
1150
|
+
q.init=function(){var a=this,b=new eg,c=!1,d=new Ob(function(){c=!0;b.reject(new U(2,9,9017))});d.U(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new vy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Ay(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1150
1151
|
new Ay(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Cy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ly(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new U(2,
|
|
1151
1152
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),F(b)}})};
|
|
1152
1153
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
@@ -1170,7 +1171,7 @@ h.g)return sa(h,2),E(h,Wh(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);F(h)}
|
|
|
1170
1171
|
function Vy(a){var b=[],c=xf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(of(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(pf(c.value));return b};function Xy(){this.g={}}function Yy(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 Zy(a,b){a.g[b.id]=b.bandwidth||2048}function $y(a,b){a=a.g[b];null==a&&(a=0);return a};function az(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.kc()):(this.h=qm(),this.g=new og);this.i=[];this.j=[];var c=!a;this.l=new Bg(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 Xx(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);
|
|
1171
1172
|
case 4:b.h=null,b.g=null,F(k)}})})}function bz(){if(Pb())a:{var a=t(ny.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=az.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hm(a,b));return um(this.h,a)};q.getConfiguration=function(){var a=qm();um(a,this.h,qm());return a};q.kc=function(){return this.g};
|
|
1172
1173
|
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Wx(this.g);this.j.push(f);b=cz(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.B(2):E(h,Om(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=yi(a,c||null);return h.return(g())})},e,f);b=new fg(b,function(){return Xx(f)});b.finally(function(){zd(d.j,f)});return dz(this,b)};
|
|
1173
|
-
function cz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:return ez(),h=g=null,k=new my,n=m=l=null,sa(B,2,3),E(B,d(),5);case 5:return g=B.h,E(B,fz(a,b,g,e),6);case 6:p=B.h;gz(a);r=!p.presentationTimeline.
|
|
1174
|
+
function cz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:return ez(),h=g=null,k=new my,n=m=l=null,sa(B,2,3),E(B,d(),5);case 5:return g=B.h,E(B,fz(a,b,g,e),6);case 6:p=B.h;gz(a);r=!p.presentationTimeline.W()&&!p.presentationTimeline.Fc();if(!r)throw new U(2,9,9005,b);return E(B,a.Wc(p,function(C){n=n||C},e),7);case 7:h=B.h;gz(a);if(n)throw n;return E(B,hz(p,h,e),8);case 8:return E(B,k.init(),9);case 9:return gz(a),E(B,oy(k),10);case 10:return l=B.h,gz(a),u=iz(h,
|
|
1174
1175
|
p,b,c,e,f),v=u.Kj,w=u.bh,E(B,l.$a.addManifests([v]),11);case 11:A=B.h;gz(a);m=A[0];gz(a);if(n)throw n;return E(B,jz(a,w,m,v,f,e,l.$a,p,h),12);case 12:return gz(a),kz(p,v,h,e),E(B,l.$a.updateManifest(m,v),13);case 13:return gz(a),z=new Fy("manifest",l.path.Eb,l.path.$a,m),B.return(Wy(z,v));case 3:return wa(B),E(B,k.destroy(),14);case 14:if(!g){B.B(15);break}return E(B,g.stop(),15);case 15:if(!h){B.B(17);break}return E(B,h.destroy(),17);case 17:xa(B,0);break;case 2:y=va(B);if(null==m){B.B(19);break}return E(B,
|
|
1175
1176
|
lz(m),19);case 19:throw n||y;}})}
|
|
1176
1177
|
function jz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,A,z;return O(function(y){switch(y.g){case 1:l={};m=0;n=function(B,C){var D,G,K,I,J,H,L;return O(function(M){if(1==M.g){D={};G=t(B);for(K=G.next();!K.done;D={uc:D.uc},K=G.next())D.uc=K.value,I=Tx(D.uc,f),J=D.uc.i,H=D.uc.h,L=function(N){return function(Q){var S,R,la;return O(function(za){if(1==za.g)return E(za,g.addSegments([{data:Q}]),2);S=za.h;gz(a);R=N.uc.g;la=Sx(R);l[la]=S[0];m+=Q.byteLength;F(za)})}}(D),Zx(e,D.uc.groupId,I,J,H,L);return E(M,ay(e),
|
|
@@ -1226,8 +1227,8 @@ uA;window.shakaMediaKeysPolyfill=!0}};
|
|
|
1226
1227
|
function vA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1227
1228
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1228
1229
|
vA.prototype.createMediaKeys=function(){var a=new zA(this.keySystem);return Promise.resolve(a)};vA.prototype.getConfiguration=function(){return this.g};function zA(a){this.h=new WebKitMediaKeys(a);this.g=new fd}zA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new AA(this.h,a)};zA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1229
|
-
function xA(a,b){a.g.qb();if(!b)return Promise.resolve();a.g.
|
|
1230
|
-
q.generateRequest=function(a,b){var c=this;this.h=new eg;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.
|
|
1230
|
+
function xA(a,b){a.g.qb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",yA);try{return Ek(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}zA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function AA(a){gb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new fd;this.sessionId="";this.expiration=NaN;this.closed=new eg;this.keyStatuses=new BA}oa(AA,gb);q=AA.prototype;
|
|
1231
|
+
q.generateRequest=function(a,b){var c=this;this.h=new eg;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Cc()?"license-request":"license-renewal").set("message",Gb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(CA(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
|
|
1231
1232
|
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:CA(c,"output-not-allowed");break;default:CA(c,"internal-error")}});CA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1232
1233
|
q.update=function(a){this.g=new eg;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.qb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function CA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}
|
|
1233
1234
|
function BA(){this.size=0;this.g=void 0}q=BA.prototype;q.Cc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,pi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=pi.value();return this.g&&Db(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function DA(){}function EA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Xb()||Vb("Tizen 4")||Vb("Tizen 5.0")||$b())&&(MediaKeys.prototype.setServerCertificate=FA)}function FA(){return Promise.resolve(!1)}Ez.PatchedMediaKeysCert=DA;DA.install=EA;Hz(EA);function GA(){}function HA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=IA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=JA,window.MediaKeys=KA,window.MediaKeySystemAccess=LA,window.shakaMediaKeysPolyfill=!0)}function IA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
@@ -1238,11 +1239,11 @@ function TA(a){var b=OA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}functi
|
|
|
1238
1239
|
function SA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
1239
1240
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1240
1241
|
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}SA.prototype.createMediaKeys=function(){var a=new RA(this.g);return Promise.resolve(a)};SA.prototype.getConfiguration=function(){return this.h};function RA(a){this.l=a;this.h=null;this.g=new fd;this.i=[];this.j=new Map}
|
|
1241
|
-
function UA(a,b){a.h=b;a.g.qb();var c=OA;b&&(a.g.
|
|
1242
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.
|
|
1242
|
+
function UA(a,b){a.h=b;a.g.qb();var c=OA;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=VA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Cc()?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=VA(a,d.sessionId))WA(d,"usable"),
|
|
1243
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=VA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?WA(e,"output-restricted"):1==f?WA(e,"expired"):WA(e,"internal-error"))}}))}
|
|
1243
1244
|
RA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new XA(b,this.l,a);this.i.push(a);return a};RA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};RA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1244
1245
|
function VA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function XA(a,b,c){gb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new eg;this.keyStatuses=new YA}oa(XA,gb);
|
|
1245
|
-
function ZA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Fb(sc("LOAD_SESSION|"+c));else{var e=sc("PERSISTENT|");d=Cc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new eg;var f=TA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Ob(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).
|
|
1246
|
+
function ZA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Fb(sc("LOAD_SESSION|"+c));else{var e=sc("PERSISTENT|");d=Cc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new eg;var f=TA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Ob(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
|
|
1246
1247
|
function $A(a,b,c){if(a.g)a.g.then(function(){return $A(a,b,c)}).catch(function(){return $A(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=oc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=zc(e.keys[0].k);e=zc(e.keys[0].kid)}else d=Fb(c),e=null;var f=TA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1247
1248
|
function WA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}q=XA.prototype;q.generateRequest=function(a,b){return ZA(this,b,null)};q.load=function(a){return"persistent-license"==this.l?ZA(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new eg;$A(this,b,a);return b};
|
|
1248
1249
|
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=TA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function YA(){this.size=0;this.g=void 0}q=YA.prototype;q.Cc=function(){return this.g};
|
|
@@ -1255,7 +1256,7 @@ zB.prototype.parseMedia=function(a,b,c){var d=oc(a);a=[];if(""==d)return a;var e
|
|
|
1255
1256
|
{xc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=gh(e,"metadata")[0])?g.children:[];h=gh(e,"style");e=gh(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next()){var u=r.value;r=new Fd;var v=u.attributes["xml:id"];if(v){r.id=v;var w=null;n&&(w=DB.exec(n)||EB.exec(n));v=w?Number(w[1]):null;w=w?Number(w[2]):null;var A,z=FB(u,h,"extent");if(z){var y=(A=DB.exec(z))||EB.exec(z);null!=y&&(r.width=Number(y[1]),r.height=Number(y[2]),A||(null!=v&&(r.width=100*r.width/v),null!=w&&(r.height=
|
|
1256
1257
|
100*r.height/w)),r.widthUnits=A||null!=v?ae:0,r.heightUnits=A||null!=w?ae:0)}if(u=FB(u,h,"origin"))if(y=(A=DB.exec(u))||EB.exec(u),null!=y)r.viewportAnchorX=Number(y[1]),r.viewportAnchorY=Number(y[2]),A?z||(r.width=100-r.viewportAnchorX,r.widthUnits=ae,r.height=100-r.viewportAnchorY,r.heightUnits=ae):(null!=w&&(r.viewportAnchorY=100*r.viewportAnchorY/w),null!=v&&(r.viewportAnchorX=100*r.viewportAnchorX/v)),r.viewportAnchorUnits=A||null!=v?ae:0}else r=null;r&&k.push(r)}if(dh(d,"p").length)throw new U(2,
|
|
1257
1258
|
2,2001,"<p> can only be inside <div> in TTML");n=t(dh(d,"div"));for(p=n.next();!p.done;p=n.next())if(dh(p.value,"span").length)throw new U(2,2,2001,"<span> can only be inside <p> in TTML");if(b=GB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1258
|
-
function GB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(
|
|
1259
|
+
function GB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if($g(a)){if(!m)return null;var r={tagName:"span",children:[eh(a)],attributes:{},parent:null}}else r=a;for(var u=null,v=t(HB),w=v.next();!w.done&&!(u=IB(r,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=mh(r,HB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new mb(n),A=new mb(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(r.attributes["xml:space"]||(h?"default":"preserve"));A=r.children.every($g);h=
|
|
1259
1260
|
[];if(!A)for(var z=t(r.children),y=z.next();!y.done;y=z.next())(y=GB(y.value,b,c,d,e,f,g,w,k,r,m,n))&&h.push(y);d=null!=l;n=eh(r);n=r.children.length&&n&&/\S/.test(n);y=r.attributes.begin||r.attributes.end||r.attributes.dur;if(!(y||n||"br"==r.tagName||0!=h.length||d&&!w))return null;z=JB(r,c);n=z.start;for(z=z.end;p&&p.tagName&&"tt"!=p.tagName;)z=KB(p,c,n,z),n=z.start,z=z.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;z=null==z?Infinity:z+b.periodStart;n=Math.max(n,b.segmentStart);z=Math.min(z,b.segmentEnd);
|
|
1260
1261
|
if(!y&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==r.tagName)return e=new Ed(n,z,""),e.lineBreak=!0,e;b="";A&&(b=vc(eh(r)||""),w&&(b=b.replace(/\s+/g," ")));b=new Ed(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=IB(r,"region",f,"")[0];if(r.attributes.region&&k&&k.attributes["xml:id"]){var B=k.attributes["xml:id"];b.region=g.filter(function(C){return C.id==B})[0]}g=k;l&&d&&!r.attributes.region&&
|
|
1261
1262
|
!r.attributes.style&&(g=IB(l,"region",f,"")[0]);LB(b,r,g,u,v,e,a,0==h.length);return b}
|
|
@@ -1272,7 +1273,7 @@ function UB(a,b){var c=null;if(VB.test(a)){a=VB.exec(a);c=Number(a[1]);var d=Num
|
|
|
1272
1273
|
function XB(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)}P("shaka.text.TtmlTextParser",zB);zB.prototype.parseMedia=zB.prototype.parseMedia;zB.prototype.setManifestType=zB.prototype.setManifestType;zB.prototype.setSequenceMode=zB.prototype.setSequenceMode;zB.prototype.parseInit=zB.prototype.parseInit;
|
|
1273
1274
|
function CB(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]))}
|
|
1274
1275
|
var DB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,QB=/^(\d{1,2}(?:\.\d+)?|100)%$/,PB=/^(\d+px|\d+em|\d*\.?\d+c)$/,EB=/^(\d+)px (\d+)px$/,VB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,WB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,YB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,ZB=/^(\d*(?:\.\d*)?)f$/,$B=/^(\d*(?:\.\d*)?)t$/,aC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),OB={left:Md,center:"center",right:"end",start:Md,
|
|
1275
|
-
end:"end"},NB={left:"line-left",center:"center",right:"line-right"},AB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],BB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],HB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Ge["application/ttml+xml"]=function(){return new zB};function bC(){this.g=new zB}bC.prototype.parseInit=function(a){var b=!1;(new Ig).box("moov",Ng).box("trak",Ng).box("mdia",Ng).box("minf",Ng).box("stbl",Ng).
|
|
1276
|
+
end:"end"},NB={left:"line-left",center:"center",right:"line-right"},AB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],BB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],HB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Ge["application/ttml+xml"]=function(){return new zB};function bC(){this.g=new zB}bC.prototype.parseInit=function(a){var b=!1;(new Ig).box("moov",Ng).box("trak",Ng).box("mdia",Ng).box("minf",Ng).box("stbl",Ng).V("stsd",Pg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};bC.prototype.setSequenceMode=function(){};bC.prototype.setManifestType=function(){};
|
|
1276
1277
|
bC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Ig).box("mdat",Sg(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};P("shaka.text.Mp4TtmlParser",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;Ge['application/mp4; codecs="stpp"']=function(){return new bC};
|
|
1277
1278
|
Ge['application/mp4; codecs="stpp.ttml"']=function(){return new bC};Ge['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new bC};Ge['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new bC};function cC(){this.h=!1;this.g="UNKNOWN"}cC.prototype.parseInit=function(){};cC.prototype.setSequenceMode=function(a){this.h=a};cC.prototype.setManifestType=function(a){this.g=a};
|
|
1278
1279
|
cC.prototype.parseMedia=function(a,b){a=oc(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=dC(new fv(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"));
|
|
@@ -1287,13 +1288,13 @@ k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.le
|
|
|
1287
1288
|
m.next())jC(a.value,b,c);else b.payload=vc(a);else b.payload=vc(a)}else b.payload=vc(a)}function iC(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function kC(a,b){return a&&0<a.length?a:b}
|
|
1288
1289
|
function jC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Fd;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=kC(g.backgroundColor,d.backgroundColor),d.color=kC(g.color,d.color),d.fontFamily=kC(g.fontFamily,d.fontFamily),d.fontSize=
|
|
1289
1290
|
kC(g.fontSize,d.fontSize),d.textShadow=kC(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Qd(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
|
|
1290
|
-
if(!f)break;if(f=dC(new fv(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(
|
|
1291
|
+
if(!f)break;if(f=dC(new fv(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if($g(a)||1==e.length&&$g(e[0]))for(c=eh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Qd(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=vc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())jC(a.value,d,c)}
|
|
1291
1292
|
function fC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Id:a.textAlign=Sd[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"==
|
|
1292
1293
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Hd);else if(d=/^region:(.*)$/.exec(b)){if(b=lC(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=Vd[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ld,a.line=Number(c[1]),c[2]&&(a.lineAlign=Vd[c[2].toUpperCase()])}
|
|
1293
1294
|
function lC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function dC(a){a=hv(a,hC);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)}P("shaka.text.VttTextParser",cC);cC.prototype.parseMedia=cC.prototype.parseMedia;cC.prototype.setManifestType=cC.prototype.setManifestType;cC.prototype.setSequenceMode=cC.prototype.setSequenceMode;cC.prototype.parseInit=cC.prototype.parseInit;var hC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1294
|
-
Ge["text/vtt"]=function(){return new cC};Ge['text/vtt; codecs="vtt"']=function(){return new cC};Ge['text/vtt; codecs="wvtt"']=function(){return new cC};function mC(){this.g=null}mC.prototype.parseInit=function(a){var b=this,c=!1;(new Ig).box("moov",Ng).box("trak",Ng).box("mdia",Ng).
|
|
1295
|
-
mC.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 Ig).box("moof",Ng).box("traf",Ng).
|
|
1296
|
-
p.value;var r=p.Ng||l,u=p.cf?c+p.cf:a;a=u+(r||0);var v=0;do{var w=m.
|
|
1295
|
+
Ge["text/vtt"]=function(){return new cC};Ge['text/vtt; codecs="vtt"']=function(){return new cC};Ge['text/vtt; codecs="wvtt"']=function(){return new cC};function mC(){this.g=null}mC.prototype.parseInit=function(a){var b=this,c=!1;(new Ig).box("moov",Ng).box("trak",Ng).box("mdia",Ng).V("mdhd",function(d){d=Yi(d.reader,d.version);b.g=d.timescale}).box("minf",Ng).box("stbl",Ng).V("stsd",Pg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new U(2,2,2008);if(!c)throw new U(2,2,2008);};mC.prototype.setSequenceMode=function(){};mC.prototype.setManifestType=function(){};
|
|
1296
|
+
mC.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 Ig).box("moof",Ng).box("traf",Ng).V("tfdt",function(y){g=!0;c=Xi(y.reader,y.version).baseMediaDecodeTime}).V("tfhd",function(y){l=Wi(y.reader,y.flags).wh}).V("trun",function(y){h=!0;d=Zi(y.reader,y.version,y.flags).Wh}).box("mdat",Sg(function(y){k=!0;e=y})).parse(a,!1);if(!k&&!g&&!h)throw new U(2,2,2008);a=c;for(var m=new Fg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1297
|
+
p.value;var r=p.Ng||l,u=p.cf?c+p.cf:a;a=u+(r||0);var v=0;do{var w=m.T();v+=w;var A=m.T(),z=null;"vttc"==Mg(A)?8<w&&(z=m.Qb(w-8)):m.skip(w-8);r&&z&&(w=nC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(Oe)};function nC(a,b,c){var d,e,f;(new Ig).box("payl",Sg(function(g){d=oc(g)})).box("iden",Sg(function(g){e=oc(g)})).box("sttg",Sg(function(g){f=oc(g)})).parse(a);return d?oC(d,e,f,b,c):null}
|
|
1297
1298
|
function oC(a,b,c,d,e){d=new Ed(d,e,"");gC(a,d,new Map);b&&(d.id=b);if(c)for(a=new fv(c),b=iv(a);b;)fC(d,b,[]),gv(a),b=iv(a);return d}P("shaka.text.Mp4VttParser",mC);mC.prototype.parseMedia=mC.prototype.parseMedia;mC.prototype.setManifestType=mC.prototype.setManifestType;mC.prototype.setSequenceMode=mC.prototype.setSequenceMode;mC.prototype.parseInit=mC.prototype.parseInit;Ge['application/mp4; codecs="wvtt"']=function(){return new mC};function pC(){}pC.prototype.parseInit=function(){};pC.prototype.setSequenceMode=function(){};pC.prototype.setManifestType=function(){};pC.prototype.parseMedia=function(a){var b=oc(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 fv(c[0]),e=qC(d),f=hv(d,/,/g);d=qC(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 Ed(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1298
1299
|
function qC(a){a=hv(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)}P("shaka.text.SbvTextParser",pC);pC.prototype.parseMedia=pC.prototype.parseMedia;pC.prototype.setManifestType=pC.prototype.setManifestType;pC.prototype.setSequenceMode=pC.prototype.setSequenceMode;pC.prototype.parseInit=pC.prototype.parseInit;Ge["text/x-subviewer"]=function(){return new pC};function rC(){this.g=new cC}rC.prototype.parseInit=function(){};rC.prototype.setSequenceMode=function(){};rC.prototype.setManifestType=function(){};rC.prototype.parseMedia=function(a,b,c){a=oc(a);a=sC(a);a=Fb(sc(a));return this.g.parseMedia(a,b,c)};
|
|
1299
1300
|
function sC(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}P("shaka.text.SrtTextParser",rC);rC.srt2webvtt=sC;rC.prototype.parseMedia=rC.prototype.parseMedia;
|
|
@@ -1303,20 +1304,20 @@ tC.prototype.parseMedia=function(a){var b="",c="";a=oc(a).split(/\r?\n\s*\r?\n/)
|
|
|
1303
1304
|
function yC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=zC(c))a.color=c;if(c=b.BackColour)if(c=zC(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=Nd;a.textAlign="start";break;case 2:a.displayAlign=Nd;a.textAlign=Id;break;case 3:a.displayAlign=Nd;a.textAlign="end";
|
|
1304
1305
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Id;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=Id;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1305
1306
|
function zC(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 xC(a){a=AC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",tC);tC.prototype.parseMedia=tC.prototype.parseMedia;tC.prototype.setManifestType=tC.prototype.setManifestType;tC.prototype.setSequenceMode=tC.prototype.setSequenceMode;tC.prototype.parseInit=tC.prototype.parseInit;
|
|
1306
|
-
var uC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vC=/^\s*([^:]+):\s*(.*)/,wC=/\s*,\s*/,AC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Ge["text/x-ssa"]=function(){return new tC};function BC(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)?{Ke:c,
|
|
1307
|
+
var uC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vC=/^\s*([^:]+):\s*(.*)/,wC=/\s*,\s*/,AC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Ge["text/x-ssa"]=function(){return new tC};function BC(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)?{Ke:c,ha:a}:null}function CC(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}}
|
|
1307
1308
|
function DC(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}
|
|
1308
1309
|
function EC(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,
|
|
1309
1310
|
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 FC(a){this.i=a;this.h=0;this.g=new Map}q=FC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?kd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Be(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1310
|
-
q.transmux=function(a,b,c,d){for(var e=Fb(a),f=Vi(e),g=f.length;g<e.length&&!DC(e,g);g++);a=1E3*c.endTime;f=Ui(f);f.length&&c&&(
|
|
1311
|
-
duration:1024,wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}});g+=
|
|
1312
|
-
FC.prototype.transmux=FC.prototype.transmux;FC.prototype.getOriginalMimeType=FC.prototype.getOriginalMimeType;FC.prototype.convertCodecs=FC.prototype.convertCodecs;FC.prototype.isSupported=FC.prototype.isSupported;FC.prototype.destroy=FC.prototype.destroy;de("audio/aac",function(){return new FC("audio/aac")},je);function GC(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,
|
|
1313
|
-
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,wa:a,
|
|
1311
|
+
q.transmux=function(a,b,c,d){for(var e=Fb(a),f=Vi(e),g=f.length;g<e.length&&!DC(e,g);g++);a=1E3*c.endTime;f=Ui(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=CC(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=BC(e,g);if(!k)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));var l=k.Ke+k.ha;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1312
|
+
k.Ke,g+l),size:k.ha,duration:1024,wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,ub:[],wa:new Uint8Array([]),Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.h,baseMediaDecodeTime:a,rb:h},stream:b};c=new Iw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=$w(c),this.g.set(b.id,d));b=qx(c);this.h++;b=Cc(d,b);return Promise.resolve(b)};
|
|
1313
|
+
P("shaka.transmuxer.AacTransmuxer",FC);FC.prototype.transmux=FC.prototype.transmux;FC.prototype.getOriginalMimeType=FC.prototype.getOriginalMimeType;FC.prototype.convertCodecs=FC.prototype.convertCodecs;FC.prototype.isSupported=FC.prototype.isSupported;FC.prototype.destroy=FC.prototype.destroy;de("audio/aac",function(){return new FC("audio/aac")},je);function GC(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,
|
|
1314
|
+
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,wa:a,ha:e}}
|
|
1314
1315
|
function HC(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 IC(a){this.i=a;this.h=0;this.g=new Map}q=IC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?kd(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};
|
|
1315
|
-
q.transmux=function(a,b,c,d){a=Fb(a);for(var e=Vi(a),f=e.length;f<a.length&&!HC(a,f);f++);var g=1E3*c.endTime;e=Ui(e);e.length&&c&&(
|
|
1316
|
-
kb:0,jb:0,gb:0,hb:2,zb:0}});f+=
|
|
1317
|
-
IC.prototype.getOriginalMimeType=IC.prototype.getOriginalMimeType;IC.prototype.convertCodecs=IC.prototype.convertCodecs;IC.prototype.isSupported=IC.prototype.isSupported;IC.prototype.destroy=IC.prototype.destroy;de("audio/ac3",function(){return new IC("audio/ac3")},je);function JC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new dj(a.subarray(b+2));fj(c,2);fj(c,3);var d=gj(c,11)+1<<1,e=gj(c,2);if(3==e){e=gj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=gj(c,2);var g=gj(c,3),h=gj(c,1);c=gj(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,wa:a,
|
|
1318
|
-
q.transmux=function(a,b,c,d){a=Fb(a);for(var e=Vi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ui(e);e.length&&c&&(
|
|
1319
|
-
wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}});f+=
|
|
1316
|
+
q.transmux=function(a,b,c,d){a=Fb(a);for(var e=Vi(a),f=e.length;f<a.length&&!HC(a,f);f++);var g=1E3*c.endTime;e=Ui(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=GC(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.wa;k.push({data:a.subarray(f,f+l.ha),size:l.ha,duration:1536,
|
|
1317
|
+
wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}});f+=l.ha}c=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:[],wa:h,Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.h,baseMediaDecodeTime:c,rb:k},stream:b};c=new Iw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=$w(c),this.g.set(b.id,d));b=qx(c);this.h++;b=Cc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",IC);IC.prototype.transmux=IC.prototype.transmux;
|
|
1318
|
+
IC.prototype.getOriginalMimeType=IC.prototype.getOriginalMimeType;IC.prototype.convertCodecs=IC.prototype.convertCodecs;IC.prototype.isSupported=IC.prototype.isSupported;IC.prototype.destroy=IC.prototype.destroy;de("audio/ac3",function(){return new IC("audio/ac3")},je);function JC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new dj(a.subarray(b+2));fj(c,2);fj(c,3);var d=gj(c,11)+1<<1,e=gj(c,2);if(3==e){e=gj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=gj(c,2);var g=gj(c,3),h=gj(c,1);c=gj(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,wa:a,ha:d}};function KC(a){this.i=a;this.h=0;this.g=new Map}q=KC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?kd(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};
|
|
1319
|
+
q.transmux=function(a,b,c,d){a=Fb(a);for(var e=Vi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ui(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=JC(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.wa;k.push({data:a.subarray(f,f+l.ha),
|
|
1320
|
+
size:l.ha,duration:1536,wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}});f+=l.ha}c=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:[],wa:h,Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.h,baseMediaDecodeTime:c,rb:k},stream:b};c=new Iw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=$w(c),this.g.set(b.id,d));b=qx(c);this.h++;b=Cc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",KC);KC.prototype.transmux=KC.prototype.transmux;
|
|
1320
1321
|
KC.prototype.getOriginalMimeType=KC.prototype.getOriginalMimeType;KC.prototype.convertCodecs=KC.prototype.convertCodecs;KC.prototype.isSupported=KC.prototype.isSupported;KC.prototype.destroy=KC.prototype.destroy;de("audio/ec3",function(){return new KC("audio/ec3")},je);function LC(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 dj(b.data),d=oj(c);oj(c);oj(c);lj(c);if(MC.includes(d)&&(d=V(c),3===d&&fj(c,1),lj(c),lj(c),fj(c,1),nj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)nj(c)&&(6>e?pj(c,16):pj(c,64))}lj(c);d=V(c);if(0===d)V(c);else if(1===d)for(fj(c,1),lj(c),lj(c),d=V(c),e=0;e<d;e++)lj(c);lj(c);fj(c,1);var f=V(c),g=V(c),h=gj(c,1);0===h&&fj(c,1);fj(c,1);var k=0,l=0,m=0,n=0;
|
|
1321
1322
|
nj(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(nj(c)&&nj(c)){var p=oj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=gj(c,16),e=gj(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],
|
|
1322
1323
|
k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ha:a,Pa:d,Ra:e}}
|
|
@@ -1329,14 +1330,14 @@ I+4;L++)gj(a,1);gj(a,1)}J=I=1;H=0;nj(a);nj(a);if(nj(a)){nj(a)&&(L=oj(a),M=[1,12,
|
|
|
1329
1330
|
gj(a,4);gj(a,5);gj(a,5);gj(a,5)}for(Q=0;Q<=f;Q++){var R=!0;S=1;nj(a)||(R=nj(a));var la=!1;R?V(a):la=nj(a);la||(S=V(a)+1);if(L){for(R=0;R<S;R++)V(a),V(a),N&&(V(a),V(a));nj(a)}if(M){for(R=0;R<S;R++)V(a),V(a),N&&(V(a),V(a));nj(a)}}}nj(a)&&(nj(a),nj(a),nj(a),H=V(a),V(a),V(a),V(a),V(a))}return{cg:y,ig:g,jg:h,hg:k,dg:l,eg:m,fg:n,gg:p,Wf:r,Xf:u,Yf:v,Zf:w,$f:A,ag:z,Te:H,Tf:0,Rf:B,Of:G,Nf:K,width:C-(b+c)*(1===B||2===B?2:1),height:D-(d+e)*(1===B?2:1),jk:I,ik:J}}
|
|
1330
1331
|
function RC(a){var b=new dj(a,!0);oj(b);oj(b);V(b);V(b);nj(b);nj(b);gj(b,3);nj(b);nj(b);V(b);V(b);mj(b);nj(b);nj(b);nj(b)&&V(b);mj(b);mj(b);nj(b);nj(b);nj(b);nj(b);a=nj(b);b=nj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Ig:c}}
|
|
1331
1332
|
function SC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ig&3)<<6|(d.jg?1:0)<<5|d.hg&31;e[2]=d.dg;e[3]=d.eg;e[4]=d.fg;e[5]=d.gg;e[6]=d.Wf;e[7]=d.Xf;e[8]=d.Yf;e[9]=d.Zf;e[10]=d.$f;e[11]=d.ag;e[12]=d.cg;e[13]=240|(d.Te&3840)>>8;e[14]=d.Te&255;e[15]=252|d.Ig&3;e[16]=252|d.Rf&3;e[17]=248|d.Of&7;e[18]=248|d.Nf&7;e[19]=0;e[20]=0;e[21]=(d.Tf&3)<<6|(d.Fg&7)<<3|(d.ah?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&
|
|
1332
|
-
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 TC(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*UC[14*(3===c?3-d:3===d?3:4)+e-1];f=VC[3*(3===c?0:2===c?1:2)+f];c=WC[c][d];var h=XC[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,
|
|
1333
|
-
function YC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function ZC(a,b){if(b+1<a.length&&YC(a,b)){var c=TC(a,b),d=4;c&&c.
|
|
1333
|
+
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 TC(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*UC[14*(3===c?3-d:3===d?3:4)+e-1];f=VC[3*(3===c?0:2===c?1:2)+f];c=WC[c][d];var h=XC[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,ha:k,hk:8*c*h}}return null}
|
|
1334
|
+
function YC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function ZC(a,b){if(b+1<a.length&&YC(a,b)){var c=TC(a,b),d=4;c&&c.ha&&(d=c.ha);b+=d;return b===a.length||b+1<a.length&&YC(a,b)}return!1}
|
|
1334
1335
|
var UC=[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],VC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],WC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],XC=[0,1,1,4];function $C(a){this.i=a;this.h=0;this.g=new Map}q=$C.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?kd(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};
|
|
1335
|
-
q.transmux=function(a,b,c,d){
|
|
1336
|
-
ub:[],wa:new Uint8Array([]),Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.h,baseMediaDecodeTime:c,rb:a},stream:b};
|
|
1336
|
+
q.transmux=function(a,b,c,d){for(var e=Fb(a),f=Vi(e).length;f<e.length&&!ZC(e,f);f++);var g;for(a=[];f<e.length;){var h=TC(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));g||(g=h);f+h.ha<=e.length&&a.push({data:e.subarray(f,f+h.ha),size:h.ha,duration:1152,wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}});f+=h.ha}if(!g)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=9E4*g.hk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1337
|
+
duration:d,ub:[],wa:new Uint8Array([]),Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.h,baseMediaDecodeTime:c,rb:a},stream:b};g=new Iw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=$w(g),this.g.set(b.id,d));b=qx(g);this.h++;b=Cc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",$C);$C.prototype.transmux=$C.prototype.transmux;$C.prototype.getOriginalMimeType=$C.prototype.getOriginalMimeType;$C.prototype.convertCodecs=$C.prototype.convertCodecs;$C.prototype.isSupported=$C.prototype.isSupported;
|
|
1337
1338
|
$C.prototype.destroy=$C.prototype.destroy;de("audio/mpeg",function(){return new $C("audio/mpeg")},je);function aD(a){this.h=a;this.g=null}q=aD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Be(a).split(","),c=Hc("audio",b);b=Hc("video",b);return!c||b||"mp3"!=se(c)?!1:kd(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};
|
|
1338
|
-
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new rj;a=Fb(a);a=this.g.parse(a);if("mp3"!=a.Md().audio||"audio"!=e)return Promise.reject(new U(2,3,3018));
|
|
1339
|
-
aD.prototype.convertCodecs=aD.prototype.convertCodecs;aD.prototype.isSupported=aD.prototype.isSupported;aD.prototype.destroy=aD.prototype.destroy;de("video/mp2t",function(){return new aD("video/mp2t")},ie);/*
|
|
1339
|
+
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new rj;a=Fb(a);a=this.g.parse(a);if("mp3"!=a.Md().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=new Uint8Array([]);e=t(a.jc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=TC(a,b))?(b+d.ha<=a.length&&(c=Cc(c,a.subarray(b,b+d.ha))),b+=d.ha):b++;return Promise.resolve(c)};P("shaka.transmuxer.MpegTsTransmuxer",aD);aD.prototype.transmux=aD.prototype.transmux;
|
|
1340
|
+
aD.prototype.getOriginalMimeType=aD.prototype.getOriginalMimeType;aD.prototype.convertCodecs=aD.prototype.convertCodecs;aD.prototype.isSupported=aD.prototype.isSupported;aD.prototype.destroy=aD.prototype.destroy;de("video/mp2t",function(){return new aD("video/mp2t")},ie);/*
|
|
1340
1341
|
@license
|
|
1341
1342
|
MSS Transmuxer
|
|
1342
1343
|
Copyright 2015 Dash Industry Forum
|
|
@@ -1347,29 +1348,29 @@ function cD(a){function b(){this._procFullBox();this.flags&1&&(this._procField("
|
|
|
1347
1348
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1348
1349
|
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==dD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=bD.prototype;q.destroy=function(){};
|
|
1349
1350
|
q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return kd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return kd(b)||kd(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
|
|
1350
|
-
q.transmux=function(a,b,c){if(!c)return Promise.resolve(Fb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1351
|
-
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=
|
|
1352
|
-
1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=eD(u,"traf")+eD(h,"senc")+16);var w=Fb(e.write());return Promise.resolve(w)}catch(A){return A instanceof U?Promise.reject(A):Promise.reject(new U(2,3,3022))}};function eD(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}P("shaka.transmuxer.MssTransmuxer",bD);bD.prototype.transmux=bD.prototype.transmux;
|
|
1353
|
-
bD.prototype.convertCodecs=bD.prototype.convertCodecs;bD.prototype.isSupported=bD.prototype.isSupported;bD.prototype.destroy=bD.prototype.destroy;var dD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);de("mss/audio/mp4",function(){return new bD("mss/audio/mp4")},je);de("mss/video/mp4",function(){return new bD("mss/video/mp4")},je);function fD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=fD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1351
|
+
q.transmux=function(a,b,c){if(!c)return Promise.resolve(Fb(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");
|
|
1352
|
+
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=
|
|
1353
|
+
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]=eD(u,"traf")+eD(h,"senc")+16);var w=Fb(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 eD(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}P("shaka.transmuxer.MssTransmuxer",bD);bD.prototype.transmux=bD.prototype.transmux;
|
|
1354
|
+
bD.prototype.getOriginalMimeType=bD.prototype.getOriginalMimeType;bD.prototype.convertCodecs=bD.prototype.convertCodecs;bD.prototype.isSupported=bD.prototype.isSupported;bD.prototype.destroy=bD.prototype.destroy;var dD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);de("mss/audio/mp4",function(){return new bD("mss/audio/mp4")},je);de("mss/video/mp4",function(){return new bD("mss/video/mp4")},je);function fD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=fD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1354
1355
|
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=Be(c).split(",");c=Hc("audio",d);d=Hc("video",d);if(c&&(c=se(c),!gD.includes(c))||d&&(c=se(d),!hD.includes(c)))return!1;if(b)return kd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return kd(b)||kd(a)};
|
|
1355
1356
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Be(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return ef(c,"audio/mp4")}).map(df).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1356
|
-
q.transmux=function(a,b,c,d,e){var f=Fb(a);if("audio"==e&&!yj(f)){for(var g=Vi(f),h=g.length;h<f.length;h++)if(ZC(f,h))return Promise.reject(new U(2,3,3018));for(h=g.length;h<f.length;h++)if(DC(f,h))return this.h||(this.h=new FC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018))}this.j?this.j.clearData():this.j=new rj;var k=this.j.parse(f),l=[],m=k.Md();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.cd();
|
|
1357
|
-
3023);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var y=NC(z);if(y){null==r&&(r=A.dts);var B=void 0;B=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:y.data,size:y.data.byteLength,duration:B,wb:Math.round((A.pts||0)-(A.dts||0)),flags:{yb:0,kb:0,jb:0,gb:0,hb:y.Wd?2:1,zb:y.Wd?0:1}})}}var C=LC(u);if(!C||null==r)throw new U(2,3,3018);b.height=C.height;
|
|
1358
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],wa:new Uint8Array([]),Ha:C.Ha,Pa:C.Pa,Ra:C.Ra,data:{Hb:this.g,baseMediaDecodeTime:r,rb:p},stream:b};break;case "hvc":var D=[],G=null,K=[],I=k.cd();if(!I.length)throw new U(2,3,3023);for(var J=0;J<I.length;J++){var H=I[J],L=H.nalus;K.push.apply(K,x(L));for(var M=!1,N=[],Q=!1,S=t(L),R=S.next();!R.done;R=S.next()){var la=R.value;switch(la.type){case 1:case 0:var za=
|
|
1359
|
-
|
|
1360
|
-
size:Oa.data.byteLength,duration:Va,wb:Math.round((H.pts||0)-(H.dts||0)),flags:{yb:0,kb:0,jb:0,gb:0,hb:Oa.Wd?2:1,zb:Oa.Wd?0:1}})}}var Ia=OC(K);if(!Ia||null==G)throw new U(2,3,3018);b.height=Ia.height;b.width=Ia.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],wa:new Uint8Array([]),Ha:Ia.Ha,Pa:Ia.Pa,Ra:Ia.Ra,data:{Hb:this.g,baseMediaDecodeTime:G,rb:D},stream:b}}n&&
|
|
1361
|
-
[],ya,db=null,Df=t(k.jc()),Ud=Df.next();!Ud.done;Ud=Df.next()){var ue=Ud.value,Cd=ue.data;if(Cd){var Oc=0;ya=CC(Cd,Oc);if(!ya)throw new U(2,3,3018);b.audioSamplingRate=ya.sampleRate;b.channelsCount=ya.channelCount;null==db&&null!==ue.pts&&(db=ue.pts);for(;Oc<Cd.length;){var ve=BC(Cd,Oc);if(ve){var we=ve.Ke+ve.
|
|
1362
|
-
3,3018);db=9E4*c.startTime;var xe=Hc("audio",b.codecs.split(","));if(!xe||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018);ya={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,cb:xe};var Dd=EC(xe,b.channelsCount);if(!Dd)throw new U(2,3,3018);for(var hj=db+9E4*(c.endTime-c.startTime)
|
|
1363
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ij,duration:d,ub:[],wa:new Uint8Array([]),Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.g,baseMediaDecodeTime:jj,rb:bb},stream:b};break;case "ac3":for(var
|
|
1364
|
-
|
|
1365
|
-
Mw.next()){var On=Nn.value,Pn=On.data;null==Uj&&null!==On.pts&&(Uj=On.pts);for(var Nf=0;Nf<Pn.length;){var Yd=JC(Pn,Nf);Yd?(b.audioSamplingRate=Yd.sampleRate,b.channelsCount=Yd.channelCount,Tj=Yd.sampleRate,Mn=Yd.wa,
|
|
1366
|
-
duration:d,ub:[],wa:Mn,Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.g,baseMediaDecodeTime:
|
|
1367
|
-
3,3018);var
|
|
1368
|
-
break;case
|
|
1369
|
-
8&255,$c.sampleRate>>>0&255,0,0].concat(x(Hb)));for(var
|
|
1370
|
-
3,3018);b.audioSamplingRate=$c.sampleRate;b.channelsCount=$c.channelCount;var
|
|
1371
|
-
this.i.get(b.id);else Vn=$w(
|
|
1372
|
-
de("video/mp2t",function(){return new fD("video/mp2t")},he);/*
|
|
1357
|
+
q.transmux=function(a,b,c,d,e){var f=Fb(a);if("audio"==e&&!yj(f)){for(var g=Vi(f),h=g.length;h<f.length;h++)if(ZC(f,h))return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));for(h=g.length;h<f.length;h++)if(DC(f,h))return this.h||(this.h=new FC("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 rj;var k=this.j.parse(f),l=[],m=k.Md();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.cd();
|
|
1358
|
+
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],z=A.nalus;u.push.apply(u,x(z));var y=NC(z);if(y){null==r&&(r=A.dts);var B=void 0;B=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:y.data,size:y.data.byteLength,duration:B,wb:Math.round((A.pts||0)-(A.dts||0)),flags:{yb:0,kb:0,jb:0,gb:0,hb:y.Wd?2:1,zb:y.Wd?0:1}})}}var C=LC(u);if(!C||null==r)throw new U(2,3,3018,c?c.P()[0]:null);b.height=C.height;
|
|
1359
|
+
b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],wa:new Uint8Array([]),Ha:C.Ha,Pa:C.Pa,Ra:C.Ra,data:{Hb:this.g,baseMediaDecodeTime:r,rb:p},stream:b};break;case "hvc":var D=[],G=null,K=[],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;K.push.apply(K,x(L));for(var M=!1,N=[],Q=!1,S=t(L),R=S.next();!R.done;R=S.next()){var la=R.value;switch(la.type){case 1:case 0:var za=
|
|
1360
|
+
Q=!0;break;case 19:case 20:case 21:M=za=Q=!0;break;case 32:za=!0;break;case 33:za=!0;break;case 34:za=!0;break;case 35:Q=za=!0;break;case 39:case 40:za=!0;break;default:za=!1}if(Q&&za){var Na=la.fullData.byteLength,Da=new Uint8Array(4);Da[0]=Na>>24&255;Da[1]=Na>>16&255;Da[2]=Na>>8&255;Da[3]=Na&255;N.push(Da);N.push(la.fullData)}}var Oa=N.length?{data:Cc.apply(wc,x(N)),Wd:M}:null;if(Oa){null==G&&null!=H.dts&&(G=H.dts);var Va=void 0;Va=J+1<I.length?(I[J+1].dts||0)-(H.dts||0):1<I.length?(H.dts||0)-(I[J-
|
|
1361
|
+
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Oa.data,size:Oa.data.byteLength,duration:Va,wb:Math.round((H.pts||0)-(H.dts||0)),flags:{yb:0,kb:0,jb:0,gb:0,hb:Oa.Wd?2:1,zb:Oa.Wd?0:1}})}}var Ia=OC(K);if(!Ia||null==G)throw new U(2,3,3018,c?c.P()[0]:null);b.height=Ia.height;b.width=Ia.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],wa:new Uint8Array([]),Ha:Ia.Ha,Pa:Ia.Pa,Ra:Ia.Ra,data:{Hb:this.g,baseMediaDecodeTime:G,rb:D},stream:b}}n&&
|
|
1362
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var bb=[],ya,db=null,Df=t(k.jc()),Ud=Df.next();!Ud.done;Ud=Df.next()){var ue=Ud.value,Cd=ue.data;if(Cd){var Oc=0;ya=CC(Cd,Oc);if(!ya)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=ya.sampleRate;b.channelsCount=ya.channelCount;null==db&&null!==ue.pts&&(db=ue.pts);for(;Oc<Cd.length;){var ve=BC(Cd,Oc);if(ve){var we=ve.Ke+ve.ha;Oc+we<=Cd.length&&bb.push({data:Cd.subarray(Oc+ve.Ke,Oc+we),size:ve.ha,duration:1024,wb:0,flags:{yb:0,
|
|
1363
|
+
kb:0,jb:0,gb:0,hb:2,zb:0}});Oc+=we}else Oc++}}}if(!ya||null==db){if(!k.cd().length)throw new U(2,3,3018,c?c.P()[0]:null);db=9E4*c.startTime;var xe=Hc("audio",b.codecs.split(","));if(!xe||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.P()[0]:null);ya={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,cb:xe};var Dd=EC(xe,b.channelsCount);if(!Dd)throw new U(2,3,3018,c?c.P()[0]:null);for(var hj=db+9E4*(c.endTime-c.startTime),ah=db;ah<hj;)bb.push({data:Dd,size:Dd.byteLength,
|
|
1364
|
+
duration:1024,wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}}),ah+=1024/ya.sampleRate*9E4}var ij=ya.sampleRate,jj=db/9E4*ij;n={id:b.id,type:"audio",codecs:ya.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ij,duration:d,ub:[],wa:new Uint8Array([]),Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.g,baseMediaDecodeTime:jj,rb:bb},stream:b};break;case "ac3":for(var bh=[],ye=0,nc=new Uint8Array([]),Sj=null,Lw=t(k.jc()),Jn=Lw.next();!Jn.done;Jn=Lw.next()){var Kn=Jn.value,Ln=Kn.data;null==Sj&&null!==Kn.pts&&
|
|
1365
|
+
(Sj=Kn.pts);for(var Mf=0;Mf<Ln.length;){var Xd=GC(Ln,Mf);Xd?(b.audioSamplingRate=Xd.sampleRate,b.channelsCount=Xd.channelCount,ye=Xd.sampleRate,nc=Xd.wa,bh.push({data:Ln.subarray(Mf,Mf+Xd.ha),size:Xd.ha,duration:1536,wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}}),Mf+=Xd.ha):Mf++}}if(0==ye||0==nc.byteLength||null==Sj)throw new U(2,3,3018,c?c.P()[0]:null);var AG=Sj/9E4*ye;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ye,duration:d,ub:[],wa:nc,Ha:new Uint8Array([]),
|
|
1366
|
+
Pa:0,Ra:0,data:{Hb:this.g,baseMediaDecodeTime:AG,rb:bh},stream:b};break;case "ec3":for(var Mw=[],Tj=0,Mn=new Uint8Array([]),Uj=null,Nw=t(k.jc()),Nn=Nw.next();!Nn.done;Nn=Nw.next()){var On=Nn.value,Pn=On.data;null==Uj&&null!==On.pts&&(Uj=On.pts);for(var Nf=0;Nf<Pn.length;){var Yd=JC(Pn,Nf);Yd?(b.audioSamplingRate=Yd.sampleRate,b.channelsCount=Yd.channelCount,Tj=Yd.sampleRate,Mn=Yd.wa,Mw.push({data:Pn.subarray(Nf,Nf+Yd.ha),size:Yd.ha,duration:1536,wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}}),Nf+=Yd.ha):
|
|
1367
|
+
Nf++}}if(0==Tj||0==Mn.byteLength||null==Uj)throw new U(2,3,3018,c?c.P()[0]:null);var BG=Uj/9E4*Tj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Tj,duration:d,ub:[],wa:Mn,Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.g,baseMediaDecodeTime:BG,rb:Mw},stream:b};break;case "mp3":for(var Ow=[],Vj,Wj=null,Pw=t(k.jc()),Qn=Pw.next();!Qn.done;Qn=Pw.next()){var Rn=Qn.value,oh=Rn.data;if(oh){null==Wj&&null!==Rn.pts&&(Wj=Rn.pts);for(var De=0;De<oh.length;){var Of=TC(oh,
|
|
1368
|
+
De);Of?(Vj||(Vj=Of),De+Of.ha<=oh.length&&Ow.push({data:oh.subarray(De,De+Of.ha),size:Of.ha,duration:1152,wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}}),De+=Of.ha):De++}}}if(!Vj||null==Wj)throw new U(2,3,3018,c?c.P()[0]:null);var Qw=Vj.sampleRate,CG=Wj/9E4*Qw;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Qw,duration:d,ub:[],wa:new Uint8Array([]),Ha:new Uint8Array([]),Pa:0,Ra:0,data:{Hb:this.g,baseMediaDecodeTime:CG,rb:Ow},stream:b};break;case "opus":var Rw=
|
|
1369
|
+
[],Xj=null,$c=k.H;if(!$c)throw new U(2,3,3018,c?c.P()[0]:null);var Hb=[];switch($c.Gi){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,
|
|
1370
|
+
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 Sw=new Uint8Array([0,$c.channelCount,0,0,$c.sampleRate>>>24&255,$c.sampleRate>>>17&255,$c.sampleRate>>>8&255,$c.sampleRate>>>0&255,0,0].concat(x(Hb)));for(var Tw=$c.sampleRate,Uw=t(k.jc()),Sn=Uw.next();!Sn.done;Sn=Uw.next()){var Tn=Sn.value,Pf=Tn.data;null==Xj&&null!==Tn.pts&&(Xj=Tn.pts);for(var ph=0;ph<Pf.length;){for(var DG=0!==(Pf[ph+1]&16),EG=0!==(Pf[ph+1]&8),
|
|
1371
|
+
Gd=ph+2,Yj=0;255===Pf[Gd];)Yj+=255,Gd+=1;Yj+=Pf[Gd];Gd+=1;Gd+=DG?2:0;Gd+=EG?2:0;var Vw=Pf.slice(Gd,Gd+Yj);Rw.push({data:Vw,size:Vw.byteLength,duration:960,wb:0,flags:{yb:0,kb:0,jb:0,gb:0,hb:2,zb:0}});ph=Gd+Yj}}if(0==Sw.byteLength||null==Xj)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=$c.sampleRate;b.channelsCount=$c.channelCount;var FG=Xj/9E4*Tw;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Tw,duration:d,ub:[],wa:Sw,Ha:new Uint8Array([]),Pa:0,
|
|
1372
|
+
Ra:0,data:{Hb:this.g,baseMediaDecodeTime:FG,rb:Rw},stream:b}}n&&(l.push(n),n=null)}}catch(Un){return Un&&3023==Un.code?Promise.resolve(new Uint8Array([])):Promise.reject(Un)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));var Ww=new Iw(l);if(this.i.has(b.id))var Vn=this.i.get(b.id);else Vn=$w(Ww),this.i.set(b.id,Vn);var GG=qx(Ww);this.g++;var HG=Cc(Vn,GG);return Promise.resolve(HG)};P("shaka.transmuxer.TsTransmuxer",fD);fD.prototype.transmux=fD.prototype.transmux;
|
|
1373
|
+
fD.prototype.getOriginalMimeType=fD.prototype.getOriginalMimeType;fD.prototype.convertCodecs=fD.prototype.convertCodecs;fD.prototype.isSupported=fD.prototype.isSupported;fD.prototype.destroy=fD.prototype.destroy;var gD=["aac","ac-3","ec-3","mp3","opus"],hD=["avc","hevc"];de("video/mp2t",function(){return new fD("video/mp2t")},he);/*
|
|
1373
1374
|
@license
|
|
1374
1375
|
EME Encryption Scheme Polyfill
|
|
1375
1376
|
Copyright 2019 Google LLC
|
|
@@ -1436,37 +1437,37 @@ sw:{C:"Kiswahili",D:"Swahili"},"sw-KE":{C:"Kiswahili",D:"Swahili (Kenya)"},ta:{C
|
|
|
1436
1437
|
D:"Thai"},"th-TH":{C:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",D:"Thai (Thailand)"},tl:{C:"Filipino",D:"Filipino"},"tl-PH":{C:"Filipino",D:"Filipino"},tlh:{C:"tlhIngan-Hol",D:"Klingon"},tr:{C:"T\u00fcrk\u00e7e",D:"Turkish"},"tr-TR":{C:"T\u00fcrk\u00e7e",D:"Turkish"},"tt-RU":{C:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",D:"Tatar"},uk:{C:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",D:"Ukrainian"},"uk-UA":{C:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
1437
1438
|
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",
|
|
1438
1439
|
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"}},CD=t(Object.keys(BD)),DD=CD.next();!DD.done;DD=
|
|
1439
|
-
CD.next()){var ED=DD.value;BD[ED.toLowerCase()]=BD[ED]};function FD(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new fd;this.localization=this.controls.ra;this.player=this.controls.bd();this.video=this.controls.nc();this.adManager=this.player.De();this.ad=b.getAd();this.eventManager.
|
|
1440
|
+
CD.next()){var ED=DD.value;BD[ED.toLowerCase()]=BD[ED]};function FD(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new fd;this.localization=this.controls.ra;this.player=this.controls.bd();this.video=this.controls.nc();this.adManager=this.player.De();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
|
|
1440
1441
|
FD.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};P("shaka.ui.Element",FD);FD.prototype.release=FD.prototype.release;function GD(a){return HD(a,"shaka-back-to-overflow-button")}function HD(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function ID(a){a&&(a=HD(a,"shaka-chosen-item"))&&a.parentElement.focus()}function JD(){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 KD(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
1441
1442
|
function LD(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 MD(a,b){FD.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 Ob(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=LD(e-d,!1)+" / "+LD(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=
|
|
1442
|
-
""))});this.eventManager.
|
|
1443
|
-
"ad-stopped",function(){c.h.textContent="";KD(c.g,!1)});this.ad&&OD(this)}oa(ND,FD);function OD(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));KD(a.g,!0)}}P("shaka.ui.AdPosition",ND);function PD(a,b){FD.call(this,a,b);var c=this;this.button=Ym();this.parent.appendChild(this.button);this.eventManager.
|
|
1444
|
-
c.h()});this.eventManager.
|
|
1445
|
-
PD.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};PD.prototype.g=function(){};PD.prototype.h=function(){};P("shaka.ui.PlayButton",PD);function SD(a,b){PD.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}oa(SD,PD);SD.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};SD.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};P("shaka.ui.BigPlayButton",SD);function TD(a,b){FD.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.
|
|
1446
|
-
!1)});this.eventManager.
|
|
1447
|
-
TD.registerElement=VD;var WD=new Map;function XD(a,b){FD.call(this,a,b);var c=this;this.m=null;this.
|
|
1448
|
-
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.
|
|
1449
|
-
this.parent.appendChild(this.container);this.eventManager.
|
|
1450
|
-
(e.h=!1,aE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.
|
|
1451
|
-
q.release=function(){this.G&&(this.G.stop(),this.G=null);FD.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.
|
|
1443
|
+
""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.La();c.g.xa(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.La(),this.g.xa(.5))}oa(MD,FD);MD.prototype.release=function(){this.g.stop();this.g=null;FD.prototype.release.call(this)};P("shaka.ui.AdCounter",MD);function ND(a,b){FD.call(this,a,b);var c=this;this.g=W("div");this.g.classList.add("shaka-ad-position");KD(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.o(this.localization,"locale-updated",function(){c.ad&&OD(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&OD(c)});this.eventManager.o(this.adManager,"ad-started",function(){OD(c)});this.eventManager.o(this.adManager,
|
|
1444
|
+
"ad-stopped",function(){c.h.textContent="";KD(c.g,!1)});this.ad&&OD(this)}oa(ND,FD);function OD(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));KD(a.g,!0)}}P("shaka.ui.AdPosition",ND);function PD(a,b){FD.call(this,a,b);var c=this;this.button=Ym();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
|
|
1445
|
+
c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?QD(c.controls):RD(c.controls)});this.ad&&(this.g(),this.h())}oa(PD,FD);PD.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.Z;return a};
|
|
1446
|
+
PD.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};PD.prototype.g=function(){};PD.prototype.h=function(){};P("shaka.ui.PlayButton",PD);function SD(a,b){PD.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}oa(SD,PD);SD.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};SD.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};P("shaka.ui.BigPlayButton",SD);function TD(a,b){FD.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.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";KD(c.g,!0)}else KD(c.g,
|
|
1447
|
+
!1)});this.eventManager.o(window,"click",function(){KD(c.g,!1)});UD(this)}oa(TD,FD);TD.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=[];FD.prototype.release.call(this)};function VD(a,b){WD.set(a,b)}function UD(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=WD.get(c);d?a.i.push(d.create(a.g,a.controls)):Ya("Unrecognized context menu element:",c)}}P("shaka.ui.ContextMenu",TD);
|
|
1448
|
+
TD.registerElement=VD;var WD=new Map;function XD(a,b){FD.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Ob(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.lg()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=W("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.pc()&&(c.controls.Id()?(d.preventDefault(),c.controls.Dc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
|
|
1449
|
+
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.U(1)):(c.s=!0,c.m=Date.now(),c.j.U(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(XD,FD);P("shaka.ui.HiddenSeekButton",XD);function YD(a,b){XD.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}oa(YD,XD);P("shaka.ui.HiddenFastForwardButton",YD);function ZD(a,b){XD.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}oa(ZD,XD);P("shaka.ui.HiddenRewindButton",ZD);function $D(a,b,c,d){FD.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 Ob(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);
|
|
1450
|
+
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(f){e.controls.pc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.pc()&&(e.h=!0,aE(e,f),e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(aE(e,f),e.onChange());f.stopPropagation()});this.eventManager.o(this.bar,"touchend",function(f){e.h&&
|
|
1451
|
+
(e.h=!1,aE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,aE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"mouseup",function(f){e.h&&(e.h=!1,e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}oa($D,FD);q=$D.prototype;
|
|
1452
|
+
q.release=function(){this.G&&(this.G.stop(),this.G=null);FD.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.U(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
|
|
1452
1453
|
q.setValue=function(a){this.h||(this.bar.value=a)};function aE(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}P("shaka.ui.RangeElement",$D);$D.prototype.setValue=$D.prototype.setValue;$D.prototype.getValue=$D.prototype.getValue;$D.prototype.changeTo=$D.prototype.changeTo;$D.prototype.onChangeEnd=$D.prototype.onChangeEnd;
|
|
1453
|
-
$D.prototype.onChange=$D.prototype.onChange;$D.prototype.onChangeStart=$D.prototype.onChangeStart;$D.prototype.setRange=$D.prototype.setRange;function bE(a,b){$D.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.
|
|
1454
|
-
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 Ob(function(){dE(c)});this.A=[];this.eventManager.
|
|
1455
|
-
function(){fE(c)||KD(c.container,!1)});this.eventManager.
|
|
1456
|
-
(parseFloat(c.bar.max)-f)/e.width*d))}else dE(c)});this.eventManager.
|
|
1457
|
-
q.onChange=function(){if(this.video.duration)if(this.update(),this.
|
|
1454
|
+
$D.prototype.onChange=$D.prototype.onChange;$D.prototype.onChangeStart=$D.prototype.onChangeStart;$D.prototype.setRange=$D.prototype.setRange;function bE(a,b){$D.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.s=new Ob(function(){var d=c.getValue();c.player.W()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.I=new Ob(function(){cE(c)});this.K=!1;this.i=W("div");this.i.id="shaka-player-ui-thumbnail-container";
|
|
1455
|
+
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 Ob(function(){dE(c)});this.A=[];this.eventManager.o(this.localization,"locale-updated",function(){return eE(c)});this.eventManager.o(this.localization,"locale-changed",function(){return eE(c)});this.eventManager.o(this.adManager,"ad-started",
|
|
1456
|
+
function(){fE(c)||KD(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){fE(c)&&KD(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.A=d.cuepoints;gE(c)});this.eventManager.o(this.player,"unloading",function(){c.A=[];gE(c);c.j&&(c.j.abort(),c.j=null);c.l=null;dE(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.player.Ee().length){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;hE(c,d,Math.round(f+
|
|
1457
|
+
(parseFloat(c.bar.max)-f)/e.width*d))}else dE(c)});this.eventManager.o(this.container,"mouseleave",function(){c.m.stop();c.m.U(.25)});this.setValue(this.video.currentTime);this.update();eE(this);this.ad&&KD(this.container,!1)}oa(bE,$D);q=bE.prototype;q.release=function(){this.s&&(this.s.stop(),this.s=null,this.I.stop(),this.I=null);$D.prototype.release.call(this)};q.onChangeStart=function(){this.K=!this.video.paused;this.controls.Xg(!0);this.video.pause();this.m.stop();this.J=!0};
|
|
1458
|
+
q.onChange=function(){if(this.video.duration)if(this.update(),this.s.U(.125),this.player.Ee().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());hE(this,(d-a)/((b-a)/c.width),d)}else dE(this)};q.onChangeEnd=function(){this.s.La();this.controls.Xg(!1);this.K&&this.video.play();this.J&&(this.J=!1,this.m.stop(),this.m.U(.25))};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1458
1459
|
q.update=function(){var a=this.H.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Qa(),g=f.end-f.start;this.setRange(f.start,f.end);fE(this)?(KD(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.H.showUnbufferedStart?
|
|
1459
1460
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):KD(this.container,!1)};
|
|
1460
1461
|
function cE(a){if(a.A.length){for(var b=a.player.Qa(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=t(a.A),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=t(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
1461
|
-
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent"}function gE(a){cE(a);var b=a.player.Qa();b=b.end-b.start;a.player.
|
|
1462
|
-
function hE(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B;O(function(C){switch(C.g){case 1:d=iE(a);if(!d)return dE(a),C.return();0>c&&(c=0);e=a.player.Qa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return E(C,a.player.pg(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return dE(a),C.return();a.player.
|
|
1463
|
-
-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";p=g.uris[0].split("#xywh=")[0];if(a.l&&p===a.l.uris[0].split("#xywh=")[0]&&g.segment.Nb()==a.l.segment.Nb()&&g.segment.Lb()==a.l.segment.Lb()){C.B(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!p.startsWith("offline:")){C.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';sa(C,5);r=zg;u=xl(g.segment.
|
|
1462
|
+
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent"}function gE(a){cE(a);var b=a.player.Qa();b=b.end-b.start;a.player.W()&&5<b&&a.I.xa(1)}function fE(a){var b=a.player.Qa();b=b.end-b.start;return a.player.W()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function eE(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1463
|
+
function hE(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,y,B;O(function(C){switch(C.g){case 1:d=iE(a);if(!d)return dE(a),C.return();0>c&&(c=0);e=a.player.Qa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return E(C,a.player.pg(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return dE(a),C.return();a.player.W()?(h=e.end-c,a.u.textContent=1>h?a.localization.resolve("LIVE"):"-"+jE(h)):a.u.textContent=jE(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1464
|
+
-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";p=g.uris[0].split("#xywh=")[0];if(a.l&&p===a.l.uris[0].split("#xywh=")[0]&&g.segment.Nb()==a.l.segment.Nb()&&g.segment.Lb()==a.l.segment.Lb()){C.B(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!p.startsWith("offline:")){C.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';sa(C,5);r=zg;u=xl(g.segment.P(),g.segment.Nb(),g.segment.Lb(),a.player.getConfiguration().streaming.retryParameters);
|
|
1464
1465
|
a.j=a.player.kc().request(r,u,{type:1});return E(C,a.j.promise,7);case 7:v=C.h;a.j=null;"mjpg"==d.codecs?(w=(new Ig).box("mdat",Sg(function(D){p=URL.createObjectURL(new Blob([D],{type:"image/jpeg"}))})),w.parse(v.data,!1)):(A=d.mimeType||"image/jpeg",z=new Blob([v.data],{type:A}),p=URL.createObjectURL(z));ua(C,4);break;case 5:y=va(C);if(7001==y.code)return C.return();throw y;case 4:try{a.i.removeChild(a.g)}catch(D){}a.g=W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=p;
|
|
1465
1466
|
a.g.onload=function(){p.startsWith("blob:")&&URL.revokeObjectURL(p)};a.i.insertBefore(a.g,a.i.firstChild);case 3:B=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="-"+B*g.positionX+"px",a.g.style.top="-"+B*g.positionY+"px",a.g.style.transform="scale("+B+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
1466
1467
|
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",F(C)}})}
|
|
1467
1468
|
function iE(a){var b=a.player.Ee();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={xf:c.xf,vf:c.vf},e=d.next())if(c.xf=e.value,c.vf=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.xf&&g.bandwidth<.01*f.vf}}(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&&
|
|
1468
1469
|
"mjpg"==f.codecs})||b[0]}function dE(a){a.i.style.visibility="hidden";a.u.textContent=""}function jE(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}P("shaka.ui.SeekBar",bE);function kE(){}kE.prototype.create=function(a,b){return new bE(a,b)};bE.Factory=kE;function lE(a,b){FD.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");KD(this.h,!1);this.j.appendChild(this.h);this.g=Ym();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;KD(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);mE(this);this.i=new Ob(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1469
|
-
d:(c.i.stop(),KD(c.h,!1))});this.eventManager.
|
|
1470
|
+
d:(c.i.stop(),KD(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){mE(c)});this.eventManager.o(this.localization,"locale-changed",function(){mE(c)});this.eventManager.o(this.adManager,"ad-started",function(){nE(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),KD(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;KD(c.g,!1);KD(c.h,!1)});this.eventManager.o(this.g,
|
|
1470
1471
|
"click",function(){c.ad.skip()});this.ad&&nE(this)}oa(lE,FD);lE.prototype.release=function(){this.i.stop();this.i=null;FD.prototype.release.call(this)};function mE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function nE(a){a.ad.isSkippable()&&(KD(a.g,!0),KD(a.h,!0),a.h.textContent="",a.i.La(),a.i.xa(.5))}P("shaka.ui.SkipAdButton",lE);/*
|
|
1471
1472
|
@license
|
|
1472
1473
|
glMatrix: https://github.com/toji/gl-matrix/
|
|
@@ -1477,69 +1478,69 @@ function oE(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}
|
|
|
1477
1478
|
function qE(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],p=b[9],r=b[10],u=b[11],v=b[12],w=b[13],A=b[14];b=b[15];var z=c[0],y=c[1],B=c[2],C=c[3];a[0]=z*d+y*h+B*n+C*v;a[1]=z*e+y*k+B*p+C*w;a[2]=z*f+y*l+B*r+C*A;a[3]=z*g+y*m+B*u+C*b;z=c[4];y=c[5];B=c[6];C=c[7];a[4]=z*d+y*h+B*n+C*v;a[5]=z*e+y*k+B*p+C*w;a[6]=z*f+y*l+B*r+C*A;a[7]=z*g+y*m+B*u+C*b;z=c[8];y=c[9];B=c[10];C=c[11];a[8]=z*d+y*h+B*n+C*v;a[9]=z*e+y*k+B*p+C*w;a[10]=z*f+y*l+B*r+C*A;a[11]=z*g+y*m+B*u+C*b;z=c[12];y=c[13];
|
|
1478
1479
|
B=c[14];C=c[15];a[12]=z*d+y*h+B*n+C*v;a[13]=z*e+y*k+B*p+C*w;a[14]=z*f+y*l+B*r+C*A;a[15]=z*g+y*m+B*u+C*b}
|
|
1479
1480
|
function rE(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;0<m?(b=2*Math.sqrt(m+1),a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k-
|
|
1480
|
-
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function sE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function tE(){var a=new Float32Array(4);a[3]=1;return a}function uE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function vE(a,b,c,d,e){this.m=a;this.oa=b;this.l=c;this.g=d;this.
|
|
1481
|
+
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function sE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function tE(){var a=new Float32Array(4);a[3]=1;return a}function uE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function vE(a,b,c,d,e){this.m=a;this.oa=b;this.l=c;this.g=d;this.s=new fd;this.L=tE();this.h=tE();this.ea=this.ya=this.ba=this.j=null;this.G=oE();this.I=oE();this.N=oE();this.Z=oE();this.A=null;this.O=!1;this.J=this.u=null;this.qa=this.ra=0;this.$=this.R=this.S=this.K=null;this.H=0;this.i=75;this.Y=0;this.F=e;wE(this)}vE.prototype.release=function(){this.s&&(this.s.release(),this.s=null);this.u&&(this.u.stop(),this.u=null);this.J&&(this.J.stop(),this.J=null)};
|
|
1481
1482
|
vE.prototype.pd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.l.width,this.l.height);xE(this,!1)};
|
|
1482
|
-
function wE(a){yE(a);zE(a);AE(a);BE(a);CE(a);a.
|
|
1483
|
+
function wE(a){yE(a);zE(a);AE(a);BE(a);CE(a);a.s.na(a.m,"loadeddata",function(){var b;a.s.o(a.m,"canplaythrough",function(){xE(a)});a.s.o(a.m,"playing",function(){a.u&&a.u.stop();if(!b){var c=a.oa.xb();c=t(c);for(var d=c.next();!d.done;d=c.next())(d=d.value.frameRate)&&(!b||b<d)&&(b=d)}b||(b=60);xE(a);a.u=(new Ob(function(){xE(a)})).La().xa(1/b)});a.s.o(a.m,"pause",function(){a.u&&a.u.stop();a.u=null;xE(a)});a.s.o(a.m,"seeked",function(){xE(a)});a.s.o(document,"visibilitychange",function(){xE(a)})})}
|
|
1483
1484
|
function yE(a){var b=a.G,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(1E-6>Math.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?1:0;else{d=f-m;e=g-e;m=c-n;var p=1/Math.sqrt(d*d+e*e+m*m);d*=p;e*=p;m*=p;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(p=Math.sqrt(n*n+l*l+h*h))?(p=1/p,n*=p,l*=p,h*=p):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var u=d*l-e*n;(p=Math.sqrt(k*k+r*r+u*u))?(p=1/p,k*=p,r*=p,u*=p):u=r=k=0;b[0]=n;b[1]=k;b[2]=
|
|
1484
|
-
d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}rE(a.L,a.G);a=b=a.
|
|
1485
|
+
d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}rE(a.L,a.G);a=b=a.Z;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
|
|
1485
1486
|
function zE(a){DE(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)}
|
|
1486
|
-
function AE(a){var b=EE(a,a.g.VERTEX_SHADER),c=EE(a,a.g.FRAGMENT_SHADER);a.j=a.g.createProgram();a.g.attachShader(a.j,b);a.g.attachShader(a.j,c);a.g.linkProgram(a.j);"cubemap"==a.F?(a.
|
|
1487
|
+
function AE(a){var b=EE(a,a.g.VERTEX_SHADER),c=EE(a,a.g.FRAGMENT_SHADER);a.j=a.g.createProgram();a.g.attachShader(a.j,b);a.g.attachShader(a.j,c);a.g.linkProgram(a.j);"cubemap"==a.F?(a.S=a.g.getAttribLocation(a.j,"aVertexPosition"),a.R=a.g.getAttribLocation(a.j,"aTextureCoord")):(a.S=a.g.getAttribLocation(a.j,"a_vPosition"),a.g.enableVertexAttribArray(a.S),a.R=a.g.getAttribLocation(a.j,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.R))}
|
|
1487
1488
|
function EE(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.F?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";
|
|
1488
1489
|
break;case a.g.FRAGMENT_SHADER:c="cubemap"==a.F?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n texture2D(uSampler, tc);\n gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}";
|
|
1489
1490
|
break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b}
|
|
1490
1491
|
function BE(a){if("cubemap"==a.F)var b={oi:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],li:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]};else{b=[];for(var c=[],d=[],
|
|
1491
|
-
e=0;100>=e;e++){var f=e/100,g=f*Math.PI,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=k/100,m=l*Math.PI*2;b.push(-1*Math.cos(m)*h,g,Math.sin(m)*h);c.push(l);c.push(f)}}for(e=0;100>e;e++)for(f=0;100>f;f++)h=101*e+f,g=h+1,k=101*(e+1)+f,l=k+1,d.push(h,k,g),d.push(g,k,l);b={oi:b,li:c,indices:d}}a.K=b;a.
|
|
1492
|
-
a.ya);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.li),a.g.STATIC_DRAW);a.
|
|
1493
|
-
function CE(a){a
|
|
1494
|
-
function xE(a,b){b=void 0===b?!0:b;var c=a.oa.Od()==Lo;!a.m||2>a.m.readyState||!c&&0==a.m.playbackRate||(pE(a.I,a.i*Math.PI/180,1.5625),"cubemap"==a.F?pE(a.I,a.i*Math.PI/180,2.5):pE(a.I,a.i*Math.PI/180,1.5625),a.g.useProgram(a.j),a.g.clear(a.g.COLOR_BUFFER_BIT),DE(a),b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a
|
|
1495
|
-
a.
|
|
1492
|
+
e=0;100>=e;e++){var f=e/100,g=f*Math.PI,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=k/100,m=l*Math.PI*2;b.push(-1*Math.cos(m)*h,g,Math.sin(m)*h);c.push(l);c.push(f)}}for(e=0;100>e;e++)for(f=0;100>f;f++)h=101*e+f,g=h+1,k=101*(e+1)+f,l=k+1,d.push(h,k,g),d.push(g,k,l);b={oi:b,li:c,indices:d}}a.K=b;a.ba=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ba);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.oi),a.g.STATIC_DRAW);a.ya=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,
|
|
1493
|
+
a.ya);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.li),a.g.STATIC_DRAW);a.ea=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.K.indices),a.g.STATIC_DRAW)}
|
|
1494
|
+
function CE(a){a.$=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.$);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)}
|
|
1495
|
+
function xE(a,b){b=void 0===b?!0:b;var c=a.oa.Od()==Lo;!a.m||2>a.m.readyState||!c&&0==a.m.playbackRate||(pE(a.I,a.i*Math.PI/180,1.5625),"cubemap"==a.F?pE(a.I,a.i*Math.PI/180,2.5):pE(a.I,a.i*Math.PI/180,1.5625),a.g.useProgram(a.j),a.g.clear(a.g.COLOR_BUFFER_BIT),DE(a),b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.$),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.m)),"equirectangular"==a.F&&(qE(a.N,a.G,
|
|
1496
|
+
a.Z),qE(a.N,a.I,a.N)),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ba),a.g.vertexAttribPointer(a.S,3,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.S),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ya),a.g.vertexAttribPointer(a.R,2,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.R),a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea),"cubemap"==a.F?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uModelViewMatrix"),!1,a.N)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,
|
|
1496
1497
|
"u_VPMatrix"),!1,a.N),a.g.uniform1i(a.g.getUniformLocation(a.j,"uSampler"),0),a.O&&a.g.viewport(0,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0),a.O&&(a.g.viewport(a.l.width/2,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0)))}
|
|
1497
1498
|
function DE(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.ra!==b||a.qa!==c){a.l.width=b;a.l.height=c;a.ra=b;a.qa=c;var d=b/c,e=a.I,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.I=e;a.g.viewport(0,0,b,c)}}
|
|
1498
1499
|
function FE(a,b,c,d){var e=90*Math.PI/180;var f="cubemap"==a.F?a.N:a.G;var g=Math.sin(b);b=Math.cos(b);var h=f[0],k=f[1],l=f[2],m=f[3],n=f[8],p=f[9],r=f[10],u=f[11];f!==f&&(f[4]=f[4],f[5]=f[5],f[6]=f[6],f[7]=f[7],f[12]=f[12],f[13]=f[13],f[14]=f[14],f[15]=f[15]);f[0]=h*b-n*g;f[1]=k*b-p*g;f[2]=l*b-r*g;f[3]=m*b-u*g;f[8]=h*g+n*b;f[9]=k*g+p*b;f[10]=l*g+r*b;f[11]=m*g+u*b;a.H+=c;a.H<e&&a.H>-e?(e=oE(),g=oE(),b=-1*c,c=Math.sin(b),b=Math.cos(b),h=g[4],k=g[5],l=g[6],m=g[7],n=g[8],p=g[9],r=g[10],u=g[11],g!==
|
|
1499
1500
|
e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=h*b+n*c,e[5]=k*b+p*c,e[6]=l*b+r*c,e[7]=m*b+u*c,e[8]=n*b-h*c,e[9]=p*b-k*c,e[10]=r*b-l*c,e[11]=u*b-m*c,qE(f,e,f)):a.H-=c;c=oE();e=oE();g=Math.sin(d);d=Math.cos(d);b=e[0];h=e[1];k=e[2];l=e[3];m=e[4];n=e[5];p=e[6];r=e[7];e!==c&&(c[8]=e[8],c[9]=e[9],c[10]=e[10],c[11]=e[11],c[12]=e[12],c[13]=e[13],c[14]=e[14],c[15]=e[15]);c[0]=b*d+m*g;c[1]=h*d+n*g;c[2]=k*d+p*g;c[3]=l*d+r*g;c[4]=m*d-b*g;c[5]=n*d-h*g;c[6]=p*
|
|
1500
|
-
d-k*g;c[7]=r*d-l*g;qE(f,c,f);xE(a,!1)}function GE(a,b){if(void 0===b||b)rE(a.h,a.G),a.
|
|
1501
|
-
"unloading",function(){f.l=null;JE(f)});JE(this)}oa(HE,gb);q=HE.prototype;q.release=function(){this.
|
|
1501
|
+
d-k*g;c[7]=r*d-l*g;qE(f,c,f);xE(a,!1)}function GE(a,b){if(void 0===b||b)rE(a.h,a.G),a.Y=0,a.A=tE(),a.A[0]=(a.h[0]-a.L[0])/20,a.A[1]=(a.h[1]-a.L[1])/20,a.A[2]=(a.h[2]-a.L[2])/20,a.A[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.A[0];a.h[1]-=a.A[1];a.h[2]-=a.A[2];a.h[3]-=a.A[3];b=oE();uE(a.h,a.h);sE(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.Y?a.J=(new Ob(function(){GE(a,!1);a.H=0;a.Y++;xE(a,!1)})).U(.025):(sE(b,a.L),a.G=b)};function HE(a,b,c,d,e){gb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.s=new fd;this.h=new fd;this.G=IE(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.F=this.A=0;this.l=null;this.s.o(d,"loading",function(){f.g&&GE(f.g);JE(f)});this.s.o(d,"spatialvideoinfo",function(g){switch(g.detail.projection){case "hequ":f.l="equirectangular";break;case "fish":f.l="equirectangular";break;default:f.l=null}JE(f)});this.s.o(d,"nospatialvideoinfo",function(){f.l=null;JE(f)});this.s.o(d,
|
|
1502
|
+
"unloading",function(){f.l=null;JE(f)});JE(this)}oa(HE,gb);q=HE.prototype;q.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);gb.prototype.release.call(this)};q.configure=function(a){this.u=a;JE(this)};q.Qf=function(){return!!this.G};q.Ob=function(){return!!this.g};q.pd=function(){this.g?this.g.pd():Ya("Not playing VR content")};q.ug=function(a){this.g?FE(this.g,a*KE,0,0):Ya("Not playing VR content")};
|
|
1502
1503
|
q.rg=function(a){this.g?FE(this.g,0,a*KE,0):Ya("Not playing VR content")};q.sg=function(a){this.g?FE(this.g,0,0,a*KE):Ya("Not playing VR content")};
|
|
1503
1504
|
function JE(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProjectionMode;a.g?a.g.F!=b&&(a.h.qb(),a.g.release(),LE(a,b)):(a.m.style.display="",LE(a,b),a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Ob()))))}else a.u.displayInVrMode||a.l||!a.g||(a.m.style.display="none",a.h.qb(),a.g.release(),a.g=null,a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Ob()))))}function LE(a,b){a.G&&a.m&&(a.g=new vE(a.L,a.K,a.m,a.G,b),ME(a))}
|
|
1504
1505
|
function IE(a){if(!a.m||ic())return null;for(var b=t(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null}
|
|
1505
|
-
function ME(a){a.h.
|
|
1506
|
-
a.h.
|
|
1506
|
+
function ME(a){a.h.o(a.i,"mousedown",function(d){if(!a.j){var e=d.clientX;d=d.clientY;a.j=!0;a.A=e;a.F=d}});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchstart",function(d){if(!a.j){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.j=!0;a.A=e;a.F=d}});a.h.o(a.i,"wheel",function(d){if(!a.j){var e=a.g,f=d.deltaY;f/=50;20<=e.i&&100>=e.i&&(e.i+=f);20>e.i?e.i=20:100<e.i&&(e.i=100);xE(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.j&&NE(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
|
|
1507
|
+
a.h.o(a.i,"touchmove",function(d){a.j&&NE(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.o(a.i,"mouseleave",function(){a.j=!1});a.h.o(a.i,"mouseup",function(){a.j=!1});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchend",function(){a.j=!1});var b=!1;if(window.DeviceOrientationEvent)if("function"==typeof DeviceMotionEvent.requestPermission){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){"granted"!==d||b||(b=!0,OE(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Wa(a.i,
|
|
1507
1508
|
"click",c);a.h.Wa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Wa(a.i,"touchend",c);"granted"!==d?(a.h.na(a.i,"click",c),a.h.na(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.na(a.i,"touchend",c)):(b=!0,OE(a))}).catch(function(){a.h.Wa(a.i,"click",c);a.h.Wa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Wa(a.i,"touchend",c);a.h.na(a.i,"click",c);a.h.na(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.na(a.i,"touchend",c)})}else b=!0,OE(a)}
|
|
1508
|
-
function OE(a){a.h.
|
|
1509
|
-
g.next())KD(h.value,!1)});this.Da=new Ob(function(){f.pc()&&QE(f)});this.I=null;this.G=[];this.ra=RE();this.i=new fd;this.u=null;this.configure(this.g);SE(this);this.
|
|
1510
|
-
q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.
|
|
1511
|
-
a.oa.destroy(),7);case 7:a.oa=null;case 6:a.H=null,a.
|
|
1512
|
-
q.configure=function(a){this.g=a;this.F.rh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Xa&&(this.Xa=null);this.Ma&&(this.Ma=null);this.u&&this.u.configure(a);this.h?(Zm(this.h),UE(this)):(XE(this),YE(this),this.u=new HE(this.h,this.Zb,this.
|
|
1509
|
+
function OE(a){a.h.o(window,"deviceorientation",function(b){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(10<Math.abs(c)||10<Math.abs(d)||5<Math.abs(e))d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;90==b||-90==b?FE(a.g,c*KE*-1,e*KE*-1,0):FE(a.g,c*KE*-1,d*KE,0)})}function NE(a,b,c){var d=-.6*Math.PI/180;FE(a.g,(b-a.A)*d,-1*(c-a.F)*d,0);a.A=b;a.F=c}var KE=Math.PI/180;function Z(a,b,c,d,e){gb.call(this);var f=this;this.S=!0;this.g=e;this.F=new uq(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.qa=!0;this.A=this.F.nc();this.s=c;this.H=this.F.bd();this.oa=a;this.j=b;this.Zb=d;this.Ia=this.H.De();this.l=this.m=null;this.Z=!1;this.J=[];this.ib=[];this.Za=!1;this.R=new Ob(function(){f.j.style.cursor="none";f.Za=!1;PE(f)});this.ba=new Ob(function(){f.h.removeAttribute("shown");f.L.U(2)});this.L=new Ob(function(){for(var g=t(f.J),h=g.next();!h.done;h=
|
|
1510
|
+
g.next())KD(h.value,!1)});this.Da=new Ob(function(){f.pc()&&QE(f)});this.I=null;this.G=[];this.ra=RE();this.i=new fd;this.u=null;this.configure(this.g);SE(this);this.ea=new Set;TE(this);this.Da.xa(this.g.refreshTickInSeconds);this.i.o(this.ra,"locale-changed",function(g){f.Ia.setLocale(g.locales[0])})}oa(Z,gb);q=Z.prototype;
|
|
1511
|
+
q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.s){b.B(2);break}return E(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.R&&(a.R.stop(),a.R=null);a.ba&&(a.ba.stop(),a.ba=null);a.L&&(a.L.stop(),a.L=null);a.Da&&(a.Da.stop(),a.Da=null);a.u&&(a.u.release(),a.u=null);UE(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.F){b.B(4);break}return E(b,a.F.destroy(),5);case 5:a.F=null;case 4:if(!a.oa){b.B(6);break}return E(b,
|
|
1512
|
+
a.oa.destroy(),7);case 7:a.oa=null;case 6:a.H=null,a.s=null,a.A=null,a.ra=null,a.ea.clear(),gb.prototype.release.call(a),F(b)}})};function UE(a){for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.release();a.G=[]}function VE(a,b){WE.set(a,b)}q.Di=function(a){this.qa=a;TE(this)};q.Jj=function(){PE(this)};
|
|
1513
|
+
q.configure=function(a){this.g=a;this.F.rh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Xa&&(this.Xa=null);this.Ma&&(this.Ma=null);this.u&&this.u.configure(a);this.h?(Zm(this.h),UE(this)):(XE(this),YE(this),this.u=new HE(this.h,this.Zb,this.s,this.H,this.g));this.j.classList.add("shaka-video-container");this.s.classList.add("shaka-video");ZE(this);this.g.addBigPlayButton&&$E(this);this.g.customContextMenu&&(this.Ma=new TD(this.Y,this),this.G.push(this.Ma));this.$||
|
|
1513
1514
|
aF(this);this.g.seekOnTaps&&(bF(this),cF(this));this.Sa=W("div");this.Sa.classList.add("shaka-server-side-ad-container");this.h.appendChild(this.Sa);dF(this);this.J=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.J.push.apply(this.J,x(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));eF(this);this.ib=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));PE(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=
|
|
1514
|
-
a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.
|
|
1515
|
-
q.bj=function(){return this.
|
|
1516
|
-
q.Dc=function(){this.L.La()};q.Vd=function(){return document.fullscreenEnabled||this.
|
|
1517
|
-
function fF(a){var b,c,d;return O(function(e){switch(e.g){case 1:sa(e,2);if(!document.fullscreenEnabled){b=a.
|
|
1518
|
-
4,2);break;case 9:va(e,2);case 4:ua(e,0);break;case 2:d=va(e),a.dispatchEvent(new T("error",(new Map).set("detail",d))),F(e)}})}function gF(a){var b;return O(function(c){if(!document.fullscreenEnabled)return b=a.
|
|
1519
|
-
q.Me=function(){return this.F.Ja()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.
|
|
1520
|
-
q.ke=function(){var a=this,b,c;return O(function(d){if(1==d.g)return sa(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?E(d,hF(a),5):document.pictureInPictureElement?E(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.
|
|
1515
|
+
a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.o(b,"click",c);this.i.o(b,"dblclick",c)}};q.Tg=function(a){(this.S=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");PE(this)};q.$h=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.Tg(!1)};q.getAd=function(){return this.m};q.Qi=function(){return this.F};q.cj=function(){return this.ra};q.uj=function(){return this.j};q.nc=function(){return this.A};
|
|
1516
|
+
q.bj=function(){return this.s};q.bd=function(){return this.H};q.aj=function(){return this.oa};q.Vi=function(){return this.h};q.lj=function(){return this.Sa};q.Si=function(){return this.O};q.Ti=function(){return this.g};q.Gj=function(){return this.Z};q.Xg=function(a){this.Z=a};q.Aj=function(){return this.qa};q.lg=function(){return this.l?this.l.getValue():this.A.currentTime};q.bi=function(a){this.I=a};q.Id=function(){return this.J.some(function(a){return!a.classList.contains("shaka-hidden")})};
|
|
1517
|
+
q.Dc=function(){this.L.La()};q.Vd=function(){return document.fullscreenEnabled||this.s.webkitSupportsFullscreen?!0:!1};q.fd=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.s;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1518
|
+
function fF(a){var b,c,d;return O(function(e){switch(e.g){case 1:sa(e,2);if(!document.fullscreenEnabled){b=a.s;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!document.pictureInPictureElement){e.B(5);break}return E(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,E(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}sa(e,9);return E(e,screen.orientation.lock("landscape"),11);case 11:ua(e,
|
|
1519
|
+
4,2);break;case 9:va(e,2);case 4:ua(e,0);break;case 2:d=va(e),a.dispatchEvent(new T("error",(new Map).set("detail",d))),F(e)}})}function gF(a){var b;return O(function(c){if(!document.fullscreenEnabled)return b=a.s,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return E(c,document.exitFullscreen(),0)})}q.kf=function(){var a=this;return O(function(b){return a.fd()?E(b,gF(a),0):E(b,fF(a),0)})};
|
|
1520
|
+
q.Me=function(){return this.F.Ja()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.s.disablePictureInPicture:!1};q.Ne=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
|
|
1521
|
+
q.ke=function(){var a=this,b,c;return O(function(d){if(1==d.g)return sa(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?E(d,hF(a),5):document.pictureInPictureElement?E(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.s,E(d,b.requestPictureInPicture(),5));if(2!=d.g)return ua(d,0);c=va(d);a.dispatchEvent(new T("error",(new Map).set("detail",c)));F(d)})};
|
|
1521
1522
|
function hF(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.j;c=b.getBoundingClientRect();return E(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;iF(d);e=b.parentNode||document.body;f=a.j.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
|
|
1522
1523
|
d.document.head.append(g);d.document.body.append(b);a.i.na(d,"pagehide",function(){f.replaceWith(b)});F(h)})}
|
|
1523
1524
|
function iF(a){var b=[].concat(x(document.styleSheets)).map(function(d){try{return[].concat(x(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}q.ii=function(){KD(this.K,!0);KD(this.O,!0);this.h.setAttribute("ad-active","true")};
|
|
1524
|
-
q.Hh=function(){KD(this.K,!1);KD(this.O,!1);this.h.removeAttribute("ad-active")};function RD(a){a.
|
|
1525
|
-
function XE(a){a.h=W("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.
|
|
1525
|
+
q.Hh=function(){KD(this.K,!1);KD(this.O,!1);this.h.removeAttribute("ad-active")};function RD(a){a.S&&a.A.duration&&(a.H.Vc(),a.A.paused&&!a.Z?a.A.play():a.A.pause())}function QD(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
1526
|
+
function XE(a){a.h=W("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.A.duration&&(a.pc()?a.I=Date.now():(jF(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){kF(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.Vd()&&a.kf()})}
|
|
1526
1527
|
function $E(a){var b=W("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Xa=new SD(b,a);a.G.push(a.Xa)}function ZE(a){var b=W("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function lF(a){a.K=W("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();KD(a.K,b);a.N.appendChild(a.K);b=new ND(a.K,a);a.G.push(b);b=new MD(a.K,a);a.G.push(b);b=new lE(a.K,a);a.G.push(b)}
|
|
1527
|
-
function aF(a){a
|
|
1528
|
+
function aF(a){a.$=W("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=W("div");b.classList.add("shaka-spinner");a.$.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");b.setAttribute("fill",
|
|
1528
1529
|
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function bF(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.Xb=new YD(b,a);a.G.push(a.Xb)}function cF(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.Yb=new ZD(b,a);a.G.push(a.Yb)}
|
|
1529
|
-
function dF(a){a.N=W("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.h.appendChild(a.N);a.i.
|
|
1530
|
-
(c=WE.get(c).create(a.
|
|
1531
|
-
function SE(a){a.i.
|
|
1532
|
-
a.i.
|
|
1533
|
-
oF(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&e&&!d&&0<c&&(b.preventDefault(),oF(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),oF(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),oF(a,a.l.getValue()+f));break;case "Home":a.l&&oF(a,a.H.Qa().start);break;case "End":a.l&&oF(a,a.H.Qa().end);break;case "f":a.Vd()&&a.kf();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.
|
|
1534
|
-
case " ":e&&pF(a)}}});a.i.
|
|
1530
|
+
function dF(a){a.N=W("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.h.appendChild(a.N);a.i.o(a.N,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Dc()});lF(a);a.Y=W("div");a.Y.classList.add("shaka-controls-button-panel");a.Y.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.Y.classList.add("shaka-tooltips-on");a.N.appendChild(a.Y);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,WE.get(c)?
|
|
1531
|
+
(c=WE.get(c).create(a.Y,a),a.G.push(c)):Ya("Unrecognized control panel element requested:",c)}function eF(a){if(a.g.addSeekBar)a.l=mF.create(a.N,a),a.G.push(a.l);else{a=t(a.J);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function YE(a){a.O=W("div");a.O.classList.add("shaka-client-side-ad-container");KD(a.O,!1);a.i.o(a.O,"click",function(){kF(a)});a.j.appendChild(a.O)}
|
|
1532
|
+
function SE(a){a.i.o(a.H,"buffering",function(){a.S&&KD(a.$,a.H.Ud())});a.S&&KD(a.$,a.H.Ud());a.i.o(window,"keydown",function(b){nF(a,b)});a.i.o(window,"click",function(){return a.Dc()});a.i.o(a,"submenuopen",function(){a.Dc()});a.i.o(a.A,"play",function(){PE(a)});a.i.o(a.A,"pause",function(){PE(a)});a.i.o(a.j,"mousemove",function(b){jF(a,b)});a.i.o(a.j,"touchmove",function(b){jF(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){jF(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.I||a.R.La()});
|
|
1533
|
+
a.i.o(a.F,"caststatuschanged",function(){TE(a)});a.i.o(a.u,"vrstatuschanged",function(){a.dispatchEvent(new T("vrstatuschanged"))});a.i.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&jF(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&e&&!d&&0<c&&(b.preventDefault(),
|
|
1534
|
+
oF(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&e&&!d&&0<c&&(b.preventDefault(),oF(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),oF(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),oF(a,a.l.getValue()+f));break;case "Home":a.l&&oF(a,a.H.Qa().start);break;case "End":a.l&&oF(a,a.H.Qa().end);break;case "f":a.Vd()&&a.kf();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.s.muted=!a.s.muted;break;case "p":a.Me()&&a.ke();break;
|
|
1535
|
+
case " ":e&&pF(a)}}});a.i.o(a.j,"keyup",function(b){a.ea.delete(b.key)});a.i.o(a.Ia,"ad-started",function(b){a.m=b.ad;a.ii()});a.i.o(a.Ia,"ad-stopped",function(){a.m=null;a.Hh()});screen.orientation&&a.i.o(screen.orientation,"change",function(){return O(function(b){return E(b,qF(a),0)})})}
|
|
1535
1536
|
function qF(a){return O(function(b){return a.A&&0!=a.A.readyState&&!a.F.Ja()&&a.g.enableFullscreenOnRotation&&a.Vd()?screen.orientation.type.includes("landscape")&&!a.fd()?E(b,fF(a),0):screen.orientation.type.includes("portrait")&&a.fd()?E(b,gF(a),0):b.B(0):b.return()})}
|
|
1536
|
-
function jF(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),PE(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.I=Date.now():a.I+1E3<Date.now()&&(a.I=null);a.I&&"mousemove"==b.type||(a.j.style.cursor="",a.Za=!0,a.L.stop(),a.pc()||(QE(a),PE(a)),a.
|
|
1537
|
-
function PE(a){var b=a.m?a.m.isPaused():!1,c=a.A.paused&&!a.
|
|
1538
|
-
function TE(a){var b=a.F.Ja();a.dispatchEvent(new T("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}q.pc=function(){return this.
|
|
1537
|
+
function jF(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),PE(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.I=Date.now():a.I+1E3<Date.now()&&(a.I=null);a.I&&"mousemove"==b.type||(a.j.style.cursor="",a.Za=!0,a.L.stop(),a.pc()||(QE(a),PE(a)),a.R.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.I||a.R.U(3))}function rF(a){return window.matchMedia("hover: hover").matches?a.ib.some(function(b){return b.matches(":hover")}):!1}
|
|
1538
|
+
function PE(a){var b=a.m?a.m.isPaused():!1,c=a.A.paused&&!a.Z,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Za||d||rF(a)?(QE(a),a.h.setAttribute("shown","true"),a.ba.stop()):a.ba.U(a.g.fadeDelay)}function kF(a){a.S&&!a.Ob()&&(a.Id()?a.L.La():a.g.singleClickForPlayAndPause&&pF(a))}function pF(a){a.m&&a.m.isLinear()?QD(a):RD(a)}
|
|
1539
|
+
function TE(a){var b=a.F.Ja();a.dispatchEvent(new T("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}q.pc=function(){return this.S?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function oF(a,b){a.l.changeTo(b);a.pc()&&QE(a)}
|
|
1539
1540
|
function QE(a){if(a.l)if(a.l.setValue(a.A.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new T("timeandseekrangeupdated"))}
|
|
1540
|
-
function nF(a,b){a.
|
|
1541
|
-
function sF(a,b){var c=a.J.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.
|
|
1542
|
-
q.yk=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});jF(this,a)};q.zj=function(){this.I||this.
|
|
1541
|
+
function nF(a,b){a.ea.add(b.key);var c=a.Id();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),PE(a),a.i.o(window,"mousedown",function(){a.i.Wa(window,"mousedown")}));"Escape"==b.key&&a.L.La();c&&a.ea.has("Tab")&&sF(a,b)}
|
|
1542
|
+
function sF(a,b){var c=a.J.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ea.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
1543
|
+
q.yk=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});jF(this,a)};q.zj=function(){this.I||this.R.La()};q.Qf=function(){return this.u.Qf()};q.Ob=function(){return this.u.Ob()};
|
|
1543
1544
|
q.sj=function(){var a=this.u;if(a.g){a=a.g;rE(a.h,a.G);var b=a.h;a=b[0];var c=b[1],d=b[2];b=b[3];var e=d*d,f=b*b;var g=a*a+c*c+e+f;var h=a*b-c*d;h>.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else Ya("Not playing VR content"),a=null;return a};q.rj=function(){var a=this.u;a.g?a=a.g.i:(Ya("Not playing VR content"),a=null);return a};
|
|
1544
1545
|
q.xk=function(a){var b=this.u;b.g?(0>a?(Ya("Field of view should be greater than 0"),a=0):100<a&&(Ya("Field of view should be less than 100"),a=100),b=b.g,b.i=a,xE(b,!1)):Ya("Not playing VR content")};q.pd=function(){this.u.pd()};q.ug=function(a){this.u.ug(a)};q.rg=function(a){this.u.rg(a)};q.sg=function(a){this.u.sg(a)};
|
|
1545
1546
|
function RE(){var a=new Yc("en");a.Fa("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
|
|
@@ -1606,12 +1607,12 @@ Z.prototype.toggleStereoscopicMode=Z.prototype.pd;Z.prototype.setVRFieldOfView=Z
|
|
|
1606
1607
|
Z.prototype.isPiPAllowed=Z.prototype.Me;Z.prototype.toggleFullScreen=Z.prototype.kf;Z.prototype.isFullScreenEnabled=Z.prototype.fd;Z.prototype.isFullScreenSupported=Z.prototype.Vd;Z.prototype.hideSettingsMenus=Z.prototype.Dc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Id;Z.prototype.setLastTouchEventTime=Z.prototype.bi;Z.prototype.getDisplayTime=Z.prototype.lg;Z.prototype.isCastAllowed=Z.prototype.Aj;Z.prototype.setSeeking=Z.prototype.Xg;Z.prototype.isSeeking=Z.prototype.Gj;
|
|
1607
1608
|
Z.prototype.getConfig=Z.prototype.Ti;Z.prototype.getClientSideAdContainer=Z.prototype.Si;Z.prototype.getServerSideAdContainer=Z.prototype.lj;Z.prototype.getControlsContainer=Z.prototype.Vi;Z.prototype.getLocalPlayer=Z.prototype.aj;Z.prototype.getPlayer=Z.prototype.bd;Z.prototype.getLocalVideo=Z.prototype.bj;Z.prototype.getVideo=Z.prototype.nc;Z.prototype.getVideoContainer=Z.prototype.uj;Z.prototype.getLocalization=Z.prototype.cj;Z.prototype.getCastProxy=Z.prototype.Qi;Z.prototype.getAd=Z.prototype.getAd;
|
|
1608
1609
|
Z.prototype.setEnabledNativeControls=Z.prototype.$h;Z.prototype.setEnabledShakaControls=Z.prototype.Tg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Jj;Z.prototype.allowCast=Z.prototype.Di;Z.registerSeekBar=function(a){mF=a};Z.registerElement=VE;Z.prototype.destroy=Z.prototype.destroy;var WE=new Map,mF=new kE;function tF(a,b){FD.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=Ym();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=W("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
|
|
1609
|
-
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);uF(this);this.eventManager.
|
|
1610
|
-
d.stopPropagation()});this.eventManager.
|
|
1610
|
+
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);uF(this);this.eventManager.o(this.localization,"locale-updated",function(){vF(c)});this.eventManager.o(this.localization,"locale-changed",function(){vF(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&KD(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){KD(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){KD(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.bi(Date.now());
|
|
1611
|
+
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){wF(c)});vF(this);this.ad&&this.ad.isLinear()&&KD(this.g,!1)}oa(tF,FD);tF.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=[];FD.prototype.release.call(this)};function xF(a,b){yF.set(a,b)}
|
|
1611
1612
|
function uF(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,yF.get(c)?(c=yF.get(c),a.i.push(c.create(a.h,a.controls))):Ya("Unrecognized overflow menu element requested:",c)}function wF(a){if(a.controls.Id())a.controls.Dc();else{KD(a.h,!0);PE(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 vF(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1612
1613
|
P("shaka.ui.OverflowMenu",tF);tF.registerElement=xF;function zF(){}zF.prototype.create=function(a,b){return new tF(a,b)};VE("overflow_menu",new zF);var yF=new Map;function AF(a,b){FD.call(this,a,b);var c=this;this.g=Ym();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);
|
|
1613
|
-
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);BF(this);CF(this);this.eventManager.
|
|
1614
|
-
c.player.Od()==Yo;KD(c.g,"available"==d.availability&&e)});this.eventManager.
|
|
1614
|
+
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);BF(this);CF(this);this.eventManager.o(this.localization,"locale-updated",function(){BF(c)});this.eventManager.o(this.localization,"locale-changed",function(){BF(c)});this.eventManager.o(this.g,"click",function(){c.controls.nc().webkitShowPlaybackTargetPicker()});a=this.controls.nc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1615
|
+
c.player.Od()==Yo;KD(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){CF(c)})}oa(AF,FD);function CF(a){var b=a.controls.nc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function BF(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}P("shaka.ui.AirPlayButton",AF);function DF(){}DF.prototype.create=function(a,b){return new AF(a,b)};xF("airplay",new DF);
|
|
1615
1616
|
VE("airplay",new DF);function EF(a,b,c,d){d=void 0===d?null:d;this.i=a;this.j=b;this.h=FF(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.wg()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);this.configure({});c.controls||a.Yg(b);b.ui=this;c.ui=this}q=EF.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)})};
|
|
1616
1617
|
q.wg=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:cc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=FF(this);gm(a,this.h,FF(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hm(a,b));gm(this.h,a,FF(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new T("uiupdated"))};q.Ui=function(){return this.g};
|
|
1617
1618
|
q.tk=function(a){this.g.Tg(a)};
|
|
@@ -1629,62 +1630,62 @@ EF.prototype.getControls=EF.prototype.Ui;EF.prototype.configure=EF.prototype.con
|
|
|
1629
1630
|
"complete"==document.readyState?O(function(a){if(1==a.g)return E(a,Promise.resolve(),2);HF();F(a)}):window.addEventListener("load",HF);function NF(a,b,c,d,e,f,g,h){function k(G){var K="";5<=G&&(K=" "+f.resolve("SURROUND"));return K}function l(G,K,I,J){G=[G,K];h&&null!=J&&G.push(J);I&&3==g&&G.push(I);return G.join(": ")}function m(G){return"variant"==G.type?G.audioRoles?G.audioRoles.join(", "):void 0:G.roles.join(", ")}var n=a.find(function(G){return 1==G.active}),p=GD(b);Zm(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));
|
|
1630
1631
|
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={Ib:r.Ib},u=a.next()){r.Ib=u.value;u=r.Ib.language;var v=r.Ib.forced,w=f.resolve("SUBTITLE_FORCED"),A=m(r.Ib),z=r.Ib.label,y=r.Ib.channelsCount,B=l(u,A,z,y);if(!p.has(B)){p.add(B);var C=Ym();C.addEventListener("click",function(G){return function(){c(G.Ib)}}(r));var D=W("span");C.appendChild(D);D.textContent=OF(u,f);switch(g){case GF:h&&(D.textContent+=k(y));v&&(D.textContent+=" ("+w+")");break;case 1:h&&
|
|
1631
1632
|
(D.textContent+=k(y));A?D.textContent=A:(Ya("Track #"+r.Ib.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(y));A&&(D.textContent+=": "+A);v&&(D.textContent+=" ("+w+")");break;case 3:z?D.textContent=z:(Ya("Track #"+r.Ib.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&B==n&&(C.appendChild(JD()),D.classList.add("shaka-chosen-item"),C.ariaSelected=
|
|
1632
|
-
"true",e.textContent=D.textContent);b.appendChild(C)}}}function OF(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=Uc(a);return a in BD?BD[a].C:c in BD?BD[c].C+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function PF(a,b,c){FD.call(this,a,b);var d=this;QF(this,c);RF(this);SF(this);this.eventManager.
|
|
1633
|
+
"true",e.textContent=D.textContent);b.appendChild(C)}}}function OF(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=Uc(a);return a in BD?BD[a].C:c in BD?BD[c].C+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function PF(a,b,c){FD.call(this,a,b);var d=this;QF(this,c);RF(this);SF(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new T("submenuopen")),KD(d.menu,!0),ID(d.menu)):KD(d.menu,!1)})}oa(PF,FD);
|
|
1633
1634
|
function QF(a,b){a.button=Ym();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)}
|
|
1634
|
-
function RF(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=Ym();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.
|
|
1635
|
-
W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function SF(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.
|
|
1636
|
-
function(){
|
|
1637
|
-
function
|
|
1638
|
-
function UF(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")}P("shaka.ui.AudioLanguageSelection",TF);function
|
|
1639
|
-
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1640
|
-
function
|
|
1641
|
-
function
|
|
1642
|
-
this.eventManager.
|
|
1643
|
-
c.controls.kf(),0)})});this.eventManager.
|
|
1644
|
-
P("shaka.ui.FullscreenButton",
|
|
1645
|
-
a.appendChild(this.l);this.g.appendChild(a);
|
|
1646
|
-
|
|
1647
|
-
this.eventManager.
|
|
1648
|
-
function
|
|
1649
|
-
W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);
|
|
1650
|
-
function(){
|
|
1651
|
-
function
|
|
1652
|
-
function
|
|
1653
|
-
function
|
|
1654
|
-
c.player.Ua())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));
|
|
1655
|
-
function
|
|
1656
|
-
"x")}function
|
|
1657
|
-
c.g.disabled=!0)):(d=3600<=g,e=LD(Math.max(0,e-f.start),d),g&&(e+=" / "+LD(g,d)),
|
|
1658
|
-
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1659
|
-
function
|
|
1660
|
-
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;
|
|
1661
|
-
"connect",function(){
|
|
1662
|
-
function
|
|
1663
|
-
case 9:ua(d,8);break;case 7:va(d);case 8:return sa(d,11),E(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;ua(d,0);break;case 11:va(d),b(!0),F(d)}})}function
|
|
1664
|
-
"abrstatuschanged",function(){
|
|
1665
|
-
function
|
|
1666
|
-
k.height&&n.videoBandwidth==k.videoBandwidth&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.ed()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=GD(a.menu);Zm(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={Tb:e.Tb},g=f.next()){e.Tb=g.value;g=Ym();g.classList.add("explicit-resolution");a.eventManager.
|
|
1667
|
-
k.Tb;a.player.configure({abr:{enabled:!1}});a.player.ef(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=W("span");h.textContent=a.player.ed()&&e.Tb.bandwidth?Math.round(e.Tb.bandwidth/1E3)+" kbits/s":e.Tb.height&&e.Tb.width?
|
|
1668
|
-
function(){a.player.configure({abr:{enabled:!0}});
|
|
1669
|
-
|
|
1670
|
-
function
|
|
1671
|
-
|
|
1672
|
-
this.eventManager.
|
|
1673
|
-
|
|
1674
|
-
this.
|
|
1635
|
+
function RF(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=Ym();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(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=
|
|
1636
|
+
W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function SF(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}KD(a.parent,!0);jb(a.parent.childNodes,b)&&kb(a.parent.childNodes,b)[0].focus();PE(a.controls)}))}P("shaka.ui.SettingsMenu",PF);function TF(a,b){PF.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){UF(c)});this.eventManager.o(this.localization,"locale-changed",function(){UF(c)});this.eventManager.o(this.player,"loading",function(){VF(c)});this.eventManager.o(this.player,"trackschanged",function(){VF(c)});this.eventManager.o(this.player,
|
|
1637
|
+
"variantchanged",function(){WF(c)});UF(this);WF(this)}oa(TF,PF);
|
|
1638
|
+
function WF(a){var b=a.player.xb();NF(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.df(c.language,c.roles[0],c.channelsCount):a.player.df(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);ID(a.menu);a.controls.dispatchEvent(new T("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);KD(a.button,2<a.menu.getElementsByTagName("button").length)}
|
|
1639
|
+
function VF(a){var b=0<a.player.xb().length;KD(a.button,b);WF(a)}function UF(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")}P("shaka.ui.AudioLanguageSelection",TF);function XF(){}XF.prototype.create=function(a,b){return new TF(a,b)};xF("language",new XF);VE("language",new XF);function YF(a,b){FD.call(this,a,b);var c=this;this.h=this.controls.F;this.g=Ym();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");
|
|
1640
|
+
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);ZF(this);$F(this);this.eventManager.o(this.localization,"locale-updated",function(){ZF(c)});this.eventManager.o(this.localization,"locale-changed",function(){ZF(c)});this.eventManager.o(this.g,"click",function(){aG(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){$F(c)})}oa(YF,FD);
|
|
1641
|
+
function aG(a){var b;O(function(c){if(1==c.g){if(a.h.Ja())return a.h.ji(),c.B(0);sa(c,3);a.g.disabled=!0;return E(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ua(c,0);b=va(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new T("error",(new Map).set("detail",b)));F(c)})}function $F(a){var b=a.h.Pf()&&a.controls.qa,c=a.h.Ja();KD(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");bG(a)}
|
|
1642
|
+
function bG(a){a.j.textContent=a.h.Ja()?a.h.$e():a.localization.resolve("OFF")}function ZF(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");bG(a)}P("shaka.ui.CastButton",YF);function cG(){}cG.prototype.create=function(a,b){return new YF(a,b)};xF("cast",new cG);VE("cast",new cG);function dG(a,b){FD.call(this,a,b);var c=this;this.g=Ym();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);eG(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){eG(c)});this.eventManager.o(this.localization,"locale-changed",function(){eG(c)});
|
|
1643
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ua())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Nc(d);c.g.setAttribute("shaka-status",d+"x")}})}oa(dG,FD);function eG(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}P("shaka.ui.FastForwardButton",dG);function fG(){}fG.prototype.create=function(a,b){return new dG(a,b)};VE("fast_forward",new fG);function gG(a,b){FD.call(this,a,b);var c=this;this.h=this.controls.s;this.g=Ym();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");hG(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);iG(this);this.eventManager.o(this.localization,"locale-updated",function(){iG(c)});this.eventManager.o(this.localization,"locale-changed",function(){iG(c)});this.eventManager.o(this.g,"click",function(){return O(function(d){return E(d,
|
|
1644
|
+
c.controls.kf(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.fd()?"fullscreen_exit":"fullscreen";iG(c)});this.eventManager.o(this.h,"loadedmetadata",function(){hG(c)});this.eventManager.o(this.h,"loadeddata",function(){hG(c)})}oa(gG,FD);function hG(a){a.controls.Vd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function iG(a){a.g.ariaLabel=a.localization.resolve(a.controls.fd()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1645
|
+
P("shaka.ui.FullscreenButton",gG);function jG(){}jG.prototype.create=function(a,b){return new gG(a,b)};VE("fullscreen",new jG);function kG(a,b){FD.call(this,a,b);var c=this;this.g=Ym();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");
|
|
1646
|
+
a.appendChild(this.l);this.g.appendChild(a);lG(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){lG(c)});this.eventManager.o(this.localization,"locale-changed",function(){lG(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.La();c.h.xa(1)});this.m=this.video.loop;this.h=new Ob(function(){c.m!=c.video.loop&&(lG(c),c.m=c.video.loop)});this.h.xa(1)}oa(kG,FD);
|
|
1647
|
+
kG.prototype.release=function(){this.h.stop();this.h=null;FD.prototype.release.call(this)};function lG(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")}P("shaka.ui.LoopButton",kG);function mG(){}mG.prototype.create=function(a,b){return new kG(a,b)};xF("loop",new mG);VE("loop",new mG);VD("loop",new mG);function nG(a,b){FD.call(this,a,b);var c=this;this.g=Ym();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);oG(this);pG(this);this.eventManager.o(this.localization,"locale-updated",function(){oG(c)});this.eventManager.o(this.localization,"locale-changed",function(){oG(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
|
|
1648
|
+
this.eventManager.o(this.video,"volumechange",function(){oG(c);pG(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){oG(c);pG(c)});this.eventManager.o(this.adManager,"ad-muted",function(){oG(c);pG(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;oG(c);pG(c)})}oa(nG,FD);function oG(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1649
|
+
function pG(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}P("shaka.ui.MuteButton",nG);function qG(){}qG.prototype.create=function(a,b){return new nG(a,b)};VE("mute",new qG);function rG(a,b){FD.call(this,a,b);var c=this;this.l=this.controls.s;this.g=Ym();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=
|
|
1650
|
+
W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);sG(this);this.parent.appendChild(this.g);this.controls.Me()||KD(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){sG(c)});this.eventManager.o(this.localization,"locale-changed",function(){sG(c)});this.eventManager.o(this.g,"click",function(){c.controls.ke()});this.eventManager.o(this.l,"enterpictureinpicture",function(){tG(c)});this.eventManager.o(this.l,"leavepictureinpicture",
|
|
1651
|
+
function(){uG(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){vG(c)});this.eventManager.o(this.player,"trackschanged",function(){vG(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){tG(c);c.eventManager.na(d.window,"pagehide",function(){uG(c)})})}oa(rG,FD);
|
|
1652
|
+
function tG(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function uG(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")}
|
|
1653
|
+
function sG(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Ne();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 vG(a){O(function(b){if(!a.controls.Me())return KD(a.g,!1),a.controls.Ne()?E(b,a.controls.ke(),0):b.B(0);if(!a.player||!a.player.ed())return KD(a.g,!0),b.B(0);KD(a.g,!1);return a.controls.Ne()?E(b,a.controls.ke(),0):b.B(0)})}P("shaka.ui.PipButton",rG);
|
|
1654
|
+
function wG(){}wG.prototype.create=function(a,b){return new rG(a,b)};xF("picture_in_picture",new wG);VE("picture_in_picture",new wG);VD("picture_in_picture",new wG);function xG(a,b){PF.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){yG(c)});this.eventManager.o(this.localization,"locale-changed",function(){yG(c)});this.eventManager.o(this.player,"loaded",function(){zG(c,c.player.Ua())});this.eventManager.o(this.player,"ratechange",function(){zG(c,
|
|
1655
|
+
c.player.Ua())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));yG(this);IG(this);zG(this,this.player.Ua())}oa(xG,PF);function yG(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")}
|
|
1656
|
+
function zG(a,b){var c=HD(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(JD()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1657
|
+
"x")}function IG(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={xd:b.xd},d=c.next()){b.xd=d.value;d=Ym();var e=W("span");e.textContent=b.xd;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.xd);a.video.defaultPlaybackRate=a.g.get(f.xd)}}(b));a.menu.appendChild(d)}ID(a.menu)}P("shaka.ui.PlaybackRateSelection",xG);function JG(){}JG.prototype.create=function(a,b){return new xG(a,b)};xF("playback_rate",new JG);VE("playback_rate",new JG);function KG(a,b){FD.call(this,a,b);var c=this;this.g=Ym();this.g.classList.add("shaka-current-time");LG(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.W()&&(c.video.currentTime=c.player.Qa().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Z,e=c.controls.lg(),f=c.player.Qa(),g=f.end-f.start;c.player.W()?(e=Math.max(0,Math.floor(f.end-e)),g=3600<=g,1<=e||d?(LG(c,"- "+LD(e,g)),c.g.disabled=!1):(LG(c,c.localization.resolve("LIVE")),
|
|
1658
|
+
c.g.disabled=!0)):(d=3600<=g,e=LD(Math.max(0,e-f.start),d),g&&(e+=" / "+LD(g,d)),LG(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.W()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}oa(KG,FD);function LG(a,b){b!=a.g.textContent&&(a.g.textContent=b)}P("shaka.ui.PresentationTimeTracker",KG);function MG(){}MG.prototype.create=function(a,b){return new KG(a,b)};VE("time_and_duration",new MG);function NG(a,b){FD.call(this,a,b);var c=this;this.g=Ym();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");
|
|
1659
|
+
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);OG(this);this.eventManager.o(this.localization,"locale-updated",function(){OG(c)});this.eventManager.o(this.localization,"locale-changed",function(){OG(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.g?GE(d.g):Ya("Not playing VR content")});this.eventManager.o(d,"vrstatuschanged",function(){KD(c.g,c.controls.Ob())});KD(this.g,this.controls.Ob())}oa(NG,FD);
|
|
1660
|
+
function OG(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}P("shaka.ui.RecenterVRButton",NG);function PG(){}PG.prototype.create=function(a,b){return new NG(a,b)};xF("recenter_vr",new PG);VE("recenter_vr",new PG);function QG(a,b){FD.call(this,a,b);var c=this;this.g=Ym();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=hc())&&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");
|
|
1661
|
+
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;RG(this);KD(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.o(this.localization,"locale-updated",function(){RG(c)}),this.eventManager.o(this.localization,"locale-changed",function(){RG(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){SG(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,
|
|
1662
|
+
"connect",function(){SG(c)}),this.eventManager.o(this.video.remote,"connecting",function(){SG(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){SG(c)}),this.eventManager.o(this.player,"loaded",function(){SG(c)}),SG(this))}oa(QG,FD);QG.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});FD.prototype.release.call(this)};
|
|
1663
|
+
function SG(a){var b,c;O(function(d){switch(d.g){case 1:if(a.controls.F.Pf()&&a.controls.qa){KD(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?KD(a.g,a.player.Od()==Yo&&e):KD(a.g,!1)};sa(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;
|
|
1664
|
+
case 9:ua(d,8);break;case 7:va(d);case 8:return sa(d,11),E(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;ua(d,0);break;case 11:va(d),b(!0),F(d)}})}function RG(a){var b=a.localization.resolve("CAST"),c=hc();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}P("shaka.ui.RemoteButton",QG);function TG(){}TG.prototype.create=function(a,b){return new QG(a,b)};xF("remote",new TG);VE("remote",new TG);function UG(a,b){PF.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){VG(c)});this.eventManager.o(this.localization,"locale-changed",function(){VG(c)});this.eventManager.o(this.player,"loading",function(){WG(c)});this.eventManager.o(this.player,"variantchanged",function(){WG(c)});this.eventManager.o(this.player,
|
|
1665
|
+
"trackschanged",function(){WG(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){WG(c)});WG(this)}oa(UG,PF);
|
|
1666
|
+
function WG(a){var b=[];a.player.Od()!=Yo&&(b=a.player.xb());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=b.filter(function(k,l){var m=-1;m=a.player.ed()?b.findIndex(function(n){return n.bandwidth==k.bandwidth}):b.findIndex(function(n){return n.height==
|
|
1667
|
+
k.height&&n.videoBandwidth==k.videoBandwidth&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.ed()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=GD(a.menu);Zm(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={Tb:e.Tb},g=f.next()){e.Tb=g.value;g=Ym();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=
|
|
1668
|
+
k.Tb;a.player.configure({abr:{enabled:!1}});a.player.ef(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=W("span");h.textContent=a.player.ed()&&e.Tb.bandwidth?Math.round(e.Tb.bandwidth/1E3)+" kbits/s":e.Tb.height&&e.Tb.width?XG(e.Tb,b):"Unknown";g.appendChild(h);d||e.Tb!=c||(g.ariaSelected="true",g.appendChild(JD()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Ym();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",
|
|
1669
|
+
function(){a.player.configure({abr:{enabled:!0}});WG(a)});a.g=W("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(JD()),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);ID(a.menu);a.controls.dispatchEvent(new T("resolutionselectionupdated"));
|
|
1670
|
+
VG(a);KD(a.button,1<b.length)}function XG(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)");a.videoBandwidth&&b.some(function(f){return f!=a&&f.height==a.height})&&(c+=" ("+Math.round(a.videoBandwidth/1E3)+" kbits/s)");return c}
|
|
1671
|
+
function VG(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"))}P("shaka.ui.ResolutionSelection",UG);function YG(){}
|
|
1672
|
+
YG.prototype.create=function(a,b){return new UG(a,b)};xF("quality",new YG);VE("quality",new YG);function ZG(a,b){FD.call(this,a,b);var c=this;this.g=Ym();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);$G(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){$G(c)});this.eventManager.o(this.localization,"locale-changed",function(){$G(c)});
|
|
1673
|
+
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ua())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Nc(d);c.g.setAttribute("shaka-status",d+"x")}})}oa(ZG,FD);function $G(a){a.g.ariaLabel=a.localization.resolve("REWIND")}P("shaka.ui.RewindButton",ZG);function aH(){}aH.prototype.create=function(a,b){return new ZG(a,b)};VE("rewind",new aH);function bH(a,b){PD.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(bH,PD);bH.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
|
|
1674
|
+
bH.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)}};P("shaka.ui.SmallPlayButton",bH);function cH(){}cH.prototype.create=function(a,b){return new bH(a,b)};VE("play_pause",new cH);function dH(a,b){FD.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}oa(dH,FD);P("shaka.ui.Spacer",dH);function eH(){}eH.prototype.create=function(a,b){return new dH(a,b)};VE("spacer",new eH);function fH(a,b){function c(k){return LD(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)"}FD.call(this,a,b);var h=this;this.i=Ym();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");
|
|
1675
|
+
this.s=W("span");a.appendChild(this.s);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();
|
|
1675
1676
|
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)+
|
|
1676
|
-
"MB":1E3<k?(k/1E3).toFixed(2)+"KB":k+"B"}};this.l=new Ob(function(){h.g=h.player.getStats();for(var k=t(h.F),l=k.next();!l.done;l=k.next())l=l.value,h.u[l].textContent=h.A[l](l)});
|
|
1677
|
-
(h.j.textContent="insert_chart_outlined",h.l.stop(),KD(h.h,!1));
|
|
1678
|
-
function
|
|
1679
|
-
|
|
1680
|
-
"texttrackvisibility",function(){
|
|
1681
|
-
function
|
|
1682
|
-
function
|
|
1683
|
-
a.button.setAttribute("shaka-status",a.currentSelection.textContent);ID(a.menu);a.controls.dispatchEvent(new T("captionselectionupdated"))}function
|
|
1684
|
-
function
|
|
1685
|
-
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1686
|
-
function
|
|
1687
|
-
this.eventManager.
|
|
1688
|
-
function
|
|
1677
|
+
"MB":1E3<k?(k/1E3).toFixed(2)+"KB":k+"B"}};this.l=new Ob(function(){h.g=h.player.getStats();for(var k=t(h.F),l=k.next();!l.done;l=k.next())l=l.value,h.u[l].textContent=h.A[l](l)});gH(this);hH(this);this.eventManager.o(this.localization,"locale-updated",function(){gH(h)});this.eventManager.o(this.localization,"locale-changed",function(){gH(h)});this.eventManager.o(this.i,"click",function(){KD(h.parent,!1);h.h.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.xa(.1),KD(h.h,!0)):
|
|
1678
|
+
(h.j.textContent="insert_chart_outlined",h.l.stop(),KD(h.h,!1));gH(h)})}oa(fH,FD);function gH(a){a.s.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")}
|
|
1679
|
+
function hH(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.h,e=d.appendChild,f=a,g=W("div"),h=W("label");h.textContent=c+":";g.appendChild(h);h=W("span");h.textContent=f.A[c](c);g.appendChild(h);f.u[c]=h;e.call(d,g);a.F.push(c)}else Ya("Unrecognized statistic element:",c)}fH.prototype.release=function(){this.l.stop();this.l=null;FD.prototype.release.call(this)};P("shaka.ui.StatisticsButton",fH);function iH(){}
|
|
1680
|
+
iH.prototype.create=function(a,b){return new fH(a,b)};xF("statistics",new iH);VD("statistics",new iH);function jH(a,b){PF.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.Gc()?this.button.ariaPressed="true":this.button.ariaPressed="false";kH(this);this.eventManager.o(this.localization,"locale-updated",function(){lH(c);mH(c)});this.eventManager.o(this.localization,"locale-changed",function(){lH(c);mH(c)});this.eventManager.o(this.player,
|
|
1681
|
+
"loading",function(){nH(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){oH(c);mH(c)});this.eventManager.o(this.player,"textchanged",function(){mH(c)});this.eventManager.o(this.player,"trackschanged",function(){nH(c)});oH(this);lH(this);mH(this);nH(this)}oa(jH,PF);function kH(a){var b=Ym();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(JD());a.g=W("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1682
|
+
function oH(a){a.player.Gc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new T("captionselectionupdated"))}
|
|
1683
|
+
function mH(a){var b=a.player.mc();NF(b,a.menu,function(c){return pH(a,c)},a.player.Gc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=Ym();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.jf(!1);mH(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Gc()||(b.ariaSelected="true",b.appendChild(JD()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1684
|
+
a.button.setAttribute("shaka-status",a.currentSelection.textContent);ID(a.menu);a.controls.dispatchEvent(new T("captionselectionupdated"))}function pH(a,b){return O(function(c){a.player.Qg(b);return E(c,a.player.jf(!0),0)})}
|
|
1685
|
+
function lH(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 nH(a){var b=0<a.player.mc().length;KD(a.button,b);mH(a)}P("shaka.ui.TextSelection",jH);function qH(){}qH.prototype.create=function(a,b){return new jH(a,b)};xF("captions",new qH);VE("captions",new qH);function rH(a,b){FD.call(this,a,b);var c=this;this.g=Ym();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");
|
|
1686
|
+
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);sH(this);this.eventManager.o(this.localization,"locale-updated",function(){sH(c)});this.eventManager.o(this.localization,"locale-changed",function(){sH(c)});var d=this.controls.u;this.eventManager.o(this.g,"click",function(){d.pd()});this.eventManager.o(d,"vrstatuschanged",function(){KD(c.g,c.controls.Ob())});KD(this.g,this.controls.Ob())}oa(rH,FD);
|
|
1687
|
+
function sH(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}P("shaka.ui.ToggleStereoscopicButton",rH);function tH(){}tH.prototype.create=function(a,b){return new rH(a,b)};xF("toggle_stereoscopic",new tH);VE("toggle_stereoscopic",new tH);function uH(a,b){$D.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.o(this.video,"volumechange",function(){return vH(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return wH(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return wH(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return vH(c)});this.eventManager.o(this.localization,"locale-updated",function(){return xH(c)});
|
|
1688
|
+
this.eventManager.o(this.localization,"locale-changed",function(){return xH(c)});vH(this);xH(this);if(this.ad)this.onChange()}oa(uH,$D);uH.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 vH(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);yH(a)}function wH(a){var b=a.ad.getVolume();a.setValue(100*b);yH(a)}
|
|
1689
|
+
function yH(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 xH(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}P("shaka.ui.VolumeBar",uH);function zH(){}zH.prototype.create=function(a,b){return new uH(a,b)};VE("volume",new zH);}).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})();
|
|
1689
1690
|
|
|
1690
1691
|
//# sourceMappingURL=shaka-player.ui.map
|