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
|
@@ -86,16 +86,16 @@ r.set=function(a,b){Gc(this);this.g=null;this.Ea.hasOwnProperty(a)?this.Ea[a]=[b
|
|
|
86
86
|
r.clone=function(){var a=new xc;a.g=this.g;if(this.Ea){var b={},c;for(c in this.Ea)b[c]=this.Ea[c].concat();a.Ea=b;a.fd=this.fd}return a};function T(a,b,c){var d=Ka.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Ic)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}T.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",T);var Ic=!0;T.Severity={RECOVERABLE:1,CRITICAL:2};T.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
87
87
|
T.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,
|
|
88
88
|
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,
|
|
89
|
-
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,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Lc.prototype.tickAfter=Lc.prototype.
|
|
89
|
+
WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
|
|
90
|
+
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,
|
|
91
|
+
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,
|
|
92
|
+
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,
|
|
93
|
+
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,
|
|
94
|
+
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,
|
|
95
|
+
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 Jc(a){this.h=a;this.g=void 0}Jc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Kc(a){this.h=a;this.g=null}Kc.prototype.W=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};Kc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Lc(a){this.h=a;this.g=null}Lc.prototype.pc=function(){this.stop();this.h();return this};Lc.prototype.W=function(a){var b=this;this.stop();this.g=(new Kc(function(){b.h()})).W(a);return this};Lc.prototype.Va=function(a){var b=this;this.stop();this.g=(new Kc(function(){b.g.W(a);b.h()})).W(a);return this};Lc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Lc);Lc.prototype.stop=Lc.prototype.stop;Lc.prototype.tickEvery=Lc.prototype.Va;
|
|
96
|
+
Lc.prototype.tickAfter=Lc.prototype.W;Lc.prototype.tickNow=Lc.prototype.pc;function Mc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Nc(a){return""!=Pc().canPlayType(a)}function Qc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Rc(){return navigator.userAgent.match(/Edge\//)?!0:!1}function Sc(){return Tc("Xbox One")}function Uc(){return Tc("Tizen")}function Vc(){return Tc("Tizen 3")}function Wc(){return Tc("Tizen 2")}function Xc(){return Tc("Web0S")}function Yc(){return Xc()&&38===Zc()}
|
|
97
97
|
function $c(){return Tc("CrKey")}function Zc(){if(!Tc("Chrome")||Rc())return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function ad(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Uc()&&!Tc("PC=EOS")&&!Tc("PC=APL")&&!Tc("VirginMedia")&&!bd()&&!cd()&&!Tc("AFT")&&!Tc("WPE")}function dd(){return Tc("PlayStation 5")}function cd(){return Tc("PlayStation 4")}function ed(){return Tc("Hisense")||Tc("VIDAA")}
|
|
98
|
-
function bd(){return Tc("SOPOpenBrowser")}function fd(){if(!ad())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 Tc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(gd)return gd;hd||(hd=new Lc(function(){gd=null}));(gd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(gd=document.createElement("video"));hd.
|
|
98
|
+
function bd(){return Tc("SOPOpenBrowser")}function fd(){if(!ad())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 Tc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(gd)return gd;hd||(hd=new Lc(function(){gd=null}));(gd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(gd=document.createElement("video"));hd.W(1);return gd}
|
|
99
99
|
function id(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q;return O(function(u){switch(u.g){case 1:a={width:Infinity,height:Infinity};if($c()){m=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;ua(u,15);if(!(n=m)){u.u(17);break}return E(u,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(Uc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
100
100
|
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(v){ab("Tizen: Error detecting screen size, default screen size 1920x1080.")}u.u(3);break}if(Sc()){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"',
|
|
101
101
|
"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.u(3);break}if(Xc()){try{f=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,f.screenWidth),a.height=Math.max(1080,f.screenHeight)}catch(v){ab("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}u.u(3);break}if(ed()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?
|
|
@@ -112,7 +112,7 @@ function Ad(a){var b=Ab(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c
|
|
|
112
112
|
function Ed(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
|
|
113
113
|
function Fd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=xd(zd(h),!1));var l=g;22!=l.length&&(l=xd(zd(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:Ab(qd(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
114
114
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Id(a,b){if(1==b.length)return b[0];a=Jd(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Jd(a,b){for(var c=t(Kd[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==Ld?"":null}
|
|
115
|
-
function Md(a,b){var c=[];a=t(Kd[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 Ld="text",Nd={ga:"video",
|
|
115
|
+
function Md(a,b){var c=[];a=t(Kd[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 Ld="text",Nd={ga:"video",U:"audio",ma:Ld,Ee:"image",Ui:"application"},Kd={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 Od(){}function Pd(a,b){var c=a;b&&!Qd.includes(a)&&(c+='; codecs="'+b+'"');return c}function Rd(a,b){b&&(a+='; codecs="'+b+'"');return a}function Sd(a,b,c){var d=Pd(a,b);b=Rd(a,b);lc(b)?(a=lc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
116
116
|
function Td(a,b,c){var d=[b];Ud.forEach(function(e,f){var g=a[f];"codecs"==f?Qd.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Vd(a){return a.split(";")[0].split("/")[1]}
|
|
117
117
|
function Wd(a){var b=Xd(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"===
|
|
118
118
|
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 Yd(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Xd(c.value),b.push(c[0]);return b.sort().join(",")}function Zd(a){return a.split(";")[0]}
|
|
@@ -132,7 +132,7 @@ var xe=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
132
132
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
133
133
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
134
134
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
135
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ce(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
|
|
135
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ce(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 De(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ee(){}
|
|
136
136
|
function Fe(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Ge(e,b,c);if(d.length){b=new gb;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={bd:A.bd},z=v.next())A.bd=z.value,z=d.filter(function(y){return function(B){return y.bd.decodingInfos[0][B]}}(A)).length,z>u?(u=z,w=[A.bd]):z==u&&w.push(A.bd);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=
|
|
137
137
|
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=Wd(m.codecs),p=Wd(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,
|
|
138
138
|
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=ob();var q=[];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=Wd(m.codecs),p=Wd(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),q.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Wd(m.codecs),p=Wd(g.codecs),n==p&&g.bandwidth>m.bandwidth&&(l.push(g),q.push(g.id)))}else l.push(g),
|
|
@@ -177,7 +177,7 @@ r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.r
|
|
|
177
177
|
this.m);d=e;a&&e.length!=this.m.length&&(d=this.m.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=tf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=uf(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=tf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=tf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
178
178
|
a[d];for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<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};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};r.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.A&&this.o&&vf(this))};
|
|
179
179
|
r.trySuggestStreams=function(){null!=this.A&&this.o&&vf(this)};r.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};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.B=a};
|
|
180
|
-
r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.
|
|
180
|
+
r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.W(wf)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
181
181
|
function vf(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function tf(a,b,c,d,e){if(a.j){var f=a.j.sg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ie(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
182
182
|
function uf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",of);of.prototype.configure=of.prototype.configure;of.prototype.setCmsdManager=of.prototype.setCmsdManager;of.prototype.setMediaElement=of.prototype.setMediaElement;of.prototype.playbackRateChanged=of.prototype.playbackRateChanged;of.prototype.setVariants=of.prototype.setVariants;
|
|
183
183
|
of.prototype.getBandwidthEstimate=of.prototype.getBandwidthEstimate;of.prototype.trySuggestStreams=of.prototype.trySuggestStreams;of.prototype.segmentDownloaded=of.prototype.segmentDownloaded;of.prototype.disable=of.prototype.disable;of.prototype.enable=of.prototype.enable;of.prototype.chooseVariant=of.prototype.chooseVariant;of.prototype.init=of.prototype.init;of.prototype.release=of.prototype.release;of.prototype.stop=of.prototype.stop;var wf=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{vj:"reload",bh:"smooth"});function xf(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)}xf.prototype.add=function(a,b,c){return yf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
@@ -187,7 +187,7 @@ function Cf(a,b,c,d,e,f,g,h,k,l){this.s=a;this.A=b;this.h=c;this.i=d;this.B=e;th
|
|
|
187
187
|
Cf.prototype.create=function(a){var b=[];b=Df(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ef(b,this.A);a.length&&(b=a);this.l&&(a=Ff(b,this.l),a.length&&(b=a));this.i&&(a=Gf(b,this.i),a.length&&(b=a));this.h&&(a=Hf(b,this.h),a.length&&(b=a));this.g&&(a=If(b,this.g),a.length&&(b=a));this.j&&(a=Jf(b,this.j),a.length&&(b=a));a=Kf(b,this.B);a.length&&(b=a);return new xf(b[0],b,!("smooth"==this.m&&ob()),this.o)};
|
|
188
188
|
function Df(a,b){b=ue(b);var c=Be(b,a.map(function(d){return Ae(d)}));return c?a.filter(function(d){return c==Ae(d)}):[]}function Ef(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function If(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Jf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
189
189
|
function Hf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Gf(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 Ff(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Kf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Lf(){this.g=Mf;this.i=(new Map).set(Mf,2).set(Nf,1);this.h=0}function Of(a,b,c){a.i.set(Mf,c).set(Nf,b)}var Nf=0,Mf=1;function Pf(a,b){var c=Qf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
190
|
-
function Rf(a){var b,c;return O(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return E(d,new Promise(function(e){(new Lc(e)).
|
|
190
|
+
function Rf(a){var b,c;return O(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return E(d,new Promise(function(e){(new Lc(e)).W(c/1E3)}),2)}a.h*=a.m;F(d)})}function Qf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Sf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Sf.prototype.resolve=function(){};Sf.prototype.reject=function(){};function Tf(a,b){this.promise=a;this.i=b;this.g=!1}function Uf(a){return new Tf(Promise.reject(a),function(){return Promise.resolve()})}function Vf(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new Tf(a,function(){return Promise.resolve()})}function Wf(a){return new Tf(Promise.resolve(a),function(){return Promise.resolve()})}function Xf(a){return new Tf(a,function(){return a.catch(function(){})})}Tf.prototype.abort=function(){this.g=!0;return this.i()};
|
|
191
191
|
function Yf(a){return new Tf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Tf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
192
192
|
Tf.prototype.va=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Zf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Sf,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new Tf(f,function(){return d()})};
|
|
193
193
|
function Zf(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}S("shaka.util.AbortableOperation",Tf);Tf.prototype.chain=Tf.prototype.va;Tf.prototype["finally"]=Tf.prototype.finally;Tf.all=Yf;Tf.prototype.abort=Tf.prototype.abort;Tf.notAbortable=Xf;Tf.completed=Wf;Tf.aborted=Vf;Tf.failed=Uf;function U(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
@@ -201,19 +201,19 @@ r.request=function(a,b,c){var d=this,e=new kg;if(this.i){var f=Promise.reject(ne
|
|
|
201
201
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.va(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.Wh||!d.l||u.fromCache||"HEAD"==b.method||a!=pg||d.l(u.timeMs,u.data.byteLength,qg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new lg(n.promise,function(){return n.abort()},e);dg(this.m,f);return f};
|
|
202
202
|
function mg(a,b,c,d){function e(h){f=f.va(function(){c.body&&(c.body=Bb(c.body));return h(b,c,d)})}var f=Wf(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.va(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
203
203
|
function ng(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new rc(c.uris[f]),l=k.wb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),sc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=hg[l])?l.pe:null;if(!n)return Uf(new T(2,1,1E3,k));var p=l.pi,q=null,u=null,v=!1,w=!1,A;return Xf(Rf(e)).va(function(){if(a.i)return Vf();A=Date.now();var z=0;c.requestStartTime=Date.now();
|
|
204
|
-
var y=n(c.uris[f],c,b,function(D,J,K){q&&q.stop();u&&u.
|
|
204
|
+
var y=n(c.uris[f],c,b,function(D,J,K){q&&q.stop();u&&u.W(C/1E3);a.l&&b==pg&&(z++,c.packetNumber=z,a.l(D,J,qg(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&&(q=new Lc(function(){v=!0;y.abort()}),q.W(B/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Lc(function(){v=!0;y.abort()}));return y}).va(function(z){q&&q.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-A);var y={response:z,
|
|
205
205
|
Wh:m};!w&&a.j&&a.j(z.headers,c,b);return y},function(z){q&&q.stop();u&&u.stop();if(a.A){var y=null,B=0;z instanceof T&&(y=z,1001==z.code&&(B=z.data[1]));a.A(c,y,B,v)}if(a.i)return Vf();v&&(z=new T(1,1,1003,c.uris[f],b));if(z instanceof T){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity)return y=(new Map).set("error",z),y=new U("retry",y),a.dispatchEvent(y),f=(f+1)%c.uris.length,ng(a,b,c,d,e,f,z,h)}throw z;})}
|
|
206
206
|
function og(a,b,c,d){var e=Wf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ae:f.Ae},g=a.next())f.Ae=g.value,e=e.va(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return h.Ae(b,k,d)}}(f));return e.va(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function qg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.wd)return!1}return!0}S("shaka.net.NetworkingEngine",eg);
|
|
207
207
|
eg.prototype.request=eg.prototype.request;eg.prototype.destroy=eg.prototype.destroy;eg.makeRequest=jg;eg.defaultRetryParameters=function(){return Qf()};eg.prototype.clearAllResponseFilters=eg.prototype.ph;eg.prototype.unregisterResponseFilter=eg.prototype.Qi;eg.prototype.registerResponseFilter=eg.prototype.ui;eg.prototype.clearAllRequestFilters=eg.prototype.oh;eg.prototype.unregisterRequestFilter=eg.prototype.Pi;eg.prototype.registerRequestFilter=eg.prototype.ti;eg.unregisterScheme=function(a){delete hg[a]};
|
|
208
208
|
eg.registerScheme=fg;eg.prototype.setForceHTTPS=eg.prototype.Nf;eg.prototype.setForceHTTP=eg.prototype.Mf;function kg(){this.g=0}eg.NumBytesRemainingClass=kg;function lg(a,b,c){Tf.call(this,a,b);this.h=c}oa(lg,Tf);eg.PendingRequest=lg;var pg=1;eg.RequestType={MANIFEST:0,SEGMENT:pg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};eg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var gg=3;
|
|
209
|
-
eg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:gg};var hg={};function rg(a){this.g=!1;this.h=new Sf;this.i=a}rg.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 sg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function tg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function wg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function xg(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 yg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function zg(a,b){this.h=Eb(a);this.i=b==Ag;this.g=0}r=zg.prototype;r.ka=function(){return this.g<this.h.byteLength};r.wa=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.
|
|
209
|
+
eg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:gg};var hg={};function rg(a){this.g=!1;this.h=new Sf;this.i=a}rg.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 sg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function tg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function wg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function xg(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 yg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function zg(a,b){this.h=Eb(a);this.i=b==Ag;this.g=0}r=zg.prototype;r.ka=function(){return this.g<this.h.byteLength};r.wa=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.R=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Bg();}};r.ta=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Bg();}};r.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Bg();}};
|
|
210
210
|
r.Fg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Bg();}};r.Kc=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 Bg();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.vb=function(a){if(this.g+a>this.h.byteLength)throw Bg();var b=Ab(this.h,this.g,a);this.g+=a;return b};
|
|
211
211
|
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Bg();this.g+=a};r.Bi=function(a){if(this.g<a)throw Bg();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Bg();this.g=a};r.lc=function(){for(var a=this.g;this.ka()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Ab(this.h,a,this.g-a);this.g+=1;return kd(a)};function Bg(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",zg);zg.prototype.readTerminatedString=zg.prototype.lc;zg.prototype.seek=zg.prototype.seek;zg.prototype.rewind=zg.prototype.Bi;
|
|
212
|
-
zg.prototype.skip=zg.prototype.skip;zg.prototype.readBytes=zg.prototype.vb;zg.prototype.readUint64=zg.prototype.Kc;zg.prototype.readInt32=zg.prototype.Fg;zg.prototype.readUint32=zg.prototype.
|
|
213
|
-
r.Ic=function(a,b,c,d){var e=b.wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.
|
|
214
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function Hg(a){for(var b=Kg(a);a.reader.ka()&&!a.parser.g;)a.parser.Ic(a.start+b,a.reader,a.partialOkay)}function Lg(a){for(var b=Kg(a),c=a.reader.
|
|
212
|
+
zg.prototype.skip=zg.prototype.skip;zg.prototype.readBytes=zg.prototype.vb;zg.prototype.readUint64=zg.prototype.Kc;zg.prototype.readInt32=zg.prototype.Fg;zg.prototype.readUint32=zg.prototype.O;zg.prototype.readUint16=zg.prototype.ta;zg.prototype.readUint8=zg.prototype.R;zg.prototype.getLength=zg.prototype.getLength;zg.prototype.getPosition=zg.prototype.wa;zg.prototype.hasMoreData=zg.prototype.ka;var Ag=1;zg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ag};function Cg(){this.i=[];this.h=[];this.g=!1}r=Cg.prototype;r.box=function(a,b){a=Dg(a);this.i[a]=Eg;this.h[a]=b;return this};r.P=function(a,b){a=Dg(a);this.i[a]=Fg;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new zg(a,0);for(this.g=!1;a.ka()&&!this.g;)this.Ic(0,a,b,c)};
|
|
213
|
+
r.Ic=function(a,b,c,d){var e=b.wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=Gg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.wa()+8>b.getLength()){this.g=!0;return}f=b.Kc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Fg){if(d&&b.wa()+4>b.getLength()){this.g=!0;return}n=b.O();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.wa(),b=0<d?b.vb(d):new Uint8Array(0),b=new zg(b,0),l({name:h,parser:this,
|
|
214
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function Hg(a){for(var b=Kg(a);a.reader.ka()&&!a.parser.g;)a.parser.Ic(a.start+b,a.reader,a.partialOkay)}function Lg(a){for(var b=Kg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Ic(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Mg(a){var b=Kg(a);for(a.reader.skip(78);a.reader.ka()&&!a.parser.g;)a.parser.Ic(a.start+b,a.reader,a.partialOkay)}
|
|
215
215
|
function Ng(a){var b=Kg(a);a.reader.skip(8);var c=a.reader.ta();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.ka()&&!a.parser.g;)a.parser.Ic(a.start+b,a.reader,a.partialOkay)}function Og(a){return function(b){a(b.reader.vb(b.reader.getLength()-b.reader.wa()))}}function Dg(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 Gg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
216
|
-
function Kg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Cg);Cg.headerSize=Kg;Cg.typeToString=Gg;Cg.allData=Og;Cg.audioSampleEntry=Ng;Cg.visualSampleEntry=Mg;Cg.sampleDescription=Lg;Cg.children=Hg;Cg.prototype.parseNext=Cg.prototype.Ic;Cg.prototype.parse=Cg.prototype.parse;Cg.prototype.stop=Cg.prototype.stop;Cg.prototype.fullBox=Cg.prototype.
|
|
216
|
+
function Kg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Cg);Cg.headerSize=Kg;Cg.typeToString=Gg;Cg.allData=Og;Cg.audioSampleEntry=Ng;Cg.visualSampleEntry=Mg;Cg.sampleDescription=Lg;Cg.children=Hg;Cg.prototype.parseNext=Cg.prototype.Ic;Cg.prototype.parse=Cg.prototype.parse;Cg.prototype.stop=Cg.prototype.stop;Cg.prototype.fullBox=Cg.prototype.P;Cg.prototype.box=Cg.prototype.box;var Eg=0,Fg=1;function Pg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Cg).box("moov",Hg).box("moof",Hg).P("pssh",function(c){if(!(1<c.version)){var d=Ab(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Ad(c.reader.vb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=Ad(c.reader.vb(16));b.h.push(f)}}}}).parse(a)}
|
|
217
217
|
function Qg(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Eb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=zd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
218
218
|
@license
|
|
219
219
|
tXml
|
|
@@ -233,14 +233,14 @@ function jh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]
|
|
|
233
233
|
function ph(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
234
234
|
function qh(a){var b=[];a=ud(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,Kb:c.split("/@")[1]||null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Kb=c.slice(1))}return b}
|
|
235
235
|
function rh(a,b){var c=qh(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.Kb)?sh(a[c],e,d,$g(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}function sh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
236
|
-
function th(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&&th(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=th(b,!1,!0),d.appendChild(c);return d}var Vg=new Map([]);function uh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.fa=this.ca=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new Sf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.da=new Map;this.
|
|
237
|
-
function xh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.
|
|
238
|
-
function zh(a,b,c){a.fa=!0;a.A=new Map;a.
|
|
236
|
+
function th(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&&th(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=th(b,!1,!0),d.appendChild(c);return d}var Vg=new Map([]);function uh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.fa=this.ca=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new Sf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.da=new Map;this.M=new Lc(function(){return vh(b)});this.S=!1;this.N=[];this.V=!1;this.K=new Lc(function(){wh(b)});this.l.catch(function(){});this.j=new rg(function(){return xh(b)});this.ba=!1;this.F=this.G=null}r=uh.prototype;r.destroy=function(){return this.j.destroy()};
|
|
237
|
+
function xh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.M.stop(),a.M=null,E(b,yh(a),2);case 2:if(!a.m){b.u(3);break}ua(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:ya(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.ba=!1,a.G=null,F(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Va(this.h.updateExpirationTime)};
|
|
238
|
+
function zh(a,b,c){a.fa=!0;a.A=new Map;a.S=c;return Ah(a,b)}function Bh(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.S=0<a.A.size;return Ah(a,b)}
|
|
239
239
|
function Ch(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 Dh(a,g,[])}
|
|
240
240
|
function Ah(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z;return O(function(y){if(1==y.g){if(c=Eh(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=xg(a.h.servers),Fh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Gh(m),p=t(n),q=p.next();!q.done;q=p.next())u=q.value,k.add(u);v=t(k);for(q=v.next();!q.done;q=
|
|
241
|
-
v.next())w=q.value,Hh(w,xg(a.h.servers),xg(a.h.advanced||{}),a.h.keySystemsMapping);return E(y,Oe(b,a.
|
|
241
|
+
v.next())w=q.value,Hh(w,xg(a.h.servers),xg(a.h.advanced||{}),a.h.keySystemsMapping);return E(y,Oe(b,a.S,a.ba,a.h.preferredKeySystems),2)}A=g||Object.keys(a.h.servers).length;if(!A)return a.ca=!0,y.return(Promise.resolve());z=Dh(a,void 0,b);return y.return(g?z:z.catch(function(){}))})}
|
|
242
242
|
function Ih(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return E(c,a.G,3);case 3:return sg(a.j),c.return();case 2:return ua(c,4),a.G=a.m.setMediaKeys(a.s),E(c,a.G,6);case 6:wa(c,5);break;case 4:b=ya(c),a.o(new T(2,6,6003,b.message));case 5:sg(a.j),F(c)}})}function Jh(a,b){return O(function(c){if(1==c.g)return E(c,Ih(a),2);Kh(a,b.initDataType,Ab(b.initData));F(c)})}
|
|
243
|
-
r.wc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.qa(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.qa(b.m,"play",function(){for(var d=t(b.
|
|
243
|
+
r.wc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.qa(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.qa(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Lh(b,e.value);b.V=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return yh(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
|
|
244
244
|
b.A.size?E(c,Ih(b),2):c.u(2)}Mh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Jh(b,d)});F(c)})};
|
|
245
245
|
function Nh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=jg([a.g.serverCertificateUri],a.h.retryParameters);ua(g,3);c=a.C.Db.request(5,b);return E(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ab(d.data);wa(g,4);break;case 3:throw e=ya(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
246
246
|
ua(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=ya(g),new T(2,6,6004,f.message);}})}function Oh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Ph(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.fb=new Sf,d.push(e.fb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);F(f)})}
|
|
@@ -248,7 +248,7 @@ function Mh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return
|
|
|
248
248
|
function Kh(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(xb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Rh(a)&&(a.l.resolve(),a.l=new Sf,a.l.catch(function(){}));Sh(a,b,c,a.g.sessionType)}}function Th(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Uh(a){a=a.i.keys();a=tg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
249
249
|
r.cf=function(){var a=this,b=this.i.keys();b=tg(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)};r.jd=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};r.Td=function(){return yg(this.da)};
|
|
250
250
|
function Dh(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A;return O(function(z){switch(z.g){case 1:d=new Map;if(c.length){e=Vh(a,c,d);z.u(2);break}return E(z,Wh(a,b),3);case 3:e=z.h;case 2:f=e;if(!f)throw new T(2,6,6001);sg(a.j);ua(z,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.H.add(q.contentType.toLowerCase());if(c.length){var y=
|
|
251
|
-
f.keySystem;var B=d.get(f.keySystem);var C=[],D=[],J=[],K=[],H=[],I=new Set;Xh(B,C,D,K,J,H,I);var G=a.
|
|
251
|
+
f.keySystem;var B=d.get(f.keySystem);var C=[],D=[],J=[],K=[],H=[],I=new Set;Xh(B,C,D,K,J,H,I);var G=a.S?"persistent-license":"temporary";y={keySystem:y,encryptionScheme:C[0],licenseServerUri:D[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||G,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:K[0],serverCertificateUri:J[0],initData:H,keyIds:I};B=t(B);
|
|
252
252
|
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=[],J=[],K=[],H=[],I=new Set,Xh(y.drmInfos,C,D,K,J,H,I),B={keySystem:B,encryptionScheme:C[0],licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,
|
|
253
253
|
sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:K[0],serverCertificateUri:J[0],initData:H,keyIds:I};a.g=B;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return E(z,f.createMediaKeys(),6);case 6:u=z.h;sg(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){z.u(7);break}ua(z,8);return E(z,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
|
|
254
254
|
10);case 10:v=z.h;if("usable"!=v)throw new T(2,6,6018);sg(a.j);wa(z,7,4);break;case 8:w=ya(z,4);if(w instanceof T)throw w;throw new T(2,6,6019,w.message);case 7:return a.ca=!0,E(z,Nh(a),11);case 11:sg(a.j);wa(z,0);break;case 4:A=ya(z);sg(a.j,A);a.g=null;a.H.clear();if(A instanceof T)throw A;throw new T(2,6,6002,A.message);}})}
|
|
@@ -256,24 +256,24 @@ function Vh(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Gh(e.va
|
|
|
256
256
|
l.ze}}(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}
|
|
257
257
|
function Wh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:if(1==b.size&&b.has(""))throw new T(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){A.u(4);break}k=h.value;if(!b.has(k)){A.u(3);break}l=b.get(k);ua(A,6);return E(A,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
258
258
|
A.h,A.return(c);case 6:ya(A);case 7:sg(a.j);case 3:h=g.next();A.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){A.u(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();A.u(9);break}u=h.value;v=b.get(u);w=v.drmInfos.some(function(z){return!!z.licenseServerUri});if(w!=p){A.u(13);break}ua(A,15);return E(A,navigator.requestMediaKeySystemAccess(u,[v]),17);case 17:return c=A.h,A.return(c);case 15:ya(A);case 16:sg(a.j);case 13:h=q.next();A.u(12);break;case 11:return A.return(c)}})}
|
|
259
|
-
function Eh(a){a=xg(a.h.clearKeys);return 0==a.size?null:Fd(a)}function Yh(a){Rh(a)&&a.l.resolve()}function Zh(a,b){(new Lc(function(){b.loaded=!0;Yh(a)})).
|
|
260
|
-
function Ph(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.
|
|
259
|
+
function Eh(a){a=xg(a.h.clearKeys);return 0==a.size?null:Fd(a)}function Yh(a){Rh(a)&&a.l.resolve()}function Zh(a,b){(new Lc(function(){b.loaded=!0;Yh(a)})).W($h)}
|
|
260
|
+
function Ph(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.V?a.N.push(n):Lh(a,n)});a.B.D(d,"keystatuseschange",function(n){return ai(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,wf:Infinity,fb:null,type:"persistent-license"};a.i.set(d,f);ua(m,2);return E(m,
|
|
261
261
|
d.load(b),4);case 4:return g=m.h,sg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),Zh(a,f),Yh(a),m.return(d);case 2:k=ya(m),sg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(l,6,6005,k.message)),f.loaded=!0,Yh(a);case 3:return m.return(Promise.resolve())}})}
|
|
262
|
-
function Sh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.
|
|
262
|
+
function Sh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.V?a.N.push(f):Lh(a,f)});a.B.D(e,"keystatuseschange",function(f){return ai(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,wf:Infinity,fb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&xd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
263
263
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new T(2,6,6006,f.message,f,h))}})}
|
|
264
264
|
function Lh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&xd(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=jg([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]=
|
|
265
265
|
f.headers[h];if(Th(a.g.keySystem)){var A=ld(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Sg(A,"PlayReadyKeyMessage");var z=ah(A,"HttpHeader");z=t(z);for(var y=z.next();!y.done;y=z.next()){var B=y.value;y=ah(B,"name")[0];B=ah(B,"value")[0];g.headers[Zg(y)]=Zg(B)}A=ah(A,"Challenge")[0];g.body=yd(Zg(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();ua(w,2);m=a.C.Db.request(2,g);return E(w,m.promise,4);case 4:l=w.h;wa(w,3);break;case 2:n=ya(w);if(a.j.g)return w.return();
|
|
266
|
-
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.reject(p),a.i.delete(c),Rh(a)&&(a.l.resolve(),a.
|
|
266
|
+
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.reject(p),a.i.delete(c),Rh(a)&&(a.l.resolve(),a.M.W(.1)));return w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&xd(l.data);ua(w,5);return E(w,c.update(l.data),7);case 7:wa(w,6);break;case 5:return q=ya(w),u=new T(2,6,6008,q.message),a.o(u),d&&d.fb&&d.fb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.fb&&d.fb.resolve(),
|
|
267
267
|
Zh(a,d));F(w)}})}
|
|
268
268
|
function ai(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(Th(a.g.keySystem)&&16==g.byteLength&&(Qc()||cd())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Ad(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.fb&&(a.i.delete(b),b.close().catch(function(){}));Rh(a)&&
|
|
269
|
-
(a.l.resolve(),a.
|
|
269
|
+
(a.l.resolve(),a.M.W(bi))}function vh(a){var b=a.aa,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new T(2,6,6014));a.C.me(yg(c))}
|
|
270
270
|
function ci(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H;return O(function(I){if(1==I.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};
|
|
271
271
|
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(G,L){var M,N,P,R,Q,fa,sa,Ia;return O(function(xa){switch(xa.g){case 1:return ua(xa,2),E(xa,L.createMediaKeys(),4);case 4:wa(xa,3);break;case 2:return ya(xa),xa.return();case 3:N=
|
|
272
272
|
(M=L.getConfiguration().sessionTypes)?M.includes("persistent-license"):!1,Vc()&&(N=!1),P=L.getConfiguration().videoCapabilities,R=L.getConfiguration().audioCapabilities,Q={persistentState:N,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(G)&&k.get(G)?Q=k.get(G):k.set(G,Q),(fa=P[0].encryptionScheme)&&!Q.encryptionSchemes.includes(fa)&&Q.encryptionSchemes.push(fa),(sa=P[0].robustness)&&!Q.videoRobustnessLevels.includes(sa)&&Q.videoRobustnessLevels.push(sa),(Ia=R[0].robustness)&&
|
|
273
273
|
!Q.audioRobustnessLevels.includes(Ia)&&Q.audioRobustnessLevels.push(Ia),F(xa)}})};m=function(G,L,M,N){var P,R,Q,fa,sa,Ia,xa,Ja,Qa;return O(function(Ba){switch(Ba.g){case 1:ua(Ba,2);P=Ce(g);R=t(P.videoCapabilities);for(Q=R.next();!Q.done;Q=R.next())fa=Q.value,fa.encryptionScheme=L,fa.robustness=M;sa=t(P.audioCapabilities);for(Q=sa.next();!Q.done;Q=sa.next())Ia=Q.value,Ia.encryptionScheme=L,Ia.robustness=N;xa=Ce(P);xa.persistentState="required";xa.sessionTypes=["persistent-license"];Ja=[xa,P];return E(Ba,
|
|
274
274
|
navigator.requestMediaKeySystemAccess(G,Ja),4);case 4:return Qa=Ba.h,E(Ba,l(G,Qa),5);case 5:wa(Ba,0);break;case 2:ya(Ba),F(Ba)}})};n=function(G,L,M,N){var P,R,Q;return O(function(fa){switch(fa.g){case 1:return ua(fa,2),P={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:G,video:{encryptionScheme:L,robustness:M},audio:{encryptionScheme:L,robustness:N}}},
|
|
275
275
|
E(fa,navigator.mediaCapabilities.decodingInfo(P),4);case 4:return R=fa.h,Q=R.keySystemAccess,E(fa,l(G,Q),5);case 5:wa(fa,0);break;case 2:ya(fa),F(fa)}})};p=t(a);for(q=p.next();!q.done;q=p.next())u=q.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),q=y.next();!q.done;q=y.next())B=q.value,"org.w3.clearkey"===B&&fd()||(v.push(m(B,z,"","")),v.push(n(B,z,"","")));C=t(a);for(q=C.next();!q.done;q=C.next())for(D=q.value,J=t(d[D]||[]),K=J.next();!K.done;K=J.next())H=K.value,
|
|
276
|
-
v.push(m(D,null,H,"")),v.push(m(D,null,"",H)),v.push(n(D,null,H,"")),v.push(n(D,null,"",H));return E(I,Promise.all(v),2)}return I.return(yg(k))})}function di(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Lc(e)).
|
|
276
|
+
v.push(m(D,null,H,"")),v.push(m(D,null,"",H)),v.push(n(D,null,H,"")),v.push(n(D,null,"",H));return E(I,Promise.all(v),2)}return I.return(yg(k))})}function di(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Lc(e)).W(ei)}),ua(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);ya(c);F(c)})}
|
|
277
277
|
function yh(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 ua(g,2),a.fa||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,di(e),5):E(g,e.remove(),5);if(2!=g.g)return wa(g,0);ya(g);F(g)})})),0)})}function fi(a,b){return a.length&&b.length&&a!==b?0<gi(a,b).length:!0}
|
|
278
278
|
function gi(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||
|
|
279
279
|
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}
|
|
@@ -292,18 +292,18 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
292
292
|
function ji(a,b,c){this.h=a;this.i=b;this.g=c}function ki(a,b){return O(function(c){if(1==c.g)return E(c,Ke(a.g,b,a.h.drm.preferredKeySystems),2);Fe(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(kf))throw new T(2,4,4032);return c.return(li(a,b))})}
|
|
293
293
|
function li(a,b){var c=Je(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,mi(a,d.keySystem,f.video),mi(a,d.keySystem,f.audio);ni(a,b)}return c}function mi(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,Kh(a.g,e.initDataType,e.initData)}}}
|
|
294
294
|
function ni(a,b){a=a.g?a.g.Td():{};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?oi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
295
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var oi=["output-restricted","internal-error"];function pi(){}function qi(a,b){if(b){var c=ri[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",pi);pi.unregisterParserByMime=function(a){delete ri[a]};pi.registerParserByMime=function(a,b){ri[a]=b};pi.registerParserByExtension=function(){qb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};pi.AccessibilityPurpose={Nj:"visually impaired",hj:"hard of hearing"};var ri={};function si(a){function
|
|
296
|
-
function(l){
|
|
297
|
-
a=ti(a,
|
|
295
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var oi=["output-restricted","internal-error"];function pi(){}function qi(a,b){if(b){var c=ri[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",pi);pi.unregisterParserByMime=function(a){delete ri[a]};pi.registerParserByMime=function(a,b){ri[a]=b};pi.registerParserByExtension=function(){qb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};pi.AccessibilityPurpose={Nj:"visually impaired",hj:"hard of hearing"};var ri={};function si(a,b){function c(){e=!0}function d(l){g.push(l);Hg(l)}a=Ab(a);var e=!1,f,g=[],h=[];(new Cg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).P("stsd",function(l){f=l;g.push(l);Lg(l)}).P("encv",c).P("enca",c).P("dvav",function(l){h.push({box:l,cb:1701733238})}).P("dva1",function(l){h.push({box:l,cb:1701733238})}).P("dvh1",function(l){h.push({box:l,cb:1701733238})}).P("dvhe",function(l){h.push({box:l,cb:1701733238})}).P("hev1",function(l){h.push({box:l,cb:1701733238})}).P("hvc1",
|
|
296
|
+
function(l){h.push({box:l,cb:1701733238})}).P("avc1",function(l){h.push({box:l,cb:1701733238})}).P("avc3",function(l){h.push({box:l,cb:1701733238})}).P("ac-3",function(l){h.push({box:l,cb:1701733217})}).P("ec-3",function(l){h.push({box:l,cb:1701733217})}).P("ac-4",function(l){h.push({box:l,cb:1701733217})}).P("mp4a",function(l){h.push({box:l,cb:1701733217})}).parse(a);if(e)return a;if(0==h.length||!f)throw fb(Ad(a)),new T(2,3,3019,b);h.reverse();b=t(h);for(var k=b.next();!k.done;k=b.next())k=k.value,
|
|
297
|
+
a=ti(a,f,k.box,g,k.cb);return a}
|
|
298
298
|
function ti(a,b,c,d,e){var f=ui.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);yi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Sc()?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,yi(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Kg(b);a=k.getUint32(b);
|
|
299
|
-
k.setUint32(b,a+1);return e}function yi(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var ui=new Jc(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 zi(a,b,c,d,e,f,g){this
|
|
299
|
+
k.setUint32(b,a+1);return e}function yi(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var ui=new Jc(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 zi(a,b,c,d,e,f,g){this.L=a;this.Ba=b;this.ja=c;this.tf=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}zi.prototype.ec=function(){return this.Ba};zi.prototype.bc=function(){return this.ja};zi.prototype.ld=function(){return this.g};function Ai(a,b){return a===b?!0:a&&b?a.ec()==b.ec()&&a.bc()==b.bc()&&Mb(a.L().sort(),b.L().sort())&&xb(a.ld(),b.ld()):a==b}S("shaka.media.InitSegmentReference",zi);
|
|
300
300
|
zi.prototype.getEndByte=zi.prototype.bc;zi.prototype.getStartByte=zi.prototype.ec;
|
|
301
301
|
function Bi(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v){l=void 0===l?[]:l;q=void 0===q?Ci:q;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Ba=d;this.ja=e;this.ea=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=q;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.s=null;this.j=0;this.o=void 0===v?!1:v;this.be=this.wd=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
302
|
-
a.next())b.value.Bg();this.o&&this.g.length&&this.g[this.g.length-1].Ag();this.B=this.mimeType=this.codecs=null}r=Bi.prototype;r
|
|
302
|
+
a.next())b.value.Bg();this.o&&this.g.length&&this.g[this.g.length-1].Ag();this.B=this.mimeType=this.codecs=null}r=Bi.prototype;r.L=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.zh=function(){return this.endTime};r.ec=function(){return this.Ba};r.bc=function(){return this.ja};r.Rh=function(){return this.tilesLayout};r.Qh=function(){return this.A};r.fc=function(){return this.status};r.ii=function(){this.status=Di};r.rf=function(){this.preload=!0};r.ci=function(){return this.preload};
|
|
303
303
|
r.ee=function(){this.l=!1};r.$h=function(){return this.l};r.Bg=function(){this.wd=!0};r.bi=function(){return this.wd};r.Ag=function(){this.be=!0};r.ai=function(){return this.be};r.zg=function(){this.m=!0};r.Xh=function(){return this.m};r.Rg=function(a){this.s=a};r.Ph=function(){return this.s};r.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};
|
|
304
304
|
r.Qf=function(a){null==this.h?$a("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.Mi=function(a){this.B=a};r.ld=function(){return this.B};function Ei(a,b){a.ea=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ei(c.value,b)}S("shaka.media.SegmentReference",Bi);Bi.prototype.getSegmentData=Bi.prototype.ld;Bi.prototype.setSegmentData=Bi.prototype.Mi;Bi.prototype.syncAgainst=Bi.prototype.Qf;Bi.prototype.offset=Bi.prototype.offset;
|
|
305
305
|
Bi.prototype.getThumbnailSprite=Bi.prototype.Ph;Bi.prototype.setThumbnailSprite=Bi.prototype.Rg;Bi.prototype.hasByterangeOptimization=Bi.prototype.Xh;Bi.prototype.markAsByterangeOptimization=Bi.prototype.zg;Bi.prototype.isLastPartial=Bi.prototype.ai;Bi.prototype.markAsLastPartial=Bi.prototype.Ag;Bi.prototype.isPartial=Bi.prototype.bi;Bi.prototype.markAsPartial=Bi.prototype.Bg;Bi.prototype.isIndependent=Bi.prototype.$h;Bi.prototype.markAsNonIndependent=Bi.prototype.ee;Bi.prototype.isPreload=Bi.prototype.ci;
|
|
306
|
-
Bi.prototype.markAsPreload=Bi.prototype.rf;Bi.prototype.markAsUnavailable=Bi.prototype.ii;Bi.prototype.getStatus=Bi.prototype.fc;Bi.prototype.getTileDuration=Bi.prototype.Qh;Bi.prototype.getTilesLayout=Bi.prototype.Rh;Bi.prototype.getEndByte=Bi.prototype.bc;Bi.prototype.getStartByte=Bi.prototype.ec;Bi.prototype.getEndTime=Bi.prototype.zh;Bi.prototype.getStartTime=Bi.prototype.getStartTime;Bi.prototype.getUris=Bi.prototype
|
|
306
|
+
Bi.prototype.markAsPreload=Bi.prototype.rf;Bi.prototype.markAsUnavailable=Bi.prototype.ii;Bi.prototype.getStatus=Bi.prototype.fc;Bi.prototype.getTileDuration=Bi.prototype.Qh;Bi.prototype.getTilesLayout=Bi.prototype.Rh;Bi.prototype.getEndByte=Bi.prototype.bc;Bi.prototype.getStartByte=Bi.prototype.ec;Bi.prototype.getEndTime=Bi.prototype.zh;Bi.prototype.getStartTime=Bi.prototype.getStartTime;Bi.prototype.getUris=Bi.prototype.L;var Ci=0,Di=1;Bi.Status={Vi:Ci,Lj:Di,nj:2};function Fi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Gi(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 Hi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Ii(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}
|
|
307
307
|
function Ji(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ii(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ii(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};/*
|
|
308
308
|
@license
|
|
309
309
|
Shaka Player
|
|
@@ -315,9 +315,9 @@ function Oi(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
315
315
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=kd(Ab(a.data,1,d));a=kd(Ab(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=kd(Ab(a.data,1,d));a=kd(Ab(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=kd(Ab(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
316
316
|
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=Bb(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=kd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=kd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Bb(a.data),b):null}
|
|
317
317
|
function Pi(a){for(var b=0,c=[];Li(a,b);){var d=Ni(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=Ni(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Oi(e))&&c.push(f);b+=e.size+10}Mi(a,b)&&(b+=10)}return c}function Qi(a,b){for(var c=b=void 0===b?0:b,d=0;Li(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ni(a,b+6),Mi(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Ki);Ki.getID3Data=Qi;
|
|
318
|
-
Ki.getID3Frames=Pi;function Ri(a,b){var c=null,d=null,e=null,f=a.
|
|
319
|
-
function Ui(a,b,c){var d=a.
|
|
320
|
-
function Vi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.
|
|
318
|
+
Ki.getID3Frames=Pi;function Ri(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Kc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,jg:c,th:d,Pj:e}}function Si(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Ti(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ta();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
319
|
+
function Ui(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Gf:null,sampleSize:null,re:null};c&256&&(h.Gf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.re=0==b?a.O():a.Fg());e.push(h)}return{Tj:d,Ig:e,sh:f}}
|
|
320
|
+
function Vi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.O();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.ta()+a.ta()/16;a=a.ta()+a.ta()/16;return{trackId:c,width:b,height:a}}function Wi(a){a=a.O();return{Ia:Gg(a)}}function Xi(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Yi(a){return(10>a?"0":"")+a};/*
|
|
321
321
|
|
|
322
322
|
Copyright Brightcove, Inc.
|
|
323
323
|
|
|
@@ -333,7 +333,7 @@ function Vi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.N();1=
|
|
|
333
333
|
See the License for the specific language governing permissions and
|
|
334
334
|
limitations under the License.
|
|
335
335
|
*/
|
|
336
|
-
function Zi(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=Ab(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function $i(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 zg(c,0)).
|
|
336
|
+
function Zi(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=Ab(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function $i(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 zg(c,0)).O(),a.g=8*d,a.i-=d)}function aj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;$i(a)}a.h<<=b;a.g-=b}
|
|
337
337
|
function bj(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&&$i(a);c=b-c;return 0<c?d<<c|bj(a,c):d}function cj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;$i(a);return b+cj(a)}function dj(a){aj(a,1+cj(a))}function V(a){var b=cj(a);return bj(a,b+1)-1}function ej(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===bj(a,1)}function mj(a){return bj(a,8)}
|
|
338
338
|
function nj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=ej(a),d=(c+d+256)%256),c=0===d?c:d}function oj(a){mj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",Zi);function pj(){this.G=null;this.H=!1;this.m=this.J=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}r=pj.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
339
339
|
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,qj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Zd:-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<
|
|
@@ -356,43 +356,44 @@ function tj(a){var b={height:null,width:null,Ia:null};a=a.Xd();if(!a.length)retu
|
|
|
356
356
|
a.toString(16).toUpperCase());b.Ia=e;return b}function sj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function wj(a){return 0>qj(a)?!1:!0}function qj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",pj);pj.syncOffset=qj;pj.probe=wj;pj.prototype.getVideoInfo=pj.prototype.gf;pj.prototype.getVideoResolution=pj.prototype.Uh;pj.prototype.getVideoNalus=pj.prototype.Xd;
|
|
357
357
|
pj.prototype.getCodecs=pj.prototype.hd;pj.prototype.getStartTime=pj.prototype.getStartTime;pj.prototype.getVideoData=pj.prototype.Dc;pj.prototype.getAudioData=pj.prototype.Lb;pj.prototype.getMetadata=pj.prototype.getMetadata;pj.prototype.parseNalus=pj.prototype.zf;pj.prototype.parseAvcNalus=pj.prototype.oi;pj.prototype.parse=pj.prototype.parse;pj.prototype.clearData=pj.prototype.clearData;pj.Timescale=9E4;var vj=[100,110,122,244,44,83,86,118,128,138,139,134];function xj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&ab("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,qb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ab("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(ab("Could not find LCEVC Library on this page"),
|
|
358
358
|
a=!1):(this.h.SupportObject.SupportStatus||ab(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 yj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
359
|
-
xj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function zj(a,b,c){var d=Aj,e=Bj;switch(b.mimeType){case "video/webm":d=Cj;break;case "video/mp4":d=Dj}switch(c){case "DASH":e=Ej;break;case "HLS":e=Fj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",xj);xj.prototype.release=xj.prototype.release;var Aj=0,Cj=1,Dj=2,Fj=0,Ej=1,Bj=-1;function Gj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.na={};this.g=null;this.ba=!1;this.ua=c||function(){};this.
|
|
360
|
-
function Hj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.da=!0});a.o.D(c,"endstreaming",function(){a.da=!1});a.o.qa(c,"sourceopen",function(){URL.revokeObjectURL(a.
|
|
361
|
-
function Kj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(q){if(1==q.g)return a.createSegmentIndex?E(q,a.createSegmentIndex(),2):q.u(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=Nd;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.ma){if(m=Pd(h,k),!he(m))return q.return(!1)}else if(b==c.ga?k=Re(k):b==c.
|
|
359
|
+
xj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function zj(a,b,c){var d=Aj,e=Bj;switch(b.mimeType){case "video/webm":d=Cj;break;case "video/mp4":d=Dj}switch(c){case "DASH":e=Ej;break;case "HLS":e=Fj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",xj);xj.prototype.release=xj.prototype.release;var Aj=0,Cj=1,Dj=2,Fj=0,Ej=1,Bj=-1;function Gj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.na={};this.g=null;this.ba=!1;this.ua=c||function(){};this.S=d||null;this.j={};this.o=new hb;this.m={};this.H=null;this.M=new Sf;this.N="";this.ca=!1;this.l=Hj(this,this.M);this.C=!1;this.J=new rg(function(){return Ij(e)});this.B=!1;this.aa="UNKNOWN";this.za=this.oa=!1;this.fa=new Sf;this.s=!1;this.da=!0;this.K=this.V=null}
|
|
360
|
+
function Hj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.da=!0});a.o.D(c,"endstreaming",function(){a.da=!1});a.o.qa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.qa(a.i,"playing",function(){a.ca=!0});a.N=Jj(c);a.i.src=a.N;return c}c=new MediaSource;a.o.qa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.qa(a.i,"playing",function(){a.ca=!0});a.N=Jj(c);a.i.src=a.N;return c}
|
|
361
|
+
function Kj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(q){if(1==q.g)return a.createSegmentIndex?E(q,a.createSegmentIndex(),2):q.u(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=Nd;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.ma){if(m=Pd(h,k),!he(m))return q.return(!1)}else if(b==c.ga?k=Re(k):b==c.U&&(k=Se(k,h)),n=
|
|
362
362
|
Td(a,h,k),p=Rd(h,k),!mb(n)&&!lc(p))return q.return(!1);return q.return(!0)})}r=Gj.prototype;r.destroy=function(){return this.J.destroy()};
|
|
363
363
|
function Ij(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(qe)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.m)b.push(a.m[k].destroy());return E(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.F=null;a.h={};a.m={};a.H=null;
|
|
364
|
-
a.j={};a.
|
|
365
|
-
function Lj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v;return O(function(w){switch(w.g){case 1:return e=Nd,f=Sa,g=Ta,E(w,Kj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Pd(c.mimeType,d);if(b==e.ma){Mj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&Qd.includes(h))k=!0;l=Rd(c.mimeType,d);if(!k){w.u(4);break}m=Jd(e.
|
|
366
|
-
Lj(a,e.ga,c,n),7);case 7:return w.return();case 5:if(p=lc(l))q=p(),a.m[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);sg(a.J);try{v=a.l.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");}a.B&&(v.mode=Nj);a.o.D(v,"error",function(){a.j[b][0].p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0))});a.o.D(v,"updateend",function(){return Oj(a,b)});a.h[b]=v;a.G[b]=h;a.na[b]=!!c.drmInfos.length;
|
|
367
|
-
r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
364
|
+
a.j={};a.S=null;a.K=null;F(l)})}r.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=Nd,E(m,e.M,2);case 2:e.B=b,e.aa=c,e.oa=d,e.za=!e.B&&"HLS"==e.aa&&!e.oa,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return E(m,Lj(e,k,l,l.codecs),6);case 6:e.s?(e.j[f.U]=[],e.j[f.ga]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
|
|
365
|
+
function Lj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v;return O(function(w){switch(w.g){case 1:return e=Nd,f=Sa,g=Ta,E(w,Kj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Pd(c.mimeType,d);if(b==e.ma){Mj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&Qd.includes(h))k=!0;l=Rd(c.mimeType,d);if(!k){w.u(4);break}m=Jd(e.U,(d||"").split(","));n=Jd(e.ga,(d||"").split(","));if(!m||!n){w.u(5);break}a.s=!0;return E(w,Lj(a,e.U,c,m),6);case 6:return E(w,
|
|
366
|
+
Lj(a,e.ga,c,n),7);case 7:return w.return();case 5:if(p=lc(l))q=p(),a.m[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);sg(a.J);try{v=a.l.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.l.readyState+" expected 'open'",null);}a.B&&(v.mode=Nj);a.o.D(v,"error",function(){var A=a.j[b][0];A.p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.o.D(v,"updateend",function(){return Oj(a,b)});a.h[b]=v;a.G[b]=h;a.na[b]=!!c.drmInfos.length;
|
|
367
|
+
F(w)}})}r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
368
368
|
function Mj(a,b,c,d){a.g||(a.g=new ge(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ba;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,ie[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):qb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):qb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
369
369
|
function Pj(a){return a.C?!1:a.l?"ended"==a.l.readyState:!0}function Qj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Ld?a=a.g.g:(a=Rj(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 Sj(a,b){return a.C?null:b==Ld?a.g.h:Fi(Rj(a,b))}function Tj(a,b,c){if(a.C)return 0;if(b==Ld)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Rj(a,b);return Hi(a,c)}
|
|
370
370
|
r.rb=function(){var a={total:this.C?[]:Ii(this.i.buffered),audio:this.C?[]:Ii(Rj(this,"audio")),video:this.C?[]:Ii(Rj(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 Rj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
371
|
-
function Uj(a,b,c,d,e,f){var g=null,h=Ab(c);if(Qd.includes(e))f=Pi(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.ua([{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.ea&&d.ea.timescale){var k=d.ea.timescale;if(!isNaN(k)){var l=0,m=!1;(new Cg).box("moof",Hg).box("traf",Hg).
|
|
371
|
+
function Uj(a,b,c,d,e,f){var g=null,h=Ab(c);if(Qd.includes(e))f=Pi(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.ua([{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.ea&&d.ea.timescale){var k=d.ea.timescale;if(!isNaN(k)){var l=0,m=!1;(new Cg).box("moof",Hg).box("traf",Hg).P("tfdt",function(n){l=Si(n.reader,
|
|
372
372
|
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!wj(h)||(a.K?a.K.clearData():a.K=new pj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ua(h,f,d?d.endTime:null));return g}
|
|
373
|
-
function Vj(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,q,u,v,w,A,z,y,B;return O(function(C){switch(C.g){case 1:m=Nd;if(b!=m.ma){C.u(2);break}if(!a.B){C.u(3);break}return E(C,a.fa,4);case 4:n=C.h,a.g.s=n;case 3:return E(C,je(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d
|
|
374
|
-
case 6:if(!a.h[b])return C.return();p=a.h[b].timestampOffset;q=a.G[b];a.m[b]&&(q=a.m[b].getOriginalMimeType());d&&(u=Uj(a,b,c,d,q,p),null!=u&&(v=d.startTime-u,w=Math.abs(p-v),(.001<=w||g||h)&&(!k||0<v||!p)&&(p=v,a.za&&(Wj(a,b,function(){return Xj(a,b)}),Wj(a,b,function(){return Yj(a,b,p)}))),A=b==m.ga||!(m.ga in a.h),a.B&&A&&a.fa.resolve(p)));f&&b==m.ga&&(a.g||Mj(a,"application/cea-608",a.B,!1),a.H||(z=q.split(";",1)[0],a.H=new Gb(z)),d?(y=a.H.i(c),y.length&&oe(a.g,y,d.startTime,d.endTime,
|
|
375
|
-
h));if(!a.m[b]){C.u(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=Zj(a,c,d?d.startTime:null,b),d&&a.B&&b!=m.ma&&(g||h)&&(B=d.startTime,Wj(a,b,function(){return Xj(a,b)}),Wj(a,b,function(){return Yj(a,b,B)})),E(C,Wj(a,b,function(){var D=c;if("video"==b&&a.
|
|
376
|
-
r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Nd,a==e.ma?E(f,d.g.remove(b,c),0):E(f,Wj(d,a,function(){return ck(d,a,b,c)}),4)):d.s?E(f,Wj(d,e.
|
|
377
|
-
r.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Nd,a==c.ma?d.return():E(d,Wj(b,a,function(){b.i.currentTime-=.001;Oj(b,a)}),2)):b.s?E(d,Wj(b,c.
|
|
378
|
-
function ek(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Nd;if(b==l.ma)return f||(a.g.s=c),le(a.g,d,e),p.return();m=[];return E(p,fk(a,b,g,h,k),2)}n=p.h;n||(m.push(Wj(a,b,function(){return Xj(a,b)})),a.s&&m.push(Wj(a,l.
|
|
379
|
-
l.
|
|
380
|
-
|
|
381
|
-
function
|
|
382
|
-
function
|
|
383
|
-
|
|
384
|
-
function
|
|
373
|
+
function Vj(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,q,u,v,w,A,z,y,B;return O(function(C){switch(C.g){case 1:m=Nd;if(b!=m.ma){C.u(2);break}if(!a.B){C.u(3);break}return E(C,a.fa,4);case 4:n=C.h,a.g.s=n;case 3:return E(C,je(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.L()[0]:null),5);case 5:return C.return();case 2:if(l||!a.s){C.u(6);break}return E(C,Vj(a,m.U,c,d,e,f,g,h,k,!0),7);case 7:return E(C,Vj(a,m.ga,c,d,e,f,g,h,k,!0),8);case 8:return C.return();
|
|
374
|
+
case 6:if(!a.h[b])return C.return();p=a.h[b].timestampOffset;q=a.G[b];a.m[b]&&(q=a.m[b].getOriginalMimeType());d&&(u=Uj(a,b,c,d,q,p),null!=u&&(v=d.startTime-u,w=Math.abs(p-v),(.001<=w||g||h)&&(!k||0<v||!p)&&(p=v,a.za&&(Wj(a,b,function(){return Xj(a,b)},null),Wj(a,b,function(){return Yj(a,b,p)},null))),A=b==m.ga||!(m.ga in a.h),a.B&&A&&a.fa.resolve(p)));f&&b==m.ga&&(a.g||Mj(a,"application/cea-608",a.B,!1),a.H||(z=q.split(";",1)[0],a.H=new Gb(z)),d?(y=a.H.i(c),y.length&&oe(a.g,y,d.startTime,d.endTime,
|
|
375
|
+
p)):a.H.init(c,h));if(!a.m[b]){C.u(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=Zj(a,c,d?d.startTime:null,b,d?d.L()[0]:null),d&&a.B&&b!=m.ma&&(g||h)&&(B=d.startTime,Wj(a,b,function(){return Xj(a,b)},null),Wj(a,b,function(){return Yj(a,b,B)},null)),E(C,Wj(a,b,function(){var D=c;if("video"==b&&a.S){var J=a.S;J.g&&J.g.appendBuffer(D,"video",J.o,-p)}a.h[b].appendBuffer(D)},d?d.L()[0]:null),11);case 11:F(C)}})}
|
|
376
|
+
function ak(a,b){var c=Sj(a,"video")||0;me(a.g,b,c)}function bk(a){a.g&&me(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Nd,a==e.ma?E(f,d.g.remove(b,c),0):E(f,Wj(d,a,function(){return ck(d,a,b,c)},null),4)):d.s?E(f,Wj(d,e.U,function(){return ck(d,e.U,b,c)},null),0):f.u(0)})};
|
|
377
|
+
function dk(a,b){var c;return O(function(d){return 1==d.g?(c=Nd,b==c.ma?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,Wj(a,b,function(){return ck(a,b,0,a.l.duration)},null),4)):a.s?E(d,Wj(a,c.U,function(){return ck(a,c.U,0,a.l.duration)},null),0):d.u(0)})}r.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Nd,a==c.ma?d.return():E(d,Wj(b,a,function(){b.i.currentTime-=.001;Oj(b,a)},null),2)):b.s?E(d,Wj(b,c.U,function(){var e=c.U;b.i.currentTime-=.001;Oj(b,e)},null),0):d.u(0)})};
|
|
378
|
+
function ek(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Nd;if(b==l.ma)return f||(a.g.s=c),le(a.g,d,e),p.return();m=[];return E(p,fk(a,b,g,h,k),2)}n=p.h;n||(m.push(Wj(a,b,function(){return Xj(a,b)},null)),a.s&&m.push(Wj(a,l.U,function(){return Xj(a,l.U)},null)));f||(m.push(Wj(a,b,function(){return Yj(a,b,c)},null)),a.s&&m.push(Wj(a,l.U,function(){return Yj(a,l.U,c)},null)));m.push(Wj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Oj(a,
|
|
379
|
+
b)},null));a.s&&m.push(Wj(a,l.U,function(){var q=l.U;a.h[q].appendWindowStart=0;a.h[q].appendWindowEnd=e;a.h[q].appendWindowStart=d;Oj(a,q)},null));return E(p,Promise.all(m),0)})}
|
|
380
|
+
function gk(a,b,c){var d;return O(function(e){if(1==e.g){d=Nd;if(b==d.ma)return e.return();b==d.ga&&(a.fa=new Sf);Wj(a,b,function(){return Xj(a,b)},null);a.s&&Wj(a,d.U,function(){return Xj(a,d.U)},null);return E(e,Wj(a,b,function(){return Yj(a,b,c)},null),2)}return a.s?E(e,Wj(a,d.U,function(){return Yj(a,d.U,c)},null),0):e.u(0)})}r.endOfStream=function(a){var b=this;return O(function(c){return E(c,hk(b,function(){Pj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};
|
|
381
|
+
r.Ua=function(a){var b=this;return O(function(c){return E(c,hk(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Sf,uri:null};b.j[d].unshift(e)}b.l.duration=a;b.V=a}),0)})};r.getDuration=function(){return this.l.duration};function ck(a,b,c,d){d<=c?Oj(a,b):a.h[b].remove(c,d)}function Xj(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;Oj(a,b)}
|
|
382
|
+
function Yj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Oj(a,b)}function Oj(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),ik(a,b))}}function Wj(a,b,c,d){sg(a.J);c={start:c,p:new Sf,uri:d};a.j[b].push(c);1==a.j[b].length&&jk(a,b);return c.p}
|
|
383
|
+
function hk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:sg(a.J);c=[];d={};for(e in a.h)d.Uc=new Sf,f={start:function(m){return function(){return m.Uc.resolve()}}(d),p:d.Uc,uri:null},a.j[e].push(f),c.push(d.Uc),1==a.j[e].length&&f.start(),d={Uc:d.Uc};ua(l,2);return E(l,Promise.all(c),4);case 4:wa(l,3);break;case 2:throw g=ya(l),g;case 3:return ua(l,5,6),E(l,b(),6);case 6:za(l);for(h in a.h)ik(a,h);Aa(l,0);break;case 5:throw k=ya(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
|
|
384
|
+
null);}})}function ik(a,b){a.j[b].shift();jk(a,b)}function jk(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),ik(a,b)}}function Zj(a,b,c,d,e){var f=a.na[d];a.A.insertFakeEncryptionInInit&&null==c&&f&&(Uc()||Sc()||bd())&&"mp4"==Vd(a.G[d])&&(b=si(b,e));return b}
|
|
385
|
+
function kk(a,b,c,d){return Wj(a,b,function(){b!==Ld&&(ob()&&(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.G[b]=c),Oj(a,b))},null)}
|
|
385
386
|
function lk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H;return O(function(I){switch(I.g){case 1:c=Nd;a.C=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.ca&&(a.i.autoplay=!1);va(I,2);a.o.nb();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(qe)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())q=p.value,q.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.l.removeSourceBuffer(v)}catch(G){}}return E(I,
|
|
386
|
-
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.
|
|
387
|
+
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.M=new Sf,a.l=Hj(a,a.M),E(I,a.M,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.V)&&a.V&&(a.l.duration=a.V),A=new Sf,z=a.l.sourceBuffers,y=b.size,B=0,C=function(){B++;B===y&&(A.resolve(),a.o.Hb(z,"addsourcebuffer",C))},a.o.D(z,"addsourcebuffer",C),D=t(b.keys()),J=D.next();case 6:if(J.done)return a.i.currentTime=d,E(I,A,2);K=J.value;H=b.get(K);return E(I,Lj(a,K,H,H.codecs),9);case 9:a.s?(a.j[c.U]=[],a.j[c.ga]=[]):a.j[K]=[];J=D.next();I.u(6);
|
|
387
388
|
break;case 2:za(I),a.C=!1,sg(a.J),a.o.qa(a.i,"canplaythrough",function(){a.J.g||(a.i.autoplay=e,f||a.i.play())}),Aa(I,0)}})}function mk(a,b){return hk(a,function(){return lk(a,b)})}
|
|
388
|
-
function fk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,z,y;return O(function(B){if(1==B.g){f=Nd;if(b==f.ma)return B.return(!1);g=Yd($d(a.G[b]));h=Zd(a.G[b]);l=!1;m=Pd(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&Qd.includes(m))n=!0;n&&(p=Rd(c,d),q=lc(p))&&(k=q(),u=Jd(f.
|
|
389
|
+
function fk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,z,y;return O(function(B){if(1==B.g){f=Nd;if(b==f.ma)return B.return(!1);g=Yd($d(a.G[b]));h=Zd(a.G[b]);l=!1;m=Pd(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&Qd.includes(m))n=!0;n&&(p=Rd(c,d),q=lc(p))&&(k=q(),u=Jd(f.U,(d||"").split(",")),v=Jd(f.ga,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.U&&(w=u),m=k.convertCodecs(b,Rd(c,w))):m=k.convertCodecs(b,p));A=Yd($d(m));z=Zd(m);if(g===A&&h===z)return B.return(!1);y=!0;if(a.s||l&&k&&!a.m[b])y=!1;if(y&&"smooth"===
|
|
389
390
|
a.A.codecSwitchingStrategy&&ob())return E(B,kk(a,b,m,k),3);k&&k.destroy();return E(B,mk(a,e),3)}return B.return(!0)})}function nk(a,b,c,d){if(b==Ld)var e=!1;else{e=Yd($d(a.G[b]));var f=Zd(a.G[b]),g=Pd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Qd.includes(g))h=!0;c=Rd(c,d);h&&(h=lc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Yd($d(g));g=Zd(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.s:!1}var Jj=window.URL.createObjectURL,Nj="sequence";function ok(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=null}r=ok.prototype;r.getDuration=function(){return this.j};r.Fh=function(){return this.g};r.Pg=function(a){this.i=a};r.Ua=function(a){this.j=a};r.Kh=function(){return this.i};r.Ng=function(a){this.A=a};r.oc=function(a){this.F=a};r.te=function(a){this.m=a};r.Wd=function(){return this.m};r.Lf=function(a){this.s=a};r.yh=function(){return this.s};
|
|
390
391
|
r.Eg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.ke(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.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
391
392
|
r.vd=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.ke(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.ce=function(){this.o=!0};r.di=function(){return this.o};r.Og=function(a){this.B=a};r.Ch=function(){return this.B};
|
|
392
|
-
r.ke=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.uf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.
|
|
393
|
-
r.Mb=function(){return this.
|
|
393
|
+
r.ke=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.uf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.T=function(){return Infinity==this.j&&!this.F};r.ic=function(){return Infinity!=this.j&&!this.F};r.jb=function(){return Math.max(this.G,this.Mb()-this.m)};r.Tg=function(a){this.G=a};
|
|
394
|
+
r.Mb=function(){return this.T()||this.ic()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};r.kd=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Mb()-this.m+a,this.sb()))};r.dc=function(){return this.kd(0)};r.sb=function(){return Math.max(0,this.Mb()-(this.T()||this.ic()?this.s:0))};r.Xg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
|
|
394
395
|
r.Mg=function(a){this.H=a};S("shaka.media.PresentationTimeline",ok);ok.prototype.setAvailabilityTimeOffset=ok.prototype.Mg;ok.prototype.usingPresentationStartTime=ok.prototype.Xg;ok.prototype.getSeekRangeEnd=ok.prototype.sb;ok.prototype.getSeekRangeStart=ok.prototype.dc;ok.prototype.getSafeSeekRangeStart=ok.prototype.kd;ok.prototype.getSegmentAvailabilityEnd=ok.prototype.Mb;ok.prototype.setUserSeekStart=ok.prototype.Tg;ok.prototype.getSegmentAvailabilityStart=ok.prototype.jb;
|
|
395
|
-
ok.prototype.isInProgress=ok.prototype.ic;ok.prototype.isLive=ok.prototype.
|
|
396
|
+
ok.prototype.isInProgress=ok.prototype.ic;ok.prototype.isLive=ok.prototype.T;ok.prototype.offset=ok.prototype.offset;ok.prototype.notifyMaxSegmentDuration=ok.prototype.uf;ok.prototype.notifyMinSegmentStartTime=ok.prototype.ke;ok.prototype.getInitialProgramDateTime=ok.prototype.Ch;ok.prototype.setInitialProgramDateTime=ok.prototype.Og;ok.prototype.isStartTimeLocked=ok.prototype.di;ok.prototype.lockStartTime=ok.prototype.ce;ok.prototype.notifySegments=ok.prototype.vd;ok.prototype.notifyTimeRange=ok.prototype.Eg;
|
|
396
397
|
ok.prototype.getDelay=ok.prototype.yh;ok.prototype.setDelay=ok.prototype.Lf;ok.prototype.getSegmentAvailabilityDuration=ok.prototype.Wd;ok.prototype.setSegmentAvailabilityDuration=ok.prototype.te;ok.prototype.setStatic=ok.prototype.oc;ok.prototype.setClockOffset=ok.prototype.Ng;ok.prototype.getPresentationStartTime=ok.prototype.Kh;ok.prototype.setDuration=ok.prototype.Ua;ok.prototype.setPresentationStartTime=ok.prototype.Pg;ok.prototype.getMaxSegmentDuration=ok.prototype.Fh;
|
|
397
398
|
ok.prototype.getDuration=ok.prototype.getDuration;function pk(a,b,c){this.j=c;this.l=a;this.s=qk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}pk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function rk(a,b){a.i=b}function sk(a){this.g=a}function qk(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(Ii(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 tk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new hb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return uk(f)});this.m=(new Lc(function(){uk(f)})).Va(this.s.gapJumpTimerTime)}tk.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.B=this.A=null};tk.prototype.xf=function(){this.o=!0;uk(this)};
|
|
398
399
|
function uk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=qk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Ji(c,b,a.s.gapDetectionThreshold),
|
|
@@ -415,7 +416,7 @@ Kk.prototype.getNumReferences=Kk.prototype.getNumReferences;function Lk(a,b,c,d)
|
|
|
415
416
|
Lk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Lk);Lk.prototype.next=Lk.prototype.next;Lk.prototype.current=Lk.prototype.current;Lk.prototype.currentPosition=Lk.prototype.rh;
|
|
416
417
|
Lk.prototype.setReverse=Lk.prototype.se;function Nk(){Kk.call(this,[]);this.h=[]}oa(Nk,Kk);r=Nk.prototype;r.clone=function(){var a=new Nk;a.h=this.h.slice();return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.zc=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.zc(a)};r.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};
|
|
417
418
|
r.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};r.offset=function(){};r.ge=function(){};r.Ja=function(){};r.ud=function(){};r.yc=function(){};r.ue=function(){};S("shaka.media.MetaSegmentIndex",Nk);Nk.prototype.updateEvery=Nk.prototype.ue;Nk.prototype.fit=Nk.prototype.yc;Nk.prototype.mergeAndEvict=Nk.prototype.ud;Nk.prototype.evict=Nk.prototype.Ja;Nk.prototype.merge=Nk.prototype.ge;
|
|
418
|
-
Nk.prototype.offset=Nk.prototype.offset;Nk.prototype.get=Nk.prototype.get;Nk.prototype.find=Nk.prototype.find;Nk.prototype.forEachTopLevelReference=Nk.prototype.zc;Nk.prototype.release=Nk.prototype.release;function Ok(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Vd();this.h=new Lc(function(){b.g.Cg(.25*b.i)})}Ok.prototype.release=function(){this.set(this.ac());this.h&&(this.h.stop(),this.h=null);this.g=null};Ok.prototype.set=function(a){this.i=a;Pk(this)};Ok.prototype.ac=function(){return this.g.ac()};function Pk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Vd()!=b&&a.g.Of(b);return}catch(c){}a.h.Va(.25);0!=a.g.Vd()&&a.g.Of(0)};function Qk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Lc(function(){Rk(b,!1)})).Va(.25)}Qk.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 Rk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Sk(){this.g=null;this.h=[]}function Tk(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 Uk(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 Vk(){this.i=this.h=null;this.g=[]}function Wk(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 Xk(){this.Nd=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.
|
|
419
|
+
Nk.prototype.offset=Nk.prototype.offset;Nk.prototype.get=Nk.prototype.get;Nk.prototype.find=Nk.prototype.find;Nk.prototype.forEachTopLevelReference=Nk.prototype.zc;Nk.prototype.release=Nk.prototype.release;function Ok(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Vd();this.h=new Lc(function(){b.g.Cg(.25*b.i)})}Ok.prototype.release=function(){this.set(this.ac());this.h&&(this.h.stop(),this.h=null);this.g=null};Ok.prototype.set=function(a){this.i=a;Pk(this)};Ok.prototype.ac=function(){return this.g.ac()};function Pk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Vd()!=b&&a.g.Of(b);return}catch(c){}a.h.Va(.25);0!=a.g.Vd()&&a.g.Of(0)};function Qk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Lc(function(){Rk(b,!1)})).Va(.25)}Qk.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 Rk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Sk(){this.g=null;this.h=[]}function Tk(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 Uk(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 Vk(){this.i=this.h=null;this.g=[]}function Wk(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 Xk(){this.Nd=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.M=this.N=this.H=this.J=this.K=this.l=this.o=NaN;this.g=new Sk;this.h=new Vk};function Yk(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function Zk(a,b){a.j=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
419
420
|
function $k(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.Ab(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.ja&&(c=!1);2==d.fc()&&(c=!1);c&&d.ea&&al(a,d.ea);c&&!a.g.has(d)&&(c=new bl(a.j),cl(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.wd&&d.be)break;d=b.next().value}dl(a)}}}
|
|
420
421
|
function al(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return Ai(d,b)})){var c=new bl(a.j);cl(c,b,a.h);a.i.set(b,c)}}function el(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&fl(a,c)}function gl(a){el(a,a.g);el(a,a.i);a.l=0}Yk.prototype.Ja=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&&fl(this,d);b&&dl(this)};
|
|
421
422
|
function dl(a){for(var b=Array.from(a.g.keys()),c={},d=t(a.i.keys()),e=d.next();!e.done;c={Gd:c.Gd},e=d.next())c.Gd=e.value,b.some(function(f){return function(g){return Ai(g.ea,f.Gd)}}(c))||fl(a,c.Gd)}function hl(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&fl(a,d)}dl(a)}function il(a,b){b&&b!==a.h&&(gl(a),a.h=b)}function fl(a,b){var c=a.g;b instanceof zi&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function bl(a){this.g=a;this.ne=this.Pf=null}
|
|
@@ -423,48 +424,48 @@ function cl(a,b,c){var d=new Uint8Array(0);a.ne=a.g(b,c,function(e){return O(fun
|
|
|
423
424
|
kl.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.yd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.tf;break a}}d=null}if(e=d)e=c.hg,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);
|
|
424
425
|
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.hg=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function nl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.yd;b.yd=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.yd=[]};function ol(a,b,c,d,e){a=jg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function pl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.J=null;this.A=!1;this.l=new rg(function(){return ql(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null}}r=pl.prototype;r.destroy=function(){return this.l.destroy()};
|
|
425
426
|
function ql(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,rl(e),b.push(sl(e));f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,gl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;F(k)})}
|
|
426
|
-
r.configure=function(a){this.h=a;this.J=new Pf({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.
|
|
427
|
-
b.
|
|
428
|
-
function wl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Nd,a.H++,d=a.H,ua(l,2),E(l,dk(a.g.
|
|
429
|
-
function Al(a,b){var c=0>a.g.ib(),d=a.i.get("video");d&&d
|
|
427
|
+
r.configure=function(a){this.h=a;this.J=new Pf({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.Z&&(gl(b.Z),b.Z=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,gl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Ld))&&
|
|
428
|
+
b.Z&&(gl(b.Z),b.Z=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.Z&&(gl(b.Z),b.Z=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.Z?(hl(c.Z,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.Z=null)):0<a.segmentPrefetchLimit&&(c.Z=tl(this,c.stream));a.disableAudioPrefetch||ul(this)};r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,vl(b,a||new Map),2);sg(b.l);b.C=!0;F(c)})};
|
|
429
|
+
function wl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Nd,a.H++,d=a.H,ua(l,2),E(l,dk(a.g.Y,c.ma),4);case 4:wa(l,3);break;case 2:if(e=ya(l),a.g)a.g.onError(e);case 3:f=Pd(b.mimeType,b.codecs),Mj(a.g.Y,f,a.m.sequenceMode,b.external),g=a.g.Y.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=xl(a,b),a.i.set(c.ma,k),yl(a,k,0)),F(l)}})}function zl(a){var b=a.i.get(Ld);b&&(rl(b),sl(b).catch(function(){}),a.i.delete(Ld));a.s=null}
|
|
430
|
+
function Al(a,b){var c=0>a.g.ib(),d=a.i.get("video");d&&d.$&&d.$.se(c);(d=a.i.get("audio"))&&d.$&&d.$.se(c);(d=a.i.get(Ld))&&d.$&&d.$.se(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.nc&&(Bl(a,b,!1,0,!1),c.nc=d);else if(b=c.nc)c.nc=null,Bl(a,b,!0,0,!1)}function Cl(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.C&&(b.video&&Bl(a,b.video,c,d,e,f),b.audio&&Bl(a,b.audio,c,d,e,f))}
|
|
430
431
|
function Dl(a,b){O(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();Bl(a,b,!0,0,!1);F(c)})}
|
|
431
|
-
function Bl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ld?g&&(g.nc&&(b.trickModeVideo?(g.nc=b,b=b.trickModeVideo):g.nc=null),g.stream!=b||e)&&(a.o.has(b)?g.
|
|
432
|
+
function Bl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ld?g&&(g.nc&&(b.trickModeVideo?(g.nc=b,b=b.trickModeVideo):g.nc=null),g.stream!=b||e)&&(a.o.has(b)?g.Z=a.o.get(b):g.Z&&il(g.Z,b),b.type==Ld&&(e=Pd(b.mimeType,b.codecs),Mj(a.g.Y,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.$=null,g.cg=!!f,c&&(g.dd?g.ve=!0:g.Sa?(g.Qb=!0,g.Rd=d,g.ve=!0):(rl(g),El(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Fl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
432
433
|
wl(a,b)}
|
|
433
|
-
function Fl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Ud();var g=Sj(a.g.
|
|
434
|
+
function Fl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Ud();var g=Sj(a.g.Y,b.type),h=b.stream.segmentIndex.find(b.Qa?b.Qa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ea)&&(h+=(k.ja?k.ja-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),f=
|
|
434
435
|
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.eb.h.g>h?!0:!1):f=!1;f&&b.eb.abort();F(e)})}
|
|
435
|
-
r.zd=function(){if(this.g)for(var a=this.g.Ud(),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
|
|
436
|
-
function Gl(a,b){b.dd||b.Qb||(b.Sa?(b.Qb=!0,b.Rd=0):null==Qj(a.g.
|
|
437
|
-
function vl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Nd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.
|
|
438
|
-
b.get(l.id),Zk(n,function(q,u,v){return Hl(q,u,v||null,a.h.retryParameters,a.g.Db)}),m.
|
|
439
|
-
function tl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ld&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ld&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.
|
|
440
|
-
function ul(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Ka:d.Ka},f=e.next())if(d.Ka=f.value,d.Ka.audio)if(a.o.has(d.Ka.audio)){if(f=a.o.get(d.Ka.audio),hl(f,b),!(0<b&&c.some(function(h){return function(k){return te(h.Ka.audio.language,k)}}(d)))){var g=a.i.get(d.Ka.audio.type);f!==(g&&g.
|
|
441
|
-
(d.Ka.audio.segmentIndex||d.Ka.audio.createSegmentIndex(),a.o.set(d.Ka.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.
|
|
436
|
+
r.zd=function(){if(this.g)for(var a=this.g.Ud(),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.$&&(e=c.$.current());if(!e||e.startTime>a||e.endTime<a)c.$=null;e=this.g.Y;e.C?e=!1:d==Ld?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Rj(e,d),e=Gi(e,a));e||((null!=Sj(this.g.Y,d)||c.Sa)&&Gl(this,c),c.eb&&(c.eb.abort(),c.eb=null),d===Ld&&(d=this.g.Y,d.H&&d.H.g()),c.zd=!0)}};
|
|
437
|
+
function Gl(a,b){b.dd||b.Qb||(b.Sa?(b.Qb=!0,b.Rd=0):null==Qj(a.g.Y,b.type)?null==b.xb&&yl(a,b,0):(rl(b),El(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
438
|
+
function vl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Nd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.U,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ga,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.Y;return E(p,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}sg(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=xl(a,l),b.has(l.id)&&(n=
|
|
439
|
+
b.get(l.id),Zk(n,function(q,u,v){return Hl(q,u,v||null,a.h.retryParameters,a.g.Db)}),m.Z=n),a.i.set(k,m),yl(a,m,0));F(p)})}function xl(a,b){return{stream:b,type:b.type,$:null,Z:tl(a,b),Qa:null,jc:null,pf:null,mf:null,lf:null,nc:null,endOfStream:!1,Sa:!1,xb:null,Qb:!1,Rd:0,ve:!1,dd:!1,zd:!0,Df:!1,od:!1,eb:null}}
|
|
440
|
+
function tl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ld&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ld&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.Z)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Yk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Hl(d,e,f||null,a.h.retryParameters,a.g.Db)}):null}
|
|
441
|
+
function ul(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Ka:d.Ka},f=e.next())if(d.Ka=f.value,d.Ka.audio)if(a.o.has(d.Ka.audio)){if(f=a.o.get(d.Ka.audio),hl(f,b),!(0<b&&c.some(function(h){return function(k){return te(h.Ka.audio.language,k)}}(d)))){var g=a.i.get(d.Ka.audio.type);f!==(g&&g.Z)&&gl(f);a.o.delete(d.Ka.audio)}}else 0>=b||!c.some(function(h){return function(k){return te(h.Ka.audio.language,k)}}(d))||!(f=tl(a,d.Ka.audio))||
|
|
442
|
+
(d.Ka.audio.segmentIndex||d.Ka.audio.createSegmentIndex(),a.o.set(d.Ka.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Y.Ua(a):this.g.Y.Ua(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
442
443
|
function Il(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:sg(a.l);if(b.Sa||null==b.xb||b.dd)return h.return();b.xb=null;if(!b.Qb){h.u(2);break}return E(h,El(a,b,b.ve,b.Rd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return E(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Sa||b.xb||yl(a,b,0),h.return();case 4:ua(h,6);d=Jl(a,b);null!=d&&(yl(a,b,d),b.od=!1);wa(h,7);break;case 6:return e=
|
|
443
|
-
ya(h),E(h,Kl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.
|
|
444
|
-
function Jl(a,b){if(Ll(b))return ak(a.g.
|
|
445
|
-
!0,"video"==b.type&&(a=a.i.get(Ld))&&Ll(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Ml(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,Ll(h)||h
|
|
446
|
-
function Ml(a,b,c,d){if(b
|
|
447
|
-
function Nl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:e=Nd;f=b.stream;g=b
|
|
448
|
-
ua(I,2);n=Pl(n,C);D=!1;J=0;(new Cg).box("mdat",function(G){J=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D){I.u(4);break}K=n.subarray(0,J);n=n.subarray(J);return E(I,Ql(a,b,c,f,d,K,!0),5);case 5:b.
|
|
449
|
-
B.return():b.Qb?(b.Sa=!1,yl(a,b,0),B.return()):E(B,Ql(a,b,c,f,d,w),10);case 10:b.
|
|
450
|
-
!0,1==y.category&&b.
|
|
444
|
+
ya(h),E(h,Kl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.Y.endOfStream(),10);case 10:sg(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ua(g),F(h)}})}
|
|
445
|
+
function Jl(a,b){if(Ll(b))return ak(a.g.Y,b.stream.originalId||""),null;b.type==Ld&&bk(a.g.Y);if(!a.g.Y.da&&b.type!=Ld)return a.h.updateIntervalSeconds/2;var c=a.g.Ud();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ja(c,!0),$k(e,c);d=b.Qa?b.Qa.endTime:c;e=Tj(a.g.Y,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Sj(a.g.Y,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
446
|
+
!0,"video"==b.type&&(a=a.i.get(Ld))&&Ll(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Ml(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,Ll(h)||h.$&&!h.$.current()||(f=Math.min(f,h.Qa?h.Qa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.Z&&b.$&&!a.o.has(b.stream)&&(b.Z.Ja(c),$k(b.Z,e.startTime));Nl(a,b,c,e).catch(function(){});return null}
|
|
447
|
+
function Ml(a,b,c,d){if(b.$)return b.$.current();if(b.Qa||d)return b.$=b.stream.segmentIndex.Ab(b.Qa?b.Qa.endTime:d,!1,0>a.g.ib()),b.$&&b.$.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.ib();var f=null;d&&(b.$=b.stream.segmentIndex.Ab(e,!1,a),f=b.$&&b.$.next().value);f||(b.$=b.stream.segmentIndex.Ab(c,!1,a),f=b.$&&b.$.next().value);return f}
|
|
448
|
+
function Nl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:e=Nd;f=b.stream;g=b.$;b.Sa=!0;ua(B,2);if(2==d.fc())throw new T(1,1,1011);return E(B,Ol(a,b,d),4);case 4:sg(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),q=p=!1,v=function(C){var D,J,K,H;return O(function(I){switch(I.g){case 1:if(p)return I.return();q=!0;sg(a.l);if(a.A)return I.return();
|
|
449
|
+
ua(I,2);n=Pl(n,C);D=!1;J=0;(new Cg).box("mdat",function(G){J=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D){I.u(4);break}K=n.subarray(0,J);n=n.subarray(J);return E(I,Ql(a,b,c,f,d,K,!0),5);case 5:b.Z&&b.$&&$k(b.Z,d.startTime,!0);case 4:wa(I,0);break;case 2:u=H=ya(I),F(I)}})},E(B,Rl(a,b,d,v),9);l=Rl(a,b,d);return E(B,l,7);case 7:m=B.h;sg(a.l);if(a.A)return B.return();sg(a.l);return b.Qb?(b.Sa=!1,yl(a,b,0),B.return()):E(B,Ql(a,b,c,f,d,m),6);case 9:w=B.h;if(u)throw u;if(q){B.u(10);break}p=!0;sg(a.l);return a.A?
|
|
450
|
+
B.return():b.Qb?(b.Sa=!1,yl(a,b,0),B.return()):E(B,Ql(a,b,c,f,d,w),10);case 10:b.Z&&b.$&&$k(b.Z,d.startTime,!0);case 6:sg(a.l);if(a.A)return B.return();b.Qa=d;g.next();b.Sa=!1;b.Df=!1;A=a.g.Y.rb();z=A[b.type];eb(JSON.stringify(z));b.Qb||a.g.xf(d,b.stream);yl(a,b,0);wa(B,0);break;case 2:y=ya(B);sg(a.l,y);if(a.A)return B.return();b.Sa=!1;if(7001==y.code)b.Sa=!1,rl(b),yl(a,b,0),B.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),B.u(0);else if(3017==y.code)Sl(a,b,y),B.u(0);else return b.od=
|
|
451
|
+
!0,1==y.category&&b.Z&&fl(b.Z,d),y.severity=2,E(B,Kl(a,b,y),0)}})}function Tl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(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))})}
|
|
451
452
|
function Pl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Sl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Df})){if(0<a.h.maxDisabledTime&&a.g.Sd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.od=!0;a.A=!0;a.g.onError(c);return}b.Df=!0}yl(a,b,4)}
|
|
452
|
-
function Ol(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v;return O(function(w){switch(w.g){case 1:d=Nd;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Yd(b.stream.codecs);k=Zd(b.stream.mimeType);l=c.timestampOffset;if(l==b.pf&&f==b.mf&&g==b.lf&&h==b.nf&&k==b.yg){w.u(2);break}m=b.nf&&b.yg&&nk(a.g.
|
|
453
|
-
function(){var A,z,y;return O(function(B){if(1==B.g)return A=new Map,a.j.audio&&A.set(d.
|
|
454
|
-
2),E(K,q,4);case 4:return A=K.h,sg(a.l),z=null,y=new Map,B={projection:null,hfov:null},C=new Cg,C.box("moov",Hg).box("trak",Hg).box("mdia",Hg).
|
|
455
|
-
Hg).box("proj",Hg).
|
|
453
|
+
function Ol(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v;return O(function(w){switch(w.g){case 1:d=Nd;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Yd(b.stream.codecs);k=Zd(b.stream.mimeType);l=c.timestampOffset;if(l==b.pf&&f==b.mf&&g==b.lf&&h==b.nf&&k==b.yg){w.u(2);break}m=b.nf&&b.yg&&nk(a.g.Y,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.ga?n=a.i.get(d.U):b.type===d.U&&(n=a.i.get(d.ga));if(!n){w.u(3);break}return E(w,sl(n).catch(function(){}),5);case 5:n.jc=null,Gl(a,n);case 3:return p=
|
|
454
|
+
function(){var A,z,y;return O(function(B){if(1==B.g)return A=new Map,a.j.audio&&A.set(d.U,a.j.audio),a.j.video&&A.set(d.ga,a.j.video),ua(B,2),b.mf=f,b.lf=g,b.nf=h,b.yg=k,b.pf=l,z=a.m.sequenceMode||"HLS"==a.m.type,E(B,ek(a.g.Y,b.type,l,f,g,z,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,A),4);if(2!=B.g)return wa(B,0);y=ya(B);b.mf=null;b.lf=null;b.nf=null;b.pf=null;throw y;})},E(w,p(),2);case 2:return Ai(c.ea,b.jc)||(b.jc=c.ea,c.l&&c.ea&&(q=Rl(a,b,c.ea),u=function(){var A,z,y,B,C,D,J;return O(function(K){switch(K.g){case 1:return ua(K,
|
|
455
|
+
2),E(K,q,4);case 4:return A=K.h,sg(a.l),z=null,y=new Map,B={projection:null,hfov:null},C=new Cg,C.box("moov",Hg).box("trak",Hg).box("mdia",Hg).P("mdhd",function(H){z=Ti(H.reader,H.version).timescale}).box("hdlr",function(H){H=H.reader;H.skip(8);switch(H.lc()){case "soun":y.set(d.U,z);break;case "vide":y.set(d.ga,z)}z=null}).box("minf",Hg).box("stbl",Hg).P("stsd",Lg).box("encv",Mg).box("avc1",Mg).box("avc3",Mg).box("hev1",Mg).box("hvc1",Mg).box("dvav",Mg).box("dva1",Mg).box("dvh1",Mg).box("dvhe",Mg).box("vexu",
|
|
456
|
+
Hg).box("proj",Hg).P("prji",function(H){H=H.reader.lc();B.projection=H}).box("hfov",function(H){H=H.reader.O()/1E3;B.hfov=H}).parse(A),Ul(a,B),y.has(b.type)?c.ea.timescale=y.get(b.type):null!=z&&(c.ea.timescale=z),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(K,a.g.eg(b.type,A),5);case 5:return E(K,Vj(a.g.Y,b.type,A,null,b.stream,D),6);case 6:wa(K,0);break;case 2:throw J=ya(K),b.jc=null,J;}})},a.g.li(c.startTime,c.ea),e.push(u()))),a.m.sequenceMode&&(v=b.Qa?b.Qa.j:null,c.j!=v&&e.push(gk(a.g.Y,
|
|
456
457
|
b.type,c.startTime))),E(w,Promise.all(e),0)}})}
|
|
457
|
-
function Ql(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p;return O(function(q){switch(q.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.F;if(l||m)k=new Cg;l&&k.
|
|
458
|
-
z+e.timestampOffset,y=D-e.startTime,B=u.reader.
|
|
459
|
-
w||(w=Pi(u),w.length&&e&&a.g.ni([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.
|
|
460
|
-
a.F=!0}});(l||m)&&k.parse(f);return E(q,Vl(a,b,c),2);case 2:return sg(a.l),n=b.zd,b.zd=!1,p=b.cg,b.cg=!1,E(q,a.g.eg(b.type,f),3);case 3:return E(q,Vj(a.g.
|
|
458
|
+
function Ql(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p;return O(function(q){switch(q.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.F;if(l||m)k=new Cg;l&&k.P("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.lc();var A=u.reader.lc();var z=u.reader.O();var y=u.reader.O();var B=u.reader.O();var C=u.reader.O();var D=e.startTime+y/z}else z=u.reader.O(),D=u.reader.Kc()/
|
|
459
|
+
z+e.timestampOffset,y=D-e.startTime,B=u.reader.O(),C=u.reader.O(),w=u.reader.lc(),A=u.reader.lc();u=u.reader.vb(u.reader.getLength()-u.reader.wa());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.mi():(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 U("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
460
|
+
w||(w=Pi(u),w.length&&e&&a.g.ni([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.P("prft",function(u){if(!a.F&&e.ea.timescale){var v=u.reader,w=u.version;v.O();u=v.O();var A=v.O();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.O():(w=v.O(),v=v.O(),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.ea.timescale*1E3)});v=new U("prft",v);a.g.onEvent(v);
|
|
461
|
+
a.F=!0}});(l||m)&&k.parse(f);return E(q,Vl(a,b,c),2);case 2:return sg(a.l),n=b.zd,b.zd=!1,p=b.cg,b.cg=!1,E(q,a.g.eg(b.type,f),3);case 3:return E(q,Vj(a.g.Y,b.type,f,e,d,h,n,p,g),4);case 4:sg(a.l),F(q)}})}function Vl(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=Qj(a.g.Y,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.Y.remove(b.type,e,e+g),2)}sg(a.l);F(h)})}
|
|
461
462
|
function Ll(a){return a&&a.type==Ld&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
462
|
-
function Rl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.ld())return l.return(e);f=null;if(b.
|
|
463
|
-
function Hl(a,b,c,d,e){var f=a instanceof Bi?a:void 0,g=f?1:0;a=ol(a
|
|
464
|
-
function El(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Qb=!1,b.ve=!1,b.Rd=0,b.dd=!0,b.Qa=null,b.jc=null,b
|
|
465
|
-
function yl(a,b,c){var d=b.type;if(d!=Ld||a.i.has(d))b.xb=(new Kc(function(){var e;return O(function(f){if(1==f.g)return ua(f,2),E(f,Il(a,b),4);if(2!=f.g)return wa(f,0);e=ya(f);if(a.g)a.g.onError(e);F(f)})})).
|
|
463
|
+
function Rl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.ld())return l.return(e);f=null;if(b.Z){var m=b.Z,n=m.g;c instanceof zi&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Pf=d),f=m.ne):f=null}f||(f=Hl(c,b.stream,d||null,a.h.retryParameters,a.g.Db));g=0;b.$&&(g=b.$.h);b.eb=f;return E(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Tl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
464
|
+
function Hl(a,b,c,d,e){var f=a instanceof Bi?a:void 0,g=f?1:0;a=ol(a.L(),a.Ba,a.ja,d,c);a.contentType=b.type;return e.request(pg,a,{type:g,stream:b,segment:f})}
|
|
465
|
+
function El(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Qb=!1,b.ve=!1,b.Rd=0,b.dd=!0,b.Qa=null,b.jc=null,b.$=null,b.Z&&!a.o.has(b.stream)&&gl(b.Z),d?(e=a.g.Ud(),f=a.g.Y.getDuration(),E(g,a.g.Y.remove(b.type,e+d,f),3)):E(g,dk(a.g.Y,b.type),4);if(3!=g.g)return sg(a.l),c?E(g,a.g.Y.flush(b.type),3):g.u(3);sg(a.l);b.dd=!1;b.endOfStream=!1;b.Sa||b.xb||yl(a,b,0);F(g)})}
|
|
466
|
+
function yl(a,b,c){var d=b.type;if(d!=Ld||a.i.has(d))b.xb=(new Kc(function(){var e;return O(function(f){if(1==f.g)return ua(f,2),E(f,Il(a,b),4);if(2!=f.g)return wa(f,0);e=ya(f);if(a.g)a.g.onError(e);F(f)})})).W(c)}function rl(a){null!=a.xb&&(a.xb.stop(),a.xb=null)}function sl(a){return O(function(b){return a.eb?E(b,a.eb.abort(),0):b.u(0)})}
|
|
466
467
|
function Kl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Rf(a.J),2);sg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Sd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
|
|
467
|
-
function Wl(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.K<c)return h.return(!1);a.K=b;d=Nd;if(e=a.i.get(d.
|
|
468
|
+
function Wl(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.K<c)return h.return(!1);a.K=b;d=Nd;if(e=a.i.get(d.U))e.jc=null,Gl(a,e),sl(e).catch(function(){});if(f=a.i.get(d.ga))f.jc=null,Gl(a,f),sl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.U,a.j.audio);a.j.video&&g.set(d.ga,a.j.video);return E(h,mk(a.g.Y,g),2)}return h.return(!0)})}
|
|
468
469
|
function Ul(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function Xl(){}
|
|
469
470
|
function Yl(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]=Ce(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ce(n)),m=Yl(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?($a("Invalid config, wrong type for "+m),
|
|
470
471
|
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&ab("Unexpected number of arguments for "+m),a[l]=b[l]):($a("Invalid config, unrecognized key "+m),k=!1)}return k}function Zl(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 $l(a,b){return a&&b}
|
|
@@ -489,16 +490,16 @@ preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecod
|
|
|
489
490
|
useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(km(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
490
491
|
function lm(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 Yl(a,b,c||hm(),d,"")}
|
|
491
492
|
function km(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=Be(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return ue(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-
|
|
492
|
-
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!=Ld&&"image"!=c.type||b.push(c);return b}function im(a){return $l([a],a)}function jm(a){return $l([a],a)}S("shaka.util.PlayerConfiguration",gm);gm.mergeConfigObjects=lm;gm.createDefault=hm;function mm(a,b,c,d,e){bg.call(this);this.K=a;this.
|
|
493
|
-
this.H=[];this.G=[]}oa(mm,bg);function nm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function om(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function pm(a,b){a.
|
|
493
|
+
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!=Ld&&"image"!=c.type||b.push(c);return b}function im(a){return $l([a],a)}function jm(a){return $l([a],a)}S("shaka.util.PlayerConfiguration",gm);gm.mergeConfigObjects=lm;gm.createDefault=hm;function mm(a,b,c,d,e){bg.call(this);this.K=a;this.V=b;this.Xa=e.networkingEngine;this.aa=d;this.o=null;this.Yb=c;this.La=0;this.Wb=e.xc;this.s=e.gi;this.Xb=e.hi;this.g=e.config;this.j=this.B=this.h=null;this.oa=!1;this.C=e.si;this.Ga=!1;this.l=null;this.da=!1;this.i=this.A=null;this.ca=!1;this.J=new Map;this.Ha=!1;this.gb=e.ri;this.ba=new Xk;this.na=new Sf;this.fa=new Sf;this.M=new Sf;this.F=new Sf;this.F.catch(function(){});this.N=null;this.m=!1;this.pb=e.jh;this.ua=null;this.hb=e.ih;this.S=!1;
|
|
494
|
+
this.H=[];this.G=[]}oa(mm,bg);function nm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function om(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function pm(a,b){a.N=b;a.S=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=mm.prototype;r.getStartTime=function(){return this.aa};r.Bc=function(){return this.K};r.df=function(){return this.h};function qm(a){a.ca=!0;return a.i}function rm(a){a.oa=!0;return a.j}function sm(a){a.Ga=!0;return a.C}
|
|
494
495
|
r.getStats=function(){return this.ba};function tm(a){a.da=!0;return a.l}function um(a){a.Ha=!0;return a.J}
|
|
495
496
|
r.start=function(){var a=this,b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return ua(c,3),E(c,vm(a),5);case 5:if(a.m)return c.return();a.na.resolve();return E(c,wm(a),6);case 6:if(a.m)return c.return();a.fa.resolve();a.o||(a.o=new Cf(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,
|
|
496
|
-
a.g.manifest.dash.enableAudioGroups));if(a.hb){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.pb){d=a.h.presentationTimeline.
|
|
497
|
-
r.dispatchEvent=function(a){return this.
|
|
498
|
-
function vm(a){var b,c,d,e,f;return O(function(g){if(1==g.g){ym(a,"manifest-parser");a.j||(a.B=qi(a.K,a.
|
|
497
|
+
a.g.manifest.dash.enableAudioGroups));if(a.hb){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.pb){d=a.h.presentationTimeline.T();var e=lf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ua=e,e.video&&xm(a,e.video,d),e.audio&&xm(a,e.audio,d)}return E(c,void 0,7);case 7:if(a.m)return c.return();a.M.resolve();wa(c,0);break;case 3:throw b=ya(c),a.F.reject(b),b;}})};
|
|
498
|
+
r.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):bg.prototype.dispatchEvent.call(this,a)};r.onError=function(a){2===a.severity&&(this.F.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function ym(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
|
|
499
|
+
function vm(a){var b,c,d,e,f;return O(function(g){if(1==g.g){ym(a,"manifest-parser");a.j||(a.B=qi(a.K,a.V),a.j=a.B(),a.j.configure(a.g.manifest));b=Date.now()/1E3;ym(a,"manifest");if(a.h)return g.u(2);c=a;return E(g,a.j.start(a.K,a.Xb),3)}2!=g.g&&(c.h=g.h);d=new U("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new T(2,4,4036);zm(a.h);e=Date.now()/1E3;f=e-b;a.ba.F=f;F(g)})}
|
|
499
500
|
function wm(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:ym(a,"drm-engine");a.La=Date.now()/1E3;a.l=a.Wb();a.s.g=a.l;a.l.configure(a.g.drm);var k=a.s;b=Je(a.h.variants,k.h.restrictions,k.i);return E(h,ki(a.s,a.h),2);case 2:c=h.h;if(!b&&!c){h.u(3);break}d=new U("trackschanged",void 0);return E(h,Promise.resolve(),4);case 4:a.dispatchEvent(d);case 3:return e=lf(a.h.variants),E(h,Bh(a.l,e,a.h.offlineSessionIds),5);case 5:return E(h,ki(a.s,a.h),6);case 6:f=h.h;if(!f){h.u(0);break}g=new U("trackschanged",
|
|
500
501
|
void 0);return E(h,Promise.resolve(),8);case 8:a.dispatchEvent(g),F(h)}})}r.configure=function(a,b){a=Zl(a,b);lm(this.g,a)};r.getConfiguration=function(){return Ce(this.g)};
|
|
501
|
-
function xm(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 Yk(d,b,function(l,m,n){return Hl(l,m,n||null,a.g.streaming.retryParameters,a.Xa)}),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.aa||0;(h=(g=b.segmentIndex.Ab(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ea&&al(e,h.ea):$k(e,h.startTime));F(k)})}r.Ti=function(){return Promise.race([this.
|
|
502
|
+
function xm(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 Yk(d,b,function(l,m,n){return Hl(l,m,n||null,a.g.streaming.retryParameters,a.Xa)}),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.aa||0;(h=(g=b.segmentIndex.Ab(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ea&&al(e,h.ea):$k(e,h.startTime));F(k)})}r.Ti=function(){return Promise.race([this.M,this.F])};
|
|
502
503
|
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.m=!0;if(!a.j||a.oa){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.ca){e.u(4);break}return E(e,a.i.stop(),4);case 4:a.C&&!a.Ga&&a.C.release();if(!a.l||a.da){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.Ha)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,gl(d);F(e)}})};
|
|
503
504
|
function zm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",mm);mm.prototype.destroy=mm.prototype.destroy;mm.prototype.waitForFinish=mm.prototype.Ti;function Am(a,b){bg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{tc:null,sc:Bm,hc:function(d,e){return Cm(c,"enter",d,e)}},{tc:Dm,sc:Bm,hc:function(d,e){return Cm(c,"enter",d,e)}},{tc:Rm,sc:Bm,hc:function(d,e){return Cm(c,"enter",d,e)}},{tc:Bm,sc:Dm,hc:function(d,e){return Cm(c,"exit",d,e)}},{tc:Bm,sc:Rm,hc:function(d,e){return Cm(c,"exit",d,e)}},{tc:Dm,sc:Rm,hc:function(d,e){return Cm(c,"skip",d,e)}},{tc:Rm,sc:Dm,hc:function(d,e){return Cm(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
|
|
504
505
|
"regionremove",function(d){c.g.delete(d.region)})}oa(Am,bg);Am.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;bg.prototype.release.call(this)};Am.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?Dm:a>d.endTime?Rm:Bm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.tc==e&&h.sc==f&&h.hc(d,b)}}};
|
|
@@ -538,69 +539,69 @@ function tn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round
|
|
|
538
539
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function yn(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=tn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
539
540
|
function un(a,b){if(!b||a.includes("offline:"))return a;a=new rc(a);a.g.set("CMCD",b);return a.toString()}var sn="m",qn="a",wn="v",rn="av",An="i",Cn="c",Bn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",bh:"s",OTHER:"o"});function Gn(a){this.h=a;this.g=null}r=Gn.prototype;r.configure=function(a){this.h=a};r.sg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Hn)?1E3*this.g.get(Hn):null};r.rg=function(){return this.h.enabled&&this.g&&this.g.has(In)?1E3*this.g.get(In):null};r.Lh=function(){return this.h.enabled&&this.g&&this.g.has(Jn)?this.g.get(Jn):null};r.Mh=function(){return this.h.enabled&&this.g&&this.g.has(Kn)?this.g.get(Kn):null};
|
|
540
541
|
r.getBandwidthEstimate=function(a){var b=this.rg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Ln(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Gn);Gn.prototype.getBandwidthEstimate=Gn.prototype.getBandwidthEstimate;Gn.prototype.getRoundTripTime=Gn.prototype.Mh;Gn.prototype.getResponseDelay=Gn.prototype.Lh;Gn.prototype.getEstimatedThroughput=Gn.prototype.rg;
|
|
541
|
-
Gn.prototype.getMaxBitrate=Gn.prototype.sg;var In="etp",Hn="mb",Jn="rd",Kn="rtt";function Mn(){this.g=null;this.h=[]}function Nn(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.u(2);a.g=b;F(c)})}Mn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){bg.call(this);var c=this;this.l=On;this.ae=this.h=null;this.da=!1;this.oe=new hb;this.Yb=new hb;this.m=new hb;this.Ha=new hb;this.Xb=new hb;this.C=this.F=this.B=this.G=null;this.qe=0;this.
|
|
542
|
-
this.Ff=[];this.s=null;this.Ga=new Cf(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.Xa=this.g.preferredTextLanguage;this.pd=this.g.preferredTextRole;this.md=this.g.preferForcedSubs;this.gd=[];b&&b(this);this.
|
|
542
|
+
Gn.prototype.getMaxBitrate=Gn.prototype.sg;var In="etp",Hn="mb",Jn="rd",Kn="rtt";function Mn(){this.g=null;this.h=[]}function Nn(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.u(2);a.g=b;F(c)})}Mn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){bg.call(this);var c=this;this.l=On;this.ae=this.h=null;this.da=!1;this.oe=new hb;this.Yb=new hb;this.m=new hb;this.Ha=new hb;this.Xb=new hb;this.C=this.F=this.B=this.G=null;this.qe=0;this.V=new Mn;this.fa=this.Bf=this.aa=this.i=this.La=this.J=this.j=this.pb=this.K=this.$g=this.ba=this.S=this.Wb=this.M=this.de=this.H=this.hb=null;this.gb=!1;this.ua=this.o=null;this.Vf=1E9;this.td=[];this.N=NaN;this.g=Pn(this);this.ca={width:Infinity,height:Infinity};this.$d=new ji(this.g,this.ca,null);
|
|
543
|
+
this.Ff=[];this.s=null;this.Ga=new Cf(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.Xa=this.g.preferredTextLanguage;this.pd=this.g.preferredTextRole;this.md=this.g.preferForcedSubs;this.gd=[];b&&b(this);this.S=Qn(this);this.ba=new Gn(this.g.cmsd);
|
|
543
544
|
this.G=Rn(this);this.G.Mf(this.g.streaming.forceHTTP);this.G.Nf(this.g.streaming.forceHTTPS);this.$f=this.na=this.A=null;this.Yf=new Lc(function(){return O(function(d){if(1==d.g)return c.na?E(d,c.wc(c.$f,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.na),4);c.$f.play();c.na=null;F(d)})});Sn&&(this.A=Sn(),this.A.configure(this.g.ads),this.Xb.D(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();
|
|
544
|
-
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.Yf.stop();if(c.na)return h.u(0);c.$f=c.h;g=c;return E(h,c.kg(!0),3)}g.na=h.h;F(h)})}),this.Xb.D(this.A,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Yf.
|
|
545
|
-
this.wc(a,!0))}oa(X,bg);function Vn(a){null!=a.K&&(yj(a.K),a.K.release(),a.K=null)}function Wn(a,b){if(b.lcevc.enabled){var c=a.Nb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Qc()||Rc())&&(b.mediaSource.forceTransmux||ab("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Vn(a);null==a.K&&(a.K=new xj(a.h,a.$g,b.lcevc),a.F&&(a.F.
|
|
546
|
-
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==Yn)return g.return();Vn(a);b=a.detach();a.l=Yn;return E(g,b,2);case 2:c=[];d=t(a.Ff);for(e=d.next();!e.done;e=d.next())f=e.value,f.m||c.push(f.destroy());a.Ff=[];return E(g,Promise.all(c),3);case 3:a.oe&&(a.oe.release(),a.oe=null);a.Yb&&(a.Yb.release(),a.Yb=null);a.m&&(a.m.release(),a.m=null);a.Ha&&(a.Ha.release(),a.Ha=null);a.Xb&&(a.Xb.release(),a.Xb=null);a.ua=null;a.g=null;a.s=null;a.ae=null;a.
|
|
545
|
+
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.Yf.stop();if(c.na)return h.u(0);c.$f=c.h;g=c;return E(h,c.kg(!0),3)}g.na=h.h;F(h)})}),this.Xb.D(this.A,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Yf.W(.1)}));this.oe.D(window,"online",function(){Tn(c);c.Ef()});this.je=new Lc(function(){return Un(c)});this.oa=null;a&&(qb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
|
|
546
|
+
this.wc(a,!0))}oa(X,bg);function Vn(a){null!=a.K&&(yj(a.K),a.K.release(),a.K=null)}function Wn(a,b){if(b.lcevc.enabled){var c=a.Nb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Qc()||Rc())&&(b.mediaSource.forceTransmux||ab("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Vn(a);null==a.K&&(a.K=new xj(a.h,a.$g,b.lcevc),a.F&&(a.F.S=a.K))}else Vn(a)}function Xn(a,b){return new U(a,b)}r=X.prototype;
|
|
547
|
+
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==Yn)return g.return();Vn(a);b=a.detach();a.l=Yn;return E(g,b,2);case 2:c=[];d=t(a.Ff);for(e=d.next();!e.done;e=d.next())f=e.value,f.m||c.push(f.destroy());a.Ff=[];return E(g,Promise.all(c),3);case 3:a.oe&&(a.oe.release(),a.oe=null);a.Yb&&(a.Yb.release(),a.Yb=null);a.m&&(a.m.release(),a.m=null);a.Ha&&(a.Ha.release(),a.Ha=null);a.Xb&&(a.Xb.release(),a.Xb=null);a.ua=null;a.g=null;a.s=null;a.ae=null;a.S=null;a.ba=
|
|
547
548
|
null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),bg.prototype.release.call(a),F(g)}})};function Zn(a,b){a.dispatchEvent(Xn("onstatechange",(new Map).set("state",b)))}
|
|
548
|
-
r.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==Yn)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,$n(c,"attach"),4);case 4:if(g.h)return g.return();ua(g,5,6);d||(Zn(c,"attach"),e=function(){var h=ao(c);h&&bo(c,h)},c.Yb.D(a,"error",e),c.h=a);if(!b||!Mc()||c.F){g.u(6);break}return E(g,co(c),6);case 6:za(g);c.
|
|
549
|
-
}})};r.kh=function(a){this.$g=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==Yn)throw new T(2,7,7E3);return E(c,b.qc(!1,a),2)}if(3!=c.g)return E(c,$n(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Yb.nb(),b.h=null),Zn(b,"detach"),b.A&&!a&&b.A.release()}finally{b.
|
|
549
|
+
r.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==Yn)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,$n(c,"attach"),4);case 4:if(g.h)return g.return();ua(g,5,6);d||(Zn(c,"attach"),e=function(){var h=ao(c);h&&bo(c,h)},c.Yb.D(a,"error",e),c.h=a);if(!b||!Mc()||c.F){g.u(6);break}return E(g,co(c),6);case 6:za(g);c.V.release();Aa(g,0);break;case 5:return f=ya(g),E(g,c.detach(),10);case 10:throw f;
|
|
550
|
+
}})};r.kh=function(a){this.$g=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==Yn)throw new T(2,7,7E3);return E(c,b.qc(!1,a),2)}if(3!=c.g)return E(c,$n(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Yb.nb(),b.h=null),Zn(b,"detach"),b.A&&!a&&b.A.release()}finally{b.V.release()}F(c)})};function $n(a,b){var c;return O(function(d){return 1==d.g?(c=++a.qe,E(d,Nn(a.V,b),2)):c!=a.qe?(a.V.release(),d.return(!0)):d.return(!1)})}
|
|
550
551
|
r.qc=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!=Yn&&(c.l=On),E(p,$n(c,"unload"),2);case 2:if(p.h)return p.return();va(p,3);c.gb=!1;Zn(c,"unload");a&&!Mc()&&(a=!1);Vn(c);d=c.gd.map(function(q){return q()});c.gd=[];return E(p,Promise.all(d),5);case 5:c.dispatchEvent(Xn("unloading"));c.Wb&&(c.Wb.release(),c.Wb=null);c.h&&(c.m.nb(),c.Ha.nb());c.je.stop();c.hb&&(c.hb.release(),c.hb=null);c.de&&(c.de.stop(),c.de=null);
|
|
551
552
|
if(!c.J){p.u(6);break}return E(p,c.J.stop(),7);case 7:c.J=null,c.La=null;case 6:if(!c.o){p.u(8);break}return E(p,c.o.stop(),8);case 8:if(!c.j){p.u(10);break}return E(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!c.F){p.u(12);break}return E(p,c.F.destroy(),13);case 13:c.F=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.na&&!b&&(c.na.destroy(),c.na=null);b||c.Yf.stop();c.ba&&(c.ba.g=null);c.h&&bn(c.h);if(!c.h||!c.h.src){p.u(14);break}return E(p,
|
|
552
|
-
new Promise(function(q){return(new Lc(q)).
|
|
553
|
-
k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(Ve={},ii.clear());c.i=null;c.s=new Xk;c.Rf=null;c.td=[];c.
|
|
554
|
-
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==Yn)throw new T(2,7,7E3);e=null;f="";a instanceof mm?(e=a,f=e.Bc()||""):f=a||"";return E(A,Nn(d.
|
|
555
|
-
2),E(B,Nn(d.
|
|
553
|
+
new Promise(function(q){return(new Lc(q)).W(.1)}),15);case 15:c.h.removeAttribute("src"),c.h.load();case 14:if(!c.B){p.u(16);break}return E(p,c.B.destroy(),17);case 17:c.B=null;case 16:c.oa&&c.aa!=c.oa.Bc()&&(c.oa.m||c.oa.destroy(),c.oa=null);c.aa=null;c.Bf=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=
|
|
554
|
+
k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(Ve={},ii.clear());c.i=null;c.s=new Xk;c.Rf=null;c.td=[];c.N=NaN;eo(c);case 3:za(p);c.V.release();Aa(p,4);break;case 4:if(a&&Mc()&&!c.F)return E(p,co(c),0);p.u(0)}})};r.Si=function(a){this.fa=a};
|
|
555
|
+
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==Yn)throw new T(2,7,7E3);e=null;f="";a instanceof mm?(e=a,f=e.Bc()||""):f=a||"";return E(A,Nn(d.V,"load"),2);case 2:d.V.release();if(!d.h)throw new T(2,7,7002);if(!d.aa){A.u(3);break}d.aa=f;return E(A,d.qc(!1),3);case 3:g=++d.qe;h=function(){return O(function(z){if(1==z.g)return d.qe==g?z.u(0):e?E(z,e.destroy(),3):z.u(3);throw new T(2,7,7E3);})};k=function(z,y){return O(function(B){switch(B.g){case 1:return va(B,
|
|
556
|
+
2),E(B,Nn(d.V,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:za(B),d.V.release(),Aa(B,0)}})};ua(A,5,6);null==b&&e&&(b=e.getStartTime());d.fa=b;d.gb=!1;d.dispatchEvent(Xn("loading"));if(e){c=e.V;A.u(8);break}if(c){A.u(8);break}return E(A,k(function(){return O(function(z){if(1==z.g)return E(z,fo(d,f),2);c=z.h;F(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){pm(e,d);d.s=e.getStats();A.u(11);break}return E(A,go(d,f,b,c,!0),12);case 12:e=
|
|
556
557
|
A.h;if(!e){d.s=new Xk;A.u(11);break}pm(e,d);d.s=e.getStats();return E(A,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Yb:Date.now()/1E3;d.s=e?e.getStats():new Xk;d.aa=f;d.Bf=c||null;if(m)return E(A,k(function(){return O(function(z){return E(z,ho(d,c),0)})},"initializeSrcEqualsDrmInner_"),24);if(d.F){A.u(17);break}return E(A,k(function(){return O(function(z){return E(z,co(d),0)})},"initializeMediaSourceEngineInner_"),17);case 17:return E(A,k(function(){return e.na},"waitForManifest"),
|
|
557
|
-
19);case 19:d.g=e.getConfiguration();d.$d=e.s;d.La=e.B;d.J=rm(e);d.Wb=sm(e);d.pb=e.gb;d.i=e.df();if(p=e.o)d.Ga=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(io(d),d.configure("manifest.disableVideo",!0));return E(A,k(function(){return e.fa},"waitForDrm"),20);case 20:return d.B=tm(e),E(A,k(function(){return O(function(z){return E(z,d.B.wc(d.h),0)})},"drmEngine_.attach"),21);case 21:return E(A,k(function(){return e.
|
|
558
|
+
19);case 19:d.g=e.getConfiguration();d.$d=e.s;d.La=e.B;d.J=rm(e);d.Wb=sm(e);d.pb=e.gb;d.i=e.df();if(p=e.o)d.Ga=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(io(d),d.configure("manifest.disableVideo",!0));return E(A,k(function(){return e.fa},"waitForDrm"),20);case 20:return d.B=tm(e),E(A,k(function(){return O(function(z){return E(z,d.B.wc(d.h),0)})},"drmEngine_.attach"),21);case 21:return E(A,k(function(){return e.M},"waitForChooseInitialVariant"),22);case 22:return!(q=e.A)||d.ua&&d.ua==q||(d.o=qm(e),d.ua=e.A,
|
|
558
559
|
"function"!=typeof d.o.setMediaElement&&(qb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(qb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(qb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),
|
|
559
560
|
u=um(e),v=e.ua,E(A,k(function(){return O(function(z){return E(z,jo(d,n,v,u),0)})},"loadInner_"),23);case 23:om(e);A.u(16);break;case 24:return E(A,k(function(){return O(function(z){return E(z,ko(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(Xn("loaded"));case 6:za(A);if(!e){A.u(26);break}return E(A,e.destroy(),26);case 26:d.oa=null;Aa(A,0);break;case 5:w=ya(A);if(7E3==w.code){A.u(28);break}return E(A,d.qc(!1),28);case 28:throw w;}})};
|
|
560
561
|
function io(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})}r.Oi=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,lo(c),2):3!=e.g?(d=e.h,E(e,c.qc(a,b),3)):e.return(d)})};
|
|
561
562
|
r.kg=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,lo(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
|
|
562
|
-
function lo(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.La&&a.aa))return e.u(2);c=a.h.currentTime;a.
|
|
563
|
+
function lo(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.La&&a.aa))return e.u(2);c=a.h.currentTime;a.T()&&(c=null);d=Date.now()/1E3;return E(e,mo(a,a.aa,c,a.Bf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.La;f.h=a.i;f.j=g;f.B=h;f=b;g=a.ua;f.i=a.o;f.A=g;b.o=a.Ga;b.start();a.i=null;a.J=null;a.La=null;a.o=null;a.ua=null}return e.return(b)})}
|
|
563
564
|
r.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,go(d,a,b,c),2);(e=f.h)?e.start().catch(function(){}):bo(d,new T(2,7,7005));return f.return(e)})};
|
|
564
565
|
function go(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.u(2):E(l,fo(a,b),3);2!=l.g&&(d=l.h);if(g=no(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.ua==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(mo(a,b,c,d||null,f,!e,h,k))})}
|
|
565
|
-
function mo(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,q,u,v,w,A,z,y,B,C,D;return O(function(J){if(1==J.g)return k=null,l=Ce(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.
|
|
566
|
+
function mo(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,q,u,v,w,A,z,y,B,C,D;return O(function(J){if(1==J.g)return k=null,l=Ce(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.S&&k.m?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(K,H){m()?k.configure(K,H):a.configure(K,H)},Infinity!=a.ca.width||Infinity!=a.ca.height?J.u(2):E(J,id(),3);2!=J.g&&(q=J.h,a.ca.width=q.width,a.ca.height=q.height);u=new ji(l,a.ca,null);v={networkingEngine:a.G,
|
|
566
567
|
filter:function(K){var H,I;return O(function(G){if(1==G.g)return E(G,ki(u,K),2);if(4!=G.g){H=G.h;if(!H)return G.u(0);I=Xn("trackschanged");return E(G,Promise.resolve(),4)}k.dispatchEvent(I);F(G)})},makeTextStreamsForClosedCaptions:function(K){return oo(a,K)},onTimelineRegionAdded:function(K){var H=k.C;a:{var I=t(H.g);for(var G=I.next();!G.done;G=I.next())if(G=G.value,G.schemeIdUri==K.schemeIdUri&&G.id==K.id&&G.startTime==K.startTime&&G.endTime==K.endTime){I=G;break a}I=null}null==I&&(H.g.add(K),K=
|
|
567
|
-
new U("regionadd",new Map([["region",K]])),H.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.
|
|
568
|
-
(new Map).set("isLive",a.
|
|
568
|
+
new U("regionadd",new Map([["region",K]])),H.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.S&&a.j.updateDuration()},newDrmInfo:function(K){var H=k.l,I=H?H.g:null;I&&H.s&&mi(u,I.keySystem,K)},onManifestUpdated:function(){var K=
|
|
569
|
+
(new Map).set("isLive",a.T());k.dispatchEvent(Xn("manifestupdated",K));nm(k,!1,function(){if(a.A)a.A.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new jl(function(){return a.Ob()});w.addEventListener("regionadd",function(K){var H=K.region;po(a,"timelineregionadded",H,k);nm(k,!1,function(){if(a.A)a.A.onDashTimedMetadata(H)})});A=null;l.streaming.observeQualityChanges&&(A=new kl(function(){return a.rb()}),A.addEventListener("qualitychange",function(K){var H=
|
|
569
570
|
K.quality;K=K.position;H=(new Map).set("mediaQuality",{bandwidth:H.bandwidth,audioSamplingRate:H.audioSamplingRate,codecs:H.codecs,contentType:H.contentType,frameRate:H.frameRate,height:H.height,mimeType:H.mimeType,channelsCount:H.channelsCount,pixelAspectRatio:H.pixelAspectRatio,width:H.width}).set("position",K);a.dispatchEvent(Xn("mediaqualitychanged",H))}));z=!0;y={Db:a.G,onError:function(K){return k.onError(K)},me:function(K){nm(k,!0,function(){a:{var H=Xn("keystatuschanged");a.dispatchEvent(H);
|
|
570
571
|
var I=Object.keys(K);H=1==I.length&&"00"==I[0];var G=!1;if(I.length){I=t(a.i.variants);for(var L=I.next();!L.done;L=I.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 P=N.value;N=L.allowedByKeySystem;if(P.keyIds.size){L.allowedByKeySystem=!0;P=t(P.keyIds);for(var R=P.next();!R.done;R=P.next())if(R=R.value,(R=K[H?"00":R])||a.B.F)L.allowedByKeySystem=L.allowedByKeySystem&&!!R&&!oi.includes(R)}N!=L.allowedByKeySystem&&(G=!0)}}}if(G&&
|
|
571
572
|
(qo(a),!ro(a)))break a;(H=a.j.j)&&!H.allowedByKeySystem&&so(a)}})},onExpirationUpdated:function(K,H){var I=Xn("expirationupdated");k.dispatchEvent(I);if((I=k.j)&&I.onExpirationUpdated)I.onExpirationUpdated(K,H)},onEvent:function(K){k.dispatchEvent(K);"drmsessionupdate"==K.type&&z&&(z=!1,K=Date.now()/1E3-k.La,(a.s||k.getStats()).j=K,a.K&&yj(a.K))}};B=Rn(a,m);ig(a.G,B);C=function(){return a.xc(y)};D={config:l,hi:v,si:w,ri:A,xc:C,gi:u,networkingEngine:B,jh:f,ih:h};k=new mm(b,d,e,c,D);a.Ff.push(k);return J.return(k)})}
|
|
572
573
|
function fo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Sm(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&ad()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
573
574
|
function no(a,b){if(!Mc())return!0;if(b){if(""==(a.h||Pc()).canPlayType(b))return!1;if(!(Mc()&&b in ri))return!0;if(ae(b)){if(a.g.streaming.preferNativeHls)return!0;if(ad()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(ad())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
574
|
-
function co(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return Zn(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Rf=b,d=to(a.h,c,function(h,k,l){uo(a,h,k,l)},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ba=f,E(g,d.
|
|
575
|
+
function co(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return Zn(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Rf=b,d=to(a.h,c,function(h,k,l){uo(a,h,k,l)},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ba=f,E(g,d.M,2);a.F=d;F(g)})}
|
|
575
576
|
function jo(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H;return O(function(I){switch(I.g){case 1:Zn(a,"load");e=a.h;a.H=new Ok({Vd:function(){return e.playbackRate},ac:function(){return e.defaultPlaybackRate},Of:function(G){e.playbackRate=G},Cg:function(G){e.currentTime+=G}});f=function(){return vo(a)};g=function(){return wo(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);Wn(a,a.g);a.Xa=a.g.preferredTextLanguage;a.pd=a.g.preferredTextRole;a.md=a.g.preferForcedSubs;
|
|
576
577
|
xo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,L,M){a.i&&a.j&&G!=a.j.j&&yo(a,G,!0,void 0===L?!1:L,void 0===M?0:M)});a.o.setMediaElement(e);a.o.setCmsdManager(a.ba);a.j=zo(a);a.j.configure(a.g.streaming);a.l=Ao;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Bo(a,G)}});a.dispatchEvent(Xn("streaming"));h=c;(k=a.j.j)||h||(h=Co(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(q=
|
|
577
|
-
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){I.u(2);break}return E(I,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);xo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.C=Do(a,G);a.hb=Eo(a,
|
|
578
|
+
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){I.u(2);break}return E(I,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);xo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.C=Do(a,G);a.hb=Eo(a,G);Fo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.fa);if(k){I.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){I.u(5);break}v=a.i.presentationTimeline;
|
|
578
579
|
w=a.fa||a.h.currentTime;A=v.dc();z=v.sb();w<A?w=A:w>z&&(w=z);return E(I,Go(h,w),6);case 6:y=I.h,u(y);case 5:yo(a,h,!0,!1,0);case 4:return a.C.Fe(),B=a.Cc().find(function(G){return G.active}),B||((C=mf(a.i.textStreams,a.Xa,a.pd,a.md)[0]||null)&&Wk(a.s.h,C,!0),h&&(C?(h.audio&&Ho(a,h.audio,C)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),Io(a)):a.da=!1),C&&(a.g.streaming.alwaysStreamText||a.kf())&&Dl(a.j,C)),E(I,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Jo(a));qo(a);ro(a);a.i.variants.some(function(G){return G.primary});
|
|
579
|
-
if((D=a.
|
|
580
|
+
if((D=a.T())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)J=function(){return Ko(a)},a.m.D(e,"timeupdate",J);D||(K=function(){return Lo(a)},a.m.D(e,"timeupdate",K),Lo(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(H=function(){var G,L;return O(function(M){if(1==M.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return M.u(0);a.m.Hb(e,"timeupdate",H);L=a;return E(M,a.preload(a.i.nextUrl),
|
|
580
581
|
4)}L.oa=M.h;F(M)})},a.m.D(e,"timeupdate",H)),a.m.D(e,"ended",function(){a.load(a.oa||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(D);a.gb=!0;a.m.qa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});F(I)}})}
|
|
581
582
|
function ho(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Nd,d=Date.now()/1E3,e=!0,a.B=a.xc({Db:a.G,onError:function(k){bo(a,k)},me:function(){},onExpirationUpdated:function(){var k=Xn("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
582
583
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Zd(b):"",codecs:b?$d(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ga,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(Pd(g.mimeType,
|
|
583
|
-
g.codecs)),b.startsWith("audio/")?(g.type=c.
|
|
584
|
+
g.codecs)),b.startsWith("audio/")?(g.type=c.U,f.audio=g):f.video=g,a.B.ba=!0,E(h,Bh(a.B,[f],[]),2)):E(h,a.B.wc(a.h),0)})}
|
|
584
585
|
function ko(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return Zn(a,"src-equals"),d=a.h,a.C=new Ek(d),e=!1,a.gd.push(function(){e=!0}),null!=a.fa&&a.C.Ge(a.fa),a.H=new Ok({Vd:function(){return d.playbackRate},ac:function(){return d.defaultPlaybackRate},Of:function(v){d.playbackRate=v},Cg:function(v){d.currentTime+=v}}),f=a.g.streaming.rebufferingGoal,Fo(a,d,f),g=function(){return vo(a)},h=function(){return wo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
585
586
|
"ratechange",h),"none"!=d.preload&&a.m.qa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return qo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return qo(a)}),a.m.D(d.audioTracks,"change",function(){return qo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "metadata":Mo(a,v);break;case "chapters":Bo(a,v);break;default:qo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return qo(a)}),
|
|
586
|
-
a.m.D(d.textTracks,"change",function(){return qo(a)})),d.src=on(a.
|
|
587
|
-
"change",A);(new Lc(A)).
|
|
588
|
-
l]),2);if((m=a.
|
|
587
|
+
a.m.D(d.textTracks,"change",function(){return qo(a)})),d.src=on(a.S,a.aa,c),(Uc()||Xc())&&d.load(),"none"!=d.preload&&!d.autoplay&&ae(c)&&fd()&&d.load(),a.l=No,a.dispatchEvent(Xn("streaming")),k=new Sf,vk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.Fe();k.resolve()}),vk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var v;return O(function(w){if(1==w.g)return Oo(a),v=Po(a),v.find(function(A){return"disabled"!=A.mode})?(0<v.length&&(a.da=!0),w.u(2)):E(w,new Promise(function(A){a.m.qa(d.textTracks,
|
|
588
|
+
"change",A);(new Lc(A)).W(1)}),2);if(e)return w.return();Qo(a);F(w)})}),d.error?k.reject(ao(a)):"none"==d.preload&&(ab('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.qa(d,"error",function(){k.reject(ao(a))}),l=new Promise(function(v,w){(new Lc(w)).W(a.g.streaming.loadTimeout)}),E(u,Promise.race([k,
|
|
589
|
+
l]),2);if((m=a.T())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return Ko(a)},a.m.D(d,"timeupdate",n);m||(p=function(){return Lo(a)},a.m.D(d,"timeupdate",p),Lo(a));a.A&&(a.A.onManifestUpdated(m),m&&(q=a.Ob().end,a.m.D(d,"progress",function(){var v=a.Ob().end;q!=v&&(a.A.onManifestUpdated(a.T()),q=v)})));a.gb=!0;F(u)})}function Oo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Jg(b,a.g.preferredVariantRole)}
|
|
589
590
|
function Qo(a){var b=a.g.preferredTextLanguage;""!=b&&a.If(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
590
|
-
function Mo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ro(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Lc(function(){var d=So(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).pc().
|
|
591
|
+
function Mo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ro(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Lc(function(){var d=So(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).pc().W(.5);a.gd.push(function(){c.stop()})}}
|
|
591
592
|
function uo(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())Ro(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Ro(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Xn("metadata",b))}
|
|
592
|
-
function Bo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Lc(function(){b.mode="hidden"})).pc().
|
|
593
|
+
function Bo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Lc(function(){b.mode="hidden"})).pc().W(.5);a.gd.push(function(){c.stop()})}}r.wi=function(){for(var a=this.V;a.g;)a.release()};r.xc=function(a){return new uh(a)};
|
|
593
594
|
function Rn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?nm(b(),!0,e):e()}b||(b=function(){return null});return new eg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Xn("downloadheadersreceived",f));d(function(){if(a.ba){var h=a.ba;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],
|
|
594
|
-
Ln(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,q=l.split(";");for(l=1;l<q.length;l++){var u=q[l].split("=");p.set(u[0],Ln(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(Xn("downloadfailed",e))},function(e,f,g){d(function(){var h=a.
|
|
595
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}vn(h,f,{ot:sn,su:!h.i})}}catch(N){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case pg: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.
|
|
596
|
-
if(q.segmentIndex&&m){var w=q.segmentIndex.Ab(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Mb(m
|
|
595
|
+
Ln(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,q=l.split(";");for(l=1;l<q.length;l++){var u=q[l].split("=");p.set(u[0],Ln(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(Xn("downloadfailed",e))},function(e,f,g){d(function(){var h=a.S,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)vn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
596
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}vn(h,f,{ot:sn,su:!h.i})}}catch(N){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case pg: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.T()?"l":"v"};n.ot=zn(k);var p=n.ot===wn||n.ot===qn||n.ot===rn||n.ot===Bn,q=k.stream;if(q){var u=h.h.ib();if(p&&(n.bl=Dn(h,q.type),n.ot!==Bn)){var v=En(h,q.type);n.dl=u?v/Math.abs(u):v}q.bandwidth&&(n.br=q.bandwidth/1E3);
|
|
597
|
+
if(q.segmentIndex&&m){var w=q.segmentIndex.Ab(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Mb(m.L(),A.L())){var z=A.L()[0],y=f.uris[0],B=new URL(z),C=new URL(y);if(B.origin!==C.origin)var D=z;else{for(var J=B.pathname.split("/").slice(1),K=C.pathname.split("/").slice(1,-1);J[0]===K[0];)J.shift(),K.shift();for(;K.length;)K.shift(),J.unshift("..");D=J.join("/")}n.nor=D}if((A.Ba||A.ja)&&(m.Ba!=A.Ba||m.ja!=A.ja)){var H=A.Ba+"-";A.ja&&(H+=A.ja);n.nrr=H}}}var I=h.h.ib()||1,G=En(h,q.type)||
|
|
597
598
|
500,L=q.bandwidth;var M=L?L*(m.endTime-m.startTime)/1E3/(G/I/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==Bn&&(n.tb=Fn(h,n.ot)/1E3);vn(h,f,n)}}catch(N){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:vn(h,f,{ot:"k"});break;case 4:vn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Nd=isNaN(f.Nd)?e:f.Nd+e)})}
|
|
598
|
-
function Do(a,b){return new Fk(a.h,a.i,a.g.streaming,b,function(){a.hb&&Rk(a.hb,!0);a.j&&a.j.zd();a.
|
|
599
|
-
function Eo(a,b){b=new Am(a.Wb,a.
|
|
600
|
-
function Fo(a,b,c){a.
|
|
601
|
-
function To(a){switch(a.l){case No:if(a.h.ended)var b=!0;else{var c=Fi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Ao:a:if(a.h.ended||Pj(a.F))b=!0;else{if(a.i.presentationTimeline.
|
|
602
|
-
function Qn(a){return new nn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},rb:function(){return a.rb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},ib:function(){return a.ib()},cc:function(){return a.cc()},Nb:function(){return a.Nb()},
|
|
603
|
-
function zo(a){return new pl(a.i,{Ud:function(){return a.C?a.C.Md():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},ib:function(){return a.ib()},
|
|
599
|
+
function Do(a,b){return new Fk(a.h,a.i,a.g.streaming,b,function(){a.hb&&Rk(a.hb,!0);a.j&&a.j.zd();a.M&&To(a)},function(c){return a.dispatchEvent(c)})}
|
|
600
|
+
function Eo(a,b){b=new Am(a.Wb,a.T()||0<b);b.addEventListener("enter",function(d){po(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){po(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(po(a,"timelineregionenter",e),po(a,"timelineregionexit",e))});var c=new Qk(a.h);c.g.add(b);a.pb&&c.g.add(a.pb);return c}
|
|
601
|
+
function Fo(a,b,c){a.M=new Lf;a.M.g=Nf;Of(a.M,c,Math.min(.5,c/2));eo(a);a.de=(new Lc(function(){To(a)})).Va(.25);a.m.D(b,"waiting",function(){return To(a)});a.m.D(b,"stalled",function(){return To(a)});a.m.D(b,"canplaythrough",function(){return To(a)});a.m.D(b,"progress",function(){return To(a)})}
|
|
602
|
+
function To(a){switch(a.l){case No:if(a.h.ended)var b=!0;else{var c=Fi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Ao:a:if(a.h.ended||Pj(a.F))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Mb();var d=Fi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Hi(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Mf:Nf;c.g=d;(b=b!=d)&&d===Mf&&(c.h=Date.now());b&&eo(a)}function to(a,b,c,d){return new Gj(a,b,c,d)}
|
|
603
|
+
function Qn(a){return new nn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},rb:function(){return a.rb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},ib:function(){return a.ib()},cc:function(){return a.cc()},Nb:function(){return a.Nb()},T:function(){return a.T()}},a.g.cmcd)}
|
|
604
|
+
function zo(a){return new pl(a.i,{Ud:function(){return a.C?a.C.Md():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},ib:function(){return a.ib()},Y:a.F,Db:a.G,onError:function(b){return bo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},mi:function(){a.J&&a.J.update&&a.J.update()},xf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.Dg();var g=Qj(a.F,f);!a.T()&&a.h.paused&&null!=g&&0<g&&a.C.Md()<g&&a.C.Ge(g)}To(a);d=(new Map).set("start",d).set("end",e).set("contentType",
|
|
604
605
|
f);a.dispatchEvent(Xn("segmentappended",d));a.o&&c.fastSwitching&&b.wd&&b.be&&a.o.trySuggestStreams()},li:function(b,c){(c=c.tf)&&a.pb&&ml(a.pb,c,b)},eg:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Pg(Ab(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;Kh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
|
|
605
606
|
return d},ni:function(b,c,d){uo(a,b,c,d)},Sd:function(b,c){return a.Sd(b,c)}})}
|
|
606
607
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Zl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(qb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(qb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
@@ -609,20 +610,20 @@ a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a
|
|
|
609
610
|
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&&
|
|
610
611
|
(a.drm.retryParameters.baseDelay=100));var d=lm(this.g,a,Pn(this));Uo(this);return d};
|
|
611
612
|
function Uo(a){a.$d=new ji(a.g,a.ca,a.B);if(a.J){var b=Ce(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.B&&a.B.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=Yn&&li(a.$d,a.i)&&qo(a)}catch(f){bo(a,f)}a.o&&ro(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||so(a)}a.G&&(a.G.Mf(a.g.streaming.forceHTTP),a.G.Nf(a.g.streaming.forceHTTPS));if(a.F)if(a.F.configure(a.g.mediaSource),a.F.ba=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
612
|
-
a.Rf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Rf=b;a.j&&(b=a.j,(c=b.i.get(Ld))&&Bl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Jo(a));a.
|
|
613
|
-
Of(a.
|
|
613
|
+
a.Rf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):qb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Rf=b;a.j&&(b=a.j,(c=b.i.get(Ld))&&Bl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Jo(a));a.M&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
614
|
+
Of(a.M,b,Math.min(.5,b/2)));a.i&&xo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.S&&a.S.configure(a.g.cmcd);a.ba&&a.ba.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Pn(this);lm(a,this.g,Pn(this));return a};r.Hh=function(){var a=Pn(this);lm(a,this.g,Pn(this));return am(this.g,Pn(this))};
|
|
614
615
|
r.pg=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.Ob().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.Ai=function(){for(var a in this.g)delete this.g[a];lm(this.g,Pn(this),Pn(this));Uo(this)};r.Dh=function(){return this.l};r.ef=function(){return this.i?this.i.type:null};r.Gh=function(){return this.h};
|
|
615
|
-
r.cc=function(){return this.G};r.Bc=function(){return this.aa};r.og=function(){return this.A?this.A:null};r.
|
|
616
|
-
r.Ob=function(){if(this.i){if(!this.gb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.dc(),end:a.sb()}}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}};r.Vh=function(){this.
|
|
617
|
-
r.cf=function(){return this.B?this.B.cf():[]};r.Td=function(){return this.B?this.B.Td():{}};r.jf=function(){return this.
|
|
618
|
-
r.Cd=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.Ha.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Ao&&(this.o.playbackRateChanged(a),Al(this.j,1<Math.abs(a))),this.
|
|
616
|
+
r.cc=function(){return this.G};r.Bc=function(){return this.aa};r.og=function(){return this.A?this.A:null};r.T=function(){return this.i?this.i.presentationTimeline.T():this.h&&this.h.src?Infinity==this.h.duration:!1};r.ic=function(){return this.i?this.i.presentationTimeline.ic():!1};r.Yh=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};
|
|
617
|
+
r.Ob=function(){if(this.i){if(!this.gb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.dc(),end:a.sb()}}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}};r.Vh=function(){this.T()&&(this.h.currentTime=this.Ob().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.B?this.B.g:null};r.jd=function(){return this.B?this.B.jd():Infinity};
|
|
618
|
+
r.cf=function(){return this.B?this.B.cf():[]};r.Td=function(){return this.B?this.B.Td():{}};r.jf=function(){return this.M?this.M.g==Nf:!1};r.ib=function(){return this.h?this.H?this.H.i:1:0};
|
|
619
|
+
r.Cd=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.Ha.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Ao&&(this.o.playbackRateChanged(a),Al(this.j,1<Math.abs(a))),this.T()&&this.Ha.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Ob(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.cd():Math.floor(c)<=Math.floor(d.start+e)&&b.cd()}))};
|
|
619
620
|
r.cd=function(){var a=this.H.ac();this.l==No&&this.H.set(a);this.l==Ao&&(this.H.set(a),this.o.playbackRateChanged(a),Al(this.j,!1));this.Ha.nb()};
|
|
620
621
|
r.Nb=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,kf(e)){var f=af(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 jf(g)}):[]};
|
|
621
622
|
r.Cc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=bf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Po(this).map(function(f){return gf(f)}):[]};r.Bh=function(){var a=this.td;this.i&&(a=this.i.imageStreams);return a.map(function(b){return cf(b)})};
|
|
622
623
|
r.uh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Ao&&b.l!=No)return g.return(null);c=b.td;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):E(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.zc(function(h){var k=Vo(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Vb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.ug(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
623
624
|
function Vo(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Vb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
624
625
|
r.ug=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B;return O(function(C){if(1==C.g){if(c.l!=Ao&&c.l!=No)return C.return(null);d=c.td;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?C.u(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=Vo(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.Vb;n=l/h.rows;p=h.Vb*h.rows;q=g.i-g.startTime;
|
|
625
|
-
u=g.A||q/p;v=g.startTime;A=w=0;1<p&&(z=Math.floor((b-g.startTime)/u),v=g.startTime+z*u,w=z%h.Vb*m,A=Math.floor(z/h.Vb)*n);y=!1;if(B=g.s)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
|
|
626
|
+
u=g.A||q/p;v=g.startTime;A=w=0;1<p&&(z=Math.floor((b-g.startTime)/u),v=g.startTime+z*u,w=z%h.Vb*m,A=Math.floor(z/h.Vb)*n);y=!1;if(B=g.s)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.L(),width:m,sprite:y})})};
|
|
626
627
|
r.Kg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Wk(this.s.h,b,!1),Dl(this.j,b),Wo(this),this.Xa=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Po(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,df(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";Wo(this)}};
|
|
627
628
|
r.Jf=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&&ab("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&&kf(d)&&(yo(this,d,!1,b,c),this.Ga=new Bf(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),ro(this))}else if(this.h&&this.h.audioTracks)for(b=
|
|
628
629
|
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,df(c)==a.id){Xo(this,c);break}};r.wh=function(){return Yo(this.Nb())};r.Oh=function(){return Yo(this.Cc())};r.vh=function(){return Array.from(Zo(this.Nb()))};r.Nh=function(){return Array.from(Zo(this.Cc()))};
|
|
@@ -634,10 +635,10 @@ r.xh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=ue(a
|
|
|
634
635
|
function Po(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function So(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function $o(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
635
636
|
r.Qg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Ao)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=mf(this.i.textStreams,this.Xa,this.pd,this.md),0<a.length&&(Dl(this.j,a[0]),Wo(this))):zl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Po(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")}Io(this)}};
|
|
636
637
|
r.Jh=function(){if(this.C)var a=this.C.Md();else{if(null==this.fa)return new Date;a=this.fa}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.tg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
637
|
-
r.Wd=function(){return this.
|
|
638
|
+
r.Wd=function(){return this.T()?this.i?this.i.presentationTimeline.Wd():null:null};r.rb=function(){if(this.l==Ao)return this.F.rb();var a={total:[],audio:[],video:[],text:[]};this.l==No&&(a.total=Ii(this.h.buffered));return a};
|
|
638
639
|
r.getStats=function(){if(this.l!=Ao&&this.l!=No)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:[]};vo(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
|
|
639
|
-
this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.
|
|
640
|
-
NaN,b.o=c.video.width||NaN,b.l=d);this.
|
|
640
|
+
this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.M=this.C.ag(),this.s.N=this.C.bg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==Ao){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||
|
|
641
|
+
NaN,b.o=c.video.width||NaN,b.l=d);this.T()&&(c=this.tg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==No&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.J;e=f.K;var g=f.H,h=f.N,k=f.M,l=f.A,m=f.i,n=f.m,p=f.F,q=f.j,u=Tk(f.g,"playing"),v=Tk(f.g,"paused"),w=Tk(f.g,"buffering"),A=f.s,z=f.C,y=f.G,B=f.Nd,C=Uk(f.g),D=[];
|
|
641
642
|
f=t(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,D.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:z,maxSegmentDuration:y,bytesDownloaded:B,stateHistory:C,
|
|
642
643
|
switchHistory:D}};
|
|
643
644
|
r.fh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:if(h.l!=Ao&&h.l!=No)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&ab("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){B.u(2);break}return E(B,ap(h,a),3);case 3:d=B.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=No){B.u(4);break}g&&(c="forced");return E(B,bp(h,a,b,c,d,f||"",k),5);case 5:l=ue(b);m=h.Cc();if(n=m.find(function(C){return ue(C.language)==
|
|
@@ -649,20 +650,20 @@ n.push(w);z={id:c.Vf++,originalId:null,groupId:null,createSegmentIndex:function(
|
|
|
649
650
|
"","")])};c.l==No?c.td.push(z):c.i.imageStreams.push(z);qo(c);return y.return(cf(z))}})};
|
|
650
651
|
r.eh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Ao&&d.l!=No)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,ap(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),E(k,bp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.qg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return E(k,new Promise(function(l,m){d.m.qa(f,"load",l);d.m.qa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return qo(d),k.return(h);case 5:throw new T(1,
|
|
651
652
|
2,2012);}})};function ap(a,b){var c;return O(function(d){switch(d.g){case 1:return ua(d,2),E(d,Sm(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
652
|
-
function bp(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,cp(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=dp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Jj(l),e="text/vtt");m=document.createElement("track");var p=a.
|
|
653
|
-
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function cp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=pg;f=jg([b],d);f.method="GET";var k=a.
|
|
653
|
+
function bp(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,cp(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=dp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Jj(l),e="text/vtt");m=document.createElement("track");var p=a.S,q=b;try{if(p.g.enabled){var u=pn(p);u.ot=Cn;u.su=!0;var v=tn(u);var w=un(q,v)}else w=q}catch(A){bb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=q}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
654
|
+
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function cp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=pg;f=jg([b],d);f.method="GET";var k=a.S;try{k.g.enabled&&vn(k,f,{ot:Cn,su:!0})}catch(l){bb("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)})}
|
|
654
655
|
function dp(a,b,c,d){var e=ie[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null),mn(b,d);throw new T(2,2,2014,c);}r.Li=function(a,b){this.ca.width=a;this.ca.height=b};r.Ef=function(a){if(this.l==Ao){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.od||d.Sa||d.xb||(d.od=!1,yl(b,d,a));b=!0}}else b=!1;return b};
|
|
655
656
|
r.df=function(){ab("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};r.Eh=function(){return this.La};
|
|
656
|
-
function Pn(a){var b=hm();b.streaming.failureCallback=function(c){if(a.
|
|
657
|
+
function Pn(a){var b=hm();b.streaming.failureCallback=function(c){if(a.T()){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.Ef(d))}};b.textDisplayFactory=function(){if(a.ae){var c=a.getConfiguration();return new cn(a.h,a.ae,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Xm(a.h,"Shaka Player TextTrack"):new $m};return b}r.Ug=function(a){this.ae=a};
|
|
657
658
|
function oo(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 Nk,l=e.closedCaptions.get(g);h={id:a.Vf++,originalId:g,groupId:null,
|
|
658
659
|
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:Ld,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([Pd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
659
660
|
function Go(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(q){if(1==q.g)return k?E(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.Ab(l))?m.next().value:null;if(!n)return q.return(null);p=n.startTime;return q.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)})}
|
|
660
|
-
function eo(a){var b=a.jf();if(a.s&&a.
|
|
661
|
-
function vo(a){if(a.s&&a.
|
|
662
|
-
function Ko(a){var b=a.h.playbackRate,c=a.
|
|
661
|
+
function eo(a){var b=a.jf();if(a.s&&a.M&&a.C){var c=a.H;c.j=b;Pk(c);a.S&&(c=a.S,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);vo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Xn("buffering",b))}function wo(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Xn("ratechange"),a.dispatchEvent(b))}
|
|
662
|
+
function vo(a){if(a.s&&a.M){var b=a.s.g,c="playing";a.M.g==Nf?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(Xn("statechanged",c)))}}
|
|
663
|
+
function Ko(a){var b=a.h.playbackRate,c=a.T();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.pg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Cd(d):1==e&&b!==a.H.ac()&&a.cd()}if(c&&(e=a.Ob(),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?
|
|
663
664
|
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-
|
|
664
|
-
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==No){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.
|
|
665
|
-
d>f?b!=g&&a.Cd(g):h&&k&&c-d<h?b!=k&&a.Cd(k):b!==a.H.ac()&&a.cd()}}function Lo(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.
|
|
665
|
+
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==No){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.M.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.Cd(k):f&&g&&c-
|
|
666
|
+
d>f?b!=g&&a.Cd(g):h&&k&&c-d<h?b!=k&&a.Cd(k):b!==a.H.ac()&&a.cd()}}function Lo(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=Xn("started"):25==a.N?d=Xn("firstquartile"):50==a.N?d=Xn("midpoint"):75==a.N?d=Xn("thirdquartile"):100==a.N&&(d=Xn("complete"));d&&a.dispatchEvent(d)}}}
|
|
666
667
|
function ro(a){try{ni(a.$d,a.i)}catch(c){return bo(a,c),!1}var b=lf(a.i.variants);b=a.Ga.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Co(a,b){b=void 0===b?!1:b;return ro(a)?a.o.chooseVariant(b):null}
|
|
667
668
|
function Un(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,fb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.je.stop();d&&so(a,!0,void 0,!1,!1)}
|
|
668
669
|
function so(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=Co(a);f&&yo(a,f,e,b,c,d)}function yo(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Cl(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Cl(a.j,b,d,e,f,c);d=null;g&&(d=af(g));b=af(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&zj(a.K,b,a.ef()),c=Xn("adaptation",c),ep(a,c)):fp(a,d,b)}}
|
|
@@ -671,25 +672,25 @@ function fp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&zj(a.K,c
|
|
|
671
672
|
r.Sd=function(a,b){if(!this.g.abr.enabled||this.l===Yn||!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.je.Va(1);b=this.rb().video.reduce(function(f,g){return f+g.end-g.start},0);so(this,!0,b,!0,!1);return!0}return!1};
|
|
672
673
|
function bo(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==Yn)return f.return();c=!0;if(!(a.gb&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ua(f,3);return E(f,Wl(a.j),5);case 5:d=f.h;c=!d;wa(f,2);break;case 3:ya(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&Tn(a,!1);e=Xn("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);F(f)}})}
|
|
673
674
|
function po(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(Xn(b,a))}function ao(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 T(2,3,3016,b,c,a.h.error.message)}
|
|
674
|
-
function xo(a,b,c){0<b&&(a.
|
|
675
|
+
function xo(a,b,c){0<b&&(a.T()||a.Tg(b));b=a.getDuration();c<b&&(a.T()||a.Ua(c))}function ep(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=Yn&&a.dispatchEvent(b);F(c)})}function Zo(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(ue(c.language)):b.add("und");return b}
|
|
675
676
|
function Yo(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=ue(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));
|
|
676
677
|
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Ug;X.prototype.getManifestParserFactory=X.prototype.Eh;X.prototype.getManifest=X.prototype.df;X.prototype.retryStreaming=X.prototype.Ef;X.prototype.setMaxHardwareResolution=X.prototype.Li;X.prototype.addChaptersTrack=X.prototype.eh;X.prototype.addThumbnailsTrack=X.prototype.gh;X.prototype.addTextTrackAsync=X.prototype.fh;X.prototype.getStats=X.prototype.getStats;
|
|
677
678
|
X.prototype.getBufferedInfo=X.prototype.rb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Wd;X.prototype.getPresentationStartTimeAsDate=X.prototype.tg;X.prototype.getPlayheadTimeAsDate=X.prototype.Jh;X.prototype.setTextTrackVisibility=X.prototype.Qg;X.prototype.getChapters=X.prototype.xh;X.prototype.getChaptersTracks=X.prototype.qg;X.prototype.isTextTrackVisible=X.prototype.kf;X.prototype.selectVariantsByLabel=X.prototype.Gi;X.prototype.selectTextLanguage=X.prototype.If;
|
|
678
679
|
X.prototype.selectAudioLanguage=X.prototype.Jg;X.prototype.getTextLanguages=X.prototype.Nh;X.prototype.getAudioLanguages=X.prototype.vh;X.prototype.getTextLanguagesAndRoles=X.prototype.Oh;X.prototype.getAudioLanguagesAndRoles=X.prototype.wh;X.prototype.selectVariantTrack=X.prototype.Jf;X.prototype.selectTextTrack=X.prototype.Kg;X.prototype.getThumbnails=X.prototype.ug;X.prototype.getAllThumbnails=X.prototype.uh;X.prototype.getImageTracks=X.prototype.Bh;X.prototype.getTextTracks=X.prototype.Cc;
|
|
679
680
|
X.prototype.getVariantTracks=X.prototype.Nb;X.prototype.cancelTrickPlay=X.prototype.cd;X.prototype.trickPlay=X.prototype.Cd;X.prototype.getPlaybackRate=X.prototype.ib;X.prototype.isBuffering=X.prototype.jf;X.prototype.getKeyStatuses=X.prototype.Td;X.prototype.getActiveSessionsMetadata=X.prototype.cf;X.prototype.getExpiration=X.prototype.jd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Vh;X.prototype.seekRange=X.prototype.Ob;
|
|
680
|
-
X.prototype.isAudioOnly=X.prototype.Yh;X.prototype.isInProgress=X.prototype.ic;X.prototype.isLive=X.prototype.
|
|
681
|
+
X.prototype.isAudioOnly=X.prototype.Yh;X.prototype.isInProgress=X.prototype.ic;X.prototype.isLive=X.prototype.T;X.prototype.getAdManager=X.prototype.og;X.prototype.getAssetUri=X.prototype.Bc;X.prototype.getNetworkingEngine=X.prototype.cc;X.prototype.getMediaElement=X.prototype.Gh;X.prototype.getManifestType=X.prototype.ef;X.prototype.getLoadMode=X.prototype.Dh;X.prototype.resetConfiguration=X.prototype.Ai;X.prototype.getBufferFullness=X.prototype.pg;X.prototype.getNonDefaultConfiguration=X.prototype.Hh;
|
|
681
682
|
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.wi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.kg;X.prototype.unloadAndSavePreload=X.prototype.Oi;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Si;X.prototype.unload=X.prototype.qc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.kh;X.prototype.attach=X.prototype.wc;
|
|
682
683
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return E(k,ci(),3);case 3:b=k.h;case 2:var l={};if(Mc())for(var m in ri)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]=Mc()?!!ri[n]:Nc(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(Qd));
|
|
683
684
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=he(n)?!0:Mc()?mb(n)||(lc(n)?!0:!1):Nc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,id(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=gp;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
684
685
|
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=fd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Mc()?!0:Nc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Sn=a};
|
|
685
|
-
X.registerSupportPlugin=function(a,b){gp[a]=b};X.prototype.destroy=X.prototype.destroy;var Yn=0,On=1,Ao=2,No=3;X.LoadMode={DESTROYED:Yn,NOT_LOADED:On,MEDIA_SOURCE:Ao,SRC_EQUALS:No};X.version="v4.9.
|
|
686
|
+
X.registerSupportPlugin=function(a,b){gp[a]=b};X.prototype.destroy=X.prototype.destroy;var Yn=0,On=1,Ao=2,No=3;X.LoadMode={DESTROYED:Yn,NOT_LOADED:On,MEDIA_SOURCE:Ao,SRC_EQUALS:No};X.version="v4.9.1";var hp=["4","9"];rb=new function(a){this.g=a;this.i=sb;this.h=tb}(new pb(Number(hp[0]),Number(hp[1])));var gp={},Sn=null;function ip(){this.h=[];this.j=this.i=this.g=0};function jp(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 hb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=jp.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
686
687
|
r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
687
688
|
r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.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)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
688
689
|
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
689
690
|
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",jp);jp.prototype.release=jp.prototype.release;
|
|
690
691
|
jp.prototype.getPodIndex=jp.prototype.getPodIndex;jp.prototype.getTimeOffset=jp.prototype.getTimeOffset;jp.prototype.getMediaUrl=jp.prototype.getMediaUrl;jp.prototype.getAdvertiserName=jp.prototype.getAdvertiserName;jp.prototype.getCreativeAdId=jp.prototype.getCreativeAdId;jp.prototype.getAdId=jp.prototype.getAdId;jp.prototype.getVastMediaWidth=jp.prototype.getVastMediaWidth;jp.prototype.getVastMediaHeight=jp.prototype.getVastMediaHeight;jp.prototype.getVastMediaBitrate=jp.prototype.getVastMediaBitrate;
|
|
691
692
|
jp.prototype.getDescription=jp.prototype.getDescription;jp.prototype.getTitle=jp.prototype.getTitle;jp.prototype.getPositionInSequence=jp.prototype.getPositionInSequence;jp.prototype.getSequenceLength=jp.prototype.getSequenceLength;jp.prototype.setMuted=jp.prototype.setMuted;jp.prototype.resize=jp.prototype.resize;jp.prototype.isLinear=jp.prototype.isLinear;jp.prototype.isMuted=jp.prototype.isMuted;jp.prototype.setVolume=jp.prototype.setVolume;jp.prototype.getVolume=jp.prototype.getVolume;
|
|
692
|
-
jp.prototype.play=jp.prototype.play;jp.prototype.pause=jp.prototype.pause;jp.prototype.skip=jp.prototype.skip;jp.prototype.canSkipNow=jp.prototype.canSkipNow;jp.prototype.getTimeUntilSkippable=jp.prototype.getTimeUntilSkippable;jp.prototype.isSkippable=jp.prototype.isSkippable;jp.prototype.isPaused=jp.prototype.isPaused;jp.prototype.getRemainingTime=jp.prototype.getRemainingTime;jp.prototype.getMinSuggestedDuration=jp.prototype.getMinSuggestedDuration;jp.prototype.getDuration=jp.prototype.getDuration;function kp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.
|
|
693
|
+
jp.prototype.play=jp.prototype.play;jp.prototype.pause=jp.prototype.pause;jp.prototype.skip=jp.prototype.skip;jp.prototype.canSkipNow=jp.prototype.canSkipNow;jp.prototype.getTimeUntilSkippable=jp.prototype.getTimeUntilSkippable;jp.prototype.isSkippable=jp.prototype.isSkippable;jp.prototype.isPaused=jp.prototype.isPaused;jp.prototype.getRemainingTime=jp.prototype.getRemainingTime;jp.prototype.getMinSuggestedDuration=jp.prototype.getMinSuggestedDuration;jp.prototype.getDuration=jp.prototype.getDuration;function kp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.1");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
693
694
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){lp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){mp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.qa(this.i,"play",function(){f.F=!0})}kp.prototype.configure=function(a){this.s=a};kp.prototype.stop=function(){this.g&&this.g.stop();this.o&&bn(this.o)};
|
|
694
695
|
kp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function mp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));np(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
695
696
|
function lp(a,b){a.m(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -708,23 +709,23 @@ r.isLinear=function(){return this.m};r.resize=function(){};r.setMuted=function(a
|
|
|
708
709
|
r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",rp);rp.prototype.release=rp.prototype.release;rp.prototype.getPodIndex=rp.prototype.getPodIndex;rp.prototype.getTimeOffset=rp.prototype.getTimeOffset;rp.prototype.getMediaUrl=rp.prototype.getMediaUrl;rp.prototype.getAdvertiserName=rp.prototype.getAdvertiserName;
|
|
709
710
|
rp.prototype.getCreativeAdId=rp.prototype.getCreativeAdId;rp.prototype.getAdId=rp.prototype.getAdId;rp.prototype.getVastMediaWidth=rp.prototype.getVastMediaWidth;rp.prototype.getVastMediaHeight=rp.prototype.getVastMediaHeight;rp.prototype.getVastMediaBitrate=rp.prototype.getVastMediaBitrate;rp.prototype.getDescription=rp.prototype.getDescription;rp.prototype.getTitle=rp.prototype.getTitle;rp.prototype.getPositionInSequence=rp.prototype.getPositionInSequence;rp.prototype.getSequenceLength=rp.prototype.getSequenceLength;
|
|
710
711
|
rp.prototype.setMuted=rp.prototype.setMuted;rp.prototype.resize=rp.prototype.resize;rp.prototype.isLinear=rp.prototype.isLinear;rp.prototype.isMuted=rp.prototype.isMuted;rp.prototype.setVolume=rp.prototype.setVolume;rp.prototype.getVolume=rp.prototype.getVolume;rp.prototype.play=rp.prototype.play;rp.prototype.pause=rp.prototype.pause;rp.prototype.skip=rp.prototype.skip;rp.prototype.canSkipNow=rp.prototype.canSkipNow;rp.prototype.getTimeUntilSkippable=rp.prototype.getTimeUntilSkippable;
|
|
711
|
-
rp.prototype.isSkippable=rp.prototype.isSkippable;rp.prototype.isPaused=rp.prototype.isPaused;rp.prototype.getRemainingTime=rp.prototype.getRemainingTime;rp.prototype.getMinSuggestedDuration=rp.prototype.getMinSuggestedDuration;rp.prototype.getDuration=rp.prototype.getDuration;function sp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.
|
|
712
|
-
sp.prototype.release=function(){this.stop();this.o&&this.o.release()};sp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(up(this,this.G,this.
|
|
713
|
-
function vp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=jg([b],Qf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=qd(e)),f=a.K.request(7,d),ua(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=kd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.
|
|
712
|
+
rp.prototype.isSkippable=rp.prototype.isSkippable;rp.prototype.isPaused=rp.prototype.isPaused;rp.prototype.getRemainingTime=rp.prototype.getRemainingTime;rp.prototype.getMinSuggestedDuration=rp.prototype.getMinSuggestedDuration;rp.prototype.getDuration=rp.prototype.getDuration;function sp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.V=NaN;this.i=d;this.J=!1;this.A=null;this.j=[];this.N=[];this.M=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.S=!0;this.H="";this.o=new hb}sp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Hb(b.target,b.type,b.listener);tp(this);this.m=[];this.s=[];this.G="";this.S=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
713
|
+
sp.prototype.release=function(){this.stop();this.o&&this.o.release()};sp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(up(this,this.G,this.S),this.S=!1)};sp.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};
|
|
714
|
+
function vp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=jg([b],Qf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=qd(e)),f=a.K.request(7,d),ua(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=kd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.V,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),q=new rc(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
714
715
|
return wa(u,0)}ya(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;F(u)})}
|
|
715
716
|
function up(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A;O(function(z){if(1==z.g)return d=jg([b],Qf()),e=a.K.request(7,d),ua(z,2),E(z,e.promise,4);if(2!=z.g){f=z.h;g=[];h=kd(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),q=p.next();!q.done;q=p.next())for(u=q.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,wp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
|
|
716
717
|
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),tp(a),a.j=[];c&&(a.J||0<g.length)&&xp(a);return wa(z,0)}ya(z);F(z)})}
|
|
717
718
|
function wp(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=yp(b);if(d=a.F.get(c))return m.return();e=jg([b.staticResource],Qf());f=a.K.request(7,e);ua(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=kd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),wa(m,0);ya(m);a.F.delete(c);F(m)})}
|
|
718
719
|
function yp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function xp(a){zp(a);a.J||(Ap(a),a.o.D(a.h,"seeked",function(){Ap(a)}),a.o.D(a.h,"ended",function(){tp(a)}));a.o.D(a.h,"timeupdate",function(){zp(a)})}
|
|
719
|
-
function Ap(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.
|
|
720
|
+
function Ap(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
720
721
|
function zp(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),Bp(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),Bp(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),Bp(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
721
|
-
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Bp(a,"skipStateChanged");0<e&&(0>=d||d>e)&&tp(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.
|
|
722
|
+
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Bp(a,"skipStateChanged");0<e&&(0>=d||d>e)&&tp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}tp(a);a.M=e;a.g=new rp(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&Bp(a,"breakStart");Cp(a);break}}}if(!a.g)for(d=
|
|
722
723
|
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(yp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){tp(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||
|
|
723
|
-
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.
|
|
724
|
-
function tp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.
|
|
724
|
+
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.M=e;a.g=new rp(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&Bp(a,"breakStart");Cp(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
725
|
+
function tp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.N.push(a.C.adId);var b=a.g.l;(void 0===b?0:b)?Bp(a,"skip"):Bp(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Hb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Bp(a,"breakEnd");a.g=null;a.C=null;a.M=null}}
|
|
725
726
|
function Cp(a){var b=!1;a.h.paused?b=!0:(Bp(a,"impression"),Bp(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Bp(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Bp(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Bp(a,"impression"),Bp(a,"start"),b=!1):Bp(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Bp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
|
|
726
727
|
d.type,d.listener)}
|
|
727
|
-
function Bp(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.
|
|
728
|
+
function Bp(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=jg([d],Qf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
|
|
728
729
|
case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
|
|
729
730
|
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function Dp(a,b){this.g=a;this.i=null;this.h=b}r=Dp.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
730
731
|
r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.h.muted=a};
|
|
@@ -739,10 +740,10 @@ this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new
|
|
|
739
740
|
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=Ep.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
|
|
740
741
|
function Fp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){bg.call(this);this.g=this.h=this.i=null;this.j=new ip;this.m=navigator.language;this.l=null}oa(Y,bg);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new kp(a,b,this.m,c,function(e){return Gp(d,e)});this.i.configure(this.l)};
|
|
741
742
|
r.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);bg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new ip};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
|
|
742
|
-
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new sp(a,b,c,function(e){return Gp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Sf,vp(d,a,b),d.H=c||"",d.
|
|
743
|
+
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new sp(a,b,c,function(e){return Gp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Sf,vp(d,a,b),d.H=c||"",d.V=Date.now()/1E3,a=d.l);return a};
|
|
743
744
|
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Ep(a,b,this.m,function(d){return Gp(c,d)});this.g.configure(this.l)};
|
|
744
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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.
|
|
745
|
-
(c.G=!0),c.j=new Sf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('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.
|
|
745
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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 T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
746
|
+
(c.G=!0),c.j=new Sf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('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)};
|
|
746
747
|
r.getServerSideCuePoints=function(){qb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
747
748
|
r.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)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
748
749
|
function Gp(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)}S("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
|
|
@@ -755,13 +756,13 @@ function Ip(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("
|
|
|
755
756
|
function Jp(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
756
757
|
var Kp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Lp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Mp=["loop","playbackRate"],Np=["pause","play"],Op={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
757
758
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Pp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Qp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Rp=[["getConfiguration","configure"]],Sp=[["isTextTrackVisible","setTextTrackVisibility"]],Tp="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
758
|
-
Up=["attach","attachCanvas","detach","load","unload"];function Vp(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Lc(b);this.
|
|
759
|
+
Up=["attach","attachCanvas","detach","load","unload"];function Vp(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Lc(b);this.M=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.J="";this.o=null;this.B=function(){return Wp(h)};this.C=function(k,l){k=Ip(l);switch(k.type){case "event":var m=k.targetName,n=$f(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.s&&(h.M(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
|
|
759
760
|
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Xp.add(this)}r=Vp.prototype;r.destroy=function(){Xp.delete(this);Yp(this);Zp&&$p(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.$a=function(){return this.h};r.Cf=function(){return this.J};
|
|
760
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.pc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Xp),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Sf;d.s=!0;aq(d,e)}},function(b){for(var c=t(Xp),d=c.next();!d.done;d=c.next())d=d.value,bq="available"==b,d.l.pc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});bq&&this.l.
|
|
761
|
+
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.pc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Xp),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Sf;d.s=!0;aq(d,e)}},function(b){for(var c=t(Xp),d=c.next();!d.done;d=c.next())d=d.value,bq="available"==b,d.l.pc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});bq&&this.l.W(cq);(a=Zp)&&
|
|
761
762
|
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Sf,this.s=!0,aq(this,a)):Zp=null}else window.__onGCastApiAvailable!==dq&&(eq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=dq)};r.Kf=function(a){this.o=a;this.h&&fq(this,{type:"appData",appData:this.o})};
|
|
762
763
|
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!bq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Sf;chrome.cast.requestSession(function(c){return aq(a,c)},function(c){return gq(a,c)});return E(b,a.j,0)})};function hq(a){a.h&&chrome.cast.requestSession(function(b){return aq(a,b)},function(b){return gq(a,b)})}r.Ac=function(){if(this.h){Yp(this);if(Zp){$p(this);try{Zp.stop(function(){},function(){})}catch(a){}Zp=null}Wp(this)}};
|
|
763
764
|
r.get=function(a,b){var c=this;if("video"==a){if(Np.includes(b))return function(){return c.Hg.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))}}else if("player"==a){if(Qp[b]&&!this.get("player","isLive")())return function(){};if(Tp.includes(b))return function(){return c.Hg.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))};if(Up.includes(b))return function(){return c.xi.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))};if(Op[b]||Pp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
764
|
-
r.set=function(a,b,c){this.g[a][b]=c;fq(this,{type:"set",targetName:a,property:b,value:c})};function aq(a,b){var c=a.
|
|
765
|
+
r.set=function(a,b,c){this.g[a][b]=c;fq(this,{type:"set",targetName:a,property:b,value:c})};function aq(a,b){var c=a.N();Zp=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Wp(a);fq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function gq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
|
|
765
766
|
r.Hg=function(a,b){fq(this,{type:"call",targetName:a,methodName:b,args:Ka.apply(2,arguments)})};r.xi=function(a,b){var c=Ka.apply(2,arguments),d=new Sf,e=this.H.toString();this.H++;this.i[e]=d;try{fq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function $p(a){var b=Zp;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
766
767
|
function Wp(a){var b=Zp?"connected"==Zp.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Yp(a)}a.h=b;a.J=b?Zp.receiver.friendlyName:"";a.l.pc()}function Yp(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function fq(a,b){b=Hp(b);var c=Zp;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.Ac(),b;}}var cq=.02,bq=!1,Zp=null,eq=null,Xp=new Set;
|
|
767
768
|
function dq(a){eq?window.__onGCastApiAvailable=eq:delete window.__onGCastApiAvailable;eq=null;if(a)for(var b=t(Xp),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function iq(a,b,c,d){d=void 0===d?!1:d;bg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Vp(c,function(){return jq(e)},function(){return kq(e)},function(f,g){return lq(e,f,g)},function(){return mq(e)},function(){return nq(e)},d);oq(this)}oa(iq,bg);r=iq.prototype;
|
|
@@ -784,11 +785,11 @@ r.Ki=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.
|
|
|
784
785
|
r.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.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,bg.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
785
786
|
function vq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return wq(a)};b.onSenderDisconnected=function(){return wq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&xq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);xq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return yq(a,
|
|
786
787
|
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return zq(a,e)};b.start();b=t(Kp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Aq(a,"video",e)});for(var d in ag)a.j.D(a.h,ag[d],function(e){return Aq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;Bq(a)});a.j.D(a.g,"playing",function(){a.o=!1;Bq(a)});a.j.D(a.g,"pause",function(){Bq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Bq(a)});
|
|
787
|
-
a.j.D(a.g,"ended",function(){(new Lc(function(){a.g&&a.g.ended&&(a.o=!0,Bq(a))})).
|
|
788
|
+
a.j.D(a.g,"ended",function(){(new Lc(function(){a.g&&a.g.ended&&(a.o=!0,Bq(a))})).W(Cq)})}function wq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Bq(a)}function Bq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);Dq(a)||Eq(a);F(c)})}
|
|
788
789
|
function Fq(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(q){switch(q.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ua(q,5),E(q,a.h.load(b.manifest,b.startTime),7)):E(q,Promise.resolve(),3);case 7:wa(q,3);break;case 5:return g=ya(q),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),q.return();case 3:if(!a.h)return q.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);
|
|
789
790
|
a.g.autoplay=f;b.manifest&&(a.g.play(),Eq(a));F(q)}})}function Aq(a,b,c){a.h&&(uq(a),xq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
790
|
-
function uq(a){a.G.
|
|
791
|
-
1);Dq(a)}function Dq(a){return a.A&&(a.g.duration||a.h.
|
|
791
|
+
function uq(a){a.G.W(Gq);for(var b={video:{},player:{}},c=t(Lp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in Qp)0==a.m%Qp[e]&&(b.player[e]=a.h[e]());for(var f in Op)0==a.m%Op[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;xq(a,{type:"update",update:b},a.l);for(var g in Pp)0==a.m%Pp[g]&&(b={player:{}},b.player[g]=a.h[g](),xq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
792
|
+
1);Dq(a)}function Dq(a){return a.A&&(a.g.duration||a.h.T())?(Hq(a),a.A=!1,!0):!1}function Hq(a,b){var c={contentId:a.h.Bc(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Eq(a,void 0===b?0:b,c)}
|
|
792
793
|
function zq(a,b){var c=Ip(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Fq(a,c.initState,c.appData);uq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
793
794
|
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Iq(a,g,f,null)},function(h){return Iq(a,g,f,h)})}}
|
|
794
795
|
function yq(a,b){var c=Ip(b.data);switch(c.type){case "PLAY":a.g.play();Eq(a);break;case "PAUSE":a.g.pause();Eq(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(),Eq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Eq(a));break;case "STOP":a.h.qc().then(function(){a.h&&Eq(a)});break;case "GET_STATUS":Hq(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));
|
|
@@ -801,16 +802,16 @@ function Wq(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Xq:d=Yq.has(c)?Yq.
|
|
|
801
802
|
var Xq=0,Zq=1,ar=2,cr=3,Yq=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"]]),$q=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"]]),br=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
|
|
802
803
|
"\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"]]),dr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
803
804
|
[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"]]),Uq=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 fr(a,b){this.h=gr;this.o=new Rq(a,b);this.i=new Rq(a,b);this.g=this.j=new Rq(a,b);this.l=0;this.m=null}function hr(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ir&&a.h!==jr&&(e=Tq(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Vq(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Vq(c,0,15),d.g=15);a.h=ir;d.h=b;return e}function kr(a){a.h=lr;a.g=a.j;a.g.h=0}function mr(a){bb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=jr}
|
|
804
|
-
var gr=0,lr=1,ir=3,jr=4,nr="black green blue cyan red yellow magenta black".split(" "),or="white green blue cyan red yellow magenta white_italics".split(" ");function pr(a,b){this.J=b;this.
|
|
805
|
-
function vr(a,b,c){var d=new Nb(a.j,b,"");d.textAlign=a.F===wr?"left":a.F===xr?"right":Qb;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.
|
|
805
|
+
var gr=0,lr=1,ir=3,jr=4,nr="black green blue cyan red yellow magenta black".split(" "),or="white green blue cyan red yellow magenta white_italics".split(" ");function pr(a,b){this.J=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.M=this.H=0;this.F=qr;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";rr(this)}function rr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(sr())}function sr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function tr(a,b){ur(a)&&(a.i[a.h][a.g]=new Qq(b,a.C,a.A,a.s,a.B),a.g++)}function ur(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}pr.prototype.isVisible=function(){return this.l};
|
|
806
|
+
function vr(a,b,c){var d=new Nb(a.j,b,"");d.textAlign=a.F===wr?"left":a.F===xr?"right":Qb;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.K?gc:2;switch(a.G){case yr:e.regionAnchorX=0;e.regionAnchorY=0;break;case zr:e.regionAnchorX=50;e.regionAnchorY=0;break;case Ar:e.regionAnchorX=100;e.regionAnchorY=0;break;case Br:e.regionAnchorX=0;e.regionAnchorY=50;break;case Cr:e.regionAnchorX=
|
|
806
807
|
50;e.regionAnchorY=50;break;case Dr:e.regionAnchorX=100;e.regionAnchorY=50;break;case Er:e.regionAnchorX=0;e.regionAnchorY=100;break;case Fr:e.regionAnchorX=50;e.regionAnchorY=100;break;case Gr:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Nq(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var wr=0,xr=1,qr=2,yr=0,zr=1,Ar=2,Br=3,Cr=4,Dr=5,Er=6,Fr=7,Gr=8;function Hr(){this.i=[];this.h=null;this.g=0}function Ir(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 Jr(a.h)),a.h=null,a.g=0))}function Jr(a){this.g=0;this.h=a}Jr.prototype.ka=function(){return this.g<this.h.length};Jr.prototype.wa=function(){return this.g};function Kr(a){if(!a.ka())throw new T(2,2,3E3);return a.h[a.g++]}Jr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function Lr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
807
808
|
function Mr(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=Kr(b).value;b=null;c=t(Nr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=vr(e,d,a.i)),rr(e);return b}if(137===c)for(b=Kr(b).value,b=t(Nr(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=Kr(b).value;b=null;c=t(Nr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=vr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Kr(b).value;
|
|
808
809
|
b=null;c=t(Nr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=vr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Kr(b).value,Or(a,b,d);if(143===c)return d=Or(a,255,d),Pr(a),d;if(144===c)b.skip(1),d=Kr(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Kr(b).value,c=Kr(b).value,b.skip(1),a.g&&(b=Qr((c&48)>>4,(c&12)>>2,c&3),a.g.B=Qr((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Kr(b).value,b=Kr(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
809
|
-
b.skip(1),d=Kr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new pr(c,a.i);f.j=d;a.h[c]=f}d=Kr(b).value;f=Kr(b).value;var g=Kr(b).value,h=Kr(b).value,k=Kr(b).value;b=Kr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.
|
|
810
|
+
b.skip(1),d=Kr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new pr(c,a.i);f.j=d;a.h[c]=f}d=Kr(b).value;f=Kr(b).value;var g=Kr(b).value,h=Kr(b).value,k=Kr(b).value;b=Kr(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.M=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
810
811
|
function Nr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Or(a,b,c){var d=null;b=t(Nr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=vr(f,c,a.i));a.h[e]=null}return d}function Pr(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Qr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Rr[a<<2|b<<1|c]}
|
|
811
812
|
var Sr=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"]]),Rr="black blue green cyan red magenta yellow white".split(" ");function Tr(){this.h=[];this.g=[];this.i=new Hr;this.l=0;this.m=new Map([["CC1",new fr(0,0)],["CC2",new fr(0,1)],["CC3",new fr(1,0)],["CC4",new fr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Ur(this)}Tr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Ur(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Pr(b.value)};
|
|
812
813
|
function Ur(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=gr,c.g=c.j,c.m=null,Sq(c.i),Sq(c.j),Sq(c.o);a.B=!0}
|
|
813
|
-
Tr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new zg(a,0);if(!(8>a.getLength())&&181===a.
|
|
814
|
+
Tr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new zg(a,0);if(!(8>a.getLength())&&181===a.R()&&49===a.ta()&&1195456820===a.O()&&3===a.R()&&(c=a.R(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.R(),f=(e&4)>>2,g=a.R(),h=a.R();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ya:g,yb: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})))}};
|
|
814
815
|
Tr.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=Vr(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Ir(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Wr(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
815
816
|
function Vr(a,b){var c=b.type;if(16===(b.Ya&112)){var d=b.Ya>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Ya&&255===b.yb||!b.Ya&&!b.yb||!Xr(b.Ya)||!Xr(b.yb))return 45<=++a.l&&Ur(a),null;a.l=0;b.Ya&=127;b.yb&=127;var e=b.Ya;if(1<=e&&15>=e||!b.Ya&&!b.yb)return null;e=null;if(16===(b.Ya&112))a:{a.A.add(d),d=b.Ya;a=b.yb;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=
|
|
816
817
|
"white";e=!1;7>f?d=or[f]:7===f&&(e=!0);a=1===(a&1);c.h!==jr&&(f=c.g,c.h===ir&&b!==f.g&&(c=1+b-f.h,er(f,c,1+f.g-f.h,f.h),Vq(f,0,c-1),Vq(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Wq(c.g,Xq,32),d=!1,b=or[(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=nr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Wq(c.g,
|
|
@@ -820,11 +821,11 @@ function Wr(a,b){var c=[];try{for(;b.ka();){var d=Kr(b).value,e=(d&224)>>5,f=d&3
|
|
|
820
821
|
0,v=1;16>v;v++,u++)p.i[u]=p.i[v];for(v=0;1>v;v++,u++)p.i[u]=sr()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=vr(q,p,g.i));q.i[q.h]=sr();q.g=0;break;case 12:q.isVisible()&&(e=vr(q,p,g.i)),rr(q),p=q,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Mr(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?tr(g.g,
|
|
821
822
|
"\u266a"):tr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&tr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Sr.has(e)){var A=Sr.get(e);tr(g.g,A)}else tr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?tr(g.g,"_"):tr(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(z){if(z instanceof T&&3E3===z.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw z;}return c}function Xr(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
822
823
|
Tr.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",Tr);Ib=function(){return new Tr};function Yr(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 Zr(){this.j=new Map;this.i=this.h=0;this.g=$r}
|
|
823
|
-
Zr.prototype.init=function(a){function b(f){f=f.name;f in as&&(c.g=as[f])}var c=this,d=[],e=[];(new Cg).box("moov",Hg).box("mvex",Hg).
|
|
824
|
+
Zr.prototype.init=function(a){function b(f){f=f.name;f in as&&(c.g=as[f])}var c=this,d=[],e=[];(new Cg).box("moov",Hg).box("mvex",Hg).P("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Hg).P("tkhd",function(f){f=Vi(f.reader,f.version);d.push(f.trackId)}).box("mdia",Hg).P("mdhd",function(f){f=Ti(f.reader,f.version);e.push(f.timescale)}).box("minf",Hg).box("stbl",Hg).P("stsd",Lg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
|
|
824
825
|
b).box("dvh1",b).box("dvhe",b).box("encv",Mg).box("sinf",Hg).box("frma",function(f){f=Wi(f.reader).Ia;f in as&&(c.g=as[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==$r&&ab("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
825
|
-
Zr.prototype.parse=function(a){var b=this;if(this.g==$r)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Cg).box("moof",function(l){f=l.start;g=[];Hg(l)}).box("traf",Hg).
|
|
826
|
+
Zr.prototype.parse=function(a){var b=this;if(this.g==$r)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Cg).box("moof",function(l){f=l.start;g=[];Hg(l)}).box("traf",Hg).P("trun",function(l){l=Ui(l.reader,l.version,l.flags);g.push(l)}).P("tfhd",function(l){l=Ri(l.reader,l.flags);d=l.jg||b.h;e=l.th||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).P("tfdt",function(l){h=Si(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw ab("Unable to find base media decode time for CEA captions!"),
|
|
826
827
|
new T(2,2,2010);bs(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
827
|
-
function bs(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Ig});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].sh);b.ka();){g=b.
|
|
828
|
+
function bs(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Ig});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].sh);b.ka();){g=b.O();var p=b.R(),q=null;q=!1;h=1;switch(a.g){case cs:q=p&31;q=6==q;break;case ds:h=2;b.skip(1);q=p>>1&63;q=39==q||40==q;break;default:return}if(q)for(p=0,l<n.length&&(p=n[l].re||0),p=(c+p)/d,h=t(Yr(b.vb(g-h))),q=h.next();!q.done;q=h.next())k.push({packet:q.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
828
829
|
c+(n[l].Gf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Zr);var $r=0,cs=1,ds=2,as={avc1:cs,avc3:cs,hev1:ds,hvc1:ds,dvav:cs,dva1:cs,dvh1:ds,dvhe:ds};Hb["video/mp4"]=function(){return new Zr};function es(){this.g=null}es.prototype.init=function(){};es.prototype.parse=function(a){this.g?this.g.clearData():this.g=new pj;var b=[];a=Ab(a);if(!wj(a))return b;a=this.g.parse(a);var c=a.hd(),d=a.Xd();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(Yr(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
829
830
|
S("shaka.cea.TsCeaParser",es);Hb["video/mp2t"]=function(){return new es};function fs(a,b,c){var d=gs(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Lc});if(1<f.length)throw new T(2,4,4050);f.length&&(g=hs(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Lc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Lc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
830
831
|
l.Lc});f.length&&(a=is(e,k,f,c,h),0==a.length&&(a=[Ed("",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(Ed(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{ig:h,Qj:e,drmInfos:a,He:g,ng:!0}}
|
|
@@ -845,14 +846,14 @@ function ts(a,b,c){b=us(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=bh(d.
|
|
|
845
846
|
function vs(a,b,c,d,e,f){for(var g=fh(a,"http://www.w3.org/1999/xlink","href"),h=fh(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=Ug("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Uf(new T(2,4,4028));if("onLoad"!=h)return Uf(new T(2,4,4027));var p=Cd([d],[g]);return e.request(0,jg(p,b)).va(function(q){q=Rg(q.data,a.tagName);if(!q)return Uf(new T(2,4,4001,g));for(a.children=
|
|
846
847
|
[];q.children.length;){var u=q.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(q.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=q.attributes[v];return ws(a,b,c,p[0],e,f+1)})}
|
|
847
848
|
function ws(a,b,c,d,e,f){f=void 0===f?0:f;if(fh(a,"http://www.w3.org/1999/xlink","href")){var g=vs(a,b,c,d,e,f);c&&(g=g.va(void 0,function(){return ws(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(Xg(a)),l=k.next();!l.done;h={uc:h.uc},l=k.next())h.uc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==fh(h.uc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.uc}}(h)):"SegmentTimeline"!=h.uc.tagName&&g.push(ws(h.uc,b,c,d,e,f));return Yf(g).va(function(){return a})}
|
|
848
|
-
;function xs(a,b,c,d,e,f,g){var h,k=(new Cg).
|
|
849
|
-
function ys(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.
|
|
849
|
+
;function xs(a,b,c,d,e,f,g){var h,k=(new Cg).P("sidx",function(l){h=ys(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
850
|
+
function ys(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Kc(),m=g.reader.Kc();g.reader.skip(2);var n=g.reader.ta();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.O(),q=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==q)throw new T(2,3,3006);h.push(new Bi(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 zs(a){this.h=Eb(a);this.g=new zg(this.h,0)}zs.prototype.ka=function(){return this.g.ka()};
|
|
850
851
|
function As(a){var b=Bs(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Bs(a);a:{d=t(Cs);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new Ds(c,
|
|
851
|
-
d)}function Bs(a){var b=a.g.wa(),c=a.g.
|
|
852
|
+
d)}function Bs(a){var b=a.g.wa(),c=a.g.R();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ab(a.h,b,c)}var Cs=[[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 Ds(a,b){this.id=a;this.g=b}
|
|
852
853
|
function Es(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Fs(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new zs(a.g);for(var n=null,p=null;a.ka();){var q=As(a);if(187==q.id){var u=Gs(q);u&&(q=c*u.Ri,u=b+u.vi,null!=n&&m.push(new Bi(n+g,q+g,l,p,u-1,f,g,h,k)),n=q,p=u)}}null!=n&&m.push(new Bi(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
853
854
|
function Gs(a){var b=new zs(a.g);a=As(b);if(179!=a.id)throw new T(2,3,3013);a=Es(a);b=As(b);if(183!=b.id)throw new T(2,3,3012);b=new zs(b.g);for(var c=0;b.ka();){var d=As(b);if(241==d.id){c=Es(d);break}}return{Ri:a,vi:c}};function Hs(a,b,c){b=ts(a,b,"Initialization");if(!b)return null;var d=a.I.Aa(),e=b.attributes.sourceURL;e&&(d=Cd(d,[ud(e)]));e=0;var f=null;if(b=eh(b,"range",jh))e=b.start,f=b.end;c=new zi(function(){return d},e,f,Is(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
|
|
854
855
|
function Js(a,b,c){var d=Number(ss(a,Ks,"presentationTimeOffset"))||0,e=ss(a,Ks,"timescale"),f=1;e&&(f=lh(e)||1);var g=d/f||0,h=Hs(a,Ks,c);Ls(a,h);var k=De(a);return{$b:function(){var l=ts(k,Ks,"RepresentationIndex");var m=k.I.Aa();l&&(l=ud(l.attributes.sourceURL))&&(m=Cd(m,[l]));l=Ms(k);return Ns(k,b,h,m,l.start,l.end,g)}}}
|
|
855
|
-
function Ns(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K;return O(function(H){if(1==H.g)return h=a.presentationTimeline,k=!a.qb||!a.ha.sd,l=a.ha.start,m=a.ha.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,u=[p(d,e,f,!1),"webm"==n?p(c
|
|
856
|
+
function Ns(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K;return O(function(H){if(1==H.g)return h=a.presentationTimeline,k=!a.qb||!a.ha.sd,l=a.ha.start,m=a.ha.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,u=[p(d,e,f,!1),"webm"==n?p(c.L(),c.Ba,c.ja,!0):null],p=null,E(H,Promise.all(u),2);v=H.h;w=v[0];A=v[1]||null;z=null;y=l-g;B=l;C=m?l+m:Infinity;if("mp4"==n)var I=xs(w,e,d,c,y,B,C);else{I=new zs(A);if(440786851!=As(I).id)throw new T(2,3,3008);var G=As(I);if(408125543!=G.id)throw new T(2,
|
|
856
857
|
3,3009);I=G.g.byteOffset;G=new zs(G.g);for(var L=null;G.ka();){var M=As(G);if(357149030==M.id){L=M;break}}if(!L)throw new T(2,3,3010);L=new zs(L.g);M=1E6;for(G=null;L.ka();){var N=As(L);if(2807729==N.id)M=Es(N);else if(17545==N.id)if(4==N.g.byteLength)G=N.g.getFloat32(0);else if(8==N.g.byteLength)G=N.g.getFloat64(0);else throw new T(2,3,3003);}if(null==G)throw new T(2,3,3011);L=M/1E9;G*=L;M=As(new zs(w));if(475249515!=M.id)throw new T(2,3,3007);I=Fs(M,I,L,G,d,c,y,B,C)}z=I;D=t(z);for(J=D.next();!J.done;J=
|
|
857
858
|
D.next())K=J.value,K.codecs=a.I.codecs,K.mimeType=a.I.mimeType;h.vd(z);q=new Kk(z);k&&q.yc(B,C,!0);return H.return(q)})}function Ks(a){return a.Mc}function Ms(a){var b=ts(a,Ks,"RepresentationIndex");a=ss(a,Ks,"indexRange");a=jh(a||"");b&&(a=eh(b,"range",jh,a));return a}function Ls(a,b){Os(a,b);if(!Ms(a))throw new T(2,4,4002);}function Os(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Ld&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
858
859
|
function Is(a){var b=a.I;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.Hc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Ps(a,b,c){var d=Hs(a,Qs,c),e=Rs(a);if(!e.Fa&&!e.timeline&&1<e.Fc.length)throw new T(2,4,4002);if(!e.Fa&&!a.ha.duration&&!e.timeline&&1==e.Fc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.ra.id&&a.I.id&&(g=b[a.ra.id+","+a.I.id])&&(f=g.segmentIndex);var h=Ss(a.ha.start,a.ha.duration,a.I.Aa,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.ud(h,a.presentationTimeline.jb()):f=new Kk(h);a.presentationTimeline.vd(h);a.qb&&a.ha.sd||f.yc(a.ha.start,
|
|
@@ -862,7 +863,7 @@ function Ts(a){return[a.I.Gb,a.pa.Gb,a.ra.Gb].filter(re).map(function(b){return
|
|
|
862
863
|
(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity,v=!(a.qb&&a.ha.sd);p?(c=p,$s(c,m,q,u,v,l),c.Ja(a.presentationTimeline.jb())):p=new at(m,a.I.id,a.bandwidth,a.I.Aa,q,u,l,v,g,a.I.Hf);m.timeline&&"image"!==a.pa.contentType&&a.presentationTimeline.Eg(m.timeline,q);d&&a.qb&&(d.segmentIndex=p);return{$b:function(){p instanceof at&&0==p.getNumReferences()&&$s(p,m,q,u,v,l);return Promise.resolve(p)}}}function Vs(a){return a.Pb}
|
|
863
864
|
function Xs(a){var b=rs(a,Vs),c=ss(a,Vs,"media"),d=ss(a,Vs,"index");return{Fa:b.Fa,timescale:b.timescale,Bd:b.Bd,Fb:b.Fb,Wf:b.Wf,timeline:b.timeline,Gc:c&&ud(c),qd:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function Ys(a){var b=a.qd?1:0;b+=a.timeline?1:0;b+=a.Fa?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.qd&&(a.timeline=null),a.Fa=null);if(!a.qd&&!a.Gc)throw new T(2,4,4002);}
|
|
864
865
|
function Zs(a,b,c,d,e,f,g){function h(G){var L=(G-v)*u,M=L+b.Fb,N=L+n;L=N+u;var P=Math.min(L,l());N=new Bi(N,P,function(){var R=M*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(M)*BigInt(w));R=qs(A,y,G,null,z,R);return Cd(B(),[R])},0,null,d,C,n,l(),[],"",null,null,Ci,f);N.codecs=a.I.codecs;N.mimeType=a.I.mimeType;N.i=L;return N}function k(){var G=[Math.max(m.jb(),n),Math.min(m.Mb(),l())].map(function(L){return L-n});G=[Math.ceil(G[0]/u),Math.ceil(G[1]/u)-1];a.I.Ca&&G[1]++;return G.map(function(L){return L+
|
|
865
|
-
v})}function l(){var G=null!=p&&e[p]||q;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.ra.id,q=a.ha.duration,u=b.Fa,v=b.Bd,w=b.timescale,A=b.Gc,z=a.bandwidth||null,y=a.I.id,B=a.I.Aa,C=n-b.Fb,D=k();c=a.qb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var J=c;J<=g;++J){var K=h(J);D.push(K)}var H=new Kk(D);D=m.Mb()<l();J=m.
|
|
866
|
+
v})}function l(){var G=null!=p&&e[p]||q;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.ra.id,q=a.ha.duration,u=b.Fa,v=b.Bd,w=b.timescale,A=b.Gc,z=a.bandwidth||null,y=a.I.id,B=a.I.Aa,C=n-b.Fb,D=k();c=a.qb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var J=c;J<=g;++J){var K=h(J);D.push(K)}var H=new Kk(D);D=m.Mb()<l();J=m.T();if(D||J){var I=Math.max(c,g+1);c=u;a.I.Ca&&(c=.1);H.ue(c,function(){var G=m.jb();H.Ja(G);var L=t(k());L.next();L=L.next().value;for(var M=[];I<=L;){var N=
|
|
866
867
|
h(I);M.push(N);I++}return G>l()&&!M.length?null:M})}return Promise.resolve(H)}function Ws(a,b){var c=a.I.Ec;c||(c=ss(a,Vs,"initialization"));if(!c)return null;c=ud(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.Aa;b=new zi(function(){var g=qs(c,d,null,null,e,null);return Cd(f(),[g])},0,null,Is(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
|
|
867
868
|
function at(a,b,c,d,e,f,g,h,k,l){Kk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&bt(this)}oa(at,Kk);r=at.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Kk.prototype.release.call(this);this.h=null};
|
|
868
869
|
r.Ja=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())}};
|
|
@@ -872,25 +873,25 @@ r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this
|
|
|
872
873
|
null==A.ad&&(A.ad=dt(b.h.Gc,b.F,f,b.B,g,A.Ce,b.C));return A.ad}}(q),0,null,this.s,c,this.i,this.l,[],"",null,null,Ci,this.A);v.codecs=l;v.mimeType=m;0==this.G?0<u&&v.ee():0!=u%this.G&&v.ee();n.push(v)}c=new Bi(this.i+e.start,k,function(){return 0<e.ub?[]:dt(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,Ci,this.A,0<e.ub);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
|
|
873
874
|
function dt(a,b,c,d,e,f,g){a=qs(a,b,c,f,d||null,e);return Cd(g(),[a]).map(function(h){return h.toString()})};function et(a){var b=Zd(a),c=b.split("/")[0];a=$d(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Zf:null,colorGamut:null}}
|
|
874
875
|
function ft(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=
|
|
875
|
-
null,p=null,q=null,u=null,v;(new Cg).box("moov",Hg).box("trak",Hg).
|
|
876
|
-
y.
|
|
877
|
-
y.name;Mg(y)}).box("dva1",function(y){v=y.name;Mg(y)}).box("dvav",function(y){v=y.name;Mg(y)}).box("dvh1",function(y){v=y.name;Mg(y)}).box("dvhe",function(y){v=y.name;Mg(y)}).box("vp09",function(y){v=y.name;Mg(y)}).box("av01",function(y){v=y.name;Mg(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+"."+Xi(y.
|
|
878
|
-
"hev1"}var C=y.reader;C.skip(1);y=C.
|
|
879
|
-
y.reader;C.skip(2);y=C.
|
|
876
|
+
null,p=null,q=null,u=null,v;(new Cg).box("moov",Hg).box("trak",Hg).P("tkhd",function(y){y=Vi(y.reader,y.version);l=String(y.height);m=String(y.width)}).box("mdia",Hg).P("mdhd",function(y){k=Ti(y.reader,y.version).language}).box("minf",Hg).box("stbl",Hg).P("stsd",Lg).box("mp4a",function(y){var B=y.reader;B.skip(6);B.skip(2);B.skip(8);var C=B.ta();B.skip(2);B.skip(2);B.skip(2);B=B.ta()+B.ta()/65536;n=C;p=B;y.reader.ka()?Hg(y):c(y)}).box("esds",function(y){y=y.reader;for(var B="mp4a",C,D;y.ka();){C=
|
|
877
|
+
y.R();for(var J=y.R();J&128;)J=y.R();if(3==C)y.ta(),J=y.R(),J&128&&y.ta(),J&64&&y.skip(y.R()),J&32&&y.ta();else if(4==C)D=y.R(),y.skip(12);else if(5==C)break}D&&(B+="."+Xi(D),5==C&&y.ka()&&(C=y.R(),D=(C&248)>>3,31===D&&y.ka()&&(D=32+((C&7)<<3)+((y.R()&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;Mg(y)}).box("avc3",function(y){v=y.name;Mg(y)}).box("hev1",function(y){v=y.name;Mg(y)}).box("hvc1",function(y){v=
|
|
878
|
+
y.name;Mg(y)}).box("dva1",function(y){v=y.name;Mg(y)}).box("dvav",function(y){v=y.name;Mg(y)}).box("dvh1",function(y){v=y.name;Mg(y)}).box("dvhe",function(y){v=y.name;Mg(y)}).box("vp09",function(y){v=y.name;Mg(y)}).box("av01",function(y){v=y.name;Mg(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+"."+Xi(y.R())+Xi(y.R())+Xi(y.R());f.push(y);h=!0}).box("hvcC",function(y){var B=v||"";switch(v){case "dvh1":B="hvc1";break;case "dvhe":B=
|
|
879
|
+
"hev1"}var C=y.reader;C.skip(1);y=C.R();var D=["","A","B","C"][y>>6],J=y&31,K=C.O(),H=(y&32)>>5?"H":"L";y=[C.R(),C.R(),C.R(),C.R(),C.R(),C.R()];C=C.R();for(var I=0,G=0;32>G;G++){I|=K&1;if(31==G)break;I<<=1;K>>=1}B=B+("."+D+J)+("."+Xi(I,!0));B+="."+H+C;D="";for(J=y.length;J--;)if((H=y[J])||D)D="."+H.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=
|
|
880
|
+
y.reader;C.skip(2);y=C.R();C=C.R();f.push(B+"."+Yi(y>>1&127)+"."+Yi(y<<5&32|C>>3&31));h=!0}).P("vpcC",function(y){var B=v||"",C=y.reader;y=C.R();var D=C.R();C=C.R()>>4&15;f.push(B+"."+Yi(y)+"."+Yi(D)+"."+Yi(C));h=!0}).box("av1C",function(y){var B=v||"",C=y.reader;C.skip(1);y=C.R();C=C.R();var D=y>>>5,J=(C&64)>>6;f.push(B+"."+D+"."+Yi(y&31)+(C>>>7?"H":"M")+"."+Yi(2===D&&J?(C&32)>>5?12:10:J?10:8)+"."+((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+Yi(1)+"."+Yi(1)+"."+Yi(1)+".0");h=!0}).box("enca",Ng).box("encv",
|
|
880
881
|
Mg).box("sinf",Hg).box("frma",function(y){y=Wi(y.reader).Ia;d(y)}).box("colr",function(y){y=y.reader;var B=null,C=null,D=y.vb(4);var J=String.fromCharCode(D[0]);J+=String.fromCharCode(D[1]);J+=String.fromCharCode(D[2]);J+=String.fromCharCode(D[3]);if("nclx"===J){switch(y.ta()){case 1:case 5:case 6:case 7:B="srgb";break;case 9:B="rec2020";break;case 11:case 12:B="p3"}D=y.ta();y.ta();switch(D){case 1:case 6:case 13:case 14:case 15:C="SDR";break;case 16:C="PQ";break;case 18:C="HLG"}}q=C;u=B}).parse(a||
|
|
881
882
|
b,!0);if(!e.length&&!f.length)return null;var w=g&&!h,A=new Map;if(h){var z=new Gb("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:gt(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:p,closedCaptions:A,Zf:q,colorGamut:u}}
|
|
882
883
|
function gt(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Yd(d);b.has(e)||(c.push(d),b.add(e))}b=Md("audio",c);d=Md("video",c);a=Md(Ld,c);d=ht(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}function ht(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?mb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
883
|
-
function it(a){var b=null;(new Cg).box("moov",Hg).box("trak",Hg).box("mdia",Hg).box("minf",Hg).box("stbl",Hg).
|
|
884
|
-
function kt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Cd(a.i,[lt(a,b)]),d=jg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),dg(a.G,e),ua(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=kd(f.data),h=JSON.parse(g),1==h.VERSION&&mt(a,h,f.uri),wa(l,0);if((k=ya(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Lc(function(){kt(a,b)});a.g.
|
|
885
|
-
function lt(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function mt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Lc(function(){kt(a,d)});if(c=b.TTL)a.C=c;a.g.
|
|
884
|
+
function it(a){var b=null;(new Cg).box("moov",Hg).box("trak",Hg).box("mdia",Hg).box("minf",Hg).box("stbl",Hg).P("stsd",Lg).box("encv",Mg).box("enca",Ng).box("sinf",Hg).box("schi",Hg).P("tenc",function(c){c=c.reader;c.R();c.R();c.R();c.R();b=Ad(c.vb(16))}).parse(a,!0);return b};function jt(a){this.o=null;this.A=a;this.G=new cg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}jt.prototype.configure=function(a){this.o=a};jt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};jt.prototype.setManifestType=function(a){this.s=a};
|
|
885
|
+
function kt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Cd(a.i,[lt(a,b)]),d=jg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),dg(a.G,e),ua(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=kd(f.data),h=JSON.parse(g),1==h.VERSION&&mt(a,h,f.uri),wa(l,0);if((k=ya(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Lc(function(){kt(a,b)});a.g.W(a.C);F(l)})}
|
|
886
|
+
function lt(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function mt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Lc(function(){kt(a,d)});if(c=b.TTL)a.C=c;a.g.W(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
886
887
|
function nt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}jt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
887
888
|
function ot(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={Ub:e.Ub},g=f.next())if(e.Ub=g.value,g=b.get(e.Ub))d.push({Af:e.Ub,location:g});else if(g=a.F.find(function(k){return function(l){return l.ij==k.Ub}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].ah?(h=new rc(h),tc(h,g["URI-REPLACEMENT"].ah),d.push({Af:e.Ub,location:h.toString()})):d.push({Af:e.Ub,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
888
889
|
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 rc(k.location)).zb))return!1;return!0});d.length&&(a.B=d[0].Af);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.B=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:Cd(a.i,d)};function pt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=pt.prototype;r.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=[]};r.Sh=function(){return this.j};r.ff=function(){return this.l.slice()};r.Ah=function(){return this.i};
|
|
889
890
|
function qt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[rt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[st(n),n]})),l=new Map(h.textStreams.map(function(n){return[tt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[ut(n),n]}));if(b){var m=vt(Ld);l.set(tt(m),m);m=vt("image");h.set(ut(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{dg:c,Yg:d,Vg:e,wg:f}}
|
|
890
891
|
r.Le=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N,P,R,Q;return O(function(fa){if(1==fa.g){e=Nd;if(!b&&1==a.length)return f=qt(a,!1),g=f.dg,h=f.Yg,k=f.Vg,l=f.wg,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()),fa.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)q=a[p],d.m.has(q.id)||(d.m.add(q.id),-1==n&&(n=p));if(-1==n)return fa.return();u=qt(a,!0);v=u.dg;w=u.Yg;A=u.Vg;z=u.wg;
|
|
891
892
|
return E(fa,Promise.all([wt(d,d.h,v,n,xt,yt,m),wt(d,d.g,w,n,xt,yt,m),wt(d,d.l,A,n,xt,yt,m),wt(d,d.i,z,n,xt,yt,m)]),2)}y=0;B=[];if(d.g.length&&d.h.length)for(I=t(d.h),G=I.next();!G.done;G=I.next())for(L=G.value,M=t(d.g),N=M.next();!N.done;N=M.next())P=N.value,R=gi(L.drmInfos,P.drmInfos),L.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=y++,B.push({id:Q,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L,video:P,bandwidth:(L.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,
|
|
892
|
-
allowedByKeySystem:!0,decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,D=t(C),J=D.next();!J.done;J=D.next())K=J.value,H=y++,B.push({id:H,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K.type==e.
|
|
893
|
-
function zt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N;return O(function(P){switch(P.g){case 1:b=Nd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.
|
|
893
|
+
allowedByKeySystem:!0,decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,D=t(C),J=D.next();!J.done;J=D.next())K=J.value,H=y++,B.push({id:H,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K.type==e.U?K:null,video:K.type==e.ga?K:null,bandwidth:K.bandwidth||0,drmInfos:K.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=B;F(fa)})};
|
|
894
|
+
function zt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N;return O(function(P){switch(P.g){case 1:b=Nd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.U}).map(function(Q){return[rt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ga}).map(function(Q){return[st(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ma}).map(function(Q){return[tt(Q),Q]}))});
|
|
894
895
|
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Ee}).map(function(Q){return[ut(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=At(b.ma),k.set(tt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=At(b.Ee),p.set(ut(q),q);u=new pt;return E(P,wt(u,[],c,0,Bt,Ct,0),2);case 2:return v=P.h,E(P,wt(u,[],d,0,Bt,Ct,0),3);case 3:return w=P.h,E(P,wt(u,[],e,0,Bt,Ct,0),4);case 4:return A=P.h,E(P,wt(u,[],f,0,Bt,Ct,0),5);case 5:z=P.h;y=0;if(w.length&&v.length)for(K=
|
|
895
896
|
t(v),H=K.next();!H.done;H=K.next())for(I=H.value,G=t(w),L=G.next();!L.done;L=G.next())M=L.value,N=y++,M.variantIds.push(N),I.variantIds.push(N);else for(B=w.concat(v),C=t(B),D=C.next();!D.done;D=C.next())J=D.value,J.variantIds=[y++];return P.return(w.concat(v).concat(A).concat(z))}})}
|
|
896
897
|
function wt(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K;return O(function(H){switch(H.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){H.u(4);break}n=m.value;return E(H,Dt(a,n,c,d,f,h,g),5);case 5:p=H.h;if(!p)throw new T(2,4,4037);m=l.next();H.u(2);break;case 4:q=t(h);for(u=q.next();!u.done;u=q.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())z=A.value,(y=Et(a,z,c,e,f,h))&&b.push(y);B=t(h);for(u=B.next();!u.done;u=
|
|
@@ -916,18 +917,18 @@ function vt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:functio
|
|
|
916
917
|
function Tt(a,b,c){if(b==a&&a!=c)return Vt;if(c==a&&a!=b)return Ut;if(b>a){if(c<=a||c-a<b-a)return Ut;if(c-a>b-a)return Vt}else{if(c>a)return Vt;if(a-c<a-b)return Ut;if(a-c>a-b)return Vt}return Xt}function Wt(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ut:b<a?Vt:Xt}function Ft(a){switch(a.type){case Ld:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
917
918
|
function st(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 rt(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 tt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
918
919
|
function ut(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}S("shaka.util.PeriodCombiner",pt);pt.prototype.setUseStreamOnce=pt.prototype.Sg;pt.prototype.setAllowMultiTypeVariants=pt.prototype.Lg;pt.prototype.combinePeriods=pt.prototype.Le;pt.prototype.getImageStreams=pt.prototype.Ah;pt.prototype.getTextStreams=pt.prototype.ff;pt.prototype.getVariants=pt.prototype.Sh;var Ut=1,Xt=0,Vt=-1,St=new Map;function Yt(a,b){var c=new DOMParser,d=Zt.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 $t(a,b){try{var c=nd(a);return Yt(c,b)}catch(d){return null}}
|
|
919
|
-
var Zt=new Jc(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 au(){var a=this;this.i=this.g=null;this.A=[];this.l=null;this.
|
|
920
|
-
r.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.
|
|
920
|
+
var Zt=new Jc(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 au(){var a=this;this.i=this.g=null;this.A=[];this.l=null;this.S=1;this.B=[];this.j={ie:"",type:"",profiles:[],Cb:null,Ca:0,Aa:null,xd:0};this.o=new Map;this.s={};this.M={};this.m=new pt;this.F=0;this.N=new Ua(5);this.G=new Lc(function(){bu(a)});this.K=new cg;this.H=null;this.V=[];this.J=Infinity;this.C=!1;this.h=null}r=au.prototype;
|
|
921
|
+
r.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.T()&&this.G.pc();this.h&&this.h.configure(this.g);this.m&&(this.m.Lg(this.g.dash.multiTypeVariantsAllowed&&ob()),this.m.Sg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.A=[a],c.i=b,E(e,cu(c),2);d=e.h;c.i&&du(c,d);if(!c.i)throw new T(2,7,7001);return e.return(c.l)})};
|
|
921
922
|
r.stop=function(){for(var a=t(Object.values(this.s)),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.s={};this.o.clear();this.j={ie:"",type:"",profiles:[],Cb:null,Ca:0,Aa:null,xd:0};this.m=null;null!=this.G&&(this.G.stop(),this.G=null);this.h&&this.h.destroy();return this.K.destroy()};
|
|
922
|
-
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ua(c,2),E(c,cu(a),4);if(2!=c.g)return wa(c,0);b=ya(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.l&&this.l.presentationTimeline.
|
|
923
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ua(c,2),E(c,cu(a),4);if(2!=c.g)return wa(c,0);b=ya(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.l&&this.l.presentationTimeline.T()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.l.presentationTimeline.Mb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,du(this,0))}}};
|
|
923
924
|
r.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
924
|
-
function cu(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=eu(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=ot(a.h,"Location",!0),e.length&&(d=e)),f=jg(d,a.g.retryParameters),g=Date.now(),E(m,fu(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,gu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.
|
|
925
|
+
function cu(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=eu(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=ot(a.h,"Location",!0),e.length&&(d=e)),f=jg(d,a.g.retryParameters),g=Date.now(),E(m,fu(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,gu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.N.sample(1,l);return m.return(l)})}
|
|
925
926
|
function gu(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=im;if(f!=g){qb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=$t(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=qd(h.outerHTML)}k=Rg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=jm;l!=m&&l(k);if("Patch"===d)return v.return(hu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(iu(a,k,c));
|
|
926
927
|
p=a.g.dash.xlinkFailGracefully;q=ws(k,a.g.retryParameters,p,c,a.i.networkingEngine);dg(a.K,q);return E(v,q.promise,2)}u=v.h;return v.return(iu(a,u,c))})}
|
|
927
928
|
function iu(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N,P,R,Q,fa,sa,Ia,xa,Ja,Qa,Ba,Wa,ra,Za,ff,Dd,be,od,Ec,ce,de,ee,pd,vi,ug,wi,xi,vg,fe;return O(function(ec){switch(ec.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Yg(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=$g(l))p=Cd(d,[n])[0],m&&(a.h?nt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=ot(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.j.ie=
|
|
928
929
|
b.attributes.id||"";a.j.xd=eh(b,"publishTime",hh)||0;a.B=Yg(b,"PatchLocation");u=Promise.resolve();if((v=bh(b,"ContentSteering"))&&a.i){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new jt(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=$g(v))(z=eh(v,"queryBeforeStart",oh,!1))?u=kt(a.h,A):kt(a.h,A);y=t(f.keys());for(B=y.next();!B.done;B=y.next())C=B.value,D=f.get(C),nt(a.h,"Location",C,D)}J=Yg(b,"BaseURL");H=!1;if(a.h)for(I=t(J),G=I.next();!G.done;G=
|
|
929
930
|
I.next())L=G.value,M=L.attributes.serviceLocation,N=$g(L),M&&N&&(nt(a.h,"BaseURL",M,N),H=!0);H&&a.h||(P=J.map($g),K=Cd(d,P));R=function(){return a.h&&H?ot(a.h,"BaseURL"):K?K:[]};a.j.Aa=R;Q=0;J&&J.length&&(Q=eh(J[0],"availabilityTimeOffset",nh)||0);a.j.Ca=Q;fa=a.g.dash.ignoreMinBufferTime;sa=0;fa||(sa=eh(b,"minBufferTime",ih)||0);a.F=eh(b,"minimumUpdatePeriod",ih,-1);Ia=eh(b,"availabilityStartTime",hh);xa=eh(b,"timeShiftBufferDepth",ih);Ja=a.g.dash.ignoreSuggestedPresentationDelay;Qa=null;Ja||(Qa=
|
|
930
|
-
eh(b,"suggestedPresentationDelay",ih));Ba=a.g.dash.ignoreMaxSegmentDuration;Wa=null;Ba||(Wa=eh(b,"maxSegmentDuration",ih));ra=b.attributes.type||"static";a.j.type=ra;if(a.l)for(Za=a.l.presentationTimeline,ff=t(Object.values(a.s)),Dd=ff.next();!Dd.done;Dd=ff.next())be=Dd.value,be.segmentIndex&&be.segmentIndex.Ja(Za.jb());else od=a.g.defaultPresentationDelay||1.5*sa,Ec=null!=Qa?Qa:od,Za=new ok(Ia,Ec,a.g.dash.autoCorrectDrift);Za.oc("static"==ra);(ce=Za.
|
|
931
|
+
eh(b,"suggestedPresentationDelay",ih));Ba=a.g.dash.ignoreMaxSegmentDuration;Wa=null;Ba||(Wa=eh(b,"maxSegmentDuration",ih));ra=b.attributes.type||"static";a.j.type=ra;if(a.l)for(Za=a.l.presentationTimeline,ff=t(Object.values(a.s)),Dd=ff.next();!Dd.done;Dd=ff.next())be=Dd.value,be.segmentIndex&&be.segmentIndex.Ja(Za.jb());else od=a.g.defaultPresentationDelay||1.5*sa,Ec=null!=Qa?Qa:od,Za=new ok(Ia,Ec,a.g.dash.autoCorrectDrift);Za.oc("static"==ra);(ce=Za.T())&&!isNaN(a.g.availabilityWindowOverride)&&
|
|
931
932
|
(xa=a.g.availabilityWindowOverride);null==xa&&(xa=Infinity);Za.te(xa);de=b.attributes.profiles||"";a.j.profiles=de.split(",");ee={qb:"static"!=ra,presentationTimeline:Za,ra:null,ha:null,pa:null,I:null,bandwidth:0,hf:!1,Ca:Q,Cb:null,profiles:de.split(",")};pd=ju(a,ee,R,b);vi=pd.duration;ug=pd.periods;"static"!=ra&&pd.lg||Za.Ua(vi||Infinity);a.J&&!a.C&&(wi=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.C=a.i.isLowLatencyMode());a.C?Za.Mg(a.J):a.J&&ab("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.");
|
|
932
933
|
Za.uf(Wa||1);return E(ec,u,2);case 2:return a.C&&(sa=0,xi=null!=Qa?Qa:a.g.defaultPresentationDelay,Za.Lf(xi)),a.l?E(ec,ku(a,pd.periods,!1),4):E(ec,a.m.Le(ug,ee.qb),6);case 6:a.l={presentationTimeline:Za,variants:a.m.j,textStreams:a.m.ff(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:sa||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:lu(b),nextUrl:mu(b)};if(!Za.Xg()){ec.u(7);break}vg=Yg(b,"UTCTiming");return E(ec,nu(a,R,vg),8);
|
|
933
934
|
case 8:fe=ec.h;if(!a.i)return ec.return();Za.Ng(fe);case 7:Za.ce();case 4:a.i.makeTextStreamsForClosedCaptions(a.l),F(ec)}})}function ku(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Le(b,!0,c),2);a.l.variants=a.m.j;d=a.m.ff();0<d.length&&(a.l.textStreams=d);a.l.imageStreams=a.m.i;a.i.filter(a.l);F(e)})}
|
|
@@ -936,11 +937,11 @@ L}}else if("type"===n.Kb){a.l.presentationTimeline.oc("static"==p);a.j.type=p;L=
|
|
|
936
937
|
Vs,"SegmentTimeline").children=[];ou(a,N);a.o.delete(N)}}else if("SegmentTemplate"===n.name){M=qh(l.attributes.sel||"");L=M[M.length-1];if(L.Kb){M=pu(a,M);N=$g(l)||"";P=t(M);for(var R=P.next();!R.done;R=P.next())R=a.o.get(R.value),sh(R.I.Pb,l.tagName,L.Kb,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=qh(l.attributes.sel||"");L=pu(a,L);M=t(L);for(N=M.next();!N.done;N=M.next())N=a.o.get(N.value),N=ts(N,Vs,"SegmentTimeline"),
|
|
937
938
|
P=Yg(N,"S"),rh(P,l),N.children=P;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,ou(a,D);J=t(f);for(K=J.next();!K.done;K=J.next())H=K.value,e.push.apply(e,x(ju(a,{qb:"dynamic"==a.j.type,presentationTimeline:a.l.presentationTimeline,ra:null,ha:null,pa:null,I:null,bandwidth:0,hf:!1,Ca:a.j.Ca,profiles:a.j.profiles,Cb:a.j.Cb},a.j.Aa,H).periods));return e.length?E(G,ku(a,e,!0),2):G.u(2)}"static"==a.j.type&&(I=a.j.Cb,a.l.presentationTimeline.Ua(I||
|
|
938
939
|
Infinity));F(G)})}function pu(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.o.values()),e=a.next();!e.done;e=a.next())e=e.value,e.ra.id===c&&e.pa.id===d&&e.I.id&&b.push(c+","+e.I.id);return b}
|
|
939
|
-
function ou(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ja(a.l.presentationTimeline.jb());try{var e=Us(c,function(f,g,h,k){return Cu(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.
|
|
940
|
+
function ou(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ja(a.l.presentationTimeline.jb());try{var e=Us(c,function(f,g,h,k){return Cu(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.M,c.I.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.u(0);f=d;return E(g,e.$b(),3)}f.segmentIndex=g.h;F(g)})}}catch(f){if(b=c.I.contentType,b!=Ld&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
940
941
|
function lu(a){var b=bh(a,"ServiceDescription");if(!b)return null;a=bh(b,"Latency");b=bh(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)));
|
|
941
942
|
return c}function mu(a){a=Yg(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}
|
|
942
|
-
function ju(a,b,c,d){var e=b.Cb;e||(e=eh(d,"mediaPresentationDuration",ih),a.j.Cb=e);var f=[],g=0;d=Yg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=eh(k,"start",ih,g),n=k.attributes.id,p=eh(k,"duration",ih),q=null;if(l){var u=eh(l,"start",ih);null!=u&&(q=u-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.H&&null!==n&&null!==m&&m<a.H)||a.
|
|
943
|
-
q&&(a.
|
|
943
|
+
function ju(a,b,c,d){var e=b.Cb;e||(e=eh(d,"mediaPresentationDuration",ih),a.j.Cb=e);var f=[],g=0;d=Yg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=eh(k,"start",ih,g),n=k.attributes.id,p=eh(k,"duration",ih),q=null;if(l){var u=eh(l,"start",ih);null!=u&&(q=u-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.H&&null!==n&&null!==m&&m<a.H)||a.V.includes(n)||h+1==d.length){null!==m&&(null===a.H||m>a.H)&&(a.H=m);g=Du(a,b,c,{start:m,duration:q,node:k,sd:null==q||!l});f.push(g);b.ra.id&&
|
|
944
|
+
q&&(a.M[b.ra.id]=q);if(null==q){g=null;break}g=m+q}}a.V=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,lg:!1}:{periods:f,duration:g,lg:!0}}
|
|
944
945
|
function Du(a,b,c,d){b.ra=Eu(a,d.node,null,c);b.ha=d;b.ra.Ca=b.Ca;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=Yg(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Fu(a,d.start,d.duration,f.value,c);c=Yg(d.node,"AdaptationSet").map(function(m){return Gu(a,b,m)}).filter(re);if(b.qb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.zi);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);
|
|
945
946
|
}d=c.filter(function(m){return!m.Uf});c=c.filter(function(m){return m.Uf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Uf.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={Ld:h.Ld},l=k.next())h.Ld=l.value,h.Ld.trickModeVideo=e.streams.find(function(m){return function(n){return Wd(m.Ld.codecs)==Wd(n.codecs)}}(h))}}}c=Hu(a.g.disableAudio,d,"audio");e=Hu(a.g.disableVideo,d,"video");f=Hu(a.g.disableText,
|
|
946
947
|
d,Ld);d=Hu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.ra.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},[])}
|
|
@@ -950,16 +951,16 @@ w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=n
|
|
|
950
951
|
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,J=C=void 0;D.includes("=")?(D=D.split("="),C=D[0].startsWith("CC")?D[0]:"CC"+D[0],J=D[1]||"und"):(C="CC"+v,2==w.length?v+=2:v++,J=D);z.set(C,ue(J))}}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,
|
|
951
952
|
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,ue(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=Yg(c,"ContentProtection");var K=fs(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),H=ue(b.pa.language||"und"),I=c.attributes.label;(m=
|
|
952
953
|
Yg(c,"Label"))&&m.length&&(m=Zg(m[0]))&&(I=m);m=Yg(c,"Representation");c=m.map(function(G){if(G=Iu(a,b,K,k,H,I,f,h,z,G,y,A))G.hdr=G.hdr||p,G.colorGamut=G.colorGamut||q,G.fastSwitching=u;return G}).filter(function(G){return!!G});if(0==c.length){g="image"==b.pa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new T(2,4,4003);}if(!b.pa.contentType||"application"==b.pa.contentType)for(b.pa.contentType=Ju(c[0].mimeType,c[0].codecs),l=t(c),v=l.next();!v.done;v=l.next())v.value.type=
|
|
953
|
-
b.pa.contentType;l=b.pa.id||"__fake__"+a.
|
|
954
|
+
b.pa.contentType;l=b.pa.id||"__fake__"+a.S++;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(G){return G.attributes.id}).filter(re);return{id:l,contentType:b.pa.contentType,language:H,Rj:f,streams:c,drmInfos:K.drmInfos,Uf:g,zi:m}}
|
|
954
955
|
function Iu(a,b,c,d,e,f,g,h,k,l,m,n){b.I=Eu(a,l,b.pa,null);var p=b.I.id;a.J=Math.min(a.J,b.I.Ca);if(!Ku(b.I))return null;var q=b.ha.start;b.bandwidth=eh(l,"bandwidth",lh)||0;var u=b.I.contentType,v=u==Ld||"application"==u;u="image"==u;try{var w=void 0;if(c.He){var A=b.I.Aa,z=Cd(A(),[c.He.ei]),y=jg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.He.iv,firstMediaSequenceNumber:0,fetchKey:function(){var I,G,L;return O(function(M){if(1==M.g)return E(M,fu(a,y,6),2);if(3!=M.g){I=M.h;if(!I.data||
|
|
955
|
-
16!=I.data.byteLength)throw new T(2,4,4049);G={name:"AES-CBC"};L=w;return E(M,window.crypto.subtle.importKey("raw",I.data,G,!0,["decrypt"]),3)}L.cryptoKey=M.h;w.fetchKey=void 0;F(M)})}}}b.I.aesKey=w;A=function(I,G,L,M){return Cu(a,I,G,L,M)};if(b.I.Mc)var B=Js(b,A,w);else if(b.I.Gb)B=Ps(b,a.s,w);else if(b.I.Pb)B=Us(b,A,a.s,!!a.l,a.g.dash.initialSegmentLimit,a.
|
|
956
|
+
16!=I.data.byteLength)throw new T(2,4,4049);G={name:"AES-CBC"};L=w;return E(M,window.crypto.subtle.importKey("raw",I.data,G,!0,["decrypt"]),3)}L.cryptoKey=M.h;w.fetchKey=void 0;F(M)})}}}b.I.aesKey=w;A=function(I,G,L,M){return Cu(a,I,G,L,M)};if(b.I.Mc)var B=Js(b,A,w);else if(b.I.Gb)B=Ps(b,a.s,w);else if(b.I.Pb)B=Us(b,A,a.s,!!a.l,a.g.dash.initialSegmentLimit,a.M,w,n,!1);else{var C=b.ha.duration||0,D=b.I.Aa;B={$b:function(){var I=Mk(q,C,D());I.zc(function(G){G.mimeType=b.I.mimeType;G.codecs=b.I.codecs});
|
|
956
957
|
return Promise.resolve(I)}}}}catch(I){if((v||u)&&4002==I.code)return null;throw I;}n=Yg(l,"ContentProtection");n=js(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;Yg(l,"SupplementalProperty").some(function(I){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==I.attributes.schemeIdUri&&"JOC"==I.attributes.value})&&(A=!0);z=!1;v&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var J;if(u&&((l=Yg(l,"EssentialProperty").find(function(I){return["http://dashif.org/thumbnail_tile",
|
|
957
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(I.attributes.schemeIdUri)}))&&(J=l.attributes.value),!J))return null;var K;l=b.I.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.I.id?b.ra.id+","+b.I.id:"";a.B.length&&p&&a.o.set(b.ra.id+","+p,Lu(b));var H=v&&a.s[v]?a.s[v]:{id:a.
|
|
958
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(I.attributes.schemeIdUri)}))&&(J=l.attributes.value),!J))return null;var K;l=b.I.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.I.id?b.ra.id+","+b.I.id:"";a.B.length&&p&&a.o.set(b.ra.id+","+p,Lu(b));var H=v&&a.s[v]?a.s[v]:{id:a.S++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){H.segmentIndex&&
|
|
958
959
|
(H.segmentIndex.release(),H.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:l,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.pa.language,label:f,type:b.pa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.I.Hc,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:A,
|
|
959
960
|
closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Pd(b.I.mimeType,b.I.codecs)])};H.createSegmentIndex=function(){var I;return O(function(G){if(1==G.g){if(H.segmentIndex)return G.u(0);I=H;return E(G,B.$b(),3)}I.segmentIndex=G.h;F(G)})};v&&b.qb&&!a.s[v]&&(a.s[v]=H);return H}
|
|
960
961
|
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]={Mc:null,Gb:null,Pb:e.Pb,Aa:e.Aa,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,Hc:e.Hc,audioSamplingRate:e.audioSamplingRate,Ca:e.Ca,Ec:e.Ec}}else"periodInfo"==d?(e=a[d],
|
|
961
962
|
b[d]={start:e.start,duration:e.duration,node:null,sd:e.sd}):b[d]=a[d];return b}function bu(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,ua(d,2),E(d,cu(a),4);case 4:b=d.h;wa(d,3);break;case 2:if(c=ya(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();du(a,b);F(d)}})}
|
|
962
|
-
function du(a,b){if(!(0>a.F)){var c=a.F;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.G.
|
|
963
|
+
function du(a,b){if(!(0>a.F)){var c=a.F;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.G.W(Math.max(c-b,Va(a.N)))}}
|
|
963
964
|
function Eu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Hc:null,audioSamplingRate:null,Ca:0,Hf:0};d=d||c.Aa;var e=b.attributes.id,f=Yg(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=$g(m);l&&m&&(nt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map($g));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=fh(b,
|
|
964
965
|
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=gt(m).join(",");n=eh(b,"frameRate",ph)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,q=Mu(Yg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=Yg(b,"AudioChannelConfiguration");u=Nu(u)||c.Hc;var v=eh(b,"audioSamplingRate",mh)||c.audioSamplingRate;k||(k=Ju(l,m));var w=bh(b,"SegmentBase"),A=bh(b,"SegmentTemplate"),z=w?eh(w,"availabilityTimeOffset",nh)||0:0,y=A?eh(A,"availabilityTimeOffset",nh)||0:0,B=f&&f.length?eh(f[0],"availabilityTimeOffset",
|
|
965
966
|
nh)||0:0;z=c.Ca+B+z+y;y=null;(B=bh(b,"SegmentSequenceProperties"))&&(B=bh(B,"SAP"))&&(y=eh(B,"cadence",kh));return{Aa:function(){return Cd(d(),f.length?a.h&&h?ot(a.h,e):g?g:[]:[])},Mc:w||c.Mc,Gb:bh(b,"SegmentList")||c.Gb,Pb:A||c.Pb,width:eh(b,"width",mh)||c.width,height:eh(b,"height",mh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:q,id:e,language:b.attributes.lang,Hc:u,audioSamplingRate:v,Ca:z,Ec:null,Hf:y||c.Hf}}
|
|
@@ -979,33 +980,33 @@ function kv(a,b){b=kd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b
|
|
|
979
980
|
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"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new 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"==
|
|
980
981
|
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 T(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)}
|
|
981
982
|
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 Wf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Uf(c)}}
|
|
982
|
-
function qv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=yd(a):e=qd(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",ov);ov.parse=pv;fg("data",pv);function rv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.
|
|
983
|
-
this.K=new Map;this.za=new Map;this.na=new Map;this.hb=this.C=!1;this.gb=new Ua(5);this.j=null;this.da=!0}r=rv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.C=b.isLowLatencyMode(),E(e,uv(c,[a]),2)):3!=e.g?(d=e.h,c.
|
|
984
|
-
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.
|
|
983
|
+
function qv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=yd(a):e=qd(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",ov);ov.parse=pv;fg("data",pv);function rv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Ld,new Map);this.N.set("image",new Map);this.Xa=new Set;this.i=new Map;this.l=null;this.M="";this.Ha=new jv;this.J=-1;this.ba=Infinity;this.aa=this.pb=!1;this.A=new Lc(function(){sv(a)});this.oa=tv;this.o=null;this.La=0;this.m=Infinity;this.Ga=this.ua=this.S=0;this.V=new cg;this.F=new Map;this.G=new Map;this.ca=new Map;this.fa=new Map;
|
|
984
|
+
this.K=new Map;this.za=new Map;this.na=new Map;this.hb=this.C=!1;this.gb=new Ua(5);this.j=null;this.da=!0}r=rv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.C=b.isLowLatencyMode(),E(e,uv(c,[a]),2)):3!=e.g?(d=e.h,c.M=d.uri,E(e,vv(c,d.data,a),3)):e.return(c.o)})};
|
|
985
|
+
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.V&&(a.push(this.V.destroy()),this.V=null);this.g=this.h=null;this.Xa.clear();this.o=null;this.i.clear();this.H.clear();this.G.clear();this.s.clear();this.ca.clear();this.fa.clear();this.K.clear();this.za.clear();this.na.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
985
986
|
r.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.nd});d.length&&!h&&(k=zv,Av(a,k.dh),l=d.map(function(n){return n.Bb}),a.l.Ua(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
986
|
-
h&&Bv(a);F(m)})};function Cv(a,b){return wv(a)?a.
|
|
987
|
-
function xv(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N,P;return O(function(R){if(1==R.g){c=[];d=t(b
|
|
988
|
-
b
|
|
987
|
+
h&&Bv(a);F(m)})};function Cv(a,b){return wv(a)?a.N.get(b.type):b.fe}
|
|
988
|
+
function xv(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N,P;return O(function(R){if(1==R.g){c=[];d=t(b.L());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Pd&&(0<=b.lb&&h.add("_HLS_msn",String(b.lb)),0<=b.mb&&h.add("_HLS_part",String(b.mb))),b.Qd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return E(R,uv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=kv(a.Ha,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
|
|
989
|
+
b.L().includes(m)||b.Gg.push(m);n=$u(l.g,"EXT-X-DEFINE");p=Dv(a,n,m);q=b.stream;u=Cv(a,b);return E(R,Ev(a,l,q.mimeType,b.L,p),3)}v=R.h;w=v.keyIds;A=v.drmInfos;z=function(Q,fa){return Q.size===fa.size&&[].concat(x(Q)).every(function(sa){return fa.has(sa)})};z(q.keyIds,w)||(q.keyIds=w,q.drmInfos=A,a.h.newDrmInfo(q));y=Fv(a,l,q,u,p,b.L,b.type);B=y.segments;if(C=y.bandwidth)q.bandwidth=C;q.segmentIndex.ud(B,a.l.jb());B.length&&(D=cv(l.g,"EXT-X-MEDIA-SEQUENCE",0),K=(J=bv(l.g,"EXT-X-SKIP"))?Number(Z(J,
|
|
989
990
|
"SKIPPED-SEGMENTS")):0,H=Gv(D,B),I=H.lb,G=H.mb,b.lb=I+K,b.mb=G,L=u.get(D),q.segmentIndex.Ja(L));M=B[0];b.kc=M.startTime;N=B[B.length-1];b.Bb=N.endTime;if(P=bv(l.g,"EXT-X-ENDLIST"))b.nd=!0;Hv(a,l);F(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
990
991
|
function Iv(a,b){for(var c=-1==a.J,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.J=Math.max(a.J,k));e.Oe=k;break}}}}if(!(0>a.J))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.J-c.Oe,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Kv(a,
|
|
991
992
|
c,d)}
|
|
992
|
-
function Lv(a,b){if(Infinity==a.ba){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.ba=Math.min(a.ba,d.h))}}b=a.ba;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)$a("Missing EXT-X-PROGRAM-DATE-TIME for stream",c
|
|
993
|
-
function Kv(a,b,c){b.kc+=c;b.Bb+=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
|
|
994
|
-
function vv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N,P,R,Q,fa,sa,Ia,xa,Ja,Qa,Ba,Wa;return O(function(ra){switch(ra.g){case 1:d=kv(a.Ha,b);e=$u(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new ok(null,0);a.l.oc(!0);k=function(){return[c]};if(1==d.type)return a.da=!1,w=$u(d.g,"EXT-X-DEFINE"),A=Dv(a,w,a.
|
|
993
|
+
function Lv(a,b){if(Infinity==a.ba){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.ba=Math.min(a.ba,d.h))}}b=a.ba;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)$a("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.L(),"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.Qf(b)}}}
|
|
994
|
+
function Kv(a,b,c){b.kc+=c;b.Bb+=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.L()}
|
|
995
|
+
function vv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N,P,R,Q,fa,sa,Ia,xa,Ja,Qa,Ba,Wa;return O(function(ra){switch(ra.g){case 1:d=kv(a.Ha,b);e=$u(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new ok(null,0);a.l.oc(!0);k=function(){return[c]};if(1==d.type)return a.da=!1,w=$u(d.g,"EXT-X-DEFINE"),A=Dv(a,w,a.M),E(ra,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");q=$u(d.g,"EXT-X-SESSION-KEY");
|
|
995
996
|
u=$u(d.g,"EXT-X-SESSION-DATA");v=$u(d.g,"EXT-X-CONTENT-STEERING");Ov(a,u);return E(ra,Pv(a,v),4);case 4:return Qv(a,m),Rv(a,l),E(ra,Sv(a,m,q,l,k,a.s),5);case 5:return f=ra.h,g=Tv(a,l),E(ra,Uv(a,n,p),6);case 6:h=ra.h;ra.u(3);break;case 7:return z=ra.h,y=z.type,B=z.mimeType,C=z.codecs,D=z.language,J=z.height,K=z.width,H=z.channelCount,I=z.sampleRate,G=z.closedCaptions,L=z.Zf,M=z.colorGamut,E(ra,Vv(a,a.B++,A,d,k,C,y,D,!0,"Media Playlist",H,G,null,!1,I,!1,B),8);case 8:N=ra.h,a.i.set(c,N),"video"==y&&
|
|
996
|
-
Wv(N.stream,K,J,null,L,null,M),f.push({id:0,language:ue(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 T(2,7,7001);1==d.type&&(wv(a)&&(Xv(a,d),P=a.m,a.A.
|
|
997
|
+
Wv(N.stream,K,J,null,L,null,M),f.push({id:0,language:ue(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 T(2,7,7001);1==d.type&&(wv(a)&&(Xv(a,d),P=a.m,a.A.W(P)),R=Array.from(a.i.values()),Yv(a,R),Bv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
997
998
|
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.aa||!a.g.hls.disableCodecGuessing){ra.u(9);break}Q=[];fa=t(a.o.variants);for(sa=fa.next();!sa.done;sa=fa.next())Ia=sa.value,Ia.audio&&""===Ia.audio.codecs&&Q.push(Ia.audio.createSegmentIndex()),Ia.video&&""===Ia.video.codecs&&Q.push(Ia.video.createSegmentIndex());return E(ra,Promise.all(Q),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){xa=
|
|
998
999
|
[];Ja=f[0];Qa=t([Ja.video,Ja.audio]);for(Ba=Qa.next();!Ba.done;Ba=Qa.next())(Wa=Ba.value)&&!Wa.segmentIndex&&xa.push(Wa.createSegmentIndex());if(0<xa.length)return E(ra,Promise.all(xa),0)}ra.u(0)}})}
|
|
999
|
-
function Mv(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K;return O(function(H){switch(H.g){case 1:e=et(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return H.return(e);f=b.segments[0];g=dv(c(),f.h,d);h=g[0];k=new rc(h);l=k.Ra.split(".").pop();if(m=Zv[l])return H.return(et(m));n=pg;p=null;q=$v(a,b,f.g,c,d);a.ca.clear();if(!q){H.u(2);break}u=ol(q
|
|
1000
|
+
function Mv(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K;return O(function(H){switch(H.g){case 1:e=et(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return H.return(e);f=b.segments[0];g=dv(c(),f.h,d);h=g[0];k=new rc(h);l=k.Ra.split(".").pop();if(m=Zv[l])return H.return(et(m));n=pg;p=null;q=$v(a,b,f.g,c,d);a.ca.clear();if(!q){H.u(2);break}u=ol(q.L(),q.ec(),q.bc(),a.g.retryParameters);return E(H,aw(a,u,n,{type:0}),3);case 3:v=H.h,p=v.data;case 2:w=0;A=null;if(z=bv(f.g,"EXT-X-BYTERANGE"))y=
|
|
1000
1001
|
t(bw(null,z.value)),w=y.next().value,A=y.next().value;B=ol(g,w,A,a.g.retryParameters);return E(H,aw(a,B,n,{type:1}),4);case 4:C=H.h;(D=C.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var I=C.data;var G=Ab(I);G=(new pj).parse(G);var L=G.hd();G=G.gf();var M=[],N=!1,P=!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;
|
|
1001
1002
|
case "opus":M.push("opus"),N=!0}switch(L.video){case "avc":G.Ia?M.push(G.Ia):M.push("avc1.42E01E");P=!0;break;case "hvc":G.Ia?M.push(G.Ia):M.push("hvc1.1.6.L93.90");P=!0;break;case "av1":M.push("av01.0.01M.08"),P=!0}if(M.length){L=N&&!P;N=new Map;if(P){P=new Gb("video/mp2t");P.i(I);I=t(P.j());for(var R=I.next();!R.done;R=I.next())R=R.value,N.set(R,R);P.g()}G={type:L?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:G.height,width:G.width,channelCount:null,sampleRate:null,
|
|
1002
1003
|
closedCaptions:N,Zf:null,colorGamut:null}}else G=null;if(J=G)return H.return(J)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(K=ft(p,C.data))return H.return(K);return H.return(e)}})}
|
|
1003
1004
|
function Bv(a){if(wv(a)){if(a.oa==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.Bb),c=Math.min(c,e.kc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.te(b)}}else a.l.Ua(dw(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1004
|
-
c.h&&a.l.Og(c.h);a.l.ce()}function Nv(a,b){var c=(new rc(a.
|
|
1005
|
+
c.h&&a.l.Og(c.h);a.l.ce()}function Nv(a,b){var c=(new rc(a.M)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
1005
1006
|
function Dv(a,b,c){c=(new rc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
|
|
1006
1007
|
function Qv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=ew(a,d);if(f){var g=Jd(Ld,d);a.G.set(f,g);Kb(d,g)}e&&(f=Jd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Jd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
1007
|
-
function Ov(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",dv([a.
|
|
1008
|
-
function Pv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new jt(a.h);a.j.configure(a.g);a.j.i=[a.
|
|
1008
|
+
function Ov(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",dv([a.M],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1009
|
+
function Pv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new jt(a.h);a.j.configure(a.g);a.j.i=[a.M];a.j.setManifestType("HLS");a.j.h=g;c=kt(a.j,h);break}return E(k,c,0)})}
|
|
1009
1010
|
function Tv(a,b){var c=av(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return fw(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Xu(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=gw(Ld,d)||hw(Ld),iw(f.stream)}}return b.filter(function(g){return g})}
|
|
1010
1011
|
function iw(a){a.fullMimeTypes=new Set([Pd(a.mimeType,a.codecs)])}
|
|
1011
1012
|
function Uv(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ua(m,2);return E(m,jw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=ya(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Xu(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
|
|
@@ -1015,11 +1016,11 @@ function Sv(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N,P
|
|
|
1015
1016
|
z(m,""):null;Wa.u(6);break}return E(Wa,ow(a,m,"",e,null,f),9);case 9:q=Wa.h;case 6:if(q){if(q.keyIds)for(y=t(q.keyIds),B=y.next();!B.done;B=y.next())C=B.value,h.add(C);g.push(q)}case 4:l=k.next();Wa.u(3);break;case 2:D={};J=t(b);for(K=J.next();!K.done;K=J.next())H=K.value,I=Vu(H),D[I]?D[I].push(H):D[I]=[H];G=[];for(L in D)M=D[L],N=M[0],P=Z(N,"FRAME-RATE"),R=Number(Z(N,"AVERAGE-BANDWIDTH"))||Number(Xu(N,"BANDWIDTH")),Q=Z(N,"RESOLUTION"),fa=t(Q?Q.split("x"):[null,null]),sa=fa.next().value,Ia=fa.next().value,
|
|
1016
1017
|
xa=Z(N,"VIDEO-RANGE"),(Ja=Z(N,"REQ-VIDEO-LAYOUT"))&&Ja.includes(",")&&(Qa=Ja.split(",").filter(function(ra){return"CH-STEREO"==ra||"CH-MONO"==ra}),Ja=Qa[0]),Ja=Ja||"CH-MONO",Ba=pw(a,M,d,R),G.push.apply(G,x(qw(a,Ba.audio,Ba.video,R,sa,Ia,P,xa,Ja,g,h)));return Wa.return(G.filter(function(ra){return null!=ra}))}})}
|
|
1017
1018
|
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=Z(n,"AUDIO");var p=Z(n,"VIDEO"),q=m||p;q&&(g.includes(q)||g.push(q),(n=Z(n,"PATHWAY-ID"))&&f.set(q,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.H.has(f)?a.H.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,
|
|
1018
|
-
"URI")});k=e.audio.find(function(w){return w&&w
|
|
1019
|
+
"URI")});k=e.audio.find(function(w){return w&&w.L().find(function(A){return u.includes(A)})});h=ew(a,b[0]);p=Jd("video",h);(q=Jd("audio",h))&&!p?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&q&&p?(k="video",h=[[p,q].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var v=n=q=p=m=null;!l.length&&(c=c.find(function(w){var A=Z(w,"URI")||"",z=Z(w,"TYPE");w=Xu(w,"GROUP-ID");return"SUBTITLES"!=z&&""==A&&g.includes(w)}))&&(m=Z(c,"LANGUAGE"),
|
|
1019
1020
|
p=Z(c,"NAME"),q=rw(c),sw(c),n=Z(c,"CHARACTERISTICS"),v=tw(c));a=uw(a,b,h,k,m,p,q,n,v);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
|
|
1020
1021
|
function ew(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.aa=0<c.length;a.aa||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 gt(a)}function rw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1021
1022
|
function tw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function sw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1022
|
-
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 q=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=q?q.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;p=q?q.stream.drmInfos:null;q=q?q
|
|
1023
|
+
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 q=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=q?q.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;p=q?q.stream.drmInfos:null;q=q?q.L().sort().join(","):"";var u=f?f.L().sort().join(","):
|
|
1023
1024
|
"";q=q+" - "+u;h&&k&&!fi(n,p)||a.Xa.has(q)||(h={id:a.B++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Xa.add(q))}return e}
|
|
1024
1025
|
function Rv(a,b){b=av(b,"CLOSED-CAPTIONS");a.da=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=ue(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Xu(d,"GROUP-ID");d=Xu(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
|
|
1025
1026
|
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=Ld);if(k==Ld)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
@@ -1027,16 +1028,16 @@ m=n.next().value;n=n.next().value;(m=c.get(m))&&nt(a.j,l,m,n)}}c=Z(h,"LANGUAGE")
|
|
|
1027
1028
|
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=Z(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=kw(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?E(p,h.stream.createSegmentIndex(),3):p.u(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
1028
1029
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1029
1030
|
function uw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var q=p.value;p=Xu(q,"URI");q=Z(q,"PATHWAY-ID");a.j&&q&&nt(a.j,l,q,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.da=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}b=null}c=Id(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}
|
|
1030
|
-
function kw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(C){var D,J,K,H,I,G,L,M,N,P,R,Q,fa,sa,Ia,xa,Ja,Qa,Ba,Wa;return O(function(ra){switch(ra.g){case 1:return D=Nd,J=z
|
|
1031
|
+
function kw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(C){var D,J,K,H,I,G,L,M,N,P,R,Q,fa,sa,Ia,xa,Ja,Qa,Ba,Wa;return O(function(ra){switch(ra.g){case 1:return D=Nd,J=z.L(),E(ra,uv(a,z.L(),!0),2);case 2:K=ra.h;if(C.aborted)return ra.return();H=K.uri;H==K.originalUri||J.includes(H)||A.push(H);I=kv(a.Ha,K.data);G=$u(I.g,"EXT-X-DEFINE");L=Dv(a,G,H);M=void 0;N=!1;if(!(!a.aa&&a.g.hls.disableCodecGuessing||a.da&&e==D.ga&&!a.g.hls.disableClosedCaptionsDetection)){ra.u(3);break}a.da=!1;return E(ra,Mv(a,I,v,L),
|
|
1031
1032
|
4);case 4:P=ra.h,!P.closedCaptions.size||l&&l.size==P.closedCaptions.size||(l=P.closedCaptions,N=!0),!a.aa&&a.g.hls.disableCodecGuessing&&(M=P.mimeType,d=P.codecs);case 3:return R=wv(a),E(ra,Vv(a,0,L,I,v,d,e,f,g,h,k,l,m,n,p,q,M),5);case 5:Q=ra.h;if(C.aborted)return ra.return();fa=Q.stream;wv(a)&&!R&&Xv(a,I);z.kc=Q.kc;z.Bb=Q.Bb;z.Qd=Q.Qd;z.Pd=Q.Pd;z.nd=Q.nd;z.fe=Q.fe;z.lb=Q.lb;z.mb=Q.mb;z.qf=!0;w.segmentIndex=fa.segmentIndex;w.encrypted=fa.encrypted;w.drmInfos=fa.drmInfos;w.keyIds=fa.keyIds;w.mimeType=
|
|
1032
|
-
fa.mimeType;w.bandwidth=w.bandwidth||fa.bandwidth;w.codecs=w.codecs||fa.codecs;w.closedCaptions=w.closedCaptions||fa.closedCaptions;iw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&N&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.ga||e==D.
|
|
1033
|
-
Ba=Qa.filter(function(Za){return Za.stream.segmentIndex}),Yv(a,Ba),Bv(a),Wa=a.m,0<Wa&&a.A.
|
|
1033
|
+
fa.mimeType;w.bandwidth=w.bandwidth||fa.bandwidth;w.codecs=w.codecs||fa.codecs;w.closedCaptions=w.closedCaptions||fa.closedCaptions;iw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&N&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.ga||e==D.U)for(sa=t(a.i.values()),Ia=sa.next();!Ia.done;Ia=sa.next())xa=Ia.value,xa.qf||xa.type!=e||(xa.stream.mimeType=fa.mimeType,iw(xa.stream));e==D.ma&&(Ja=fa.segmentIndex.get(0))&&Ja.ea&&(w.mimeType="application/mp4",iw(w));vw(a)&&(a.pb?Yv(a,[z]):(a.pb=!0,Qa=Array.from(a.i.values()),
|
|
1034
|
+
Ba=Qa.filter(function(Za){return Za.stream.segmentIndex}),Yv(a,Ba),Bv(a),Wa=a.m,0<Wa&&a.A.W(Wa)));F(ra)}})}function v(){return a.j&&1<c.length?ot(a.j,b):A.concat(ev([a.M],c,a.s))}var w=ww(a,d,e,f,g,h,k,l,m,n,p,q),A=[],z={stream:w,type:e,Gg:A,L:v,kc:0,Bb:0,fe:new Map,Qd:!1,Pd:!1,nd:!1,Oe:-1,lb:-1,mb:-1,qf:!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&&
|
|
1034
1035
|
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.Bb));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.zc(function(e){c.push(e)});a.l.vd(c)}
|
|
1035
1036
|
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.yc(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)}
|
|
1036
1037
|
function vw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1037
1038
|
function Vv(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w){var A,z,y,B,C,D,J,K,H,I,G,L,M,N,P,R,Q,fa,sa,Ia,xa;return O(function(Ja){switch(Ja.g){case 1:if(1!=d.type)throw new T(2,4,4017);var Qa=bv(d.g,"EXT-X-PLAYLIST-TYPE"),Ba=bv(d.g,"EXT-X-ENDLIST");Ba=Qa&&"VOD"==Qa.value||Ba;Qa=Qa&&"EVENT"==Qa.value&&!Ba;Qa=!Ba&&!Qa;Ba?Av(a,tv):Qa?Av(a,cw):Av(a,xw);wv(a)&&Hv(a,d);if(w){Ja.u(2);break}return E(Ja,yw(a,g,f,d,c,e),3);case 3:w=Ja.h;case 2:return E(Ja,Ev(a,d,w,e,c),4);case 4:A=Ja.h;z=A.drmInfos;y=A.keyIds;B=A.encrypted;
|
|
1038
|
-
C=A.hh;if(B&&!z.length&&!C)throw new T(2,4,4026);D=ww(a,f,g,h,k,l,m,n,p,q,u,v);D.encrypted=B;D.drmInfos=z;D.keyIds=y;D.mimeType=w;iw(D);J=wv(a)?a.
|
|
1039
|
-
type:g,Gg:[]
|
|
1039
|
+
C=A.hh;if(B&&!z.length&&!C)throw new T(2,4,4026);D=ww(a,f,g,h,k,l,m,n,p,q,u,v);D.encrypted=B;D.drmInfos=z;D.keyIds=y;D.mimeType=w;iw(D);J=wv(a)?a.N.get(g):new Map;K=Fv(a,d,D,J,c,e,g);H=K.segments;if(I=K.bandwidth)D.bandwidth=I;wv(a)&&Hv(a,d);G=H[0].startTime;L=H[H.length-1];M=L.endTime;N=new Kk(H);D.segmentIndex=N;R=(P=bv(d.g,"EXT-X-SERVER-CONTROL"))?null!=Wu(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=Wu(P,"CAN-BLOCK-RELOAD"):!1;fa=cv(d.g,"EXT-X-MEDIA-SEQUENCE",0);sa=Gv(fa,H);Ia=sa.lb;xa=sa.mb;return Ja.return({stream:D,
|
|
1040
|
+
type:g,Gg:[],L:e,kc:G,Bb:M,Qd:R,Pd:Q,nd:!1,Oe:-1,lb:Ia,mb:xa,fe:J,qf:!1})}})}function Gv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{lb:a,mb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{lb:a,mb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{lb:a,mb:c}}
|
|
1040
1041
|
function ww(a,b,c,d,e,f,g,h,k,l,m,n){var p=gw(c,b)||hw(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Ld?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1041
1042
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Ld?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ue(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:q,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,
|
|
1042
1043
|
fullMimeTypes:new Set};iw(a);return a}
|
|
@@ -1045,12 +1046,12 @@ function Ev(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,z,y,B,C,D,J,K,H,I,G,L,M,N,P
|
|
|
1045
1046
|
function zw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=zd(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=cv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.fa.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=
|
|
1046
1047
|
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u,v;return O(function(w){if(1==w.g)return l=dv(d(),Xu(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=jg(l,a.g.retryParameters),p=aw(a,n,6),a.K.set(m,p)),E(w,a.K.get(m),2);if(3!=w.g){q=w.h;if(!q.data||q.data.byteLength!=k.bitsKey/8)throw new T(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",q.data,u,!0,["decrypt"]),3)}v.cryptoKey=w.h;k.fetchKey=void 0;
|
|
1047
1048
|
F(w)})};a.fa.set(c,k)}return a.fa.get(c)}
|
|
1048
|
-
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 T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=bv(b.g,"EXT-X-PART-INF"))a.
|
|
1049
|
+
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 T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=bv(b.g,"EXT-X-PART-INF"))a.S=Number(Xu(e,"PART-TARGET"));b=bv(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.S?(a.m=a.hb?5*a.S<=c?Math.min(a.S,a.m):Math.min(c,a.m):Math.min(a.S,a.m),a.Ga=b?Number(Xu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1049
1050
|
Wu(b,"HOLD-BACK"):null,a.ua=c?Number(c.value):0);a.La=Math.max(d,a.La)}function Xv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Ga)b=a.Ga;else if(a.ua)b=a.ua;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.La*c}a.l.Pg(0);a.l.Lf(b);a.l.oc(!1)}
|
|
1050
1051
|
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(),Z(f,"BYTERANGE","")].join("-");if(!a.ca.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.ca.set(g,b)}return a.ca.get(g)}
|
|
1051
1052
|
function Aw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new zi(function(){return a},e,f,null,null,null,d)}
|
|
1052
1053
|
function Bw(a,b,c,d,e,f,g,h,k){var l=d.g,m=bv(l,"EXTINF"),n=0,p=0,q=null;d.ub.length&&!a.C&&ab("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=hh(v.value))}var w=Ci;bv(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.ub.length)throw new T(2,4,4024,"EXTINF");
|
|
1053
|
-
if(!a.C)return null}var A=[];v=!1;var z=null,y=!1,B=!1;if(a.C&&d.ub.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=u,D={},J=0;J<d.ub.length;D={Yc:D.Yc,Id:D.Id},J++){var K=d.ub[J],H=0==J?c:A[A.length-1],I=0==J?e:H.endTime,G=Number(Z(K,"DURATION"))||a.
|
|
1054
|
+
if(!a.C)return null}var A=[];v=!1;var z=null,y=!1,B=!1;if(a.C&&d.ub.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=u,D={},J=0;J<d.ub.length;D={Yc:D.Yc,Id:D.Id},J++){var K=d.ub[J],H=0==J?c:A[A.length-1],I=0==J?e:H.endTime,G=Number(Z(K,"DURATION"))||a.S;if(G){var L=I+G,M=0,N=null;"EXT-X-PRELOAD-HINT"==K.name?(M=(M=Z(K,"BYTERANGE-START"))?Number(M):0,(H=Z(K,"BYTERANGE-LENGTH"))?N=M+Number(H)-1:M&&(N=Number.MAX_SAFE_INTEGER)):
|
|
1054
1055
|
(M=Z(K,"BYTERANGE"),N=t(bw(H,M)),M=N.next().value,N=N.next().value);D.Id=Z(K,"URI");if(D.Id){H=Ci;"YES"==Z(K,"GAP")&&(H=2,y=!0);D.Yc=null;var P=function(Q){return function(){null==Q.Yc&&(Q.Yc=dv(h(),Q.Id,f));return Q.Yc}}(D);n&&0<=M&&null!=N&&(z=P,v=!0);I=new Bi(I,L,P,M,N,b,0,0,Infinity,[],"",null,C,H,k);"EXT-X-PRELOAD-HINT"==K.name&&(I.rf(),B=!0);"YES"!=Z(K,"INDEPENDENT")&&0<J&&I.ee();A.push(I);C&&(C+=G)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(A.length)n=A[A.length-
|
|
1055
1056
|
1].endTime;else return null;v&&(y||0!=A[0].Ba?(v=!1,z=null):A=[]);(m=bv(l,"EXT-X-BYTERANGE"))?(q=t(bw(c,m.value)),p=q.next().value,q=q.next().value):A.length&&(p=A[0].Ba,q=A[A.length-1].ja);c="";m=null;"image"==g.type&&(c="1x1",g=bv(l,"EXT-X-TILES"))&&(c=Xu(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var R=null;b=new Bi(e,n,function(){if(z)return z();null==R&&(R=dv(h(),d.h,f));return R||[]},p,q,b,0,0,Infinity,A,c,m,u,w,k,0<A.length&&!!d.h);v&&(a.hb=!0,b.zg(),B&&b.rf());return b}
|
|
1056
1057
|
function bw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ja+1,d=c+b-1);return[c,d]}
|
|
@@ -1061,10 +1062,10 @@ 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),
|
|
|
1061
1062
|
function hw(a){return a==Ld?"text/vtt":Cw[a].mp4}
|
|
1062
1063
|
function yw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z;return O(function(y){switch(y.g){case 1:g=pg;h=Math.trunc((d.segments.length-1)/2);k=dv(f(),d.segments[h].h,e);l=new rc(k[0]);m=l.Ra.split(".").pop();n=Cw[b];if((p=n[m])||(p=Zv[m])||(p=gw(b,c)))return y.return(p);u=1;v=jg(k,a.g.retryParameters);ua(y,2);v.method="HEAD";return E(y,aw(a,v,g,{type:u}),4);case 4:w=y.h;q=w.headers["content-type"];wa(y,3);break;case 2:A=ya(y);if(!A||1002!=A.code&&1001!=A.code){y.u(3);break}v.method="GET";return E(y,
|
|
1063
1064
|
aw(a,v,g,{type:u}),6);case 6:z=y.h,q=z.headers["content-type"];case 3:return q?y.return(q.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,jg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1064
|
-
function sv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ua(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();wv(a)&&(d=(c-b)/1E3,a.gb.sample(1,d),e=a.m,f=Math.max(0,e-Va(a.gb)),a.A.
|
|
1065
|
-
function wv(a){return a.oa!=tv}function Av(a,b){a.oa=b;a.l&&a.l.oc(!wv(a));wv(a)||a.A.stop()}function aw(a,b,c,d){if(!a.
|
|
1065
|
+
function sv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ua(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();wv(a)&&(d=(c-b)/1E3,a.gb.sample(1,d),e=a.m,f=Math.max(0,e-Va(a.gb)),a.A.W(f));wa(h,3);break;case 2:g=ya(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.W(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();F(h)}})}
|
|
1066
|
+
function wv(a){return a.oa!=tv}function Av(a,b){a.oa=b;a.l&&a.l.oc(!wv(a));wv(a)||a.A.stop()}function aw(a,b,c,d){if(!a.V)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);dg(a.V,b);return b.promise}function mw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1066
1067
|
function ow(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,y,B;return O(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new T(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=Ad(yd(k[0].split("data:text/plain;base64,").pop()));C.u(2);break}m=k.sort().join("");a.za.has(m)||(n=jg(k,a.g.retryParameters),p=aw(a,n,6),a.za.set(m,
|
|
1067
|
-
p));return E(C,a.za.get(m),3);case 3:q=C.h,l=Ad(q.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.na.has(e)){v=a.na.get(e);C.u(5);break}w=ol(e
|
|
1068
|
+
p));return E(C,a.za.get(m),3);case 3:q=C.h,l=Ad(q.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.na.has(e)){v=a.na.get(e);C.u(5);break}w=ol(e.L(),e.ec(),e.bc(),a.g.retryParameters);A=pg;return E(C,aw(a,w,A,{type:0}),6);case 6:z=C.h,v=it(z.data),a.na.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(Fd(y,B))}})}S("shaka.hls.HlsParser",rv);
|
|
1068
1069
|
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",
|
|
1069
1070
|
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 T(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new T(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 Ed("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
|
|
1070
1071
|
"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=Ab(b.data);c=Ed("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Xu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
|
|
@@ -1107,14 +1108,14 @@ A),w,b,d);w.segmentIndex=new Kk(A);return Promise.resolve()};w.closeSegmentIndex
|
|
|
1107
1108
|
function nx(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;
|
|
1108
1109
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function ox(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 px(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1109
1110
|
function qx(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={Xc:g.Xc},h=e.next())g.Xc=h.value,d.push(new Bi(g.Xc.start,g.Xc.end,function(k){return function(){return Cd(a.l,[f.replace("{start time}",String(k.Xc.Xf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",hx);var mx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),lx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1110
|
-
ri["application/vnd.ms-sstr+xml"]=function(){return new hx};function rx(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=nd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function sx(){}function tx(a,b,c,d,e){var f=new ux;xg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new vx,h={fg:!1,Wg:!1};a=wx(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 Tf(a,function(){h.fg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Lc(function(){h.Wg=!0;g.abort()});k.
|
|
1111
|
+
ri["application/vnd.ms-sstr+xml"]=function(){return new hx};function rx(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=nd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function sx(){}function tx(a,b,c,d,e){var f=new ux;xg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new vx,h={fg:!1,Wg:!1};a=wx(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 Tf(a,function(){h.fg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Lc(function(){h.Wg=!0;g.abort()});k.W(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1111
1112
|
function wx(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:return h=xx,k=yx,p=n=0,q=Date.now(),ua(B,2),E(B,h(a,c),4);case 4:l=B.h;f(zx(l.headers));if("HEAD"==c.method){B.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(C){function D(){var J,K,H;return O(function(I){switch(I.g){case 1:return ua(I,2),E(I,u.read(),4);case 4:J=I.h;wa(I,3);break;case 2:return ya(I),I.return();case 3:if(J.done){I.u(5);break}n+=
|
|
1112
1113
|
J.value.byteLength;if(!g){I.u(5);break}return E(I,g(J.value),5);case 5:K=Date.now();if(100<K-q||J.done)H=J.done?0:w-n,e(K-q,n-p,H),p=n,q=K;J.done?C.close():(C.enqueue(J.value),D());F(I)}})}D()};new k({start:A});return E(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:wa(B,3);break;case 2:z=ya(B);if(d.fg)throw new T(1,1,7001,a,b);if(d.Wg)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return y=zx(l.headers),B.return(rx(y,m,l.status,a,l.url,b))}})}
|
|
1113
1114
|
function zx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Ax(){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)}S("shaka.net.HttpFetchPlugin",sx);sx.isSupported=Ax;sx.parse=tx;var xx=window.fetch,vx=window.AbortController,yx=window.ReadableStream,ux=window.Headers;
|
|
1114
1115
|
Ax()&&(fg("http",tx,2,!0),fg("https",tx,2,!0),fg("blob",tx,2,!0));function Bx(){}
|
|
1115
1116
|
function Cx(a,b,c,d,e){var f=new Dx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=Ex(f);e(q);n=!0}};f.onload=function(q){var u=Ex(f),v=f.response;try{d(Date.now()-g,q.loaded-h,0);var w=rx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(q){m(new T(1,
|
|
1116
1117
|
1,1002,a,q,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(q){var u=Date.now();if(100<u-g||q.lengthComputable&&q.loaded==q.total)d(u-g,q.loaded-h,4==f.readyState?0:q.total-q.loaded),h=q.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Tf(k,function(){f.abort();return Promise.resolve()})}
|
|
1117
|
-
function Ex(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Bx);Bx.parse=Cx;var Dx=window.XMLHttpRequest;fg("http",Cx,1,!0);fg("https",Cx,1,!0);fg("blob",Cx,1,!0);function Fx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Gx(a){return a
|
|
1118
|
+
function Ex(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Bx);Bx.parse=Cx;var Dx=window.XMLHttpRequest;fg("http",Cx,1,!0);fg("https",Cx,1,!0);fg("blob",Cx,1,!0);function Fx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Gx(a){return a.L().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.ja}function Hx(a,b){return ol(a.g.L(),a.g.Ba,a.g.ja,b.streaming.retryParameters)};function Ix(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Jx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Ix.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 Kx(a){var b=this;this.o=a;this.j=new Map;this.i=new rg(function(){return Lx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Ix}Kx.prototype.destroy=function(){return this.i.destroy()};function Mx(a,b,c){a.m=b;a.l=c}function Lx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1118
1119
|
function Nx(a,b,c,d,e,f){sg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return E(u,Ox(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Ab(h),l=new Pg(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);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 Px(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1119
1120
|
function Ox(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=pg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Kb(a.h,e);return g.return(f.data)})};function Qx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Sf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Qx.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ua(b,2);return E(b,a.g,4)}if(2!=b.g)return wa(b,0);ya(b);F(b)})};
|
|
1120
1121
|
function Rx(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)})}})}Qx.prototype.store=function(){return this.h};Qx.prototype.promise=function(){return this.g};function Sx(a){this.h=a;this.g=[]}Sx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Tx(a,b){return Ux(a,b,"readwrite")}function Ux(a,b,c){c=a.h.transaction([b],c);var d=new Qx(c,b);a.g.push(d);d.promise().then(function(){Kb(a.g,d)},function(){Kb(a.g,d)});return d};function Vx(a,b,c){this.h=new Sx(a);this.i=b;this.g=c}r=Vx.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Wx(this.i)};r.removeSegments=function(a,b){return Xx(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Yx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.gg(e)}))})};r.addManifests=function(){return Wx(this.g)};
|
|
@@ -1138,7 +1139,7 @@ oy.prototype.ed=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[]
|
|
|
1138
1139
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1139
1140
|
function py(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,
|
|
1140
1141
|
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 qy(){Vx.apply(this,arguments)}oa(qy,Vx);r=qy.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Zx(this,a,b)};r.ed=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ry(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ry.prototype;
|
|
1141
|
-
r.init=function(){var a=this,b=new Sf,c=!1,d=new Lc(function(){c=!0;b.reject(new T(2,9,9017))});d.
|
|
1142
|
+
r.init=function(){var a=this,b=new Sf,c=!1,d=new Lc(function(){c=!0;b.reject(new T(2,9,9017))});d.W(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 jy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new oy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1142
1143
|
new oy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new qy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new $x(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new T(2,
|
|
1143
1144
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),F(b)}})};
|
|
1144
1145
|
r.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};r.getEmeSessionCell=function(){return this.m};
|
|
@@ -1162,7 +1163,7 @@ h.g)return ua(h,2),E(h,Oh(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);ya(h);F(h)}
|
|
|
1162
1163
|
function Jy(a){var b=[],c=lf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(af(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(bf(c.value));return b};function Ly(){this.g={}}function My(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 Ny(a,b){a.g[b.id]=b.bandwidth||2048}function Oy(a,b){a=a.g[b];null==a&&(a=0);return a};function Py(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.cc()):(this.h=hm(),this.g=new eg);this.i=[];this.j=[];var c=!a;this.l=new rg(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 Lx(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.u(4);break}return E(k,b.g.destroy(),4);
|
|
1163
1164
|
case 4:b.h=null,b.g=null,F(k)}})})}function Qy(){if(Mc())a:{var a=t(by.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}r=Py.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Zl(a,b));return lm(this.h,a)};r.getConfiguration=function(){var a=hm();lm(a,this.h,hm());return a};r.cc=function(){return this.g};
|
|
1164
1165
|
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Kx(this.g);this.j.push(f);b=Ry(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):E(h,Sm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=qi(a,c||null);return h.return(g())})},e,f);b=new Tf(b,function(){return Lx(f)});b.finally(function(){Kb(d.j,f)});return Sy(this,b)};
|
|
1165
|
-
function Ry(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:return Ty(),h=g=null,k=new ay,n=m=l=null,ua(B,2,3),E(B,d(),5);case 5:return g=B.h,E(B,Uy(a,b,g,e),6);case 6:p=B.h;Vy(a);q=!p.presentationTimeline.
|
|
1166
|
+
function Ry(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,y;return O(function(B){switch(B.g){case 1:return Ty(),h=g=null,k=new ay,n=m=l=null,ua(B,2,3),E(B,d(),5);case 5:return g=B.h,E(B,Uy(a,b,g,e),6);case 6:p=B.h;Vy(a);q=!p.presentationTimeline.T()&&!p.presentationTimeline.ic();if(!q)throw new T(2,9,9005,b);return E(B,a.xc(p,function(C){n=n||C},e),7);case 7:h=B.h;Vy(a);if(n)throw n;return E(B,Wy(p,h,e),8);case 8:return E(B,k.init(),9);case 9:return Vy(a),E(B,cy(k),10);case 10:return l=B.h,Vy(a),u=Xy(h,
|
|
1166
1167
|
p,b,c,e,f),v=u.fi,w=u.Tf,E(B,l.Da.addManifests([v]),11);case 11:A=B.h;Vy(a);m=A[0];Vy(a);if(n)throw n;return E(B,Yy(a,w,m,v,f,e,l.Da,p,h),12);case 12:return Vy(a),Zy(p,v,h,e),E(B,l.Da.updateManifest(m,v),13);case 13:return Vy(a),z=new ty("manifest",l.path.kb,l.path.Da,m),B.return(Ky(z,v));case 3:return za(B),E(B,k.destroy(),14);case 14:if(!g){B.u(15);break}return E(B,g.stop(),15);case 15:if(!h){B.u(17);break}return E(B,h.destroy(),17);case 17:Aa(B,0);break;case 2:y=ya(B);if(null==m){B.u(19);break}return E(B,
|
|
1167
1168
|
$y(m),19);case 19:throw n||y;}})}
|
|
1168
1169
|
function Yy(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,v,w,A,z;return O(function(y){switch(y.g){case 1:l={};m=0;n=function(B,C){var D,J,K,H,I,G,L;return O(function(M){if(1==M.g){D={};J=t(B);for(K=J.next();!K.done;D={Tb:D.Tb},K=J.next())D.Tb=K.value,H=Hx(D.Tb,f),I=D.Tb.i,G=D.Tb.h,L=function(N){return function(P){var R,Q,fa;return O(function(sa){if(1==sa.g)return E(sa,g.addSegments([{data:P}]),2);R=sa.h;Vy(a);Q=N.Tb.g;fa=Gx(Q);l[fa]=R[0];m+=P.byteLength;F(sa)})}}(D),Nx(e,D.Tb.groupId,H,I,G,L);return E(M,Px(e),
|
|
@@ -1234,7 +1235,7 @@ function HA(a,b){a.h=b;a.g.nb();var c=BA;b&&(a.g.D(b,c+"needkey",function(d){var
|
|
|
1234
1235
|
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=IA(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?JA(e,"output-restricted"):1==f?JA(e,"expired"):JA(e,"internal-error"))}}))}
|
|
1235
1236
|
EA.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 KA(b,this.l,a);this.i.push(a);return a};EA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};EA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1236
1237
|
function IA(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 KA(a,b,c){bg.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 Sf;this.keyStatuses=new LA}oa(KA,bg);
|
|
1237
|
-
function MA(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=Ab(qd("LOAD_SESSION|"+c));else{var e=qd("PERSISTENT|");d=Bd(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Sf;var f=GA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Lc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).
|
|
1238
|
+
function MA(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=Ab(qd("LOAD_SESSION|"+c));else{var e=qd("PERSISTENT|");d=Bd(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Sf;var f=GA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Lc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).W(.01)}return a.h}
|
|
1238
1239
|
function NA(a,b,c){if(a.g)a.g.then(function(){return NA(a,b,c)}).catch(function(){return NA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=kd(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=yd(e.keys[0].k);e=yd(e.keys[0].kid)}else d=Ab(c),e=null;var f=GA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1239
1240
|
function JA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r=KA.prototype;r.generateRequest=function(a,b){return MA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?MA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Sf;NA(this,b,a);return b};
|
|
1240
1241
|
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=GA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function LA(){this.size=0;this.g=void 0}r=LA.prototype;r.fc=function(){return this.g};
|
|
@@ -1264,7 +1265,7 @@ function HB(a,b){var c=null;if(IB.test(a)){a=IB.exec(a);c=Number(a[1]);var d=Num
|
|
|
1264
1265
|
function KB(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)}S("shaka.text.TtmlTextParser",mB);mB.prototype.parseMedia=mB.prototype.parseMedia;mB.prototype.setManifestType=mB.prototype.setManifestType;mB.prototype.setSequenceMode=mB.prototype.setSequenceMode;mB.prototype.parseInit=mB.prototype.parseInit;
|
|
1265
1266
|
function pB(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]))}
|
|
1266
1267
|
var qB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,DB=/^(\d{1,2}(?:\.\d+)?|100)%$/,CB=/^(\d+px|\d+em|\d*\.?\d+c)$/,rB=/^(\d+)px (\d+)px$/,IB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,JB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,LB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,MB=/^(\d*(?:\.\d*)?)f$/,NB=/^(\d*(?:\.\d*)?)t$/,OB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),BB={left:Ub,center:"center",right:"end",start:Ub,
|
|
1267
|
-
end:"end"},AB={left:"line-left",center:"center",right:"line-right"},nB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],oB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],uB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ie["application/ttml+xml"]=function(){return new mB};function PB(){this.g=new mB}PB.prototype.parseInit=function(a){var b=!1;(new Cg).box("moov",Hg).box("trak",Hg).box("mdia",Hg).box("minf",Hg).box("stbl",Hg).
|
|
1268
|
+
end:"end"},AB={left:"line-left",center:"center",right:"line-right"},nB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],oB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],uB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ie["application/ttml+xml"]=function(){return new mB};function PB(){this.g=new mB}PB.prototype.parseInit=function(a){var b=!1;(new Cg).box("moov",Hg).box("trak",Hg).box("mdia",Hg).box("minf",Hg).box("stbl",Hg).P("stsd",Lg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};PB.prototype.setSequenceMode=function(){};PB.prototype.setManifestType=function(){};
|
|
1268
1269
|
PB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Cg).box("mdat",Og(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",PB);PB.prototype.parseMedia=PB.prototype.parseMedia;PB.prototype.setManifestType=PB.prototype.setManifestType;PB.prototype.setSequenceMode=PB.prototype.setSequenceMode;PB.prototype.parseInit=PB.prototype.parseInit;ie['application/mp4; codecs="stpp"']=function(){return new PB};
|
|
1269
1270
|
ie['application/mp4; codecs="stpp.ttml"']=function(){return new PB};ie['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new PB};ie['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new PB};function QB(){this.h=!1;this.g="UNKNOWN"}QB.prototype.parseInit=function(){};QB.prototype.setSequenceMode=function(a){this.h=a};QB.prototype.setManifestType=function(a){this.g=a};
|
|
1270
1271
|
QB.prototype.parseMedia=function(a,b){a=kd(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=RB(new fv(a[1]));if(null==a)throw new T(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
|
|
@@ -1283,9 +1284,9 @@ if(!f)break;if(f=RB(new fv(f)))d.startTime=f;break;case "ruby":case "rp":case "r
|
|
|
1283
1284
|
function TB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Qb:a.textAlign=$b[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"==
|
|
1284
1285
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pb);else if(d=/^region:(.*)$/.exec(b)){if(b=ZB(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=bc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Tb,a.line=Number(c[1]),c[2]&&(a.lineAlign=bc[c[2].toUpperCase()])}
|
|
1285
1286
|
function ZB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function RB(a){a=hv(a,VB);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.VttTextParser",QB);QB.prototype.parseMedia=QB.prototype.parseMedia;QB.prototype.setManifestType=QB.prototype.setManifestType;QB.prototype.setSequenceMode=QB.prototype.setSequenceMode;QB.prototype.parseInit=QB.prototype.parseInit;var VB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1286
|
-
ie["text/vtt"]=function(){return new QB};ie['text/vtt; codecs="vtt"']=function(){return new QB};ie['text/vtt; codecs="wvtt"']=function(){return new QB};function $B(){this.g=null}$B.prototype.parseInit=function(a){var b=this,c=!1;(new Cg).box("moov",Hg).box("trak",Hg).box("mdia",Hg).
|
|
1287
|
-
$B.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Cg).box("moof",Hg).box("traf",Hg).
|
|
1288
|
-
p.value;var q=p.Gf||l,u=p.re?c+p.re:a;a=u+(q||0);var v=0;do{var w=m.
|
|
1287
|
+
ie["text/vtt"]=function(){return new QB};ie['text/vtt; codecs="vtt"']=function(){return new QB};ie['text/vtt; codecs="wvtt"']=function(){return new QB};function $B(){this.g=null}$B.prototype.parseInit=function(a){var b=this,c=!1;(new Cg).box("moov",Hg).box("trak",Hg).box("mdia",Hg).P("mdhd",function(d){d=Ti(d.reader,d.version);b.g=d.timescale}).box("minf",Hg).box("stbl",Hg).P("stsd",Lg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};$B.prototype.setSequenceMode=function(){};$B.prototype.setManifestType=function(){};
|
|
1288
|
+
$B.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Cg).box("moof",Hg).box("traf",Hg).P("tfdt",function(y){g=!0;c=Si(y.reader,y.version).baseMediaDecodeTime}).P("tfhd",function(y){l=Ri(y.reader,y.flags).jg}).P("trun",function(y){h=!0;d=Ui(y.reader,y.version,y.flags).Ig}).box("mdat",Og(function(y){k=!0;e=y})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new zg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1289
|
+
p.value;var q=p.Gf||l,u=p.re?c+p.re:a;a=u+(q||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),z=null;"vttc"==Gg(A)?8<w&&(z=m.vb(w-8)):m.skip(w-8);q&&z&&(w=aC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(re)};function aC(a,b,c){var d,e,f;(new Cg).box("payl",Og(function(g){d=kd(g)})).box("iden",Og(function(g){e=kd(g)})).box("sttg",Og(function(g){f=kd(g)})).parse(a);return d?bC(d,e,f,b,c):null}
|
|
1289
1290
|
function bC(a,b,c,d,e){d=new Nb(d,e,"");UB(a,d,new Map);b&&(d.id=b);if(c)for(a=new fv(c),b=iv(a);b;)TB(d,b,[]),gv(a),b=iv(a);return d}S("shaka.text.Mp4VttParser",$B);$B.prototype.parseMedia=$B.prototype.parseMedia;$B.prototype.setManifestType=$B.prototype.setManifestType;$B.prototype.setSequenceMode=$B.prototype.setSequenceMode;$B.prototype.parseInit=$B.prototype.parseInit;ie['application/mp4; codecs="wvtt"']=function(){return new $B};function cC(){}cC.prototype.parseInit=function(){};cC.prototype.setSequenceMode=function(){};cC.prototype.setManifestType=function(){};cC.prototype.parseMedia=function(a){var b=kd(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=dC(d),f=hv(d,/,/g);d=dC(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Nb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1290
1291
|
function dC(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)}S("shaka.text.SbvTextParser",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;ie["text/x-subviewer"]=function(){return new cC};function eC(){this.g=new QB}eC.prototype.parseInit=function(){};eC.prototype.setSequenceMode=function(){};eC.prototype.setManifestType=function(){};eC.prototype.parseMedia=function(a,b,c){a=kd(a);a=fC(a);a=Ab(qd(a));return this.g.parseMedia(a,b,c)};
|
|
1291
1292
|
function fC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",eC);eC.srt2webvtt=fC;eC.prototype.parseMedia=eC.prototype.parseMedia;
|
|
@@ -1295,20 +1296,20 @@ gC.prototype.parseMedia=function(a){var b="",c="";a=kd(a).split(/\r?\n\s*\r?\n/)
|
|
|
1295
1296
|
function lC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=mC(c))a.color=c;if(c=b.BackColour)if(c=mC(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=Vb;a.textAlign="start";break;case 2:a.displayAlign=Vb;a.textAlign=Qb;break;case 3:a.displayAlign=Vb;a.textAlign="end";
|
|
1296
1297
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Qb;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=Qb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1297
1298
|
function mC(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 kC(a){a=nC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",gC);gC.prototype.parseMedia=gC.prototype.parseMedia;gC.prototype.setManifestType=gC.prototype.setManifestType;gC.prototype.setSequenceMode=gC.prototype.setSequenceMode;gC.prototype.parseInit=gC.prototype.parseInit;
|
|
1298
|
-
var hC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,iC=/^\s*([^:]+):\s*(.*)/,jC=/\s*,\s*/,nC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ie["text/x-ssa"]=function(){return new gC};function oC(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)?{Yd:c,
|
|
1299
|
+
var hC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,iC=/^\s*([^:]+):\s*(.*)/,jC=/\s*,\s*/,nC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ie["text/x-ssa"]=function(){return new gC};function oC(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)?{Yd:c,X:a}:null}function pC(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,Ia:"mp4a.40."+e}}
|
|
1299
1300
|
function qC(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}
|
|
1300
1301
|
function rC(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,
|
|
1301
1302
|
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 sC(a){this.i=a;this.h=0;this.g=new Map}r=sC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+($d(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1302
|
-
r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Qi(e),g=f.length;g<e.length&&!qC(e,g);g++);a=1E3*c.endTime;f=Pi(f);f.length&&c&&(
|
|
1303
|
-
duration:1024,Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}});g+=
|
|
1304
|
-
sC.prototype.transmux=sC.prototype.transmux;sC.prototype.getOriginalMimeType=sC.prototype.getOriginalMimeType;sC.prototype.convertCodecs=sC.prototype.convertCodecs;sC.prototype.isSupported=sC.prototype.isSupported;sC.prototype.destroy=sC.prototype.destroy;jc("audio/aac",function(){return new sC("audio/aac")},pc);function tC(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,
|
|
1305
|
-
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,ia:a,
|
|
1303
|
+
r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Qi(e),g=f.length;g<e.length&&!qC(e,g);g++);a=1E3*c.endTime;f=Pi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=pC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=oC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));var l=k.Yd+k.X;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1304
|
+
k.Yd,g+l),size:k.X,duration:1024,Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.Ia,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Wa:[],ia:new Uint8Array([]),sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:h},stream:b};c=new Iw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Ow(c),this.g.set(b.id,d));b=ex(c);this.h++;b=Bd(d,b);return Promise.resolve(b)};
|
|
1305
|
+
S("shaka.transmuxer.AacTransmuxer",sC);sC.prototype.transmux=sC.prototype.transmux;sC.prototype.getOriginalMimeType=sC.prototype.getOriginalMimeType;sC.prototype.convertCodecs=sC.prototype.convertCodecs;sC.prototype.isSupported=sC.prototype.isSupported;sC.prototype.destroy=sC.prototype.destroy;jc("audio/aac",function(){return new sC("audio/aac")},pc);function tC(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,
|
|
1306
|
+
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,ia:a,X:e}}
|
|
1306
1307
|
function uC(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 vC(a){this.i=a;this.h=0;this.g=new Map}r=vC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1307
|
-
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Qi(a),f=e.length;f<a.length&&!uC(a,f);f++);var g=1E3*c.endTime;e=Pi(e);e.length&&c&&(
|
|
1308
|
-
Pa:0,Oa:0,Ma:0,Na:2,bb:0}});f+=
|
|
1309
|
-
vC.prototype.getOriginalMimeType=vC.prototype.getOriginalMimeType;vC.prototype.convertCodecs=vC.prototype.convertCodecs;vC.prototype.isSupported=vC.prototype.isSupported;vC.prototype.destroy=vC.prototype.destroy;jc("audio/ac3",function(){return new vC("audio/ac3")},pc);function wC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Zi(a.subarray(b+2));aj(c,2);aj(c,3);var d=bj(c,11)+1<<1,e=bj(c,2);if(3==e){e=bj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=bj(c,2);var g=bj(c,3),h=bj(c,1);c=bj(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,ia:a,
|
|
1310
|
-
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Qi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Pi(e);e.length&&c&&(
|
|
1311
|
-
Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}});f+=
|
|
1308
|
+
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Qi(a),f=e.length;f<a.length&&!uC(a,f);f++);var g=1E3*c.endTime;e=Pi(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=tC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ia;k.push({data:a.subarray(f,f+l.X),size:l.X,duration:1536,
|
|
1309
|
+
Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}});f+=l.X}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,Wa:[],ia:h,sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.h,baseMediaDecodeTime:c,Ta:k},stream:b};c=new Iw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Ow(c),this.g.set(b.id,d));b=ex(c);this.h++;b=Bd(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",vC);vC.prototype.transmux=vC.prototype.transmux;
|
|
1310
|
+
vC.prototype.getOriginalMimeType=vC.prototype.getOriginalMimeType;vC.prototype.convertCodecs=vC.prototype.convertCodecs;vC.prototype.isSupported=vC.prototype.isSupported;vC.prototype.destroy=vC.prototype.destroy;jc("audio/ac3",function(){return new vC("audio/ac3")},pc);function wC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Zi(a.subarray(b+2));aj(c,2);aj(c,3);var d=bj(c,11)+1<<1,e=bj(c,2);if(3==e){e=bj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=bj(c,2);var g=bj(c,3),h=bj(c,1);c=bj(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,ia:a,X:d}};function xC(a){this.i=a;this.h=0;this.g=new Map}r=xC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1311
|
+
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Qi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Pi(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=wC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ia;k.push({data:a.subarray(f,f+l.X),size:l.X,
|
|
1312
|
+
duration:1536,Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}});f+=l.X}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,Wa:[],ia:h,sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.h,baseMediaDecodeTime:c,Ta:k},stream:b};c=new Iw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Ow(c),this.g.set(b.id,d));b=ex(c);this.h++;b=Bd(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",xC);xC.prototype.transmux=xC.prototype.transmux;
|
|
1312
1313
|
xC.prototype.getOriginalMimeType=xC.prototype.getOriginalMimeType;xC.prototype.convertCodecs=xC.prototype.convertCodecs;xC.prototype.isSupported=xC.prototype.isSupported;xC.prototype.destroy=xC.prototype.destroy;jc("audio/ec3",function(){return new xC("audio/ec3")},pc);function yC(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 Zi(b.data),d=mj(c);mj(c);mj(c);dj(c);if(zC.includes(d)&&(d=V(c),3===d&&aj(c,1),dj(c),dj(c),aj(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?nj(c,16):nj(c,64))}dj(c);d=V(c);if(0===d)V(c);else if(1===d)for(aj(c,1),dj(c),dj(c),d=V(c),e=0;e<d;e++)dj(c);dj(c);aj(c,1);var f=V(c),g=V(c),h=bj(c,1);0===h&&aj(c,1);aj(c,1);var k=0,l=0,m=0,n=0;W(c)&&
|
|
1313
1314
|
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=mj(c),q=[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=q[p-1],e=u[p-1]):255===p&&(d=bj(c,16),e=bj(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],k[5],255,
|
|
1314
1315
|
225].concat(k,[1],b));return{height:c,width:f,sa:a,xa:d,ya:e}}
|
|
@@ -1321,14 +1322,14 @@ V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(I=0;4>I;I++)for(var G=0;G<(
|
|
|
1321
1322
|
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var fa=!1;Q?V(a):fa=W(a);fa||(R=V(a)+1);if(L){for(Q=0;Q<R;Q++)V(a),V(a),N&&(V(a),V(a));W(a)}if(M){for(Q=0;Q<R;Q++)V(a),V(a),N&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),G=V(a),V(a),V(a),V(a),V(a))}return{Ve:y,af:g,bf:h,$e:k,We:l,Xe:m,Ye:n,Ze:p,Pe:q,Qe:u,Re:v,Se:w,Te:A,Ue:z,he:G,Me:0,Ke:B,Je:J,Ie:K,width:C-(b+c)*(1===B||2===B?2:1),height:D-(d+e)*(1===B?2:1),Ei:H,Di:I}}
|
|
1322
1323
|
function EC(a){var b=new Zi(a,!0);mj(b);mj(b);V(b);V(b);W(b);W(b);bj(b,3);W(b);W(b);V(b);V(b);ej(b);W(b);W(b);W(b)&&V(b);ej(b);ej(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{yf:c}}
|
|
1323
1324
|
function FC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.af&3)<<6|(d.bf?1:0)<<5|d.$e&31;e[2]=d.We;e[3]=d.Xe;e[4]=d.Ye;e[5]=d.Ze;e[6]=d.Pe;e[7]=d.Qe;e[8]=d.Re;e[9]=d.Se;e[10]=d.Te;e[11]=d.Ue;e[12]=d.Ve;e[13]=240|(d.he&3840)>>8;e[14]=d.he&255;e[15]=252|d.yf&3;e[16]=252|d.Ke&3;e[17]=248|d.Je&7;e[18]=248|d.Ie&7;e[19]=0;e[20]=0;e[21]=(d.Me&3)<<6|(d.vf&7)<<3|(d.Sf?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&
|
|
1324
|
-
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 GC(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*HC[14*(3===c?3-d:3===d?3:4)+e-1];f=IC[3*(3===c?0:2===c?1:2)+f];c=JC[c][d];var h=KC[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,
|
|
1325
|
-
function LC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function MC(a,b){if(b+1<a.length&&LC(a,b)){var c=GC(a,b),d=4;c&&c.
|
|
1325
|
+
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 GC(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*HC[14*(3===c?3-d:3===d?3:4)+e-1];f=IC[3*(3===c?0:2===c?1:2)+f];c=JC[c][d];var h=KC[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,X:k,Ci:8*c*h}}return null}
|
|
1326
|
+
function LC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function MC(a,b){if(b+1<a.length&&LC(a,b)){var c=GC(a,b),d=4;c&&c.X&&(d=c.X);b+=d;return b===a.length||b+1<a.length&&LC(a,b)}return!1}
|
|
1326
1327
|
var HC=[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],IC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],JC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],KC=[0,1,1,4];function NC(a){this.i=a;this.h=0;this.g=new Map}r=NC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1327
|
-
r.transmux=function(a,b,c,d){
|
|
1328
|
-
ia:new Uint8Array([]),sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.h,baseMediaDecodeTime:c,Ta:a},stream:b};
|
|
1328
|
+
r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Qi(e).length;f<e.length&&!MC(e,f);f++);var g;for(a=[];f<e.length;){var h=GC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));g||(g=h);f+h.X<=e.length&&a.push({data:e.subarray(f,f+h.X),size:h.X,duration:1152,Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}});f+=h.X}if(!g)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));c=9E4*g.Ci/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1329
|
+
duration:d,Wa:[],ia:new Uint8Array([]),sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.h,baseMediaDecodeTime:c,Ta:a},stream:b};g=new Iw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Ow(g),this.g.set(b.id,d));b=ex(g);this.h++;b=Bd(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",NC);NC.prototype.transmux=NC.prototype.transmux;NC.prototype.getOriginalMimeType=NC.prototype.getOriginalMimeType;NC.prototype.convertCodecs=NC.prototype.convertCodecs;NC.prototype.isSupported=NC.prototype.isSupported;
|
|
1329
1330
|
NC.prototype.destroy=NC.prototype.destroy;jc("audio/mpeg",function(){return new NC("audio/mpeg")},pc);function OC(a){this.h=a;this.g=null}r=OC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=$d(a).split(","),c=Jd("audio",b);b=Jd("video",b);return!c||b||"mp3"!=Wd(c)?!1:mb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
|
|
1330
|
-
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new pj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.hd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018));
|
|
1331
|
-
OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;jc("video/mp2t",function(){return new OC("video/mp2t")},oc);/*
|
|
1331
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new pj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.hd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));c=new Uint8Array([]);e=t(a.Lb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=GC(a,b))?(b+d.X<=a.length&&(c=Bd(c,a.subarray(b,b+d.X))),b+=d.X):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",OC);OC.prototype.transmux=OC.prototype.transmux;
|
|
1332
|
+
OC.prototype.getOriginalMimeType=OC.prototype.getOriginalMimeType;OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;jc("video/mp2t",function(){return new OC("video/mp2t")},oc);/*
|
|
1332
1333
|
@license
|
|
1333
1334
|
MSS Transmuxer
|
|
1334
1335
|
Copyright 2015 Dash Industry Forum
|
|
@@ -1339,29 +1340,29 @@ function QC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("
|
|
|
1339
1340
|
"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",
|
|
1340
1341
|
"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]!==RC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=PC.prototype;r.destroy=function(){};
|
|
1341
1342
|
r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
|
|
1342
|
-
r.transmux=function(a,b,c){if(!c)return Promise.resolve(Ab(a));if(!b.mssPrivateData)return Promise.reject(new T(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");
|
|
1343
|
-
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 q=this.g.createFullBox("saiz",h);q.version=0;q.flags=0;q.sample_count=n.sample_count;q.default_sample_info_size=0;q.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)q.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else q.default_sample_info_size=
|
|
1344
|
-
1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=SC(u,"traf")+SC(h,"senc")+16);var w=Ab(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022))}};function SC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",PC);PC.prototype.transmux=PC.prototype.transmux;
|
|
1345
|
-
PC.prototype.convertCodecs=PC.prototype.convertCodecs;PC.prototype.isSupported=PC.prototype.isSupported;PC.prototype.destroy=PC.prototype.destroy;var RC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);jc("mss/audio/mp4",function(){return new PC("mss/audio/mp4")},pc);jc("mss/video/mp4",function(){return new PC("mss/video/mp4")},pc);function TC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=TC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1343
|
+
r.transmux=function(a,b,c){if(!c)return Promise.resolve(Ab(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.L()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1344
|
+
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 q=this.g.createFullBox("saiz",h);q.version=0;q.flags=0;q.sample_count=n.sample_count;q.default_sample_info_size=0;q.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)q.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else q.default_sample_info_size=
|
|
1345
|
+
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]=SC(u,"traf")+SC(h,"senc")+16);var w=Ab(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.L()[0]:null))}};function SC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",PC);PC.prototype.transmux=PC.prototype.transmux;
|
|
1346
|
+
PC.prototype.getOriginalMimeType=PC.prototype.getOriginalMimeType;PC.prototype.convertCodecs=PC.prototype.convertCodecs;PC.prototype.isSupported=PC.prototype.isSupported;PC.prototype.destroy=PC.prototype.destroy;var RC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);jc("mss/audio/mp4",function(){return new PC("mss/audio/mp4")},pc);jc("mss/video/mp4",function(){return new PC("mss/video/mp4")},pc);function TC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=TC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1346
1347
|
r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=$d(c).split(",");c=Jd("audio",d);d=Jd("video",d);if(c&&(c=Wd(c),!UC.includes(c))||d&&(c=Wd(d),!VC.includes(c)))return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};
|
|
1347
1348
|
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=$d(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Se(c,"audio/mp4")}).map(Re).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
|
|
1348
|
-
r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!wj(f)){for(var g=Qi(f),h=g.length;h<f.length;h++)if(MC(f,h))return Promise.reject(new T(2,3,3018));for(h=g.length;h<f.length;h++)if(qC(f,h))return this.h||(this.h=new sC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018))}this.j?this.j.clearData():this.j=new pj;var k=this.j.parse(f),l=[],m=k.hd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],q=null,u=[],v=k.Dc();
|
|
1349
|
-
3023);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var y=AC(z);if(y){null==q&&(q=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,Za:Math.round((A.pts||0)-(A.dts||0)),flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:y.rd?2:1,bb:y.rd?0:1}})}}var C=yC(u);if(!C||null==q)throw new T(2,3,3018);b.height=C.height;
|
|
1350
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],ia:new Uint8Array([]),sa:C.sa,xa:C.xa,ya:C.ya,data:{ob:this.g,baseMediaDecodeTime:q,Ta:p},stream:b};break;case "hvc":var D=[],J=null,K=[],H=k.Dc();if(!H.length)throw new T(2,3,3023);for(var I=0;I<H.length;I++){var G=H[I],L=G.nalus;K.push.apply(K,x(L));for(var M=!1,N=[],P=!1,R=t(L),Q=R.next();!Q.done;Q=R.next()){var fa=Q.value;switch(fa.type){case 1:case 0:var sa=
|
|
1351
|
-
|
|
1352
|
-
size:Ja.data.byteLength,duration:Qa,Za:Math.round((G.pts||0)-(G.dts||0)),flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:Ja.rd?2:1,bb:Ja.rd?0:1}})}}var Ba=BC(K);if(!Ba||null==J)throw new T(2,3,3018);b.height=Ba.height;b.width=Ba.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],ia:new Uint8Array([]),sa:Ba.sa,xa:Ba.xa,ya:Ba.ya,data:{ob:this.g,baseMediaDecodeTime:J,Ta:D},stream:b}}n&&
|
|
1353
|
-
[],ra,Za=null,ff=t(k.Lb()),Dd=ff.next();!Dd.done;Dd=ff.next()){var be=Dd.value,od=be.data;if(od){var Ec=0;ra=pC(od,Ec);if(!ra)throw new T(2,3,3018);b.audioSamplingRate=ra.sampleRate;b.channelsCount=ra.channelCount;null==Za&&null!==be.pts&&(Za=be.pts);for(;Ec<od.length;){var ce=oC(od,Ec);if(ce){var de=ce.Yd+ce.
|
|
1354
|
-
3,3018);Za=9E4*c.startTime;var ee=Jd("audio",b.codecs.split(","));if(!ee||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018);ra={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ia:ee};var pd=rC(ee,b.channelsCount);if(!pd)throw new T(2,3,3018);for(var vi=Za+9E4*(c.endTime-c.startTime),ug=Za;ug<vi;)Wa.push({data:pd,size:pd.byteLength,
|
|
1355
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wi,duration:d,Wa:[],ia:new Uint8Array([]),sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.g,baseMediaDecodeTime:xi,Ta:Wa},stream:b};break;case "ac3":for(var vg=[],fe=0,ec=new Uint8Array([]),fj=null,qu=t(k.Lb()),Em=qu.next();!Em.done;Em=qu.next()){var Fm=Em.value,Gm=Fm.data;null==fj&&null!==Fm.pts&&
|
|
1356
|
-
vg.push({data:Gm.subarray(pf,pf+Gd.
|
|
1357
|
-
su.next()){var Jm=Im.value,Km=Jm.data;null==hj&&null!==Jm.pts&&(hj=Jm.pts);for(var qf=0;qf<Km.length;){var Hd=wC(Km,qf);Hd?(b.audioSamplingRate=Hd.sampleRate,b.channelsCount=Hd.channelCount,gj=Hd.sampleRate,Hm=Hd.ia,ru.push({data:Km.subarray(qf,qf+Hd.
|
|
1358
|
-
duration:d,Wa:[],ia:Hm,sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.g,baseMediaDecodeTime:lD,Ta:ru},stream:b};break;case "mp3":for(var tu=[],ij,jj=null,uu=t(k.Lb()),Lm=uu.next();!Lm.done;Lm=uu.next()){var Mm=Lm.value,Ig=Mm.data;if(Ig){null==jj&&null!==Mm.pts&&(jj=Mm.pts);for(var ke=0;ke<Ig.length;){var rf=GC(Ig,
|
|
1359
|
-
3,3018);var vu=ij.sampleRate,mD=jj/9E4*vu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:vu,duration:d,Wa:[],ia:new Uint8Array([]),sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.g,baseMediaDecodeTime:mD,Ta:tu},stream:b};break;case "opus":var wu=[],
|
|
1360
|
-
break;case
|
|
1361
|
-
8&255,Oc.sampleRate>>>0&255,0,0].concat(x(yb)));for(var yu=Oc.sampleRate,zu=t(k.Lb()),Nm=zu.next();!Nm.done;Nm=zu.next()){var Om=Nm.value,sf=Om.data;null==kj&&null!==Om.pts&&(kj=Om.pts);for(var Jg=0;Jg<sf.length;){for(var nD=0!==(sf[Jg+1]&16),oD=0!==(sf[Jg+1]&8),sd=Jg+
|
|
1362
|
-
3,3018);b.audioSamplingRate=Oc.sampleRate;b.channelsCount=Oc.channelCount;var pD=kj/9E4*yu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:yu,duration:d,Wa:[],ia:xu,sa:new Uint8Array([]),xa:0,ya:0,
|
|
1363
|
-
this.i.get(b.id);else Qm=Ow(Bu),this.i.set(b.id,Qm);var qD=ex(Bu);this.g++;var rD=Bd(Qm,qD);return Promise.resolve(rD)};S("shaka.transmuxer.TsTransmuxer",TC);TC.prototype.transmux=TC.prototype.transmux;
|
|
1364
|
-
jc("video/mp2t",function(){return new TC("video/mp2t")},nc);/*
|
|
1349
|
+
r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!wj(f)){for(var g=Qi(f),h=g.length;h<f.length;h++)if(MC(f,h))return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));for(h=g.length;h<f.length;h++)if(qC(f,h))return this.h||(this.h=new sC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.L()[0]:null))}this.j?this.j.clearData():this.j=new pj;var k=this.j.parse(f),l=[],m=k.hd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],q=null,u=[],v=k.Dc();
|
|
1350
|
+
if(!v.length)throw new T(2,3,3023,c?c.L()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var y=AC(z);if(y){null==q&&(q=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,Za:Math.round((A.pts||0)-(A.dts||0)),flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:y.rd?2:1,bb:y.rd?0:1}})}}var C=yC(u);if(!C||null==q)throw new T(2,3,3018,c?c.L()[0]:null);b.height=C.height;
|
|
1351
|
+
b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],ia:new Uint8Array([]),sa:C.sa,xa:C.xa,ya:C.ya,data:{ob:this.g,baseMediaDecodeTime:q,Ta:p},stream:b};break;case "hvc":var D=[],J=null,K=[],H=k.Dc();if(!H.length)throw new T(2,3,3023,c?c.L()[0]:null);for(var I=0;I<H.length;I++){var G=H[I],L=G.nalus;K.push.apply(K,x(L));for(var M=!1,N=[],P=!1,R=t(L),Q=R.next();!Q.done;Q=R.next()){var fa=Q.value;switch(fa.type){case 1:case 0:var sa=
|
|
1352
|
+
P=!0;break;case 19:case 20:case 21:M=sa=P=!0;break;case 32:sa=!0;break;case 33:sa=!0;break;case 34:sa=!0;break;case 35:P=sa=!0;break;case 39:case 40:sa=!0;break;default:sa=!1}if(P&&sa){var Ia=fa.fullData.byteLength,xa=new Uint8Array(4);xa[0]=Ia>>24&255;xa[1]=Ia>>16&255;xa[2]=Ia>>8&255;xa[3]=Ia&255;N.push(xa);N.push(fa.fullData)}}var Ja=N.length?{data:Bd.apply(vd,x(N)),rd:M}:null;if(Ja){null==J&&null!=G.dts&&(J=G.dts);var Qa=void 0;Qa=I+1<H.length?(H[I+1].dts||0)-(G.dts||0):1<H.length?(G.dts||0)-(H[I-
|
|
1353
|
+
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ja.data,size:Ja.data.byteLength,duration:Qa,Za:Math.round((G.pts||0)-(G.dts||0)),flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:Ja.rd?2:1,bb:Ja.rd?0:1}})}}var Ba=BC(K);if(!Ba||null==J)throw new T(2,3,3018,c?c.L()[0]:null);b.height=Ba.height;b.width=Ba.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],ia:new Uint8Array([]),sa:Ba.sa,xa:Ba.xa,ya:Ba.ya,data:{ob:this.g,baseMediaDecodeTime:J,Ta:D},stream:b}}n&&
|
|
1354
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Wa=[],ra,Za=null,ff=t(k.Lb()),Dd=ff.next();!Dd.done;Dd=ff.next()){var be=Dd.value,od=be.data;if(od){var Ec=0;ra=pC(od,Ec);if(!ra)throw new T(2,3,3018,c?c.L()[0]:null);b.audioSamplingRate=ra.sampleRate;b.channelsCount=ra.channelCount;null==Za&&null!==be.pts&&(Za=be.pts);for(;Ec<od.length;){var ce=oC(od,Ec);if(ce){var de=ce.Yd+ce.X;Ec+de<=od.length&&Wa.push({data:od.subarray(Ec+ce.Yd,Ec+de),size:ce.X,duration:1024,Za:0,flags:{ab:0,
|
|
1355
|
+
Pa:0,Oa:0,Ma:0,Na:2,bb:0}});Ec+=de}else Ec++}}}if(!ra||null==Za){if(!k.Dc().length)throw new T(2,3,3018,c?c.L()[0]:null);Za=9E4*c.startTime;var ee=Jd("audio",b.codecs.split(","));if(!ee||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.L()[0]:null);ra={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ia:ee};var pd=rC(ee,b.channelsCount);if(!pd)throw new T(2,3,3018,c?c.L()[0]:null);for(var vi=Za+9E4*(c.endTime-c.startTime),ug=Za;ug<vi;)Wa.push({data:pd,size:pd.byteLength,
|
|
1356
|
+
duration:1024,Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}}),ug+=1024/ra.sampleRate*9E4}var wi=ra.sampleRate,xi=Za/9E4*wi;n={id:b.id,type:"audio",codecs:ra.Ia,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wi,duration:d,Wa:[],ia:new Uint8Array([]),sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.g,baseMediaDecodeTime:xi,Ta:Wa},stream:b};break;case "ac3":for(var vg=[],fe=0,ec=new Uint8Array([]),fj=null,qu=t(k.Lb()),Em=qu.next();!Em.done;Em=qu.next()){var Fm=Em.value,Gm=Fm.data;null==fj&&null!==Fm.pts&&
|
|
1357
|
+
(fj=Fm.pts);for(var pf=0;pf<Gm.length;){var Gd=tC(Gm,pf);Gd?(b.audioSamplingRate=Gd.sampleRate,b.channelsCount=Gd.channelCount,fe=Gd.sampleRate,ec=Gd.ia,vg.push({data:Gm.subarray(pf,pf+Gd.X),size:Gd.X,duration:1536,Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}}),pf+=Gd.X):pf++}}if(0==fe||0==ec.byteLength||null==fj)throw new T(2,3,3018,c?c.L()[0]:null);var kD=fj/9E4*fe;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:fe,duration:d,Wa:[],ia:ec,sa:new Uint8Array([]),
|
|
1358
|
+
xa:0,ya:0,data:{ob:this.g,baseMediaDecodeTime:kD,Ta:vg},stream:b};break;case "ec3":for(var ru=[],gj=0,Hm=new Uint8Array([]),hj=null,su=t(k.Lb()),Im=su.next();!Im.done;Im=su.next()){var Jm=Im.value,Km=Jm.data;null==hj&&null!==Jm.pts&&(hj=Jm.pts);for(var qf=0;qf<Km.length;){var Hd=wC(Km,qf);Hd?(b.audioSamplingRate=Hd.sampleRate,b.channelsCount=Hd.channelCount,gj=Hd.sampleRate,Hm=Hd.ia,ru.push({data:Km.subarray(qf,qf+Hd.X),size:Hd.X,duration:1536,Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}}),qf+=Hd.X):
|
|
1359
|
+
qf++}}if(0==gj||0==Hm.byteLength||null==hj)throw new T(2,3,3018,c?c.L()[0]:null);var lD=hj/9E4*gj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:gj,duration:d,Wa:[],ia:Hm,sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.g,baseMediaDecodeTime:lD,Ta:ru},stream:b};break;case "mp3":for(var tu=[],ij,jj=null,uu=t(k.Lb()),Lm=uu.next();!Lm.done;Lm=uu.next()){var Mm=Lm.value,Ig=Mm.data;if(Ig){null==jj&&null!==Mm.pts&&(jj=Mm.pts);for(var ke=0;ke<Ig.length;){var rf=GC(Ig,
|
|
1360
|
+
ke);rf?(ij||(ij=rf),ke+rf.X<=Ig.length&&tu.push({data:Ig.subarray(ke,ke+rf.X),size:rf.X,duration:1152,Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}}),ke+=rf.X):ke++}}}if(!ij||null==jj)throw new T(2,3,3018,c?c.L()[0]:null);var vu=ij.sampleRate,mD=jj/9E4*vu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:vu,duration:d,Wa:[],ia:new Uint8Array([]),sa:new Uint8Array([]),xa:0,ya:0,data:{ob:this.g,baseMediaDecodeTime:mD,Ta:tu},stream:b};break;case "opus":var wu=[],
|
|
1361
|
+
kj=null,Oc=k.F;if(!Oc)throw new T(2,3,3018,c?c.L()[0]:null);var yb=[];switch(Oc.nh){case 1:case 2:yb=[0];break;case 0:yb=[255,1,1,0,1];break;case 128:yb=[255,2,0,0,1];break;case 3:yb=[1,2,1,0,2,1];break;case 4:yb=[1,2,2,0,1,2,3];break;case 5:yb=[1,3,2,0,4,1,2,3];break;case 6:yb=[1,4,2,0,4,1,2,3,5];break;case 7:yb=[1,4,2,0,4,1,2,3,5,6];break;case 8:yb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:yb=[1,1,2,0,1];break;case 131:yb=[1,1,3,0,1,2];break;case 132:yb=[1,1,4,0,1,2,3];break;case 133:yb=[1,1,5,0,1,
|
|
1362
|
+
2,3,4];break;case 134:yb=[1,1,6,0,1,2,3,4,5];break;case 135:yb=[1,1,7,0,1,2,3,4,5,6];break;case 136:yb=[1,1,8,0,1,2,3,4,5,6,7]}var xu=new Uint8Array([0,Oc.channelCount,0,0,Oc.sampleRate>>>24&255,Oc.sampleRate>>>17&255,Oc.sampleRate>>>8&255,Oc.sampleRate>>>0&255,0,0].concat(x(yb)));for(var yu=Oc.sampleRate,zu=t(k.Lb()),Nm=zu.next();!Nm.done;Nm=zu.next()){var Om=Nm.value,sf=Om.data;null==kj&&null!==Om.pts&&(kj=Om.pts);for(var Jg=0;Jg<sf.length;){for(var nD=0!==(sf[Jg+1]&16),oD=0!==(sf[Jg+1]&8),sd=Jg+
|
|
1363
|
+
2,lj=0;255===sf[sd];)lj+=255,sd+=1;lj+=sf[sd];sd+=1;sd+=nD?2:0;sd+=oD?2:0;var Au=sf.slice(sd,sd+lj);wu.push({data:Au,size:Au.byteLength,duration:960,Za:0,flags:{ab:0,Pa:0,Oa:0,Ma:0,Na:2,bb:0}});Jg=sd+lj}}if(0==xu.byteLength||null==kj)throw new T(2,3,3018,c?c.L()[0]:null);b.audioSamplingRate=Oc.sampleRate;b.channelsCount=Oc.channelCount;var pD=kj/9E4*yu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:yu,duration:d,Wa:[],ia:xu,sa:new Uint8Array([]),xa:0,ya:0,
|
|
1364
|
+
data:{ob:this.g,baseMediaDecodeTime:pD,Ta:wu},stream:b}}n&&(l.push(n),n=null)}}catch(Pm){return Pm&&3023==Pm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Pm)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.L()[0]:null));var Bu=new Iw(l);if(this.i.has(b.id))var Qm=this.i.get(b.id);else Qm=Ow(Bu),this.i.set(b.id,Qm);var qD=ex(Bu);this.g++;var rD=Bd(Qm,qD);return Promise.resolve(rD)};S("shaka.transmuxer.TsTransmuxer",TC);TC.prototype.transmux=TC.prototype.transmux;
|
|
1365
|
+
TC.prototype.getOriginalMimeType=TC.prototype.getOriginalMimeType;TC.prototype.convertCodecs=TC.prototype.convertCodecs;TC.prototype.isSupported=TC.prototype.isSupported;TC.prototype.destroy=TC.prototype.destroy;var UC=["aac","ac-3","ec-3","mp3","opus"],VC=["avc","hevc"];jc("video/mp2t",function(){return new TC("video/mp2t")},nc);/*
|
|
1365
1366
|
@license
|
|
1366
1367
|
EME Encryption Scheme Polyfill
|
|
1367
1368
|
Copyright 2019 Google LLC
|