shaka-player 4.9.9 → 4.9.10
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/deps.js +1 -1
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.debug.js +350 -348
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +461 -461
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +318 -316
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +873 -873
- package/dist/shaka-player.ui.map +2 -2
- package/externs/shaka/player.js +2 -2
- package/lib/dash/mpd_utils.js +3 -3
- package/lib/hls/hls_parser.js +39 -45
- package/lib/media/preload_manager.js +1 -1
- package/lib/media/segment_index.js +14 -5
- package/lib/media/segment_prefetch.js +37 -25
- package/lib/media/streaming_engine.js +24 -13
- package/lib/player.js +1 -1
- package/lib/util/manifest_parser_utils.js +1 -0
- package/package.json +1 -1
|
@@ -25,8 +25,8 @@ ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!
|
|
|
25
25
|
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.C(g):this.m(g)}};
|
|
26
26
|
b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.A()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
|
|
27
27
|
function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.A=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
|
|
28
|
-
b.prototype.H=function(g){var h=this.j();g.
|
|
29
|
-
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).
|
|
28
|
+
b.prototype.H=function(g){var h=this.j();g.Rd(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(u){try{l(p(u))}catch(v){m(v)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Rd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Rd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
29
|
+
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Rd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){p[u]=v;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Rd(n(p.length-1),m),k=h.next();
|
|
30
30
|
while(!k.done)})};return b});function Ma(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
31
31
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ma(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
32
32
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ma(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ma(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ma(k,
|
|
@@ -65,7 +65,7 @@ function Nb(a,b,c){c||(c=Kb);if(a.length!=b.length)return!1;for(var d=0;d<a.leng
|
|
|
65
65
|
function $b(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Nb(a.nestedCues,b.nestedCues,$b))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Nb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}S("shaka.text.Cue",Ob);Ob.equal=$b;Ob.prototype.clone=Ob.prototype.clone;var Qb="auto";
|
|
66
66
|
Ob.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Qb};var Rb="center",ac={LEFT:"left",RIGHT:"right",CENTER:Rb,START:"start",END:"end"};Ob.textAlign=ac;var Wb="after",bc={BEFORE:"before",CENTER:"center",AFTER:Wb};Ob.displayAlign=bc;var Sb="ltr";Ob.direction={HORIZONTAL_LEFT_TO_RIGHT:Sb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Tb="horizontal-tb";Ob.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Tb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ub=0;
|
|
67
67
|
Ob.lineInterpretation={LINE_NUMBER:Ub,PERCENTAGE:1};var Vb="start",cc={CENTER:"center",START:Vb,END:"end"};Ob.lineAlign=cc;var dc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ob.defaultTextColor=dc;var ec={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ob.defaultTextBackgroundColor=ec;var Xb=400;Ob.fontWeight={NORMAL:Xb,BOLD:700};
|
|
68
|
-
var Yb="normal",fc={NORMAL:Yb,ITALIC:"italic",OBLIQUE:"oblique"};Ob.fontStyle=fc;Ob.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Pb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=hc;this.scroll=ic}S("shaka.text.CueRegion",Pb);var hc=1;Pb.units={PX:0,PERCENTAGE:hc,LINES:2};var ic="";Pb.scrollMode={NONE:ic,UP:"up"};function jc(){}jc.prototype.destroy=function(){};function kc(a,b,c){lc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,
|
|
68
|
+
var Yb="normal",fc={NORMAL:Yb,ITALIC:"italic",OBLIQUE:"oblique"};Ob.fontStyle=fc;Ob.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Pb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=hc;this.scroll=ic}S("shaka.text.CueRegion",Pb);var hc=1;Pb.units={PX:0,PERCENTAGE:hc,LINES:2};var ic="";Pb.scrollMode={NONE:ic,UP:"up"};function jc(){}jc.prototype.destroy=function(){};function kc(a,b,c){lc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,ue:b}}function mc(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([nc,oc,pc,qc]),e=d.next();!e.done;e=d.next())if(e=lc[c+"-"+e.value]){var f=e.ue(),g=f.isSupported(a,b);f.destroy();if(g)return e.ue}return null}S("shaka.transmuxer.TransmuxerEngine",jc);jc.findTransmuxer=mc;jc.unregisterTransmuxer=function(a,b){delete lc[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
69
69
|
jc.registerTransmuxer=kc;jc.prototype.destroy=jc.prototype.destroy;var lc={},qc=1,pc=2,oc=3,nc=4;jc.PluginPriority={FALLBACK:qc,PREFERRED_SECONDARY:pc,PREFERRED:oc,APPLICATION:nc};/*
|
|
70
70
|
@license
|
|
71
71
|
Copyright 2008 The Closure Library Authors
|
|
@@ -81,9 +81,9 @@ r.toString=function(){var a=[],b=this.wb;b&&a.push(zc(b,Ac,!0),":");if(b=this.zb
|
|
|
81
81
|
r.resolve=function(a){var b=this.clone();"data"===b.wb&&(b=new sc);var c=!!a.wb;c?tc(b,a.wb):c=!!a.oc;c?b.oc=a.oc:c=!!a.zb;c?uc(b,a.zb):c=null!=a.Gc;var d=a.Qa;if(c)vc(b,a.Gc);else if(c=!!a.Qa){if("/"!=d.charAt(0))if(this.zb&&!this.Qa)d="/"+d;else{var e=b.Qa.lastIndexOf("/");-1!=e&&(d=b.Qa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
82
82
|
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Qa=d:c=""!==a.g.toString();c?wc(b,a.g.clone()):c=!!a.Vb;c&&(b.Vb=a.Vb);return b};r.clone=function(){return new sc(this)};function tc(a,b,c){a.wb=c?xc(b,!0):b;a.wb&&(a.wb=a.wb.replace(/:$/,""))}function uc(a,b,c){a.zb=c?xc(b,!0):b}function vc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Gc=b}else a.Gc=null}
|
|
83
83
|
function wc(a,b,c){b instanceof yc?a.g=b:(c||(b=zc(b,Ec)),a.g=new yc(b))}function xc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function zc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ac=/[#\/\?@]/g,Cc=/[#\?:]/g,Bc=/[#\?]/g,Ec=/[#\?@]/g,Dc=/#/g;function yc(a){this.g=a||null}
|
|
84
|
-
function
|
|
85
|
-
r.set=function(a,b){
|
|
86
|
-
r.clone=function(){var a=new yc;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.
|
|
84
|
+
function Gc(a){if(!a.Ea&&(a.Ea={},a.dd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=yc.prototype;r.Ea=null;r.dd=null;function Ic(a){Gc(a);return a.dd}r.add=function(a,b){Gc(this);this.g=null;var c=this.Ea.hasOwnProperty(a)?this.Ea[a]:null;c||(this.Ea[a]=c=[]);c.push(b);this.dd++;return this};
|
|
85
|
+
r.set=function(a,b){Gc(this);this.g=null;this.Ea.hasOwnProperty(a)?this.Ea[a]=[b]:this.add(a,b);return this};r.get=function(a){Gc(this);return this.Ea[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ea)return"";var a=[],b;for(b in this.Ea)for(var c=encodeURIComponent(b),d=this.Ea[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
86
|
+
r.clone=function(){var a=new yc;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.dd=this.dd}return a};function T(a,b,c){var d=La.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(Jc)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 Jc=!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
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,
|
|
@@ -92,11 +92,11 @@ DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPOR
|
|
|
92
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
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
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 Kc(a){this.h=a;this.g=void 0}Kc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1};function Mc(a){this.h=a;this.g=null}Mc.prototype.
|
|
96
|
-
Nc.prototype.tickAfter=Nc.prototype.
|
|
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 Kc(a){this.h=a;this.g=void 0}Kc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1};function Mc(a){this.h=a;this.g=null}Mc.prototype.X=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};Mc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Nc(a){this.h=a;this.g=null}Nc.prototype.mc=function(){this.stop();this.h();return this};Nc.prototype.X=function(a){var b=this;this.stop();this.g=(new Mc(function(){b.h()})).X(a);return this};Nc.prototype.Ua=function(a){var b=this;this.stop();this.g=(new Mc(function(){b.g.X(a);b.h()})).X(a);return this};Nc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Nc);Nc.prototype.stop=Nc.prototype.stop;Nc.prototype.tickEvery=Nc.prototype.Ua;
|
|
96
|
+
Nc.prototype.tickAfter=Nc.prototype.X;Nc.prototype.tickNow=Nc.prototype.mc;function Oc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Qc(a){return""!=Sc().canPlayType(a)}function Tc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Uc(){return Vc("Xbox One")}function Wc(){return Vc("Tizen")}function Xc(){return Vc("Tizen 3")}function Yc(){return Vc("Tizen 2")}function Zc(){return Vc("Web0S")}function $c(){return Zc()&&38===ad()}function bd(){return Vc("CrKey")}
|
|
97
97
|
function ad(){if(!Vc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function cd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Wc()&&!Vc("PC=EOS")&&!Vc("PC=APL")&&!Vc("VirginMedia")&&!dd()&&!ed()&&!Vc("AFT")&&!Vc("WPE")&&!Vc("DT_STB_BCM")}function fd(){return Vc("PlayStation 5")}function ed(){return Vc("PlayStation 4")}function gd(){return Vc("Hisense")||Vc("VIDAA")}
|
|
98
98
|
function dd(){return Vc("SOPOpenBrowser")}function hd(){if(!cd())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 id(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1}function Vc(a){return(navigator.userAgent||"").includes(a)}
|
|
99
|
-
function Sc(){if(jd)return jd;kd||(kd=new Nc(function(){jd=null}));(jd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(jd=document.createElement("video"));kd.
|
|
99
|
+
function Sc(){if(jd)return jd;kd||(kd=new Nc(function(){jd=null}));(jd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(jd=document.createElement("video"));kd.X(1);return jd}function ld(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
|
|
100
100
|
function md(){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(bd()){m=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;ta(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(Wc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
101
101
|
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(Uc()){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"',
|
|
102
102
|
"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(Zc()){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(gd()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?
|
|
@@ -105,15 +105,15 @@ u.h;case 17:if(n){a.width=3840;a.height=2160;u.u(19);break}if(!(p=m)){u.u(20);br
|
|
|
105
105
|
function od(a){if(!a)return"";a=Bb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!ed())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&$a('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
106
106
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
107
107
|
function pd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Fb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return sd(d)}
|
|
108
|
-
function
|
|
108
|
+
function ud(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Bb(a);if(239==c[0]&&187==c[1]&&191==c[2])return od(c);if(254==c[0]&&255==c[1])return pd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return pd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return pd(a,!1);if(0==c[1]&&0==c[3])return pd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return od(a);throw new T(2,2,2003);}
|
|
109
109
|
function vd(a){if(window.TextEncoder&&!ed()){var b=new TextEncoder;return Cb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Cb(b)}function wd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function sd(a){return xd.value()(a)}
|
|
110
|
-
function yd(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}S("shaka.util.StringUtils",nd);nd.resetFromCharCode=function(){xd.g=void 0};nd.toUTF16=wd;nd.toUTF8=vd;nd.fromBytesAutoDetect=
|
|
110
|
+
function yd(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}S("shaka.util.StringUtils",nd);nd.resetFromCharCode=function(){xd.g=void 0};nd.toUTF16=wd;nd.toUTF8=vd;nd.fromBytesAutoDetect=ud;nd.fromUTF16=pd;nd.fromUTF8=od;
|
|
111
111
|
var xd=new Kc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Jb:65536};0<b.Jb;b={Jb:b.Jb},b.Jb/=2)if(a(b.Jb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Jb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Jb));return e}}(b);return null});function zd(){}function Ad(a){a=sd(Bb(a));return btoa(a)}function Bd(a,b){b=void 0==b?!0:b;a=Ad(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Cd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Dd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
112
112
|
function Ed(a){var b=Bb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Fd(){for(var a=La.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(Bb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",zd);zd.concat=Fd;zd.toHex=Ed;zd.fromHex=Dd;zd.fromBase64=Cd;zd.toBase64=Bd;zd.toStandardBase64=Ad;function Gd(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new sc(a[0]);b=new sc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new sc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new sc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
113
113
|
function Jd(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
|
|
114
114
|
function Kd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Bd(Dd(h),!1));var l=g;22!=l.length&&(l=Bd(Dd(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:Bb(vd(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
115
115
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Ld(a,b){if(1==b.length)return b[0];a=Md(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Md(a,b){for(var c=t(Nd[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==Od?"":null}
|
|
116
|
-
function Pd(a,b){var c=[];a=t(Nd[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 Od="text",Qd={ga:"video",
|
|
116
|
+
function Pd(a,b){var c=[];a=t(Nd[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 Od="text",Qd={ga:"video",V:"audio",na:Od,Ie:"image",Wi:"application"},Nd={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Rd(){}function Sd(a,b){var c=a;b&&!Td.includes(a)&&(c+='; codecs="'+b+'"');return c}function Ud(a,b){b&&(a+='; codecs="'+b+'"');return a}function Vd(a,b,c){var d=Sd(a,b);b=Ud(a,b);mc(b)?(a=mc(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}
|
|
117
117
|
function Wd(a,b,c){var d=[b];Xd.forEach(function(e,f){var g=a[f];"codecs"==f?Td.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Yd(a){return a.split(";")[0].split("/")[1]}
|
|
118
118
|
function Zd(a){var b=$d(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"===
|
|
119
119
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function ae(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=$d(c.value),b.push(c[0]);return b.sort().join(",")}function be(a){return a.split(";")[0]}
|
|
@@ -134,7 +134,7 @@ var Ae=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
134
134
|
"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",
|
|
135
135
|
"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",
|
|
136
136
|
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Fe(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 Ge(a){var b={},c;for(c in a)b[c]=a[c];return b};function He(){}
|
|
137
|
-
function Ie(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Je(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={
|
|
137
|
+
function Ie(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Je(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={$c:A.$c},z=v.next())A.$c=z.value,z=d.filter(function(B){return function(y){return B.$c.decodingInfos[0][y]}}(A)).length,z>u?(u=z,w=[A.$c]):z==u&&w.push(A.$c);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=
|
|
138
138
|
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=Zd(m.codecs),p=Zd(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,
|
|
139
139
|
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=Zd(m.codecs),p=Zd(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=Zd(m.codecs),p=Zd(g.codecs),n==p&&g.bandwidth>m.bandwidth&&(l.push(g),q.push(g.id)))}else l.push(g),
|
|
140
140
|
q.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!q.includes(u.id)?!1:!0})}
|
|
@@ -144,12 +144,12 @@ function Le(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.wid
|
|
|
144
144
|
function Oe(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return E(g,Re(b.variants,c,!1,d),2);e=null;a&&(f=a.g)&&(e=f.keySystem);b.variants=b.variants.filter(function(h){var k=Se(h,e);if(!k){var l=[];h.audio&&l.push(Te(h.audio));h.video&&l.push(Te(h.video))}return k});G(g)})}
|
|
145
145
|
function Se(a,b){var c=Uc(),d=Vc("Firefox")&&Vc("Android"),e=a.video,f=e&&e.width||0,g=e&&e.height||0;if(c&&e&&(1920<f||1080<g)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return!1;if(e){c=Ue(e.codecs);if(e.codecs.includes(",")){f=e.codecs.split(",");c=Ld("video",f);c=Ue(c);f=Ld("audio",f);f=Ve(f,e.mimeType);g=Vd(e.mimeType,f,"audio");if(!mb(g))return!1;c=[c,f].join()}f=Vd(e.mimeType,c,"video");if(!mb(f))return!1;e.codecs=c}e=a.audio;if(d&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus"))return!1;
|
|
146
146
|
if(e){d=Ve(e.codecs,e.mimeType);c=Vd(e.mimeType,d,"audio");if(!mb(c))return!1;e.codecs=d}return a.decodingInfos.some(function(h){return!h.supported||b&&(h=h.keySystemAccess)&&h.keySystem!=b?!1:!0})}function We(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=We(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
147
|
-
function Xe(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Ge(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f={};g=t(b);for(h=g.next();!h.done;f={
|
|
148
|
-
null;n=t(n||[]);for(var q=n.next();!q.done;q=n.next())p=c(p,q.value);p&&(m.
|
|
147
|
+
function Xe(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Ge(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f={};g=t(b);for(h=g.next();!h.done;f={Mc:f.Mc,Nc:f.Nc},h=g.next())k=h.value,f.Nc=We(k),f.Mc=Ye,f.Mc[f.Nc]?d=c(d,f.Mc[f.Nc]):e.push(Ze(k).then(function(m){return function(n){var p=
|
|
148
|
+
null;n=t(n||[]);for(var q=n.next();!q.done;q=n.next())p=c(p,q.value);p&&(m.Mc[m.Nc]=p,d=c(d,p))}}(f)));return E(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);G(l)})}
|
|
149
149
|
function Ze(a){var b=[""];a.video&&(b=he(a.video.contentType).split(","));var c=[""];a.audio&&(c=he(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={Qb:f.Qb},h=g.next())h=h.value,f.Qb=Fe(a),a.video&&(f.Qb.video.contentType=Sd(be(f.Qb.video.contentType),e)),a.audio&&(f.Qb.audio.contentType=Sd(be(f.Qb.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Qb).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
150
150
|
return null})}
|
|
151
|
-
function Re(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y;return O(function(
|
|
152
|
-
return E(
|
|
151
|
+
function Re(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y;return O(function(C){switch(C.g){case 1:if(e=a.some(function(D){return D.decodingInfos.length}))return C.return();f={};g=t(d);h=g.next();case 2:if(h.done){C.u(4);break}f.Ce=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){C.u(7);break}n=m.value;p=$e(n,b,c).filter(function(D){return function(K){K=K[0];return(K.keySystemConfiguration&&K.keySystemConfiguration.keySystem)===D.Ce}}(f));q=t(p);u=q.next();case 8:if(u.done){C.u(10);break}v=u.value;
|
|
152
|
+
return E(C,Xe(n,v),9);case 9:u=q.next();C.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();C.u(5);break;case 7:if(k)return C.return();f={Ce:f.Ce};h=g.next();C.u(2);break;case 4:w=t(a),m=w.next();case 12:if(m.done){C.u(0);break}A=m.value;z=$e(A,b,c).filter(function(D){D=D[0];D=D.keySystemConfiguration&&D.keySystemConfiguration.keySystem;return!D||!d.includes(D)});B=t(z);u=B.next();case 15:if(u.done){m=w.next();C.u(12);break}y=u.value;return E(C,Xe(A,y),16);case 16:u=B.next(),C.u(15)}})}
|
|
153
153
|
function $e(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=he(k);if(l.includes(",")&&!d){var m=l.split(","),n=be(k);l=Ld("video",m);m=Ld("audio",m);m=Ve(m,n);n=Vd(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Ue(l);k={contentType:Vd(be(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
|
|
154
154
|
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=be(l),l=Ve(he(l),k),k=Vd(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
|
|
155
155
|
k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(var p=g.next();!p.done;p=g.next())f=p.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=
|
|
@@ -178,7 +178,7 @@ r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.r
|
|
|
178
178
|
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=vf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=wf(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=vf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=vf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
179
179
|
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.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.A=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
|
|
180
180
|
r.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.A&&this.o&&xf(this))};r.trySuggestStreams=function(){null!=this.A&&this.o&&xf(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};
|
|
181
|
-
r.playbackRateChanged=function(a){this.B=a};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.
|
|
181
|
+
r.playbackRateChanged=function(a){this.B=a};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.X(yf)}),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)};
|
|
182
182
|
function xf(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 vf(a,b,c,d,e){if(a.j){var f=a.j.ug();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Le(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
183
183
|
function wf(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",uf);uf.prototype.configure=uf.prototype.configure;uf.prototype.setCmsdManager=uf.prototype.setCmsdManager;uf.prototype.setMediaElement=uf.prototype.setMediaElement;uf.prototype.playbackRateChanged=uf.prototype.playbackRateChanged;uf.prototype.setVariants=uf.prototype.setVariants;
|
|
184
184
|
uf.prototype.getBandwidthEstimate=uf.prototype.getBandwidthEstimate;uf.prototype.trySuggestStreams=uf.prototype.trySuggestStreams;uf.prototype.segmentDownloaded=uf.prototype.segmentDownloaded;uf.prototype.disable=uf.prototype.disable;uf.prototype.enable=uf.prototype.enable;uf.prototype.chooseVariant=uf.prototype.chooseVariant;uf.prototype.init=uf.prototype.init;uf.prototype.release=uf.prototype.release;uf.prototype.stop=uf.prototype.stop;var yf=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{xj:"reload",fh:"smooth"});function zf(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)}zf.prototype.add=function(a,b,c){return Af(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
@@ -188,23 +188,23 @@ function Ef(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
|
|
|
188
188
|
Ef.prototype.create=function(a){var b=[];b=Ff(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Gf(b,this.A);a.length&&(b=a);this.l&&(a=Hf(b,this.l),a.length&&(b=a));this.i&&(a=If(b,this.i),a.length&&(b=a));this.h&&(a=Jf(b,this.h),a.length&&(b=a));this.g&&(a=Kf(b,this.g),a.length&&(b=a));this.j&&(a=Lf(b,this.j),a.length&&(b=a));a=Mf(b,this.B);a.length&&(b=a);return new zf(b[0],b,!("smooth"==this.m&&ob()),this.o)};
|
|
189
189
|
function Ff(a,b){b=xe(b);var c=Ee(b,a.map(function(d){return De(d)}));return c?a.filter(function(d){return c==De(d)}):[]}function Gf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Kf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Lf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
190
190
|
function Jf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function If(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 Hf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Mf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Nf(){this.g=Of;this.i=(new Map).set(Of,2).set(Pf,1);this.h=0}function Qf(a,b,c){a.i.set(Of,c).set(Pf,b)}var Pf=0,Of=1;function Rf(a,b){var c=Sf();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}
|
|
191
|
-
function Tf(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 Nc(e)).
|
|
191
|
+
function Tf(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 Nc(e)).X(c/1E3)}),2)}a.h*=a.m;G(d)})}function Sf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Uf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Uf.prototype.resolve=function(){};Uf.prototype.reject=function(){};function Vf(a,b){this.promise=a;this.i=b;this.g=!1}function Wf(a){return new Vf(Promise.reject(a),function(){return Promise.resolve()})}function Xf(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new Vf(a,function(){return Promise.resolve()})}function Yf(a){return new Vf(Promise.resolve(a),function(){return Promise.resolve()})}function Zf(a){return new Vf(a,function(){return a.catch(function(){})})}Vf.prototype.abort=function(){this.g=!0;return this.i()};
|
|
192
192
|
function $f(a){return new Vf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Vf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
193
193
|
Vf.prototype.xa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=ag(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Uf,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new Vf(f,function(){return d()})};
|
|
194
194
|
function ag(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",Vf);Vf.prototype.chain=Vf.prototype.xa;Vf.prototype["finally"]=Vf.prototype.finally;Vf.all=$f;Vf.prototype.abort=Vf.prototype.abort;Vf.notAbortable=Zf;Vf.completed=Yf;Vf.aborted=Xf;Vf.failed=Wf;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}
|
|
195
195
|
function bg(a){var b=new U(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}U.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};U.prototype.stopImmediatePropagation=function(){this.g=!0};U.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",U);
|
|
196
196
|
var cg={Yi:"abrstatuschanged",Zi:"adaptation",$i:"buffering",aj:"complete",bj:"downloadfailed",cj:"downloadheadersreceived",dj:"drmsessionupdate",fj:"emsg",wj:"prft",Error:"error",gj:"expirationupdated",hj:"firstquartile",ij:"gapjumped",lj:"keystatuschanged",nj:"loaded",oj:"loading",qj:"manifestparsed",rj:"manifestupdated",sj:"mediaqualitychanged",Metadata:"metadata",tj:"midpoint",uj:"nospatialvideoinfo",vj:"onstatechange",yj:"ratechange",zj:"segmentappended",Aj:"sessiondata",Bj:"spatialvideoinfo",
|
|
197
|
-
Cj:"stalldetected",Dj:"started",Ej:"statechanged",Fj:"streaming",Gj:"textchanged",Hj:"texttrackvisibility",Ij:"thirdquartile",Jj:"timelineregionadded",Kj:"timelineregionenter",Lj:"timelineregionexit",Mj:"trackschanged",Oj:"unloading",Qj:"variantchanged"};function dg(){this.va=new gb;this.
|
|
198
|
-
dg.prototype.release=function(){this.va=null};function eg(){this.g=[]}function fg(a,b){a.g.push(b.finally(function(){Lb(a.g,b)}))}eg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function gg(a,b,c,d,e,f){dg.call(this);this.i=!1;this.m=new eg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.F=e||null;this.C=f||null;this.o=this.s=!1}pa(gg,dg);r=gg.prototype;r.Qf=function(a){this.s=a};r.Rf=function(a){this.o=a};function hg(a,b,c,d){c=c||ig;var e=jg[a];if(!e||c>=e.priority)jg[a]={priority:c,
|
|
197
|
+
Cj:"stalldetected",Dj:"started",Ej:"statechanged",Fj:"streaming",Gj:"textchanged",Hj:"texttrackvisibility",Ij:"thirdquartile",Jj:"timelineregionadded",Kj:"timelineregionenter",Lj:"timelineregionexit",Mj:"trackschanged",Oj:"unloading",Qj:"variantchanged"};function dg(){this.va=new gb;this.pe=this}dg.prototype.addEventListener=function(a,b){this.va&&this.va.push(a,b)};dg.prototype.removeEventListener=function(a,b){this.va&&this.va.remove(a,b)};dg.prototype.dispatchEvent=function(a){if(!this.va)return!0;var b=this.va.get(a.type)||[],c=this.va.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.pe;a.currentTarget=this.pe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
198
|
+
dg.prototype.release=function(){this.va=null};function eg(){this.g=[]}function fg(a,b){a.g.push(b.finally(function(){Lb(a.g,b)}))}eg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function gg(a,b,c,d,e,f){dg.call(this);this.i=!1;this.m=new eg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.F=e||null;this.C=f||null;this.o=this.s=!1}pa(gg,dg);r=gg.prototype;r.Qf=function(a){this.s=a};r.Rf=function(a){this.o=a};function hg(a,b,c,d){c=c||ig;var e=jg[a];if(!e||c>=e.priority)jg[a]={priority:c,ue:b,si:void 0===d?!1:d}}
|
|
199
199
|
function kg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(d=a.next();!d.done;d=a.next())b.h.add(d.value)}r.vi=function(a){this.g.add(a)};r.Ri=function(a){this.g.delete(a)};r.rh=function(){this.g.clear()};r.wi=function(a){this.h.add(a)};r.Si=function(a){this.h.delete(a)};r.sh=function(){this.h.clear()};
|
|
200
200
|
function lg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();dg.prototype.release.call(this);return this.m.destroy()};
|
|
201
201
|
r.request=function(a,b,c){var d=this,e=new mg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new ng(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Fe(b.retryParameters):Sf();b.uris=Fe(b.uris);f=og(this,a,b,c);var g=f.xa(function(){return pg(d,a,b,c,new Rf(b.retryParameters,!1),0,null,e)}),h=g.xa(function(p){return qg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
202
202
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.xa(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.Zh||!d.l||u.fromCache||"HEAD"==b.method||a!=rg||d.l(u.timeMs,u.data.byteLength,sg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new ng(n.promise,function(){return n.abort()},e);fg(this.m,f);return f};
|
|
203
203
|
function og(a,b,c,d){function e(h){f=f.xa(function(){c.body&&(c.body=Cb(c.body));return h(b,c,d)})}var f=Yf(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.xa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
204
|
-
function pg(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 sc(c.uris[f]),l=k.wb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=jg[l])?l.
|
|
205
|
-
var B=n(c.uris[f],c,b,function(
|
|
204
|
+
function pg(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 sc(c.uris[f]),l=k.wb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=jg[l])?l.ue:null;if(!n)return Wf(new T(2,1,1E3,k));var p=l.si,q=null,u=null,v=!1,w=!1,A;return Zf(Tf(e)).xa(function(){if(a.i)return Xf();A=Date.now();var z=0;c.requestStartTime=Date.now();
|
|
205
|
+
var B=n(c.uris[f],c,b,function(D,K,I){q&&q.stop();u&&u.X(C/1E3);a.l&&b==rg&&(z++,c.packetNumber=z,a.l(D,K,sg(d),c),m=!0,h.g=I)},function(D){a.j&&a.j(D,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return B;var y=c.retryParameters.connectionTimeout;y&&(q=new Nc(function(){v=!0;B.abort()}),q.X(y/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Nc(function(){v=!0;B.abort()}));return B}).xa(function(z){q&&q.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-A);var B={response:z,
|
|
206
206
|
Zh:m};!w&&a.j&&a.j(z.headers,c,b);return B},function(z){q&&q.stop();u&&u.stop();if(a.A){var B=null,y=0;z instanceof T&&(B=z,1001==z.code&&(y=z.data[1]));a.A(c,B,y,v)}if(a.i)return Xf();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 B=(new Map).set("error",z),B=new U("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,pg(a,b,c,d,e,f,z,h)}throw z;})}
|
|
207
|
-
function qg(a,b,c,d){var e=Yf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ee:f.Ee},g=a.next())f.Ee=g.value,e=e.xa(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return h.Ee(b,k,d)}}(f));return e.xa(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 sg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.
|
|
207
|
+
function qg(a,b,c,d){var e=Yf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ee:f.Ee},g=a.next())f.Ee=g.value,e=e.xa(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return h.Ee(b,k,d)}}(f));return e.xa(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 sg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.yd)return!1}return!0}S("shaka.net.NetworkingEngine",gg);
|
|
208
208
|
gg.prototype.request=gg.prototype.request;gg.prototype.destroy=gg.prototype.destroy;gg.makeRequest=lg;gg.defaultRetryParameters=function(){return Sf()};gg.prototype.clearAllResponseFilters=gg.prototype.sh;gg.prototype.unregisterResponseFilter=gg.prototype.Si;gg.prototype.registerResponseFilter=gg.prototype.wi;gg.prototype.clearAllRequestFilters=gg.prototype.rh;gg.prototype.unregisterRequestFilter=gg.prototype.Ri;gg.prototype.registerRequestFilter=gg.prototype.vi;gg.unregisterScheme=function(a){delete jg[a]};
|
|
209
209
|
gg.registerScheme=hg;gg.prototype.setForceHTTPS=gg.prototype.Rf;gg.prototype.setForceHTTP=gg.prototype.Qf;function mg(){this.g=0}gg.NumBytesRemainingClass=mg;function ng(a,b,c){Vf.call(this,a,b);this.h=c}pa(ng,Vf);gg.PendingRequest=ng;var rg=1;gg.RequestType={MANIFEST:0,SEGMENT:rg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};gg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var ig=3;
|
|
210
210
|
gg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ig};var jg={};function tg(a){this.g=!1;this.h=new Uf;this.i=a}tg.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 ug(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function vg(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 zg(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 Ag(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Bg(a,b){this.h=Fb(a);this.i=b==Cg;this.g=0}r=Bg.prototype;r.la=function(){return this.g<this.h.byteLength};r.ra=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 Dg();}};r.ja=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Dg();}};r.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Dg();}};
|
|
@@ -221,7 +221,7 @@ function Sg(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=
|
|
|
221
221
|
Copyright 2015 Tobias Nickel
|
|
222
222
|
SPDX-License-Identifier: MIT
|
|
223
223
|
*/
|
|
224
|
-
function Tg(a,b){a=
|
|
224
|
+
function Tg(a,b){a=ud(a);return Ug(a,b)}function Ug(a,b){a=Vg(a);return!b&&a.length?a[0]:(a=a.find(function(c){return c.tagName===b}))?a:null}function Wg(a){return Xg.has(a)?Xg.get(a):""}
|
|
225
225
|
function Vg(a){function b(e,f){f=void 0===f?!1:f;for(var g=[];a[d];)if(60==a.charCodeAt(d)){if(47===a.charCodeAt(d+1)){f=d+2;d=a.indexOf(">",d);f=a.substring(f,d);var h=f.indexOf(e);if(-1==h){var k=e.indexOf(".");0<k&&(h=f.indexOf(e.substring(0,k)))}if(-1==h)throw e=a.substring(0,d).split("\n"),Error("Unexpected close tag\nLine: "+(e.length-1)+"\nColumn: "+(e[e.length-1].length+1)+"\nChar: "+a[d]);d+1&&(d+=1);break}else if(33===a.charCodeAt(d+1)){if(45==a.charCodeAt(d+2)){for(;-1!==d&&(62!==a.charCodeAt(d)||
|
|
226
226
|
45!=a.charCodeAt(d-1)||45!=a.charCodeAt(d-2)||-1==d);)d=a.indexOf(">",d+1);-1===d&&(d=a.length)}else if(91===a.charCodeAt(d+2)&&91===a.charCodeAt(d+8)&&"cdata"===a.substr(d+3,5).toLowerCase()){h=a.indexOf("]]\x3e",d);-1==h?(g.push(a.substr(d+9)),d=a.length):(g.push(a.substring(d+9,h)),d=h+3);continue}d++;continue}a:{k=f;d++;var l=c(),m={};for(h=[];62!==a.charCodeAt(d)&&a[d];){var n=a.charCodeAt(d);if(64<n&&91>n||96<n&&123>n){n=c();for(var p=a.charCodeAt(d);p&&39!==p&&34!==p&&!(64<p&&91>p||96<p&&123>
|
|
227
227
|
p)&&62!==p;)d++,p=a.charCodeAt(d);var q=d+1;d=a.indexOf(a[d],q);q=a.slice(q,d);if(39===p||34===p){if(-1===d){k={tagName:l,attributes:m,children:h,parent:null};for(l=0;l<h.length;l++)"string"!==typeof h[l]&&(h[l].parent=k);h=k;break a}}else q=null,d--;n.startsWith("xmlns:")&&Xg.set(q,n.split(":")[1]);"tt"===l&&"xml:space"===n&&"preserve"===q&&(k=!0);m[n]=q}d++}47!==a.charCodeAt(d-1)?(d++,h=b(l,k)):d++;k={tagName:l,attributes:m,children:h,parent:null};l=h.length;for(m=0;m<l;m++)n=h[m],"string"!==typeof n?
|
|
@@ -234,54 +234,54 @@ function lh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]
|
|
|
234
234
|
function rh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
235
235
|
function sh(a){var b=[];a=yd(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}
|
|
236
236
|
function th(a,b){var c=sh(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)?uh(a[c],e,d,bh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}function uh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
237
|
-
function vh(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&&vh(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=vh(b,!1,!0),d.appendChild(c);return d}var Xg=new Map([]);function wh(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 Uf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this
|
|
238
|
-
function zh(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.L.stop(),a.L=null,E(b,Ah(a),2);case 2:if(!a.m){b.u(3);break}ta(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:xa(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.
|
|
239
|
-
function Bh(a,b,c){a.fa=!0;a.A=new Map;a.
|
|
237
|
+
function vh(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&&vh(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=vh(b,!1,!0),d.appendChild(c);return d}var Xg=new Map([]);function wh(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 Uf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.da=new Map;this.L=new Nc(function(){return xh(b)});this.T=!1;this.N=[];this.W=!1;this.K=new Nc(function(){yh(b)});this.l.catch(function(){});this.j=new tg(function(){return zh(b)});this.aa=!1;this.F=this.G=null}r=wh.prototype;r.destroy=function(){return this.j.destroy()};
|
|
238
|
+
function zh(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.L.stop(),a.L=null,E(b,Ah(a),2);case 2:if(!a.m){b.u(3);break}ta(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:xa(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.aa=!1,a.G=null,G(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Ua(this.h.updateExpirationTime)};
|
|
239
|
+
function Bh(a,b,c){a.fa=!0;a.A=new Map;a.T=c;return Ch(a,b)}function Dh(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.T=0<a.A.size;return Ch(a,b)}
|
|
240
240
|
function Eh(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 Fh(a,g,[])}
|
|
241
241
|
function Ch(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z;return O(function(B){if(1==B.g){if(c=Gh(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(y){return y.video&&y.video.drmInfos.length||y.audio&&y.audio.drmInfos.length?!0:!1});g||(h=zg(a.h.servers),Hh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Ih(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=
|
|
242
|
-
v.next())w=q.value,Jh(w,zg(a.h.servers),zg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,Re(b,a.
|
|
242
|
+
v.next())w=q.value,Jh(w,zg(a.h.servers),zg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,Re(b,a.T,a.aa,a.h.preferredKeySystems),2)}ug(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.ca=!0,B.return(Promise.resolve());z=Fh(a,void 0,b);return B.return(g?z:z.catch(function(){}))})}
|
|
243
243
|
function Kh(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 ug(a.j),c.return();case 2:return ta(c,4),a.G=a.m.setMediaKeys(a.s),E(c,a.G,6);case 6:wa(c,5);break;case 4:b=xa(c),a.o(new T(2,6,6003,b.message));case 5:ug(a.j),G(c)}})}function Lh(a,b){return O(function(c){if(1==c.g)return E(c,Kh(a),2);Mh(a,b.initDataType,Bb(b.initData));G(c)})}
|
|
244
|
-
r.tc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.sa(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.sa(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Nh(b,e.value);b.
|
|
244
|
+
r.tc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.sa(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.sa(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Nh(b,e.value);b.W=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ah(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||
|
|
245
245
|
b.A.size?E(c,Kh(b),2):c.u(2)}Oh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Lh(b,d)});G(c)})};
|
|
246
246
|
function Ph(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=lg([a.g.serverCertificateUri],a.h.retryParameters);ta(g,3);c=a.C.Db.request(5,b);return E(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Bb(d.data);wa(g,4);break;case 3:throw e=xa(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();
|
|
247
|
-
ta(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=xa(g),new T(2,6,6004,f.message);}})}function Qh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Rh(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.
|
|
247
|
+
ta(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=xa(g),new T(2,6,6004,f.message);}})}function Qh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Rh(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.gb=new Uf,d.push(e.gb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);G(f)})}
|
|
248
248
|
function Oh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){Rh(a,k,h)});return E(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Sh(a))return g.return(a.l);a.l=new Uf;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Mh(a,f.initDataType,f.initData);Th(a)&&a.l.resolve();return g.return(a.l)})}
|
|
249
249
|
function Mh(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(zb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Th(a)&&(a.l.resolve(),a.l=new Uf,a.l.catch(function(){}));Uh(a,b,c,a.g.sessionType)}}function Vh(a){a=a.i.keys();a=vg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
250
|
-
r.gf=function(){var a=this,b=this.i.keys();b=vg(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.
|
|
250
|
+
r.gf=function(){var a=this,b=this.i.keys();b=vg(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.ld=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.Xd=function(){return Ag(this.da)};
|
|
251
251
|
function Fh(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=Wh(a,c,d);z.u(2);break}return E(z,Xh(a,b),3);case 3:e=z.h;case 2:f=e;if(!f)throw new T(2,6,6001);ug(a.j);ta(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 B=
|
|
252
|
-
f.keySystem;var y=d.get(f.keySystem);var
|
|
253
|
-
for(
|
|
254
|
-
sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:
|
|
252
|
+
f.keySystem;var y=d.get(f.keySystem);var C=[],D=[],K=[],I=[],J=[],H=new Set;Yh(y,C,D,I,K,J,H);var F=a.T?"persistent-license":"temporary";B={keySystem:B,encryptionScheme:C[0],licenseServerUri:D[0],distinctiveIdentifierRequired:y[0].distinctiveIdentifierRequired,persistentStateRequired:y[0].persistentStateRequired,sessionType:y[0].sessionType||F,audioRobustness:y[0].audioRobustness||"",videoRobustness:y[0].videoRobustness||"",serverCertificate:I[0],serverCertificateUri:K[0],initData:J,keyIds:H};y=t(y);
|
|
253
|
+
for(C=y.next();!C.done;C=y.next())C=C.value,C.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(B.persistentStateRequired=C.persistentStateRequired);y=B}else y=f.keySystem,B=b.get(f.keySystem),C=[],D=[],K=[],I=[],J=[],H=new Set,Yh(B.drmInfos,C,D,I,K,J,H),y={keySystem:y,encryptionScheme:C[0],licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,
|
|
254
|
+
sessionType:B.sessionTypes[0]||"temporary",audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:I[0],serverCertificateUri:K[0],initData:J,keyIds:H};a.g=y;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return E(z,f.createMediaKeys(),6);case 6:u=z.h;ug(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){z.u(7);break}ta(z,8);return E(z,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
|
|
255
255
|
10);case 10:v=z.h;if("usable"!=v)throw new T(2,6,6018);ug(a.j);wa(z,7,4);break;case 8:w=xa(z,4);if(w instanceof T)throw w;throw new T(2,6,6019,w.message);case 7:return a.ca=!0,E(z,Ph(a),11);case 11:ug(a.j);wa(z,0);break;case 4:A=xa(z);ug(a.j,A);a.g=null;a.H.clear();if(A instanceof T)throw A;throw new T(2,6,6002,A.message);}})}
|
|
256
256
|
function Wh(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ih(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={De:d.De},e=a.next())for(d.De=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
257
257
|
l.De}}(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}
|
|
258
258
|
function Xh(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);ta(A,6);return E(A,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
259
259
|
A.h,A.return(c);case 6:xa(A);case 7:ug(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}ta(A,15);return E(A,navigator.requestMediaKeySystemAccess(u,[v]),17);case 17:return c=A.h,A.return(c);case 15:xa(A);case 16:ug(a.j);case 13:h=q.next();A.u(12);break;case 11:return A.return(c)}})}
|
|
260
|
-
function Gh(a){a=zg(a.h.clearKeys);return 0==a.size?null:Kd(a)}function Zh(a){Th(a)&&a.l.resolve()}function $h(a,b){(new Nc(function(){b.loaded=!0;Zh(a)})).
|
|
261
|
-
function Rh(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.
|
|
260
|
+
function Gh(a){a=zg(a.h.clearKeys);return 0==a.size?null:Kd(a)}function Zh(a){Th(a)&&a.l.resolve()}function $h(a,b){(new Nc(function(){b.loaded=!0;Zh(a)})).X(ai)}
|
|
261
|
+
function Rh(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.W?a.N.push(n):Nh(a,n)});a.B.D(d,"keystatuseschange",function(n){return bi(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Af:Infinity,gb:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return E(m,
|
|
262
262
|
d.load(b),4);case 4:return g=m.h,ug(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),$h(a,f),Zh(a),m.return(d);case 2:k=xa(m),ug(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,Zh(a);case 3:return m.return(Promise.resolve())}})}
|
|
263
|
-
function Uh(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.
|
|
263
|
+
function Uh(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.W?a.N.push(f):Nh(a,f)});a.B.D(e,"keystatuseschange",function(f){return bi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Af:Infinity,gb: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&&Bd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
264
264
|
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))}})}
|
|
265
265
|
function Nh(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&&Bd(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=lg([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]=
|
|
266
266
|
f.headers[h];if(Lc(a.g.keySystem)){var A=pd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Ug(A,"PlayReadyKeyMessage");var z=ch(A,"HttpHeader");z=t(z);for(var B=z.next();!B.done;B=z.next()){var y=B.value;B=ch(y,"name")[0];y=ch(y,"value")[0];g.headers[ah(B)]=ah(y)}A=ch(A,"Challenge")[0];g.body=Cd(ah(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();ta(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=xa(w);if(a.j.g)return w.return();
|
|
267
|
-
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.
|
|
267
|
+
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.gb&&d.gb.reject(p)):(d&&d.gb&&d.gb.reject(p),a.i.delete(c),Th(a)&&(a.l.resolve(),a.L.X(.1)));return w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Bd(l.data);ta(w,5);return E(w,c.update(l.data),7);case 7:wa(w,6);break;case 5:return q=xa(w),u=new T(2,6,6008,q.message),a.o(u),d&&d.gb&&d.gb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.gb&&d.gb.resolve(),
|
|
268
268
|
$h(a,d));G(w)}})}
|
|
269
|
-
function bi(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(Lc(a.g.keySystem)&&16==g.byteLength&&(Tc()||ed())){h=Fb(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=Ed(g).slice(0,32);a
|
|
270
|
-
(a.l.resolve(),a.L.
|
|
271
|
-
function di(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
269
|
+
function bi(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(Lc(a.g.keySystem)&&16==g.byteLength&&(Tc()||ed())){h=Fb(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=Ed(g).slice(0,32);a.$.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.gb&&(a.i.delete(b),b.close().catch(function(){}));Th(a)&&
|
|
270
|
+
(a.l.resolve(),a.L.X(ci))}function xh(a){var b=a.$,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.qe(Ag(c))}
|
|
271
|
+
function di(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J;return O(function(H){if(1==H.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
|
|
272
272
|
{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(F,N){var L,M,P,R,Q,ja,ka,va;return O(function(ya){switch(ya.g){case 1:return ta(ya,2),E(ya,N.createMediaKeys(),4);case 4:wa(ya,3);break;case 2:return xa(ya),ya.return();case 3:M=(L=N.getConfiguration().sessionTypes)?L.includes("persistent-license"):
|
|
273
273
|
!1,Xc()&&(M=!1),P=N.getConfiguration().videoCapabilities,R=N.getConfiguration().audioCapabilities,Q={persistentState:M,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(F)&&k.get(F)?Q=k.get(F):k.set(F,Q),(ja=P[0].encryptionScheme)&&!Q.encryptionSchemes.includes(ja)&&Q.encryptionSchemes.push(ja),(ka=P[0].robustness)&&!Q.videoRobustnessLevels.includes(ka)&&Q.videoRobustnessLevels.push(ka),(va=R[0].robustness)&&!Q.audioRobustnessLevels.includes(va)&&Q.audioRobustnessLevels.push(va),
|
|
274
274
|
G(ya)}})};m=function(F,N,L,M){var P,R,Q,ja,ka,va,ya,Ba,Ka;return O(function(Ca){switch(Ca.g){case 1:ta(Ca,2);P=Fe(g);R=t(P.videoCapabilities);for(Q=R.next();!Q.done;Q=R.next())ja=Q.value,ja.encryptionScheme=N,ja.robustness=L;ka=t(P.audioCapabilities);for(Q=ka.next();!Q.done;Q=ka.next())va=Q.value,va.encryptionScheme=N,va.robustness=M;ya=Fe(P);ya.persistentState="required";ya.sessionTypes=["persistent-license"];Ba=[ya,P];return E(Ca,navigator.requestMediaKeySystemAccess(F,Ba),4);case 4:return Ka=Ca.h,
|
|
275
275
|
E(Ca,l(F,Ka),5);case 5:wa(Ca,0);break;case 2:xa(Ca),G(Ca)}})};n=function(F,N,L,M){var P,R,Q;return O(function(ja){switch(ja.g){case 1:return ta(ja,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:F,video:{encryptionScheme:N,robustness:L},audio:{encryptionScheme:N,robustness:M}}},E(ja,navigator.mediaCapabilities.decodingInfo(P),4);case 4:return R=
|
|
276
|
-
ja.h,Q=R.keySystemAccess,E(ja,l(F,Q),5);case 5:wa(ja,0);break;case 2:xa(ja),G(ja)}})};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,B=t(a),q=B.next();!q.done;q=B.next())y=q.value,"org.w3.clearkey"===y&&hd()||(v.push(m(y,z,"","")),v.push(n(y,z,"","")));
|
|
277
|
-
|
|
276
|
+
ja.h,Q=R.keySystemAccess,E(ja,l(F,Q),5);case 5:wa(ja,0);break;case 2:xa(ja),G(ja)}})};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,B=t(a),q=B.next();!q.done;q=B.next())y=q.value,"org.w3.clearkey"===y&&hd()||(v.push(m(y,z,"","")),v.push(n(y,z,"","")));C=t(a);for(q=C.next();!q.done;q=C.next())for(D=q.value,K=t(d[D]||[]),I=K.next();!I.done;I=K.next())J=I.value,v.push(m(D,null,J,"")),v.push(m(D,null,"",J)),v.push(n(D,null,
|
|
277
|
+
J,"")),v.push(n(D,null,"",J));return E(H,Promise.all(v),2)}return H.return(Ag(k))})}function ei(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Nc(e)).X(fi)}),ta(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);xa(c);G(c)})}
|
|
278
278
|
function Ah(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return E(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return ta(g,2),a.fa||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,ei(e),5):E(g,e.remove(),5);if(2!=g.g)return wa(g,0);xa(g);G(g)})})),0)})}function gi(a,b){return a.length&&b.length&&a!==b?0<hi(a,b).length:!0}
|
|
279
279
|
function hi(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||
|
|
280
280
|
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}
|
|
281
|
-
function Ih(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function yh(a){a.i.forEach(function(b,c){var d=b.Af,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Af=e)})}function Th(a){a=a.i.values();return wg(a,function(b){return b.loaded})}function Sh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a
|
|
281
|
+
function Ih(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function yh(a){a.i.forEach(function(b,c){var d=b.Af,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Af=e)})}function Th(a){a=a.i.values();return wg(a,function(b){return b.loaded})}function Sh(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.$.get(c.value))return!1;return!0}
|
|
282
282
|
function Hh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
283
283
|
function Yh(a,b,c,d,e,f,g){var h=[],k={};a=t(a);for(var l=a.next();!l.done;k={ma:k.ma},l=a.next()){k.ma=l.value;b.includes(k.ma.encryptionScheme)||b.push(k.ma.encryptionScheme);"org.w3.clearkey"==k.ma.keySystem&&k.ma.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(k.ma.licenseServerUri)||h.push(k.ma.licenseServerUri):c.includes(k.ma.licenseServerUri)||c.push(k.ma.licenseServerUri);e.includes(k.ma.serverCertificateUri)||e.push(k.ma.serverCertificateUri);k.ma.serverCertificate&&
|
|
284
|
-
(d.some(function(p){return function(q){return zb(q,p.ma.serverCertificate)}}(k))||d.push(k.ma.serverCertificate));if(k.ma.initData){l={};for(var m=t(k.ma.initData),n=m.next();!n.done;l={
|
|
284
|
+
(d.some(function(p){return function(q){return zb(q,p.ma.serverCertificate)}}(k))||d.push(k.ma.serverCertificate));if(k.ma.initData){l={};for(var m=t(k.ma.initData),n=m.next();!n.done;l={Id:l.Id},n=m.next())l.Id=n.value,f.some(function(p){return function(q){var u=p.Id;return q.keyId&&q.keyId==u.keyId?!0:q.initDataType==u.initDataType&&zb(q.initData,u.initData)}}(l))||f.push(l.Id)}if(k.ma.keyIds)for(l=t(k.ma.keyIds),m=l.next();!m.done;m=l.next())g.add(m.value)}if(1==h.length)c.push(h[0]);else if(0<
|
|
285
285
|
h.length){b=[];h=t(h);for(d=h.next();!d.done;d=h.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));h=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(h))}}
|
|
286
286
|
function Jh(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
287
287
|
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var fi=1,ai=5,ci=.5,ii=new Kc(function(){return Cb(new Uint8Array([0]))}),ji=new Map;/*
|
|
@@ -292,19 +292,19 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
292
292
|
*/
|
|
293
293
|
function ki(a,b,c){this.h=a;this.i=b;this.g=c}function li(a,b){return O(function(c){if(1==c.g)return E(c,Ne(a.g,b,a.h.drm.preferredKeySystems),2);Ie(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(mf))throw new T(2,4,4032);return c.return(mi(a,b))})}
|
|
294
294
|
function mi(a,b){var c=Me(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,ni(a,d.keySystem,f.video),ni(a,d.keySystem,f.audio);oi(a,b)}return c}function ni(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,Mh(a.g,e.initDataType,e.initData)}}}
|
|
295
|
-
function oi(a,b){a=a.g?a.g.
|
|
296
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var pi=["output-restricted","internal-error"];function qi(){}function ri(a,b){if(b){var c=si[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",qi);qi.unregisterParserByMime=function(a){delete si[a]};qi.registerParserByMime=function(a,b){si[a]=b};qi.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};qi.AccessibilityPurpose={Pj:"visually impaired",jj:"hard of hearing"};var si={};function ti(a,b){function c(){f=!0}function d(m){h.push(m);Jg(m)}var e=a=Bb(a),f=!1,g,h=[],k=[];(new Eg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).P("stsd",function(m){g=m;h.push(m);Ng(m)}).P("encv",c).P("enca",c).P("dvav",function(m){k.push({box:m,
|
|
297
|
-
function(m){k.push({box:m,
|
|
298
|
-
e=ui(e,g,l.box,h,l.
|
|
295
|
+
function oi(a,b){a=a.g?a.g.Xd():{};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?pi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
296
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var pi=["output-restricted","internal-error"];function qi(){}function ri(a,b){if(b){var c=si[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",qi);qi.unregisterParserByMime=function(a){delete si[a]};qi.registerParserByMime=function(a,b){si[a]=b};qi.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};qi.AccessibilityPurpose={Pj:"visually impaired",jj:"hard of hearing"};var si={};function ti(a,b){function c(){f=!0}function d(m){h.push(m);Jg(m)}var e=a=Bb(a),f=!1,g,h=[],k=[];(new Eg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).P("stsd",function(m){g=m;h.push(m);Ng(m)}).P("encv",c).P("enca",c).P("dvav",function(m){k.push({box:m,eb:1701733238})}).P("dva1",function(m){k.push({box:m,eb:1701733238})}).P("dvh1",function(m){k.push({box:m,eb:1701733238})}).P("dvhe",function(m){k.push({box:m,eb:1701733238})}).P("hev1",function(m){k.push({box:m,eb:1701733238})}).P("hvc1",
|
|
297
|
+
function(m){k.push({box:m,eb:1701733238})}).P("avc1",function(m){k.push({box:m,eb:1701733238})}).P("avc3",function(m){k.push({box:m,eb:1701733238})}).P("ac-3",function(m){k.push({box:m,eb:1701733217})}).P("ec-3",function(m){k.push({box:m,eb:1701733217})}).P("ac-4",function(m){k.push({box:m,eb:1701733217})}).P("mp4a",function(m){k.push({box:m,eb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Ed(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
|
|
298
|
+
e=ui(e,g,l.box,h,l.eb);return Tc()&&id()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
299
299
|
function ui(a,b,c,d,e){var f=vi.value(),g=a.subarray(c.start,c.start+c.size),h=Fb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Fb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);wi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Uc()||Tc()?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,wi(e,d.start,d.size+k.byteLength);k=Fb(e,b.start);b=Kg(b);
|
|
300
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function wi(a,b,c){a=Fb(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 vi=new Kc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function xi(a,b,c,d,e,f,g){this.M=a;this.Ba=b;this.ka=c;this.xf=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}xi.prototype.ac=function(){return this.Ba};xi.prototype.Yb=function(){return this.ka};xi.prototype.
|
|
300
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function wi(a,b,c){a=Fb(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 vi=new Kc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function xi(a,b,c,d,e,f,g){this.M=a;this.Ba=b;this.ka=c;this.xf=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}xi.prototype.ac=function(){return this.Ba};xi.prototype.Yb=function(){return this.ka};xi.prototype.nd=function(){return this.g};function yi(a,b){return a===b?!0:a&&b?a.ac()==b.ac()&&a.Yb()==b.Yb()&&Nb(a.M().sort(),b.M().sort())&&zb(a.nd(),b.nd()):a==b}S("shaka.media.InitSegmentReference",xi);
|
|
301
301
|
xi.prototype.getEndByte=xi.prototype.Yb;xi.prototype.getStartByte=xi.prototype.ac;
|
|
302
|
-
function
|
|
303
|
-
a.next())b.value.Dg();this.o&&this.g.length&&this.g[this.g.length-1].Cg();this.B=this.mimeType=this.codecs=null}r=
|
|
304
|
-
r.
|
|
305
|
-
r.Uf=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.Oi=function(a){this.B=a};r.
|
|
306
|
-
|
|
307
|
-
|
|
302
|
+
function zi(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?Di:q;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Ba=d;this.ka=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.fe=this.yd=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
303
|
+
a.next())b.value.Dg();this.o&&this.g.length&&this.g[this.g.length-1].Cg();this.B=this.mimeType=this.codecs=null}r=zi.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.Bh=function(){return this.endTime};r.ac=function(){return this.Ba};r.Yb=function(){return this.ka};r.Uh=function(){return this.tilesLayout};r.Th=function(){return this.A};r.bc=function(){return this.status};r.li=function(){this.status=Ei};r.wf=function(){this.preload=!0};r.fi=function(){return this.preload};
|
|
304
|
+
r.ie=function(){this.l=!1};r.ci=function(){return this.l};r.Dg=function(){this.yd=!0};r.ei=function(){return this.yd};r.Cg=function(){this.fe=!0};r.di=function(){return this.fe};r.Bg=function(){this.m=!0};r.$h=function(){return this.m};r.Ug=function(a){this.s=a};r.Sh=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};
|
|
305
|
+
r.Uf=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.Oi=function(a){this.B=a};r.nd=function(){return this.B};function Fi(a,b){a.ea=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Fi(c.value,b)}S("shaka.media.SegmentReference",zi);zi.prototype.getSegmentData=zi.prototype.nd;zi.prototype.setSegmentData=zi.prototype.Oi;zi.prototype.syncAgainst=zi.prototype.Uf;zi.prototype.offset=zi.prototype.offset;
|
|
306
|
+
zi.prototype.getThumbnailSprite=zi.prototype.Sh;zi.prototype.setThumbnailSprite=zi.prototype.Ug;zi.prototype.hasByterangeOptimization=zi.prototype.$h;zi.prototype.markAsByterangeOptimization=zi.prototype.Bg;zi.prototype.isLastPartial=zi.prototype.di;zi.prototype.markAsLastPartial=zi.prototype.Cg;zi.prototype.isPartial=zi.prototype.ei;zi.prototype.markAsPartial=zi.prototype.Dg;zi.prototype.isIndependent=zi.prototype.ci;zi.prototype.markAsNonIndependent=zi.prototype.ie;zi.prototype.isPreload=zi.prototype.fi;
|
|
307
|
+
zi.prototype.markAsPreload=zi.prototype.wf;zi.prototype.markAsUnavailable=zi.prototype.li;zi.prototype.getStatus=zi.prototype.bc;zi.prototype.getTileDuration=zi.prototype.Th;zi.prototype.getTilesLayout=zi.prototype.Uh;zi.prototype.getEndByte=zi.prototype.Yb;zi.prototype.getStartByte=zi.prototype.ac;zi.prototype.getEndTime=zi.prototype.Bh;zi.prototype.getStartTime=zi.prototype.getStartTime;zi.prototype.getUris=zi.prototype.M;var Di=0,Ei=1;zi.Status={Xi:Di,Nj:Ei,pj:2};function Gi(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Hi(a){return!a||Gi(a)?null:a.length?a.end(a.length-1):null}function Ii(a,b){return!a||!a.length||Gi(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ji(a,b){if(!a||!a.length||Gi(a))return 0;var c=0;a=t(Ki(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}
|
|
308
308
|
function Li(a,b,c){if(!a||!a.length||Gi(a))return null;a=Ki(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ki(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};/*
|
|
309
309
|
@license
|
|
310
310
|
Shaka Player
|
|
@@ -316,10 +316,10 @@ function Qi(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
316
316
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=od(Bb(a.data,1,d));a=od(Bb(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=od(Bb(a.data,1,d));a=od(Bb(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=od(Bb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
317
317
|
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=Cb(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=od(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=od(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Cb(a.data),b):null}
|
|
318
318
|
function Ri(a){for(var b=0,c=[];Ni(a,b);){var d=Pi(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=Pi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Qi(e))&&c.push(f);b+=e.size+10}Oi(a,b)&&(b+=10)}return c}function Si(a,b){for(var c=b=void 0===b?0:b,d=0;Ni(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Pi(a,b+6),Oi(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Mi);Mi.getID3Data=Si;
|
|
319
|
-
Mi.getID3Frames=Ri;function Ti(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Hc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,
|
|
320
|
-
function Wi(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={Kf:null,sampleSize:null,
|
|
319
|
+
Mi.getID3Frames=Ri;function Ti(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Hc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,fd:c,Vd:d,Rj:e}}function Ui(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Vi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ja();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
320
|
+
function Wi(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={Kf:null,sampleSize:null,we:null};c&256&&(h.Kf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.we=0==b?a.O():a.Ig());e.push(h)}return{Vj:d,Lg:e,vh:f}}
|
|
321
321
|
function Xi(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.ja()+a.ja()/16;a=a.ja()+a.ja()/16;return{trackId:c,width:b,height:a}}function Yi(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ja();a.skip(2);a.skip(2);a.skip(2);a=a.ja()+a.ja()/65536;return{channelCount:b,sampleRate:a}}function Zi(a){a=a.O();return{Ga:Ig(a)}}
|
|
322
|
-
function $i(a){var b=null,c=null,d=a.nb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.ja()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ja();a.ja();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,
|
|
322
|
+
function $i(a){var b=null,c=null,d=a.nb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.ja()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ja();a.ja();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,Fd:c}}
|
|
323
323
|
function aj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function bj(a){return(10>a?"0":"")+a};/*
|
|
324
324
|
|
|
325
325
|
Copyright Brightcove, Inc.
|
|
@@ -338,11 +338,11 @@ function aj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
|
|
|
338
338
|
*/
|
|
339
339
|
function cj(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=Bb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function dj(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 Bg(c,0)).O(),a.g=8*d,a.i-=d)}function ej(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;dj(a)}a.h<<=b;a.g-=b}
|
|
340
340
|
function fj(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&&dj(a);c=b-c;return 0<c?d<<c|fj(a,c):d}function gj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;dj(a);return b+gj(a)}function hj(a){ej(a,1+gj(a))}function V(a){var b=gj(a);return fj(a,b+1)-1}function ij(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===fj(a,1)}function jj(a){return fj(a,8)}
|
|
341
|
-
function
|
|
342
|
-
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,uj(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,
|
|
341
|
+
function kj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=ij(a),d=(c+d+256)%256),c=0===d?c:d}function sj(a){jj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",cj);function tj(){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=tj.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
342
|
+
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,uj(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,ce:-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<
|
|
343
343
|
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var q=f[n+1]+2;switch(f[n]){case 5:var u=sd(f.subarray(n+2,n+q));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
|
|
344
|
-
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,qh:u,sampleRate:48E3}))}n+=q;p-=q}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.
|
|
345
|
-
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.J=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.
|
|
344
|
+
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,qh:u,sampleRate:48E3}))}n+=q;p-=q}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.ce&&(g.ce=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
|
|
345
|
+
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.J=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.ce&&(this.C=f.ce);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.J:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
346
346
|
break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
347
347
|
function vj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=wj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=wj(d,
|
|
348
348
|
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.ri=function(a){rb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Df(a)};
|
|
@@ -351,132 +351,132 @@ n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={
|
|
|
351
351
|
r.Lb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Fd.apply(zd,x(c.value)),e=vj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Fd(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
352
352
|
r.Ac=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Fd.apply(zd,x(d.value)),f=vj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Fd(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.Df(d,
|
|
353
353
|
g,void 0),d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Lb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Ac(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};
|
|
354
|
-
r.
|
|
355
|
-
function yj(a){var b={height:null,width:null,Ga:null};a=a
|
|
354
|
+
r.kd=function(){return{audio:this.A,video:this.m}};r.ae=function(){for(var a=[],b=t(this.Ac()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.Xh=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.lf();return{height:a.height,width:a.width}};r.lf=function(){return"hvc"==this.m?xj(this):yj(this)};
|
|
355
|
+
function yj(a){var b={height:null,width:null,Ga:null};a=a.ae();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new cj(a.data);var c=jj(a),d=jj(a),e=jj(a);hj(a);if(zj.includes(c)){var f=V(a);3===f&&ej(a,1);hj(a);hj(a);ej(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?kj(a,16):kj(a,64))}}hj(a);f=V(a);if(0===f)V(a);else if(1===f)for(ej(a,1),hj(a),hj(a),f=V(a),g=0;g<f;g++)hj(a);hj(a);ej(a,1);f=V(a);g=V(a);var h=fj(a,1);0===h&&ej(a,1);ej(a,1);var k=0,l=0,m=0,n=
|
|
356
356
|
0;W(a)&&(k=V(a),l=V(a),m=V(a),n=V(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.Ga="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
357
|
-
function xj(a){var b={height:null,width:null,Ga:null};a=a
|
|
358
|
-
(w+=V(c),A+=V(c),z+=V(c),B+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(z+B)*(1===d?2:1));c=function(y){for(var
|
|
359
|
-
a.toString(16).toUpperCase());b.Ga=e;return b}function wj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Aj(a){return 0>uj(a)?!1:!0}function uj(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",tj);tj.syncOffset=uj;tj.probe=Aj;tj.prototype.getVideoInfo=tj.prototype.lf;tj.prototype.getVideoResolution=tj.prototype.Xh;tj.prototype.getVideoNalus=tj.prototype
|
|
360
|
-
tj.prototype.getCodecs=tj.prototype.
|
|
357
|
+
function xj(a){var b={height:null,width:null,Ga:null};a=a.ae();if(!a.length)return b;a=a.find(function(y){return 33==y.type});if(!a)return b;var c=new cj(a.fullData,!0);jj(c);jj(c);fj(c,4);var d=fj(c,3);W(c);var e=fj(c,2),f=fj(c,1),g=fj(c,5),h=fj(c,32);a=jj(c);for(var k=jj(c),l=jj(c),m=jj(c),n=jj(c),p=jj(c),q=jj(c),u=[],v=[],w=0;w<d;w++)u.push(W(c)),v.push(W(c));if(0<d)for(w=d;8>w;w++)fj(c,2);for(w=0;w<d;w++)u[w]&&fj(c,88),v[w]&&jj(c);V(c);d=V(c);3==d&&fj(c,1);u=V(c);v=V(c);var A=w=0,z=0,B=0;W(c)&&
|
|
358
|
+
(w+=V(c),A+=V(c),z+=V(c),B+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(z+B)*(1===d?2:1));c=function(y){for(var C=0,D=0;32>D;D++)C|=(y>>D&1)<<31-D;return C>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+q;p&&(e+="."+p.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
359
|
+
a.toString(16).toUpperCase());b.Ga=e;return b}function wj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Aj(a){return 0>uj(a)?!1:!0}function uj(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",tj);tj.syncOffset=uj;tj.probe=Aj;tj.prototype.getVideoInfo=tj.prototype.lf;tj.prototype.getVideoResolution=tj.prototype.Xh;tj.prototype.getVideoNalus=tj.prototype.ae;
|
|
360
|
+
tj.prototype.getCodecs=tj.prototype.kd;tj.prototype.getStartTime=tj.prototype.getStartTime;tj.prototype.getVideoData=tj.prototype.Ac;tj.prototype.getAudioData=tj.prototype.Lb;tj.prototype.getMetadata=tj.prototype.getMetadata;tj.prototype.parseNalus=tj.prototype.Df;tj.prototype.parseAvcNalus=tj.prototype.ri;tj.prototype.parse=tj.prototype.parse;tj.prototype.clearData=tj.prototype.clearData;tj.Timescale=9E4;var zj=[100,110,122,244,44,83,86,118,128,138,139,134];function Bj(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,rb("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"),
|
|
361
361
|
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 Cj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
362
|
-
Bj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Dj(a,b,c){var d=Ej,e=Fj;switch(b.mimeType){case "video/webm":d=Gj;break;case "video/mp4":d=Hj}switch(c){case "DASH":e=Ij;break;case "HLS":e=Jj}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",Bj);Bj.prototype.release=Bj.prototype.release;var Ej=0,Gj=1,Hj=2,Jj=0,Ij=1,Fj=-1;function Kj(a,b,c,d){var e=this;this.i=a;this.
|
|
362
|
+
Bj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Dj(a,b,c){var d=Ej,e=Fj;switch(b.mimeType){case "video/webm":d=Gj;break;case "video/mp4":d=Hj}switch(c){case "DASH":e=Ij;break;case "HLS":e=Jj}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",Bj);Bj.prototype.release=Bj.prototype.release;var Ej=0,Gj=1,Hj=2,Jj=0,Ij=1,Fj=-1;function Kj(a,b,c,d){var e=this;this.i=a;this.W=c;this.A=null;this.F=b;this.h={};this.G={};this.pa={};this.g=null;this.ca=!1;this.T=d||null;this.j={};this.o=new hb;this.m={};this.H=null;this.L=new Uf;this.N="";this.da=!1;this.l=Lj(this,this.L);this.C=!1;this.J=new tg(function(){return Mj(e)});this.B=!1;this.aa="UNKNOWN";this.oa=this.wa=!1;this.va=new Uf;this.s=!1;this.fa=!0;this.K=this.$=null}
|
|
363
363
|
function Lj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.fa=!0});a.o.D(c,"endstreaming",function(){a.fa=!1});a.o.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.sa(a.i,"playing",function(){a.da=!0});a.N=Nj(c);a.i.src=a.N;return c}c=new MediaSource;a.o.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.sa(a.i,"playing",function(){a.da=!0});a.N=Nj(c);a.i.src=a.N;return c}
|
|
364
|
-
function Oj(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=Qd;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.na){if(m=Sd(h,k),!ke(m))return q.return(!1)}else if(b==c.ga?k=Ue(k):b==c.
|
|
364
|
+
function Oj(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=Qd;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.na){if(m=Sd(h,k),!ke(m))return q.return(!1)}else if(b==c.ga?k=Ue(k):b==c.V&&(k=Ve(k,h)),n=
|
|
365
365
|
Wd(a,h,k),p=Ud(h,k),!mb(n)&&!mc(p))return q.return(!1);return q.return(!0)})}r=Kj.prototype;r.destroy=function(){return this.J.destroy()};
|
|
366
366
|
function Mj(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(te)),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;
|
|
367
|
-
a.j={};a.
|
|
368
|
-
function Pj(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=Qd,f=Sa,g=Ta,E(w,Oj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Sd(c.mimeType,d);if(b==e.na){Qj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&Td.includes(h))k=!0;l=Ud(c.mimeType,d);if(!k){w.u(4);break}m=Md(e.
|
|
367
|
+
a.j={};a.T=null;a.K=null;a.W=null;G(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=Qd,E(m,e.L,2);case 2:e.B=b,e.aa=c,e.wa=d,e.oa=!e.B&&"HLS"==e.aa&&!e.wa,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,Pj(e,k,l,l.codecs),6);case 6:e.s?(e.j[f.V]=[],e.j[f.ga]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
|
|
368
|
+
function Pj(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=Qd,f=Sa,g=Ta,E(w,Oj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Sd(c.mimeType,d);if(b==e.na){Qj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&Td.includes(h))k=!0;l=Ud(c.mimeType,d);if(!k){w.u(4);break}m=Md(e.V,(d||"").split(","));n=Md(e.ga,(d||"").split(","));if(!m||!n){w.u(5);break}a.s=!0;return E(w,Pj(a,e.V,c,m),6);case 6:return E(w,
|
|
369
369
|
Pj(a,e.ga,c,n),7);case 7:return w.return();case 5:if(p=mc(l))q=p(),a.m[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);ug(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=Rj);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 Sj(a,b)});a.h[b]=v;a.G[b]=h;a.pa[b]=!!c.drmInfos.length;
|
|
370
370
|
G(w)}})}r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
371
|
-
function Qj(a,b,c,d){a.g||(a.g=new je(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ca;a=a.
|
|
371
|
+
function Qj(a,b,c,d){a.g||(a.g=new je(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ca;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,me[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):rb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):rb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
372
372
|
function Tj(a){return a.C?!1:a.l?"ended"==a.l.readyState:!0}function Uj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Od?a=a.g.g:(a=Vj(a,b),a=!a||Gi(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Wj(a,b){return a.C?null:b==Od?a.g.h:Hi(Vj(a,b))}function Xj(a,b,c){if(a.C)return 0;if(b==Od)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Vj(a,b);return Ji(a,c)}
|
|
373
373
|
r.sb=function(){var a={total:this.C?[]:Ki(this.i.buffered),audio:this.C?[]:Ki(Vj(this,"audio")),video:this.C?[]:Ki(Vj(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 Vj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
374
|
-
function Yj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Td.includes(e))f=Ri(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.
|
|
375
|
-
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Aj(h)||(a.K?a.K.clearData():a.K=new tj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.
|
|
376
|
-
function Zj(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,B,y;return O(function(
|
|
377
|
-
case 6:if(!a.h[b])return
|
|
378
|
-
p)):a.H.init(c,h));if(!a.m[b]){
|
|
379
|
-
function ek(a,b){var c=Wj(a,"video")||0;pe(a.g,b,c)}function fk(a){a.g&&pe(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Qd,a==e.na?E(f,d.g.remove(b,c),0):E(f,ak(d,a,function(){return gk(d,a,b,c)},null),4)):d.s?E(f,ak(d,e.
|
|
380
|
-
function hk(a,b){var c;return O(function(d){return 1==d.g?(c=Qd,b==c.na?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,ak(a,b,function(){return gk(a,b,0,a.l.duration)},null),4)):a.s?E(d,ak(a,c.
|
|
381
|
-
function ik(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Qd;if(b==l.na)return f||(a.g.s=c),oe(a.g,d,e),p.return();m=[];return E(p,jk(a,b,g,h,k),2)}n=p.h;n||(m.push(ak(a,b,function(){return bk(a,b)},null)),a.s&&m.push(ak(a,l.
|
|
382
|
-
b)},null));a.s&&m.push(ak(a,l.
|
|
383
|
-
function kk(a,b,c){var d;return O(function(e){if(1==e.g){d=Qd;if(b==d.na)return e.return();b==d.ga&&(a.va=new Uf);ak(a,b,function(){return bk(a,b)},null);a.s&&ak(a,d.
|
|
384
|
-
r.Ta=function(a){var b=this;return O(function(c){return E(c,lk(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Uf,uri:null};b.j[d].unshift(e)}b.l.duration=a;b
|
|
374
|
+
function Yj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Td.includes(e))f=Ri(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.W.re([{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 Eg).box("moof",Jg).box("traf",Jg).P("tfdt",function(n){l=Ui(n.reader,
|
|
375
|
+
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Aj(h)||(a.K?a.K.clearData():a.K=new tj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.W.re(h,f,d?d.endTime:null));return g}
|
|
376
|
+
function Zj(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,B,y;return O(function(C){switch(C.g){case 1:m=Qd;if(b!=m.na){C.u(2);break}if(!a.B){C.u(3);break}return E(C,a.va,4);case 4:n=C.h,a.g.s=n;case 3:return E(C,ne(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return C.return();case 2:if(l||!a.s){C.u(6);break}return E(C,Zj(a,m.V,c,d,e,f,g,h,k,!0),7);case 7:return E(C,Zj(a,m.ga,c,d,e,f,g,h,k,!0),8);case 8:return C.return();
|
|
377
|
+
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=Yj(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.oa&&(ak(a,b,function(){return bk(a,b)},null),ak(a,b,function(){return ck(a,b,p)},null))),A=b==m.ga||!(m.ga in a.h),a.B&&A&&a.va.resolve(p)));f&&b==m.ga&&(a.g||Qj(a,"application/cea-608",a.B,!1),a.H||(z=q.split(";",1)[0],a.H=new Hb(z)),d?(B=a.H.i(c),B.length&&re(a.g,B,d.startTime,d.endTime,
|
|
378
|
+
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=dk(a,c,d?d.startTime:null,b,d?d.M()[0]:null),d&&a.B&&b!=m.na&&(g||h)&&(y=d.startTime,ak(a,b,function(){return bk(a,b)},null),ak(a,b,function(){return ck(a,b,y)},null)),E(C,ak(a,b,function(){var D=c;if("video"==b&&a.T){var K=a.T;K.g&&K.g.appendBuffer(D,"video",K.o,-p)}a.h[b].appendBuffer(D)},d?d.M()[0]:null),11);case 11:G(C)}})}
|
|
379
|
+
function ek(a,b){var c=Wj(a,"video")||0;pe(a.g,b,c)}function fk(a){a.g&&pe(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Qd,a==e.na?E(f,d.g.remove(b,c),0):E(f,ak(d,a,function(){return gk(d,a,b,c)},null),4)):d.s?E(f,ak(d,e.V,function(){return gk(d,e.V,b,c)},null),0):f.u(0)})};
|
|
380
|
+
function hk(a,b){var c;return O(function(d){return 1==d.g?(c=Qd,b==c.na?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,ak(a,b,function(){return gk(a,b,0,a.l.duration)},null),4)):a.s?E(d,ak(a,c.V,function(){return gk(a,c.V,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=Qd,a==c.na?d.return():E(d,ak(b,a,function(){b.i.currentTime-=.001;Sj(b,a)},null),2)):b.s?E(d,ak(b,c.V,function(){var e=c.V;b.i.currentTime-=.001;Sj(b,e)},null),0):d.u(0)})};
|
|
381
|
+
function ik(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Qd;if(b==l.na)return f||(a.g.s=c),oe(a.g,d,e),p.return();m=[];return E(p,jk(a,b,g,h,k),2)}n=p.h;n||(m.push(ak(a,b,function(){return bk(a,b)},null)),a.s&&m.push(ak(a,l.V,function(){return bk(a,l.V)},null)));f||(m.push(ak(a,b,function(){return ck(a,b,c)},null)),a.s&&m.push(ak(a,l.V,function(){return ck(a,l.V,c)},null)));m.push(ak(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Sj(a,
|
|
382
|
+
b)},null));a.s&&m.push(ak(a,l.V,function(){var q=l.V;a.h[q].appendWindowStart=0;a.h[q].appendWindowEnd=e;a.h[q].appendWindowStart=d;Sj(a,q)},null));return E(p,Promise.all(m),0)})}
|
|
383
|
+
function kk(a,b,c){var d;return O(function(e){if(1==e.g){d=Qd;if(b==d.na)return e.return();b==d.ga&&(a.va=new Uf);ak(a,b,function(){return bk(a,b)},null);a.s&&ak(a,d.V,function(){return bk(a,d.V)},null);return E(e,ak(a,b,function(){return ck(a,b,c)},null),2)}return a.s?E(e,ak(a,d.V,function(){return ck(a,d.V,c)},null),0):e.u(0)})}r.endOfStream=function(a){var b=this;return O(function(c){return E(c,lk(b,function(){Tj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};
|
|
384
|
+
r.Ta=function(a){var b=this;return O(function(c){return E(c,lk(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Uf,uri:null};b.j[d].unshift(e)}b.l.duration=a;b.$=a}),0)})};r.getDuration=function(){return this.l.duration};function gk(a,b,c,d){d<=c?Sj(a,b):a.h[b].remove(c,d)}function bk(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;Sj(a,b)}
|
|
385
385
|
function ck(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Sj(a,b)}function Sj(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),mk(a,b))}}function ak(a,b,c,d){ug(a.J);c={start:c,p:new Uf,uri:d};a.j[b].push(c);1==a.j[b].length&&nk(a,b);return c.p}
|
|
386
|
-
function lk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:ug(a.J);c=[];d={};for(e in a.h)d.
|
|
387
|
-
null);}})}function mk(a,b){a.j[b].shift();nk(a,b)}function nk(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)),mk(a,b)}}function dk(a,b,c,d,e){var f=null==c,g=a.pa[d];c=a.
|
|
386
|
+
function lk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:ug(a.J);c=[];d={};for(e in a.h)d.Sc=new Uf,f={start:function(m){return function(){return m.Sc.resolve()}}(d),p:d.Sc,uri:null},a.j[e].push(f),c.push(d.Sc),1==a.j[e].length&&f.start(),d={Sc:d.Sc};ta(l,2);return E(l,Promise.all(c),4);case 4:wa(l,3);break;case 2:throw g=xa(l),g;case 3:return ta(l,5,6),E(l,b(),6);case 6:Aa(l);for(h in a.h)mk(a,h);Da(l,0);break;case 5:throw k=xa(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
|
|
387
|
+
null);}})}function mk(a,b){a.j[b].shift();nk(a,b)}function nk(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)),mk(a,b)}}function dk(a,b,c,d,e){var f=null==c,g=a.pa[d];c=a.W.Fh();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Lc(c),f=Wc()||Uc()||dd()||Tc()&&id()&&c;f&&"mp4"==Yd(a.G[d])&&(b=ti(b,e));return b}
|
|
388
388
|
function ok(a,b,c,d){return ak(a,b,function(){b!==Od&&(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),Sj(a,b))},null)}
|
|
389
|
-
function pk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
390
|
-
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.L=new Uf,a.l=Lj(a,a.L),E(H,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a
|
|
391
|
-
|
|
392
|
-
function jk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){if(1==y.g){f=Qd;if(b==f.na)return y.return(!1);g=ae(he(a.G[b]));h=be(a.G[b]);l=!1;m=Sd(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&Td.includes(m))n=!0;n&&(p=Ud(c,d),q=mc(p))&&(k=q(),u=Md(f.
|
|
393
|
-
a.A.codecSwitchingStrategy&&ob())return E(y,ok(a,b,m,k),3);k&&k.destroy();return E(y,qk(a,e),3)}return y.return(!0)})}function rk(a,b,c,d){if(b==Od)var e=!1;else{e=ae(he(a.G[b]));var f=be(a.G[b]),g=Sd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Td.includes(g))h=!0;c=Ud(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ae(he(g));g=be(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.s:!1}var Nj=window.URL.createObjectURL,Rj="sequence";function sk(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=a}r=sk.prototype;r.getDuration=function(){return this.j};r.Ih=function(){return this.g};r.Sg=function(a){this.i=a};r.Ta=function(a){this.j=a};r.Nh=function(){return this.i};r.Qg=function(a){this.A=a};r.lc=function(a){this.F=a};r.xe=function(a){this.m=a};r
|
|
394
|
-
r.Gg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.
|
|
395
|
-
r.
|
|
396
|
-
r.
|
|
397
|
-
r.Mb=function(){return this.
|
|
398
|
-
r.Pg=function(a){this.H=a};S("shaka.media.PresentationTimeline",sk);sk.prototype.setAvailabilityTimeOffset=sk.prototype.Pg;sk.prototype.usingPresentationStartTime=sk.prototype.$g;sk.prototype.getSeekRangeEnd=sk.prototype.ub;sk.prototype.getSeekRangeStart=sk.prototype.$b;sk.prototype.getSafeSeekRangeStart=sk.prototype.
|
|
399
|
-
sk.prototype.isInProgress=sk.prototype.ec;sk.prototype.isLive=sk.prototype.
|
|
400
|
-
sk.prototype.getDelay=sk.prototype.Ah;sk.prototype.setDelay=sk.prototype.Pf;sk.prototype.getSegmentAvailabilityDuration=sk.prototype
|
|
389
|
+
function pk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J;return O(function(H){switch(H.g){case 1:c=Qd;a.C=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);ua(H,2);a.o.ob();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(te)),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(F){}}return E(H,
|
|
390
|
+
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.L=new Uf,a.l=Lj(a,a.L),E(H,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.$)&&a.$&&(a.l.duration=a.$),A=new Uf,z=a.l.sourceBuffers,B=b.size,y=0,C=function(){y++;y===B&&(A.resolve(),a.o.Hb(z,"addsourcebuffer",C))},a.o.D(z,"addsourcebuffer",C),D=t(b.keys()),K=D.next();case 6:if(K.done)return a.i.currentTime=d,E(H,A,2);I=K.value;J=b.get(I);return E(H,Pj(a,I,J,J.codecs),9);case 9:a.s?(a.j[c.V]=[],a.j[c.ga]=[]):a.j[I]=[];K=D.next();H.u(6);
|
|
391
|
+
break;case 2:Aa(H),a.C=!1,ug(a.J),a.o.sa(a.i,"canplaythrough",function(){a.J.g||(a.i.autoplay=e,f||a.i.play())}),Da(H,0)}})}function qk(a,b){return lk(a,function(){return pk(a,b)})}
|
|
392
|
+
function jk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){if(1==y.g){f=Qd;if(b==f.na)return y.return(!1);g=ae(he(a.G[b]));h=be(a.G[b]);l=!1;m=Sd(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&Td.includes(m))n=!0;n&&(p=Ud(c,d),q=mc(p))&&(k=q(),u=Md(f.V,(d||"").split(",")),v=Md(f.ga,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.V&&(w=u),m=k.convertCodecs(b,Ud(c,w))):m=k.convertCodecs(b,p));A=ae(he(m));z=be(m);if(g===A&&h===z)return y.return(!1);B=!0;if(a.s||l&&k&&!a.m[b])B=!1;if(B&&"smooth"===
|
|
393
|
+
a.A.codecSwitchingStrategy&&ob())return E(y,ok(a,b,m,k),3);k&&k.destroy();return E(y,qk(a,e),3)}return y.return(!0)})}function rk(a,b,c,d){if(b==Od)var e=!1;else{e=ae(he(a.G[b]));var f=be(a.G[b]),g=Sd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Td.includes(g))h=!0;c=Ud(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ae(he(g));g=be(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.s:!1}var Nj=window.URL.createObjectURL,Rj="sequence";function sk(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=a}r=sk.prototype;r.getDuration=function(){return this.j};r.Ih=function(){return this.g};r.Sg=function(a){this.i=a};r.Ta=function(a){this.j=a};r.Nh=function(){return this.i};r.Qg=function(a){this.A=a};r.lc=function(a){this.F=a};r.xe=function(a){this.m=a};r.$d=function(){return this.m};r.Pf=function(a){this.s=a};r.Ah=function(){return this.s};
|
|
394
|
+
r.Gg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.oe(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)}};
|
|
395
|
+
r.xd=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.oe(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.ge=function(){this.o=!0};r.gi=function(){return this.o};r.Rg=function(a){this.B=a};r.Eh=function(){return this.B};
|
|
396
|
+
r.oe=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.yf=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.U=function(){return Infinity==this.j&&!this.F};r.ec=function(){return Infinity!=this.j&&!this.F};r.jb=function(){return Math.max(this.G,this.Mb()-this.m)};r.Wg=function(a){this.G=a};
|
|
397
|
+
r.Mb=function(){return this.U()||this.ec()?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.md=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.ub()))};r.$b=function(){return this.md(0)};r.ub=function(){return Math.max(0,this.Mb()-(this.U()||this.ec()?this.s:0))};r.$g=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
|
|
398
|
+
r.Pg=function(a){this.H=a};S("shaka.media.PresentationTimeline",sk);sk.prototype.setAvailabilityTimeOffset=sk.prototype.Pg;sk.prototype.usingPresentationStartTime=sk.prototype.$g;sk.prototype.getSeekRangeEnd=sk.prototype.ub;sk.prototype.getSeekRangeStart=sk.prototype.$b;sk.prototype.getSafeSeekRangeStart=sk.prototype.md;sk.prototype.getSegmentAvailabilityEnd=sk.prototype.Mb;sk.prototype.setUserSeekStart=sk.prototype.Wg;sk.prototype.getSegmentAvailabilityStart=sk.prototype.jb;
|
|
399
|
+
sk.prototype.isInProgress=sk.prototype.ec;sk.prototype.isLive=sk.prototype.U;sk.prototype.offset=sk.prototype.offset;sk.prototype.notifyMaxSegmentDuration=sk.prototype.yf;sk.prototype.notifyMinSegmentStartTime=sk.prototype.oe;sk.prototype.getInitialProgramDateTime=sk.prototype.Eh;sk.prototype.setInitialProgramDateTime=sk.prototype.Rg;sk.prototype.isStartTimeLocked=sk.prototype.gi;sk.prototype.lockStartTime=sk.prototype.ge;sk.prototype.notifySegments=sk.prototype.xd;sk.prototype.notifyTimeRange=sk.prototype.Gg;
|
|
400
|
+
sk.prototype.getDelay=sk.prototype.Ah;sk.prototype.setDelay=sk.prototype.Pf;sk.prototype.getSegmentAvailabilityDuration=sk.prototype.$d;sk.prototype.setSegmentAvailabilityDuration=sk.prototype.xe;sk.prototype.setStatic=sk.prototype.lc;sk.prototype.setClockOffset=sk.prototype.Qg;sk.prototype.getPresentationStartTime=sk.prototype.Nh;sk.prototype.setDuration=sk.prototype.Ta;sk.prototype.setPresentationStartTime=sk.prototype.Sg;sk.prototype.getMaxSegmentDuration=sk.prototype.Ih;
|
|
401
401
|
sk.prototype.getDuration=sk.prototype.getDuration;function tk(a,b,c){this.j=c;this.l=a;this.s=uk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}tk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function vk(a,b){a.i=b}function wk(a){this.g=a}function uk(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(Ki(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 xk(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 yk(f)});this.m=(new Nc(function(){yk(f)})).Ua(this.s.gapJumpTimerTime)}xk.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};xk.prototype.Bf=function(){this.o=!0;yk(this)};
|
|
402
402
|
function yk(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=uk(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=Li(c,b,a.s.gapDetectionThreshold),
|
|
403
403
|
null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Uc())e=Math.ceil(100*(e+.01))/100;e>=a.B.ub()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function zk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ak.value().get(b),c.sa(a,b,d))}var Ak=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new hb;this.i=new Ck(a);zk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Dk(e,e.j())})}Bk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Ek(a){return a.o?a.g.currentTime:a.j()}
|
|
404
404
|
function Fk(a,b){0<a.g.readyState?Gk(a.i,b):zk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Dk(a,a.j())})}function Dk(a,b){.001>Math.abs(a.g.currentTime-b)?Hk(a):(a.h.sa(a.g,"seeking",function(){Hk(a)}),Gk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Hk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
405
405
|
function Ck(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Nc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ck.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Gk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ua(.1)};function Ik(a){this.h=a;this.j=!1;this.g=null;this.i=new hb}r=Ik.prototype;r.Je=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.sa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;zk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};r.Ke=function(a){this.g=this.j?this.g:a};
|
|
406
|
-
r.
|
|
406
|
+
r.Pd=function(){return(this.j?this.h.currentTime:this.g)||0};r.eg=function(){return 0};r.dg=function(){return 0};r.Fg=function(){};
|
|
407
407
|
function Jk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Kk(a,c,f);this.j=new xk(a,b.presentationTimeline,c,this.o,f);this.h=new Bk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Ek(g.h);h=Lk(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;Fk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
408
408
|
g.g.$b():g.g.ub():0>h&&(h=g.g.ub()+h);return Mk(g,Nk(g,h))});this.m=new Nc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ek(g.h),k=g.g.$b(),l=g.g.ub();3>l-k&&(k=l-3);h<k&&(h=Lk(g,h),g.i.currentTime=h)}})}r=Jk.prototype;r.Je=function(){this.m.Ua(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.Ke=function(a){Fk(this.h,a)};
|
|
409
|
-
r.
|
|
410
|
-
function Lk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.$b(),f=a.g.ub(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.
|
|
409
|
+
r.Pd=function(){var a=Ek(this.h);return 0<this.i.readyState&&!this.i.paused?Nk(this,a):a};r.eg=function(){return this.o?this.o.o:0};r.dg=function(){return this.j.C};r.Fg=function(){this.j.Bf()};function Mk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
410
|
+
function Lk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.$b(),f=a.g.ub(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.md(c),k=a.g.md(d);c=a.g.md(c+d);return b>=g?Mk(a,b):b>f?f:b<e?Ii(a.i.buffered,k)?k:c:b>=h||Ii(a.i.buffered,b)?b:c}function Nk(a,b){var c=a.g.$b();if(b<c)return c;a=a.g.ub();return b>a?a:b}
|
|
411
411
|
function Kk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new tk(new wk(a),b.stallThreshold,c);vk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Ok(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Ok.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.mi=function(){this.o=!0};r.wc=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
412
412
|
r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
413
|
-
r.
|
|
414
|
-
r.vc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new
|
|
413
|
+
r.ke=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};r.wd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.ke(a);this.Ha(b)};r.Ha=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
414
|
+
r.vc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new zi(a.startTime,b,a.C,a.Ba,a.ka,a.ea,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.j=a.j,this.g[this.g.length-1]=b)}};
|
|
415
415
|
r.ye=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Nc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Ua(a))};Ok.prototype[Symbol.iterator]=function(){return this.Ab(0)};
|
|
416
|
-
Ok.prototype.Ab=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;
|
|
417
|
-
S("shaka.media.SegmentIndex",Ok);Ok.forSingleSegment=Qk;Ok.prototype.getIteratorForTime=Ok.prototype.Ab;Ok.prototype.updateEvery=Ok.prototype.ye;Ok.prototype.fit=Ok.prototype.vc;Ok.prototype.evict=Ok.prototype.Ha;Ok.prototype.mergeAndEvict=Ok.prototype.
|
|
418
|
-
Ok.prototype.getNumReferences=Ok.prototype.getNumReferences;function Pk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Pk.prototype.
|
|
416
|
+
Ok.prototype.Ab=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return $a("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Pk(this,d,f,c)};function Qk(a,b,c){a=new zi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Ok([a])}
|
|
417
|
+
S("shaka.media.SegmentIndex",Ok);Ok.forSingleSegment=Qk;Ok.prototype.getIteratorForTime=Ok.prototype.Ab;Ok.prototype.updateEvery=Ok.prototype.ye;Ok.prototype.fit=Ok.prototype.vc;Ok.prototype.evict=Ok.prototype.Ha;Ok.prototype.mergeAndEvict=Ok.prototype.wd;Ok.prototype.offset=Ok.prototype.offset;Ok.prototype.get=Ok.prototype.get;Ok.prototype.find=Ok.prototype.find;Ok.prototype.markImmutable=Ok.prototype.mi;Ok.prototype.release=Ok.prototype.release;Ok.prototype.getNumEvicted=Ok.prototype.getNumEvicted;
|
|
418
|
+
Ok.prototype.getNumReferences=Ok.prototype.getNumReferences;function Pk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Pk.prototype.Kc=function(a){this.reverse=a};Pk.prototype.uh=function(){return this.h};Pk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
419
419
|
Pk.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",Pk);Pk.prototype.next=Pk.prototype.next;Pk.prototype.current=Pk.prototype.current;Pk.prototype.currentPosition=Pk.prototype.uh;
|
|
420
|
-
Pk.prototype.setReverse=Pk.prototype.
|
|
421
|
-
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.
|
|
422
|
-
Rk.prototype.offset=Rk.prototype.offset;Rk.prototype.get=Rk.prototype.get;Rk.prototype.find=Rk.prototype.find;Rk.prototype.forEachTopLevelReference=Rk.prototype.wc;Rk.prototype.release=Rk.prototype.release;function Sk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.
|
|
423
|
-
function dl(a,b,c){c=void 0===c?!1:c;if(a.
|
|
424
|
-
function
|
|
425
|
-
function hl(a){for(var b=Array.from(a.
|
|
426
|
-
function gl(a,b,c){var d=new Uint8Array(0);a.
|
|
427
|
-
ol.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.
|
|
428
|
-
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.kg=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function rl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.
|
|
429
|
-
function ul(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,vl(e),b.push(wl(e));f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,kl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;G(k)})}
|
|
430
|
-
r.configure=function(a){this.h=a;this.J=new Rf({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.
|
|
431
|
-
b.
|
|
432
|
-
r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,Al(b,a||new Map),2);ug(b.l);b.C=!0;G(c)})};function Bl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Qd,a.H++,d=a.H,ta(l,2),E(l,hk(a.g.
|
|
433
|
-
function El(a){var b=a.i.get(Od);b&&(vl(b),wl(b).catch(function(){}),a.i.delete(Od));a.s=null}function Fl(a,b){var c=0>a.g
|
|
420
|
+
Pk.prototype.setReverse=Pk.prototype.Kc;function Rk(){Ok.call(this,[]);this.h=[]}pa(Rk,Ok);r=Rk.prototype;r.clone=function(){var a=new Rk;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.wc=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.wc(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};
|
|
421
|
+
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.ke=function(){};r.Ha=function(){};r.wd=function(){};r.vc=function(){};r.ye=function(){};S("shaka.media.MetaSegmentIndex",Rk);Rk.prototype.updateEvery=Rk.prototype.ye;Rk.prototype.fit=Rk.prototype.vc;Rk.prototype.mergeAndEvict=Rk.prototype.wd;Rk.prototype.evict=Rk.prototype.Ha;Rk.prototype.merge=Rk.prototype.ke;
|
|
422
|
+
Rk.prototype.offset=Rk.prototype.offset;Rk.prototype.get=Rk.prototype.get;Rk.prototype.find=Rk.prototype.find;Rk.prototype.forEachTopLevelReference=Rk.prototype.wc;Rk.prototype.release=Rk.prototype.release;function Sk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Zd();this.h=new Nc(function(){b.g.Eg(.25*b.i)})}Sk.prototype.release=function(){this.set(this.Xb());this.h&&(this.h.stop(),this.h=null);this.g=null};Sk.prototype.set=function(a){this.i=a;Tk(this)};Sk.prototype.Xb=function(){return this.g.Xb()};function Tk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Zd()!=b&&a.g.Sf(b);return}catch(c){}a.h.Ua(.25);0!=a.g.Zd()&&a.g.Sf(0)};function Uk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Nc(function(){Vk(b,!1)})).Ua(.25)}Uk.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 Vk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Wk(){this.g=null;this.h=[]}function Xk(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 Yk(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 Zk(){this.i=this.h=null;this.g=[]}function $k(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 al(){this.Qd=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.J=this.K=this.l=this.o=NaN;this.g=new Wk;this.h=new Zk};function bl(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function cl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
423
|
+
function dl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ab(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.ka&&(c=!1);2==b.bc()&&(c=!1);c&&b.ea&&el(a,b.ea);c&&!a.h.has(b)&&(c=new fl(a.l),gl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.yd&&b.fe)break}hl(a)}}function el(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return yi(d,b)})){var c=new fl(a.l);gl(c,b,a.i);a.j.set(b,c)}}
|
|
424
|
+
function il(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&jl(a,c)}function kl(a){il(a,a.h);il(a,a.j);a.g=null}bl.prototype.Ha=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&jl(this,d);b&&hl(this)};bl.prototype.Kc=function(a){this.o=a;this.g&&this.g.Kc(a)};
|
|
425
|
+
function hl(a){for(var b=Array.from(a.h.keys()),c={},d=t(a.j.keys()),e=d.next();!e.done;c={Jd:c.Jd},e=d.next())c.Jd=e.value,b.some(function(f){return function(g){return yi(g.ea,f.Jd)}}(c))||jl(a,c.Jd)}function ll(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&jl(a,d)}hl(a)}function ml(a,b){b&&b!==a.i&&(kl(a),a.i=b)}function jl(a,b){var c=a.h;b instanceof xi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function fl(a){this.g=a;this.se=this.Tf=null}
|
|
426
|
+
function gl(a,b,c){var d=new Uint8Array(0);a.se=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Fd(d,e):d=e,a.Tf?E(f,a.Tf(d),3):f.u(0);d=new Uint8Array(0);G(f)})})}fl.prototype.abort=function(){this.se&&this.se.abort()};function nl(a){dg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Nc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ua(2)}pa(nl,dg);nl.prototype.release=function(){this.g.clear();this.h.stop();dg.prototype.release.call(this)};function ol(a){dg.call(this);this.g=new Map;this.h=a}pa(ol,dg);ol.prototype.release=function(){this.g.clear();dg.prototype.release.call(this)};function pl(a,b){var c=a.g.get(b);c||(c={Bd:[],kg:null,contentType:b},a.g.set(b,c));return c}function ql(a,b,c){var d=pl(a,b.contentType);rl(a,d);a={xf:b,position:c};d=d.Bd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
427
|
+
ol.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.Bd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.xf;break a}}d=null}if(e=d)e=c.kg,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);
|
|
428
|
+
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.kg=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function rl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Bd;b.Bd=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.Bd=[]};function sl(a,b,c,d,e){a=lg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function tl(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 tg(function(){return ul(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null};this.N=0;this.L=Infinity}r=tl.prototype;r.destroy=function(){return this.l.destroy()};
|
|
429
|
+
function ul(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,vl(e),b.push(wl(e)),e.S&&(kl(e.S),e.S=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,kl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;G(k)})}
|
|
430
|
+
r.configure=function(a){this.h=a;this.J=new Rf({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.S&&(kl(b.S),b.S=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,kl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Od))&&
|
|
431
|
+
b.S&&(kl(b.S),b.S=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.S&&(kl(b.S),b.S=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.S?(ll(c.S,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(kl(c.S),c.S=null)):0<a.segmentPrefetchLimit&&(c.S=xl(this,c.stream));a.disableAudioPrefetch||yl(this)};function zl(a,b,c){a.m.presentationTimeline.U()||(a.N=b,a.L=c)}
|
|
432
|
+
r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,Al(b,a||new Map),2);ug(b.l);b.C=!0;G(c)})};function Bl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Qd,a.H++,d=a.H,ta(l,2),E(l,hk(a.g.Z,c.na),4);case 4:wa(l,3);break;case 2:if(e=xa(l),a.g)a.g.onError(e);case 3:f=Sd(b.mimeType,b.codecs),Qj(a.g.Z,f,a.m.sequenceMode,b.external),g=a.g.Z.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=Cl(a,b),a.i.set(c.na,k),Dl(a,k,0)),G(l)}})}
|
|
433
|
+
function El(a){var b=a.i.get(Od);b&&(vl(b),wl(b).catch(function(){}),a.i.delete(Od));a.s=null}function Fl(a,b){for(var c=0>a.g.$a(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ba&&e.ba.Kc(c),e.S&&e.S.Kc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Kc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.kc&&(Gl(a,b,!1,0,!1),c.kc=d);else if(b=c.kc)c.kc=null,Gl(a,b,!0,0,!1)}
|
|
434
434
|
function Hl(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&&Gl(a,b.video,c,d,e,f),b.audio&&Gl(a,b.audio,c,d,e,f))}function Il(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();Gl(a,b,!0,0,!1);G(c)})}
|
|
435
|
-
function Gl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Od?g&&(g.kc&&(b.trickModeVideo?(g.kc=b,b=b.trickModeVideo):g.kc=null),g.stream!=b||e)&&(a.o.has(b)?g.
|
|
435
|
+
function Gl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Od?g&&(g.kc&&(b.trickModeVideo?(g.kc=b,b=b.trickModeVideo):g.kc=null),g.stream!=b||e)&&(a.o.has(b)?g.S=a.o.get(b):g.S&&ml(g.S,b),b.type==Od&&(e=Sd(b.mimeType,b.codecs),Qj(a.g.Z,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.fg=!!f,c&&(g.bd?g.ze=!0:g.Ra?(g.Pb=!0,g.Ud=d,g.ze=!0):(vl(g),Jl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Kl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
436
436
|
Bl(a,b)}
|
|
437
|
-
function Kl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.
|
|
438
|
-
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.
|
|
439
|
-
r.
|
|
440
|
-
function Ll(a,b){b.
|
|
441
|
-
function Al(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Qd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.
|
|
442
|
-
b.get(l.id),cl(n,function(q,u,v){return Ml(q,u,v||null,a.h.retryParameters,a.g.Db)}),m.
|
|
443
|
-
function xl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Od&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Od&&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.
|
|
444
|
-
function yl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Ia:d.Ia},f=e.next())if(d.Ia=f.value,d.Ia.audio)if(a.o.has(d.Ia.audio)){if(f=a.o.get(d.Ia.audio),ll(f,b),!(0<b&&c.some(function(h){return function(k){return we(h.Ia.audio.language,k)}}(d)))){var g=a.i.get(d.Ia.audio.type);f!==(g&&g.
|
|
445
|
-
(d.Ia.audio.segmentIndex||d.Ia.audio.createSegmentIndex(),a.o.set(d.Ia.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.
|
|
446
|
-
function Nl(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:ug(a.l);if(b.Ra||null==b.xb||b.
|
|
447
|
-
xa(h),E(h,Pl(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.
|
|
448
|
-
function Ol(a,b){if(Ql(b))return ek(a.g.
|
|
449
|
-
!0,"video"==b.type&&(a=a.i.get(Od))&&Ql(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Rl(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,Ql(h)||h
|
|
450
|
-
function Rl(a,b,c,d){if(b
|
|
451
|
-
function Sl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:e=Qd;f=b.stream;g=b
|
|
452
|
-
ta(H,2);n=Ul(n,
|
|
453
|
-
y.return():b.Pb?(b.Ra=!1,Dl(a,b,0),y.return()):E(y,Vl(a,b,c,f,d,w),10);case 10:b.
|
|
454
|
-
!0,1==B.category&&b.
|
|
455
|
-
function Ul(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Xl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Hf})){if(0<a.h.maxDisabledTime&&a.g.
|
|
456
|
-
function Tl(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=Qd;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=ae(b.stream.codecs);k=be(b.stream.mimeType);l=c.timestampOffset;if(l==b.uf&&f==b.rf&&g==b.qf&&h==b.tf&&k==b.Ag){w.u(2);break}m=b.tf&&b.Ag&&rk(a.g.
|
|
457
|
-
null,Ll(a,n);case 3:return p=function(){var A,z,B;return O(function(y){if(1==y.g)return A=new Map,a.j.audio&&A.set(d.
|
|
458
|
-
z,B,y,D,
|
|
459
|
-
Og).box("dvav",Og).box("dva1",Og).box("dvh1",Og).box("dvhe",Og).box("vexu",Jg).box("proj",Jg).P("prji",function(
|
|
460
|
-
c.ea),e.push(u()))),a.m.sequenceMode&&(v=b.Pa?b.Pa.j:null,c.j!=v&&e.push(kk(a.g.
|
|
461
|
-
function Vl(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 Eg;l&&k.P("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.ic();var A=u.reader.ic();var z=u.reader.O();var B=u.reader.O();var y=u.reader.O();var
|
|
462
|
-
z+e.timestampOffset,B=
|
|
463
|
-
w||(w=Ri(u),w.length&&e&&a.g.
|
|
464
|
-
a.F=!0}});(l||m)&&k.parse(f);return E(q,$l(a,b,c),2);case 2:return ug(a.l),n=b.
|
|
437
|
+
function Kl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.fb)return e.return();c=b.stream;d=b.fb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.fb!=d||b.stream!=c)return e.return();var f=a.g.Yd();var g=Wj(a.g.Z,b.type),h=b.stream.segmentIndex.find(b.Pa?b.Pa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ka?k.ka-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ea)&&(h+=(k.ka?k.ka-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),f=
|
|
438
|
+
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.fb.h.g>h?!0:!1):f=!1;f&&b.fb.abort();G(e)})}
|
|
439
|
+
r.Cd=function(){if(this.g)for(var a=this.g.Yd(),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.ba&&(e=c.ba.current());c.S&&(c.S.g=null);if("audio"===c.type)for(var f=t(this.o.values()),g=f.next();!g.done;g=f.next())g.value.g=null;if(!e||e.startTime>a||e.endTime<a)c.ba=null;e=this.g.Z;e.C?e=!1:d==Od?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Vj(e,d),e=Ii(e,a));e||((null!=Wj(this.g.Z,d)||c.Ra)&&Ll(this,c),c.fb&&(c.fb.abort(),c.fb=null),d===Od&&(d=
|
|
440
|
+
this.g.Z,d.H&&d.H.g()),c.Cd=!0)}};function Ll(a,b){b.bd||b.Pb||(b.Ra?(b.Pb=!0,b.Ud=0):null==Uj(a.g.Z,b.type)?null==b.xb&&Dl(a,b,0):(vl(b),Jl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
441
|
+
function Al(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Qd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.V,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.na,a.s),e.add(a.s));f=a.g.Z;return E(p,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}ug(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=Cl(a,l),b.has(l.id)&&(n=
|
|
442
|
+
b.get(l.id),cl(n,function(q,u,v){return Ml(q,u,v||null,a.h.retryParameters,a.g.Db)}),m.S=n),a.i.set(k,m),Dl(a,m,0));G(p)})}function Cl(a,b){return{stream:b,type:b.type,ba:null,S:xl(a,b),Pa:null,fc:null,uf:null,rf:null,qf:null,kc:null,endOfStream:!1,Ra:!1,xb:null,Pb:!1,Ud:0,ze:!1,bd:!1,Cd:!0,Hf:!1,qd:!1,fb:null}}
|
|
443
|
+
function xl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Od&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Od&&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.S)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new bl(a.h.segmentPrefetchLimit,b,function(d,e,f){return Ml(d,e,f||null,a.h.retryParameters,a.g.Db)},0>a.g.$a()):null}
|
|
444
|
+
function yl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Ia:d.Ia},f=e.next())if(d.Ia=f.value,d.Ia.audio)if(a.o.has(d.Ia.audio)){if(f=a.o.get(d.Ia.audio),ll(f,b),!(0<b&&c.some(function(h){return function(k){return we(h.Ia.audio.language,k)}}(d)))){var g=a.i.get(d.Ia.audio.type);f!==(g&&g.S)&&kl(f);a.o.delete(d.Ia.audio)}}else 0>=b||!c.some(function(h){return function(k){return we(h.Ia.audio.language,k)}}(d))||!(f=xl(a,d.Ia.audio))||
|
|
445
|
+
(d.Ia.audio.segmentIndex||d.Ia.audio.createSegmentIndex(),a.o.set(d.Ia.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Z.Ta(a):this.g.Z.Ta(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
446
|
+
function Nl(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:ug(a.l);if(b.Ra||null==b.xb||b.bd)return h.return();b.xb=null;if(!b.Pb){h.u(2);break}return E(h,Jl(a,b,b.ze,b.Ud),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.Ra||b.xb||Dl(a,b,0),h.return();case 4:ta(h,6);d=Ol(a,b);null!=d&&(Dl(a,b,d),b.qd=!1);wa(h,7);break;case 6:return e=
|
|
447
|
+
xa(h),E(h,Pl(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.Z.endOfStream(),10);case 10:ug(a.l),g=a.g.Z.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ta(g),G(h)}})}
|
|
448
|
+
function Ol(a,b){if(Ql(b))return ek(a.g.Z,b.stream.originalId||""),null;b.type==Od&&fk(a.g.Z);if(!a.g.Z.fa&&b.type!=Od)return a.h.updateIntervalSeconds/2;var c=a.g.Yd();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.Ha(c,!0),dl(e,c);d=b.Pa?b.Pa.endTime:c;e=Xj(a.g.Z,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=Wj(a.g.Z,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
449
|
+
!0,"video"==b.type&&(a=a.i.get(Od))&&Ql(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Rl(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,Ql(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.Pa?h.Pa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.S&&b.ba&&!a.o.has(b.stream)&&(b.S.Ha(c),dl(b.S,e.startTime));Sl(a,b,c,e).catch(function(){});return null}
|
|
450
|
+
function Rl(a,b,c,d){if(b.ba)return b.ba.current();if(b.Pa||d)return b.ba=b.stream.segmentIndex.Ab(b.Pa?b.Pa.endTime:d,!1,0>a.g.$a()),b.ba&&b.ba.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.$a();var f=null;d&&(b.ba=b.stream.segmentIndex.Ab(e,!1,a),f=b.ba&&b.ba.next().value);f||(b.ba=b.stream.segmentIndex.Ab(c,!1,a),f=b.ba&&b.ba.next().value);return f}
|
|
451
|
+
function Sl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:e=Qd;f=b.stream;g=b.ba;b.Ra=!0;ta(y,2);if(2==d.bc())throw new T(1,1,1011);return E(y,Tl(a,b,d),4);case 4:ug(a.l);if(a.A)return y.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,K,I,J;return O(function(H){switch(H.g){case 1:if(p)return H.return();q=!0;ug(a.l);if(a.A)return H.return();
|
|
452
|
+
ta(H,2);n=Ul(n,C);D=!1;K=0;(new Eg).box("mdat",function(F){K=F.size+F.start;D=!0}).parse(n,!1,!0);if(!D){H.u(4);break}I=n.subarray(0,K);n=n.subarray(K);return E(H,Vl(a,b,c,f,d,I,!0),5);case 5:b.S&&b.ba&&dl(b.S,d.startTime,!0);case 4:wa(H,0);break;case 2:u=J=xa(H),G(H)}})},E(y,Wl(a,b,d,v),9);l=Wl(a,b,d);return E(y,l,7);case 7:m=y.h;ug(a.l);if(a.A)return y.return();ug(a.l);return b.Pb?(b.Ra=!1,Dl(a,b,0),y.return()):E(y,Vl(a,b,c,f,d,m),6);case 9:w=y.h;if(u)throw u;if(q){y.u(10);break}p=!0;ug(a.l);return a.A?
|
|
453
|
+
y.return():b.Pb?(b.Ra=!1,Dl(a,b,0),y.return()):E(y,Vl(a,b,c,f,d,w),10);case 10:b.S&&b.ba&&dl(b.S,d.startTime,!0);case 6:ug(a.l);if(a.A)return y.return();b.Pa=d;g.next();b.Ra=!1;b.Hf=!1;A=a.g.Z.sb();z=A[b.type];eb(JSON.stringify(z));b.Pb||a.g.Bf(d,b.stream);Dl(a,b,0);wa(y,0);break;case 2:B=xa(y);ug(a.l,B);if(a.A)return y.return();b.Ra=!1;if(7001==B.code)b.Ra=!1,vl(b),Dl(a,b,0),y.u(0);else if(b.type==e.na&&a.h.ignoreTextStreamFailures)a.i.delete(e.na),y.u(0);else if(3017==B.code)Xl(a,b,B),y.u(0);else return b.qd=
|
|
454
|
+
!0,1==B.category&&b.S&&jl(b.S,d),B.severity=2,E(y,Pl(a,b,B),0)}})}function Yl(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=Bb(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))})}
|
|
455
|
+
function Ul(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Xl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Hf})){if(0<a.h.maxDisabledTime&&a.g.Wd(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.qd=!0;a.A=!0;a.g.onError(c);return}b.Hf=!0}Dl(a,b,4)}
|
|
456
|
+
function Tl(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=Qd;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=ae(b.stream.codecs);k=be(b.stream.mimeType);l=c.timestampOffset;if(l==b.uf&&f==b.rf&&g==b.qf&&h==b.tf&&k==b.Ag){w.u(2);break}m=b.tf&&b.Ag&&rk(a.g.Z,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.ga?n=a.i.get(d.V):b.type===d.V&&(n=a.i.get(d.ga));if(!n){w.u(3);break}return E(w,wl(n).catch(function(){}),5);case 5:n.fc=
|
|
457
|
+
null,Ll(a,n);case 3:return p=function(){var A,z,B;return O(function(y){if(1==y.g)return A=new Map,a.j.audio&&A.set(d.V,a.j.audio),a.j.video&&A.set(d.ga,a.j.video),ta(y,2),b.rf=f,b.qf=g,b.tf=h,b.Ag=k,b.uf=l,z=a.m.sequenceMode||"HLS"==a.m.type,E(y,ik(a.g.Z,b.type,l,f,g,z,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,A),4);if(2!=y.g)return wa(y,0);B=xa(y);b.rf=null;b.qf=null;b.tf=null;b.uf=null;throw B;})},E(w,p(),2);case 2:return yi(c.ea,b.fc)||(b.fc=c.ea,c.l&&c.ea&&(q=Wl(a,b,c.ea),u=function(){var A,
|
|
458
|
+
z,B,y,C,D,K;return O(function(I){switch(I.g){case 1:return ta(I,2),E(I,q,4);case 4:return A=I.h,ug(a.l),z=null,B=new Map,y={projection:null,hfov:null},C=new Eg,C.box("moov",Jg).box("trak",Jg).box("mdia",Jg).P("mdhd",function(J){z=Vi(J.reader,J.version).timescale}).box("hdlr",function(J){J=J.reader;J.skip(8);switch(J.ic()){case "soun":B.set(d.V,z);break;case "vide":B.set(d.ga,z)}z=null}).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("encv",Og).box("avc1",Og).box("avc3",Og).box("hev1",Og).box("hvc1",
|
|
459
|
+
Og).box("dvav",Og).box("dva1",Og).box("dvh1",Og).box("dvhe",Og).box("vexu",Jg).box("proj",Jg).P("prji",function(J){J=J.reader.ic();y.projection=J}).box("hfov",function(J){J=J.reader.O()/1E3;y.hfov=J}).parse(A),Zl(a,y),B.has(b.type)?c.ea.timescale=B.get(b.type):null!=z&&(c.ea.timescale=z),D=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(I,a.g.hg(b.type,A),5);case 5:return E(I,Zj(a.g.Z,b.type,A,null,b.stream,D),6);case 6:wa(I,0);break;case 2:throw K=xa(I),b.fc=null,K;}})},a.g.oi(c.startTime,
|
|
460
|
+
c.ea),e.push(u()))),a.m.sequenceMode&&(v=b.Pa?b.Pa.j:null,c.j!=v&&e.push(kk(a.g.Z,b.type,c.startTime))),E(w,Promise.all(e),0)}})}
|
|
461
|
+
function Vl(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 Eg;l&&k.P("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.ic();var A=u.reader.ic();var z=u.reader.O();var B=u.reader.O();var y=u.reader.O();var C=u.reader.O();var D=e.startTime+B/z}else z=u.reader.O(),D=u.reader.Hc()/
|
|
462
|
+
z+e.timestampOffset,B=D-e.startTime,y=u.reader.O(),C=u.reader.O(),w=u.reader.ic(),A=u.reader.ic();u=u.reader.nb(u.reader.getLength()-u.reader.ra());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.pi():(v=(new Map).set("detail",{startTime:D,endTime:D+y/z,schemeIdUri:w,value:A,timescale:z,presentationTimeDelta:B,eventDuration:y,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"!=
|
|
463
|
+
w||(w=Ri(u),w.length&&e&&a.g.re([{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);
|
|
464
|
+
a.F=!0}});(l||m)&&k.parse(f);return E(q,$l(a,b,c),2);case 2:return ug(a.l),n=b.Cd,b.Cd=!1,p=b.fg,b.fg=!1,E(q,a.g.hg(b.type,f),3);case 3:return E(q,Zj(a.g.Z,b.type,f,e,d,h,n,p,g),4);case 4:ug(a.l),G(q)}})}function $l(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=Uj(a.g.Z,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.Z.remove(b.type,e,e+g),2)}ug(a.l);G(h)})}
|
|
465
465
|
function Ql(a){return a&&a.type==Od&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
466
|
-
function Wl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.
|
|
467
|
-
function Ml(a,b,c,d,e){var f=a instanceof
|
|
468
|
-
function Jl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Pb=!1,b.ze=!1,b.
|
|
469
|
-
function Dl(a,b,c){var d=b.type;if(d!=Od||a.i.has(d))b.xb=(new Mc(function(){var e;return O(function(f){if(1==f.g)return ta(f,2),E(f,Nl(a,b),4);if(2!=f.g)return wa(f,0);e=xa(f);if(a.g)a.g.onError(e);G(f)})})).
|
|
470
|
-
function Pl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Tf(a.J),2);ug(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.
|
|
471
|
-
function am(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=Qd;if(e=a.i.get(d.
|
|
466
|
+
function Wl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.nd())return l.return(e);f=null;if(b.S){var m=b.S,n=m.h;c instanceof xi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Tf=d),f=m.se):f=null}f||(f=Ml(c,b.stream,d||null,a.h.retryParameters,a.g.Db));g=0;b.ba&&(g=b.ba.h);b.fb=f;return E(l,f.promise,2);case 2:h=l.h;b.fb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Yl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
467
|
+
function Ml(a,b,c,d,e){var f=a instanceof zi?a:void 0,g=f?1:0;a=sl(a.M(),a.Ba,a.ka,d,c);a.contentType=b.type;return e.request(rg,a,{type:g,stream:b,segment:f})}
|
|
468
|
+
function Jl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Pb=!1,b.ze=!1,b.Ud=0,b.bd=!0,b.Pa=null,b.fc=null,b.ba=null,b.S&&!a.o.has(b.stream)&&kl(b.S),d?(e=a.g.Yd(),f=a.g.Z.getDuration(),E(g,a.g.Z.remove(b.type,e+d,f),3)):E(g,hk(a.g.Z,b.type),4);if(3!=g.g)return ug(a.l),c?E(g,a.g.Z.flush(b.type),3):g.u(3);ug(a.l);b.bd=!1;b.endOfStream=!1;b.Ra||b.xb||Dl(a,b,0);G(g)})}
|
|
469
|
+
function Dl(a,b,c){var d=b.type;if(d!=Od||a.i.has(d))b.xb=(new Mc(function(){var e;return O(function(f){if(1==f.g)return ta(f,2),E(f,Nl(a,b),4);if(2!=f.g)return wa(f,0);e=xa(f);if(a.g)a.g.onError(e);G(f)})})).X(c)}function vl(a){null!=a.xb&&(a.xb.stop(),a.xb=null)}function wl(a){return O(function(b){return a.fb?E(b,a.fb.abort(),0):b.u(0)})}
|
|
470
|
+
function Pl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Tf(a.J),2);ug(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Wd(b.stream,d),c.handled&&(c.severity=1));if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);G(e)})}
|
|
471
|
+
function am(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=Qd;if(e=a.i.get(d.V))e.fc=null,Ll(a,e),wl(e).catch(function(){});if(f=a.i.get(d.ga))f.fc=null,Ll(a,f),wl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.V,a.j.audio);a.j.video&&g.set(d.ga,a.j.video);return E(h,qk(a.g.Z,g),2)}return h.return(!0)})}
|
|
472
472
|
function Zl(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 bm(){}
|
|
473
473
|
function cm(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]=Fe(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Fe(n)),m=cm(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),
|
|
474
474
|
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 dm(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 em(a,b){return a&&b}
|
|
475
475
|
function fm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&c(g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||m!==h[l]&&(k[l]=m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}
|
|
476
|
-
function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",bm);bm.getDifferenceFromConfigObjects=fm;bm.convertToConfigObject=dm;bm.mergeConfigObjects=cm;function gm(){}function hm(a){a=
|
|
476
|
+
function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",bm);bm.getDifferenceFromConfigObjects=fm;bm.convertToConfigObject=dm;bm.mergeConfigObjects=cm;function gm(){}function hm(a){a=ud(a);return(new sc(a)).zb}function im(a,b,c){function d(h){Fb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Bb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=wd(b,!0):e=b;a=ud(a);a=wd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function jm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=ud(a).split("skd://").pop();return im(a,c,b)}
|
|
477
477
|
function km(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",gm);gm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=od(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Cb(Cd(c)))}};gm.expressplayFairPlayRequest=function(a,b){km(a,b)};
|
|
478
478
|
gm.conaxFairPlayRequest=function(a,b){km(a,b)};gm.ezdrmFairPlayRequest=function(a,b){km(a,b)};gm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Bb(b.body),a=Bd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=vd("spc="+a))};gm.expressplayInitDataTransform=function(a,b,c){return jm(a,b,c)};
|
|
479
|
-
gm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=
|
|
479
|
+
gm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=ud(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Eb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return im(a,d,b)};gm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=ud(a).split(";").pop();return im(a,c,b)};gm.verimatrixInitDataTransform=function(a,b,c){return jm(a,b,c)};gm.initDataTransform=im;
|
|
480
480
|
gm.defaultGetContentId=hm;gm.isFairPlaySupported=function(){var a;return O(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ta(b,2),E(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);xa(b);return b.return(!1)})};function lm(){}
|
|
481
481
|
function mm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Sf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){ld()&&"skd"==n&&(n=p.serverCertificate,p=hm(m),m=im(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Uc(),minHdcpVersion:"",ignoreDuplicateInitData:!Yc()};
|
|
482
482
|
(Uc()||ed())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Yc()||Xc()||Vc("Tizen 4")||Vc("Tizen 5")||Vc("Tizen 6")||$c()||Zc()&&53===ad()||Zc()&&68===ad()||!(!bd()||bd()&&Vc("Android")||bd()&&Vc("Fuchsia"))||id()&&Tc()||(c="smooth",d=!0);d={retryParameters:Sf(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",
|
|
@@ -493,17 +493,17 @@ minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minCha
|
|
|
493
493
|
skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(pm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
494
494
|
function qm(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 cm(a,b,c||mm(),d,"")}
|
|
495
495
|
function pm(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=Ee(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return xe(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-
|
|
496
|
-
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!=Od&&"image"!=c.type||b.push(c);return b}function nm(a){return em([a],a)}function om(a){return em([a],a)}S("shaka.util.PlayerConfiguration",lm);lm.mergeConfigObjects=qm;lm.createDefault=mm;function rm(a,b,c,d,e){dg.call(this);this.K=a;this.
|
|
497
|
-
function sm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function tm(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 um(a,b){a.L=b;a.N=!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=rm.prototype;r.getStartTime=function(){return this.
|
|
496
|
+
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!=Od&&"image"!=c.type||b.push(c);return b}function nm(a){return em([a],a)}function om(a){return em([a],a)}S("shaka.util.PlayerConfiguration",lm);lm.mergeConfigObjects=qm;lm.createDefault=mm;function rm(a,b,c,d,e){dg.call(this);this.K=a;this.T=b;this.Ja=e.networkingEngine;this.W=d;this.o=null;this.qb=c;this.wa=0;this.hb=e.uc;this.B=e.ji;this.ib=e.ki;this.g=e.config;this.j=this.C=this.h=null;this.da=!1;this.F=e.ui;this.oa=!1;this.l=null;this.ca=!1;this.i=this.A=null;this.aa=!1;this.J=new Map;this.pa=!1;this.Ka=e.ti;this.$=new al;this.m=new Uf;this.L=null;this.s=!1;this.Wa=e.mh;this.fa=null;this.Xa=e.lh;this.N=!1;this.H=[];this.G=[]}pa(rm,dg);
|
|
497
|
+
function sm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function tm(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 um(a,b){a.L=b;a.N=!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=rm.prototype;r.getStartTime=function(){return this.W};r.yc=function(){return this.K};r.hf=function(){return this.h};function vm(a){a.aa=!0;return a.i}function wm(a){a.da=!0;return a.j}function xm(a){a.oa=!0;return a.F}r.getStats=function(){return this.$};
|
|
498
498
|
function ym(a){a.ca=!0;return a.l}function zm(a){a.pa=!0;return a.J}
|
|
499
499
|
r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return ta(c,3),E(c,Am(a),5);case 5:return Bm(a),E(c,Cm(a),6);case 6:Bm(a);a.o||(a.o=new Ef(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
|
|
500
|
-
if(a.Xa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Wa){d=a.h.presentationTimeline.
|
|
500
|
+
if(a.Xa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Wa){d=a.h.presentationTimeline.U();var e=nf(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.fa=e,e.video&&Dm(a,e.video,d),e.audio&&Dm(a,e.audio,d)}return E(c,void 0,7);case 7:Bm(a);a.m.resolve();wa(c,0);break;case 3:b=xa(c),a.m.reject(b),G(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):dg.prototype.dispatchEvent.call(this,a)};
|
|
501
501
|
r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function Bm(a){if(a.s)throw new T(2,7,7003);}function Em(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
|
|
502
|
-
function Am(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Em(a,"manifest-parser");a.j||(a.C=ri(a.K,a.
|
|
503
|
-
function Cm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Em(a,"drm-engine");a.wa=Date.now()/1E3;a.l=a.
|
|
502
|
+
function Am(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Em(a,"manifest-parser");a.j||(a.C=ri(a.K,a.T),a.j=a.C(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Em(a,"manifest");if(a.h)return g.u(2);c=a;return E(g,a.j.start(a.K,a.ib),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);Fm(a.h);e=Date.now()/1E3;f=e-b;a.$.F=f;G(g)})}
|
|
503
|
+
function Cm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Em(a,"drm-engine");a.wa=Date.now()/1E3;a.l=a.hb();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Me(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return E(g,Promise.resolve(),3);case 3:Bm(a),a.dispatchEvent(c);case 2:return d=nf(a.h.variants),E(g,Dh(a.l,d,a.h.offlineSessionIds),4);case 4:return Bm(a),E(g,li(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return E(g,
|
|
504
504
|
Promise.resolve(),7);case 7:a.dispatchEvent(f),G(g)}})}r.configure=function(a,b){a=dm(a,b);qm(this.g,a)};r.getConfiguration=function(){return Fe(this.g)};
|
|
505
|
-
function Dm(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 bl(d,b,function(l,m,n){return Ml(l,m,n||null,a.g.streaming.retryParameters,a.Ja)}),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.
|
|
506
|
-
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.da){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.
|
|
505
|
+
function Dm(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 bl(d,b,function(l,m,n){return Ml(l,m,n||null,a.g.streaming.retryParameters,a.Ja)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.W||0;(h=(g=b.segmentIndex.Ab(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ea&&el(e,h.ea):dl(e,h.startTime));G(k)})}r.Vi=function(){return this.m};
|
|
506
|
+
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.da){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return E(e,a.i.stop(),4);case 4:a.F&&!a.oa&&a.F.release();if(!a.l||a.ca){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.pa)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,kl(d);G(e)}})};
|
|
507
507
|
function Fm(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",rm);rm.prototype.destroy=rm.prototype.destroy;rm.prototype.waitForFinish=rm.prototype.Vi;function Gm(a,b){dg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{qc:null,pc:Hm,dc:function(d,e){return Vm(c,"enter",d,e)}},{qc:Wm,pc:Hm,dc:function(d,e){return Vm(c,"enter",d,e)}},{qc:Xm,pc:Hm,dc:function(d,e){return Vm(c,"enter",d,e)}},{qc:Hm,pc:Wm,dc:function(d,e){return Vm(c,"exit",d,e)}},{qc:Hm,pc:Xm,dc:function(d,e){return Vm(c,"exit",d,e)}},{qc:Wm,pc:Xm,dc:function(d,e){return Vm(c,"skip",d,e)}},{qc:Xm,pc:Wm,dc:function(d,e){return Vm(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
|
|
508
508
|
"regionremove",function(d){c.g.delete(d.region)})}pa(Gm,dg);Gm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;dg.prototype.release.call(this)};Gm.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?Wm:a>d.endTime?Xm:Hm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.qc==e&&h.pc==f&&h.dc(d,b)}}};
|
|
509
509
|
function Vm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Wm=1,Hm=2,Xm=3;function Ym(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new sc(a)).Qa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Zm[d])return m.return(e);f=0;g=lg([a],c);ta(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];wa(m,3);break;case 2:k=xa(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
@@ -517,7 +517,7 @@ c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};
|
|
|
517
517
|
function en(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
518
518
|
function dn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",cn);cn.prototype.setTextVisibility=cn.prototype.setTextVisibility;cn.prototype.isTextVisible=cn.prototype.isTextVisible;cn.prototype.destroy=cn.prototype.destroy;cn.prototype.append=cn.prototype.append;cn.prototype.remove=cn.prototype.remove;cn.prototype.configure=cn.prototype.configure;function fn(){}r=fn.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",fn);fn.prototype.setTextVisibility=fn.prototype.setTextVisibility;fn.prototype.isTextVisible=fn.prototype.isTextVisible;fn.prototype.destroy=fn.prototype.destroy;fn.prototype.append=fn.prototype.append;fn.prototype.remove=fn.prototype.remove;fn.prototype.configure=fn.prototype.configure;function gn(){}function hn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",gn);gn.removeAllChildren=hn;function jn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Nc(function(){d.A.paused||
|
|
519
519
|
kn(d)})).Ua(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new hb;this.j.D(document,"fullscreenchange",function(){kn(d,!0)});this.j.D(this.A,"seeking",function(){kn(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){kn(d,!0)}),this.o.observe(this.g));this.B=new Map}r=jn.prototype;r.configure=function(a){this.C&&this.C.Ua(a.captionsUpdatePeriod)};
|
|
520
|
-
r.append=function(a){var b=[].concat(x(this.h)),c={};a=t(a);for(var d=a.next();!d.done;c={
|
|
520
|
+
r.append=function(a){var b=[].concat(x(this.h)),c={};a=t(a);for(var d=a.next();!d.done;c={Hd:c.Hd},d=a.next())c.Hd=d.value,b.some(function(e){return function(f){return $b(f,e.Hd)}}(c))||this.h.push(c.Hd);kn(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
521
521
|
r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});kn(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function ln(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
522
522
|
function mn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.bh:null;l&&(g.push(l.Re),l.jc&&g.push(l.jc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?ln(a,n)||(f=!0):(nn(a,k,e),l=a.i.get(k),n=l.bh,f=!0));0<k.nestedCues.length&&n&&mn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
|
|
523
523
|
q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.jc?(d.jc.contains(c)&&d.jc.removeChild(c),c.appendChild(d.jc),d.jc.appendChild(d.Re)):c.appendChild(d.Re)}}function kn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())hn(d.value);hn(a.g);a.i.clear();a.B.clear()}a.m&&mn(a,a.h,a.g,c,[])}}
|
|
@@ -535,164 +535,164 @@ jn.prototype.isTextVisible=jn.prototype.isTextVisible;jn.prototype.remove=jn.pro
|
|
|
535
535
|
break;case "right":g.push("align:right");break;case Rb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function tn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}tn.prototype.configure=function(a){this.g=a};function un(a){a.i=!1;a.l=!0;a.j=!1}
|
|
536
536
|
function vn(a,b,c){try{if(!a.g.enabled)return b;var d=wn(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=xn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=yn;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=zn;break a}e=void 0}d.ot=e;d.su=
|
|
537
537
|
!0;var f=An(d);return Bn(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function wn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
538
|
-
function Cn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,wn(a));c.pr=a.h
|
|
538
|
+
function Cn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,wn(a));c.pr=a.h.$a();var e=c.ot===Dn||c.ot===yn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=En(a,c);if(d)d=Fn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=An(a);f&&(b.uris=b.uris.map(function(g){return Bn(g,f)}))}}}function En(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
|
|
539
539
|
function Gn(a){if(0===a.type)return Hn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?yn:Dn;if("audio"==b)return xn;if("text"==b)return"application/mp4"===a.mimeType?In:Jn}}function Kn(a,b){b=a.h.sb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
540
540
|
function Ln(a,b){b=a.h.sb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Mn(a,b){var c=a.h.cc();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Dn:return a.videoBandwidth||NaN;case xn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
541
541
|
function An(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
542
542
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Fn(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=An(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
543
543
|
function Bn(a,b){if(!b||a.includes("offline:"))return a;a=new sc(a);a.g.set("CMCD",b);return a.toString()}var zn="m",xn="a",Dn="v",yn="av",Hn="i",Jn="c",In="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",fh:"s",OTHER:"o"});function Nn(a){this.h=a;this.g=null}r=Nn.prototype;r.configure=function(a){this.h=a};r.ug=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(On)?1E3*this.g.get(On):null};r.tg=function(){return this.h.enabled&&this.g&&this.g.has(Pn)?1E3*this.g.get(Pn):null};r.Oh=function(){return this.h.enabled&&this.g&&this.g.has(Qn)?this.g.get(Qn):null};r.Ph=function(){return this.h.enabled&&this.g&&this.g.has(Rn)?this.g.get(Rn):null};
|
|
544
544
|
r.getBandwidthEstimate=function(a){var b=this.tg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Sn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Nn);Nn.prototype.getBandwidthEstimate=Nn.prototype.getBandwidthEstimate;Nn.prototype.getRoundTripTime=Nn.prototype.Ph;Nn.prototype.getResponseDelay=Nn.prototype.Oh;Nn.prototype.getEstimatedThroughput=Nn.prototype.tg;
|
|
545
|
-
Nn.prototype.getMaxBitrate=Nn.prototype.ug;var Pn="etp",On="mb",Qn="rd",Rn="rtt";function Tn(){this.g=null;this.h=[]}function Un(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;G(c)})}Tn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){dg.call(this);var c=this;this.l=Vn;this.
|
|
546
|
-
this.Jf=[];this.s=null;this.Ja=new Ef(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.Wa=this.g.preferredTextLanguage;this.
|
|
547
|
-
this.G=Yn(this);this.G.Qf(this.g.streaming.forceHTTP);this.G.Rf(this.g.streaming.forceHTTPS);this.cg=this.oa=this.B=null;this.bg=new Nc(function(){return O(function(d){if(1==d.g)return c.oa?E(d,c.tc(c.cg,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.oa),4);c.cg.play();c.oa=null;G(d)})});Zn&&(this.B=Zn(),this.B.configure(this.g.ads),this.
|
|
548
|
-
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.bg.stop();if(c.oa)return h.u(0);c.cg=c.h;g=c;return E(h,c.mg(!0),3)}g.oa=h.h;G(h)})}),this.
|
|
549
|
-
this.tc(a,!0))}pa(X,dg);function bo(a){null!=a.K&&(Cj(a.K),a.K.release(),a.K=null)}function co(a,b){b.lcevc.enabled?(bo(a),null==a.K&&(a.K=new Bj(a.h,a.dh,b.lcevc),a.F&&(a.F.
|
|
550
|
-
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==fo)return g.return();bo(a);b=a.detach();a.l=fo;return E(g,b,2);case 2:c=[];d=t(a.Jf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.Jf=[];return E(g,Promise.all(c),3);case 3:a.
|
|
545
|
+
Nn.prototype.getMaxBitrate=Nn.prototype.ug;var Pn="etp",On="mb",Qn="rd",Rn="rtt";function Tn(){this.g=null;this.h=[]}function Un(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;G(c)})}Tn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){dg.call(this);var c=this;this.l=Vn;this.ee=this.h=null;this.da=!1;this.te=new hb;this.hd=new hb;this.m=new hb;this.Ka=new hb;this.gd=new hb;this.C=this.F=this.A=this.G=null;this.ve=0;this.W=new Tn;this.fa=this.Ff=this.$=this.i=this.Xa=this.J=this.j=this.qb=this.K=this.dh=this.aa=this.N=this.ed=this.L=this.he=this.H=this.ib=null;this.hb=!1;this.wa=this.o=null;this.Zf=1E9;this.vd=[];this.T=NaN;this.g=Wn(this);this.ca={width:Infinity,height:Infinity};this.de=new ki(this.g,this.ca,null);
|
|
546
|
+
this.Jf=[];this.s=null;this.Ja=new Ef(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.Wa=this.g.preferredTextLanguage;this.rd=this.g.preferredTextRole;this.od=this.g.preferForcedSubs;this.jd=[];b&&b(this);this.N=Xn(this);this.aa=new Nn(this.g.cmsd);
|
|
547
|
+
this.G=Yn(this);this.G.Qf(this.g.streaming.forceHTTP);this.G.Rf(this.g.streaming.forceHTTPS);this.cg=this.oa=this.B=null;this.bg=new Nc(function(){return O(function(d){if(1==d.g)return c.oa?E(d,c.tc(c.cg,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.oa),4);c.cg.play();c.oa=null;G(d)})});Zn&&(this.B=Zn(),this.B.configure(this.g.ads),this.gd.D(this.B,"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();
|
|
548
|
+
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.bg.stop();if(c.oa)return h.u(0);c.cg=c.h;g=c;return E(h,c.mg(!0),3)}g.oa=h.h;G(h)})}),this.gd.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.bg.X(.1)}));this.te.D(window,"online",function(){$n(c);c.If()});this.ne=new Nc(function(){return ao(c)});this.pa=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
|
|
549
|
+
this.tc(a,!0))}pa(X,dg);function bo(a){null!=a.K&&(Cj(a.K),a.K.release(),a.K=null)}function co(a,b){b.lcevc.enabled?(bo(a),null==a.K&&(a.K=new Bj(a.h,a.dh,b.lcevc),a.F&&(a.F.T=a.K))):bo(a)}function eo(a,b){return new U(a,b)}r=X.prototype;
|
|
550
|
+
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==fo)return g.return();bo(a);b=a.detach();a.l=fo;return E(g,b,2);case 2:c=[];d=t(a.Jf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.Jf=[];return E(g,Promise.all(c),3);case 3:a.te&&(a.te.release(),a.te=null);a.hd&&(a.hd.release(),a.hd=null);a.m&&(a.m.release(),a.m=null);a.Ka&&(a.Ka.release(),a.Ka=null);a.gd&&(a.gd.release(),a.gd=null);a.wa=null;a.g=null;a.s=null;a.ee=null;a.N=null;a.aa=
|
|
551
551
|
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),dg.prototype.release.call(a),G(g)}})};function go(a,b){a.dispatchEvent(eo("onstatechange",(new Map).set("state",b)))}
|
|
552
|
-
r.tc=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==fo)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,ho(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(go(c,"attach"),e=function(){var h=io(c);h&&jo(c,h)},c.
|
|
553
|
-
}})};r.nh=function(a){this.dh=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==fo)throw new T(2,7,7E3);return E(c,b.nc(!1,a),2)}if(3!=c.g)return E(c,ho(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.
|
|
554
|
-
r.nc=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!=fo&&(c.l=Vn),E(p,ho(c,"unload"),2);case 2:if(p.h)return p.return();ua(p,3);c.
|
|
552
|
+
r.tc=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==fo)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,ho(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(go(c,"attach"),e=function(){var h=io(c);h&&jo(c,h)},c.hd.D(a,"error",e),c.h=a);if(!b||!Oc()||c.F){g.u(6);break}return E(g,ko(c),6);case 6:Aa(g);c.W.release();Da(g,0);break;case 5:return f=xa(g),E(g,c.detach(),10);case 10:throw f;
|
|
553
|
+
}})};r.nh=function(a){this.dh=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==fo)throw new T(2,7,7E3);return E(c,b.nc(!1,a),2)}if(3!=c.g)return E(c,ho(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.hd.ob(),b.h=null),go(b,"detach"),b.B&&!a&&b.B.release()}finally{b.W.release()}G(c)})};function ho(a,b){var c;return O(function(d){return 1==d.g?(c=++a.ve,E(d,Un(a.W,b),2)):c!=a.ve?(a.W.release(),d.return(!0)):d.return(!1)})}
|
|
554
|
+
r.nc=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!=fo&&(c.l=Vn),E(p,ho(c,"unload"),2);case 2:if(p.h)return p.return();ua(p,3);c.hb=!1;go(c,"unload");a&&!Oc()&&(a=!1);bo(c);d=c.jd.map(function(q){return q()});c.jd=[];return E(p,Promise.all(d),5);case 5:c.dispatchEvent(eo("unloading"));c.ed&&(c.ed.release(),c.ed=null);c.h&&(c.m.ob(),c.Ka.ob());c.ne.stop();c.ib&&(c.ib.release(),c.ib=null);c.he&&(c.he.stop(),c.he=null);
|
|
555
555
|
if(!c.J){p.u(6);break}return E(p,c.J.stop(),7);case 7:c.J=null,c.Xa=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(!ld("webkit")||!c.A){p.u(12);break}return E(p,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.F){p.u(14);break}return E(p,c.F.destroy(),15);case 15:c.F=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.oa&&!b&&(c.oa.destroy(),c.oa=
|
|
556
|
-
null);b||c.bg.stop();c.N&&un(c.N);c.
|
|
557
|
-
|
|
558
|
-
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==fo)throw new T(2,7,7E3);e=null;f="";a instanceof rm?(e=a,f=e.yc()||""):f=a||"";return E(A,Un(d.
|
|
559
|
-
2),E(y,Un(d.
|
|
560
|
-
A.h)?(um(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new al;case 11:m=!e;n=e?e.qb:Date.now()/1E3;d.s=e?e.getStats():new al;d
|
|
561
|
-
e.getConfiguration();d.
|
|
556
|
+
null);b||c.bg.stop();c.N&&un(c.N);c.aa&&(c.aa.g=null);c.h&&hn(c.h);if(!c.h||!c.h.src){p.u(16);break}return E(p,new Promise(function(q){return(new Nc(q)).X(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.A){p.u(18);break}return E(p,c.A.destroy(),19);case 19:c.A=null;case 18:c.pa&&c.$!=c.pa.yc()&&(c.pa.s||c.pa.destroy(),c.pa=null);c.$=null;c.Ff=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=
|
|
557
|
+
k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(Ye={},ji.clear());c.i=null;c.s=new al;c.Vf=null;c.vd=[];c.T=NaN;lo(c);case 3:Aa(p);c.W.release();Da(p,4);break;case 4:if(a&&Oc()&&!c.F)return E(p,ko(c),0);p.u(0)}})};r.Ui=function(a){this.fa=a};
|
|
558
|
+
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==fo)throw new T(2,7,7E3);e=null;f="";a instanceof rm?(e=a,f=e.yc()||""):f=a||"";return E(A,Un(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new T(2,7,7002);if(!d.$){A.u(3);break}d.$=f;return E(A,d.nc(!1),3);case 3:g=++d.ve;h=function(){return O(function(z){if(1==z.g)return d.ve==g?z.u(0):e?E(z,e.destroy(),3):z.u(3);throw new T(2,7,7E3);})};k=function(z,B){return O(function(y){switch(y.g){case 1:return ua(y,
|
|
559
|
+
2),E(y,Un(d.W,B),4);case 4:return E(y,h(),5);case 5:return E(y,z(),6);case 6:return E(y,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Aa(y),d.W.release(),Da(y,0)}})};ta(A,5,6);null==b&&e&&(b=e.getStartTime());d.fa=b;d.hb=!1;d.dispatchEvent(eo("loading"));if(e){c=e.T;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,mo(d,f),2);c=z.h;G(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){um(e,d);d.s=e.getStats();A.u(11);break}return E(A,no(d,f,b,c,!0),12);case 12:(e=
|
|
560
|
+
A.h)?(um(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new al;case 11:m=!e;n=e?e.qb:Date.now()/1E3;d.s=e?e.getStats():new al;d.$=f;d.Ff=c||null;if(m)return E(A,k(function(){return O(function(z){return E(z,oo(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){A.u(15);break}return E(A,k(function(){return O(function(z){return E(z,ko(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return E(A,k(function(){return O(function(z){return E(z,e.m,0)})},"waitForFinish"),17);case 17:d.g=
|
|
561
|
+
e.getConfiguration();d.de=e.B;d.Xa=e.C;d.J=wm(e);d.ed=xm(e);d.qb=e.Ka;d.i=e.hf();if(p=e.o)d.Ja=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(po(d),d.configure("manifest.disableVideo",!0));d.A=ym(e);return E(A,k(function(){return O(function(z){return E(z,d.A.tc(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(q=e.A)||d.wa&&d.wa==q||(d.o=vm(e),d.wa=e.A,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
|
|
562
562
|
function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=zm(e),v=e.fa,E(A,k(function(){return O(function(z){return E(z,qo(d,n,v,u),0)})},"loadInner_"),19);case 19:tm(e);A.u(14);break;case 20:return E(A,
|
|
563
563
|
k(function(){return O(function(z){return E(z,ro(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(eo("loaded"));case 6:Aa(A);if(!e){A.u(22);break}return E(A,e.destroy(),22);case 22:d.pa=null;Da(A,0);break;case 5:w=xa(A);if(7E3==w.code){A.u(24);break}return E(A,d.nc(!1),24);case 24:throw w;}})};
|
|
564
564
|
function po(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.Qi=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,so(c),2):3!=e.g?(d=e.h,E(e,c.nc(a,b),3)):e.return(d)})};
|
|
565
565
|
r.mg=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,so(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
|
|
566
|
-
function so(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Xa&&a
|
|
566
|
+
function so(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Xa&&a.$))return e.u(2);c=a.h.currentTime;a.U()&&(c=null);d=Date.now()/1E3;return E(e,to(a,a.$,c,a.Ff,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Xa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.wa;f.i=a.o;f.A=g;b.o=a.Ja;b.start();a.i=null;a.J=null;a.Xa=null;a.o=null;a.wa=null}return e.return(b)})}
|
|
567
567
|
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,no(d,a,b,c),2);(e=f.h)?e.start():jo(d,new T(2,7,7005));return f.return(e)})};function no(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,mo(a,b),3);2!=l.g&&(d=l.h);if(g=uo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.wa==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(to(a,b,c,d||null,f,!e,h,k))})}
|
|
568
|
-
function to(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,B,y,D
|
|
569
|
-
filter:function(
|
|
570
|
-
new U("regionadd",new Map([["region",
|
|
571
|
-
(new Map).set("isLive",a.
|
|
572
|
-
|
|
573
|
-
var F=Object.keys(
|
|
574
|
-
!pi.includes(Q)}P!=L.allowedByKeySystem&&(N=!0)}}}if(N&&(xo(a),!yo(a)))break a;(
|
|
575
|
-
mh:f,lh:h};k=new rm(b,d,e,c,
|
|
576
|
-
function uo(a,b){if(!
|
|
577
|
-
function ko(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return go(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Vf=b,d=Ao(a.h,c,{Fh:function(){return a.keySystem()},
|
|
578
|
-
function qo(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
579
|
-
Eo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(F,N,L){a.i&&a.j&&F!=a.j.j&&Fo(a,F,!0,void 0===N?!1:N,void 0===L?0:L)});a.o.setMediaElement(e);a.o.setCmsdManager(a.
|
|
580
|
-
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){H.u(2);break}return E(H,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Eo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);zl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(F){a.C=Ko(a,F);a.
|
|
581
|
-
break}v=a.i.presentationTimeline;w=a.fa||a.h.currentTime;A=v.$b();z=v.ub();w<A?w=A:w>z&&(w=z);return E(H,No(h,w),6);case 6:B=H.h,u(B);case 5:Fo(a,h,!0,!1,0);case 4:return a.C.Je(),y=a.zc().find(function(F){return F.active}),y||((
|
|
582
|
-
xo(a);yo(a);a.i.variants.some(function(F){return F.primary});if((
|
|
583
|
-
a.m.Hb(e,"timeupdate",
|
|
584
|
-
function oo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Qd,d=Date.now()/1E3,e=!0,a.A=a.uc({Db:a.G,onError:function(k){jo(a,k)},
|
|
568
|
+
function to(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,B,y,C,D;return O(function(K){if(1==K.g)return k=null,l=Fe(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.N&&k.s?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(I,J){m()?k.configure(I,J):a.configure(I,J)},Infinity!=a.ca.width||Infinity!=a.ca.height?K.u(2):E(K,md(),3);2!=K.g&&(q=K.h,a.ca.width=q.width,a.ca.height=q.height);u=new ki(l,a.ca,null);v={networkingEngine:a.G,
|
|
569
|
+
filter:function(I){var J,H;return O(function(F){if(1==F.g)return E(F,li(u,I),2);if(4!=F.g){J=F.h;if(!J)return F.u(0);H=eo("trackschanged");return E(F,Promise.resolve(),4)}k.dispatchEvent(H);G(F)})},makeTextStreamsForClosedCaptions:function(I){return vo(a,I)},onTimelineRegionAdded:function(I){var J=k.F;a:{var H=t(J.g);for(var F=H.next();!F.done;F=H.next())if(F=F.value,F.schemeIdUri==I.schemeIdUri&&F.id==I.id&&F.startTime==I.startTime&&F.endTime==I.endTime){H=F;break a}H=null}null==H&&(J.g.add(I),I=
|
|
570
|
+
new U("regionadd",new Map([["region",I]])),J.dispatchEvent(I))},onEvent:function(I){return k.dispatchEvent(I)},onError:function(I){return k.onError(I)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){p("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.N&&a.j.updateDuration()},newDrmInfo:function(I){var J=k.l,H=J?J.g:null;H&&J.s&&ni(u,H.keySystem,I)},onManifestUpdated:function(){var I=
|
|
571
|
+
(new Map).set("isLive",a.U());k.dispatchEvent(eo("manifestupdated",I));sm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new nl(function(){return a.Nb()});w.addEventListener("regionadd",function(I){var J=I.region;wo(a,"timelineregionadded",J,k);sm(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(J)})});A=null;l.streaming.observeQualityChanges&&(A=new ol(function(){return a.sb()}),A.addEventListener("qualitychange",function(I){var J=
|
|
572
|
+
I.quality;I=I.position;J=(new Map).set("mediaQuality",{bandwidth:J.bandwidth,audioSamplingRate:J.audioSamplingRate,codecs:J.codecs,contentType:J.contentType,frameRate:J.frameRate,height:J.height,mimeType:J.mimeType,channelsCount:J.channelsCount,pixelAspectRatio:J.pixelAspectRatio,width:J.width}).set("position",I);a.dispatchEvent(eo("mediaqualitychanged",J))}));z=!0;B={Db:a.G,onError:function(I){return k.onError(I)},qe:function(I){sm(k,!0,function(){a:{var J=I,H=eo("keystatuschanged");a.dispatchEvent(H);
|
|
573
|
+
var F=Object.keys(J);1==F.length&&""==F[0]&&(F=["00"],J={"00":J[""]});H=1==F.length&&"00"==F[0];var N=!1;if(F.length){F=t(a.i.variants);for(var L=F.next();!L.done;L=F.next()){L=L.value;var M=[];L.audio&&M.push(L.audio);L.video&&M.push(L.video);M=t(M);for(var P=M.next();!P.done;P=M.next()){var R=P.value;P=L.allowedByKeySystem;if(R.keyIds.size){L.allowedByKeySystem=!0;R=t(R.keyIds);for(var Q=R.next();!Q.done;Q=R.next())if(Q=Q.value,(Q=J[H?"00":Q])||a.A.F)L.allowedByKeySystem=L.allowedByKeySystem&&!!Q&&
|
|
574
|
+
!pi.includes(Q)}P!=L.allowedByKeySystem&&(N=!0)}}}if(N&&(xo(a),!yo(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&zo(a)}})},onExpirationUpdated:function(I,J){var H=eo("expirationupdated");k.dispatchEvent(H);if((H=k.j)&&H.onExpirationUpdated)H.onExpirationUpdated(I,J)},onEvent:function(I){k.dispatchEvent(I);"drmsessionupdate"==I.type&&z&&(z=!1,I=Date.now()/1E3-k.wa,(a.s||k.getStats()).j=I,a.K&&Cj(a.K))}};y=Yn(a,m);kg(a.G,y);C=function(){return a.uc(B)};D={config:l,ki:v,ui:w,ti:A,uc:C,ji:u,networkingEngine:y,
|
|
575
|
+
mh:f,lh:h};k=new rm(b,d,e,c,D);a.Jf.push(k);return K.return(k)})}function mo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Ym(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&cd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
576
|
+
function uo(a,b){if(!Oc())return!0;if(b){if(""==(a.h||Sc()).canPlayType(b))return!1;if(!(Oc()&&b in si))return!0;if(ie(b)){if(a.g.streaming.preferNativeHls)return!0;if(cd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(cd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
577
|
+
function ko(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return go(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Vf=b,d=Ao(a.h,c,{Fh:function(){return a.keySystem()},re:function(h,k,l){Bo(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ca=f,E(g,d.L,2);a.F=d;G(g)})}
|
|
578
|
+
function qo(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J;return O(function(H){switch(H.g){case 1:go(a,"load");e=a.h;a.H=new Sk({Zd:function(){return e.playbackRate},Xb:function(){return e.defaultPlaybackRate},Sf:function(F){e.playbackRate=F},Eg:function(F){e.currentTime+=F}});f=function(){return Co(a)};g=function(){return Do(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);co(a,a.g);a.Wa=a.g.preferredTextLanguage;a.rd=a.g.preferredTextRole;a.od=a.g.preferForcedSubs;
|
|
579
|
+
Eo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(F,N,L){a.i&&a.j&&F!=a.j.j&&Fo(a,F,!0,void 0===N?!1:N,void 0===L?0:L)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=Go(a);a.j.configure(a.g.streaming);a.l=Ho;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":Io(a,F)}});a.dispatchEvent(eo("streaming"));h=c;(k=a.j.j)||h||(h=Jo(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(q=
|
|
580
|
+
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){H.u(2);break}return E(H,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Eo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);zl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(F){a.C=Ko(a,F);a.ib=Lo(a,F);Mo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.fa);if(k){H.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){H.u(5);
|
|
581
|
+
break}v=a.i.presentationTimeline;w=a.fa||a.h.currentTime;A=v.$b();z=v.ub();w<A?w=A:w>z&&(w=z);return E(H,No(h,w),6);case 6:B=H.h,u(B);case 5:Fo(a,h,!0,!1,0);case 4:return a.C.Je(),y=a.zc().find(function(F){return F.active}),y||((C=of(a.i.textStreams,a.Wa,a.rd,a.od)[0]||null)&&$k(a.s.h,C,!0),h&&(C?(h.audio&&Oo(a,h.audio,C)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),Po(a)):a.da=!1),C&&(a.g.streaming.alwaysStreamText||a.pf())&&Il(a.j,C)),E(H,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Qo(a));
|
|
582
|
+
xo(a);yo(a);a.i.variants.some(function(F){return F.primary});if((D=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)K=function(){return Ro(a)},a.m.D(e,"timeupdate",K);D||(I=function(){return So(a)},a.m.D(e,"timeupdate",I),So(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(J=function(){var F,N;return O(function(L){if(1==L.g){F=a.h.duration-a.h.currentTime;if(isNaN(F)||!(F<=a.g.streaming.preloadNextUrlWindow))return L.u(0);
|
|
583
|
+
a.m.Hb(e,"timeupdate",J);N=a;return E(L,a.preload(a.i.nextUrl),4)}N.pa=L.h;G(L)})},a.m.D(e,"timeupdate",J)),a.m.D(e,"ended",function(){a.load(a.pa||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(D);a.hb=!0;a.m.sa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});G(H)}})}
|
|
584
|
+
function oo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Qd,d=Date.now()/1E3,e=!0,a.A=a.uc({Db:a.G,onError:function(k){jo(a,k)},qe:function(){},onExpirationUpdated:function(){var k=eo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
585
585
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?be(b):"",codecs:b?he(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(Sd(g.mimeType,
|
|
586
|
-
g.codecs)),b.startsWith("audio/")?(g.type=c.
|
|
587
|
-
function ro(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return go(a,"src-equals"),d=a.h,a.C=new Ik(d),e=!1,a.
|
|
586
|
+
g.codecs)),b.startsWith("audio/")?(g.type=c.V,f.audio=g):f.video=g,a.A.aa=!0,E(h,Dh(a.A,[f],[]),2)):E(h,a.A.tc(a.h),0)})}
|
|
587
|
+
function ro(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return go(a,"src-equals"),d=a.h,a.C=new Ik(d),e=!1,a.jd.push(function(){e=!0}),null!=a.fa&&a.C.Ke(a.fa),a.H=new Sk({Zd:function(){return d.playbackRate},Xb:function(){return d.defaultPlaybackRate},Sf:function(v){d.playbackRate=v},Eg:function(v){d.currentTime+=v}}),f=a.g.streaming.rebufferingGoal,Mo(a,d,f),g=function(){return Co(a)},h=function(){return Do(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
588
588
|
"ratechange",h),"none"!=d.preload&&a.m.sa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return xo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return xo(a)}),a.m.D(d.audioTracks,"change",function(){return xo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "metadata":To(a,v);break;case "chapters":Io(a,v);break;default:xo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return xo(a)}),
|
|
589
|
-
a.m.D(d.textTracks,"change",function(){return xo(a)})),d.src=vn(a.N,a
|
|
590
|
-
"change",A);(new Nc(A)).
|
|
591
|
-
l]),2);if((m=a.
|
|
589
|
+
a.m.D(d.textTracks,"change",function(){return xo(a)})),d.src=vn(a.N,a.$,c),(Wc()||Zc())&&d.load(),"none"!=d.preload&&!d.autoplay&&ie(c)&&hd()&&d.load(),a.l=Uo,a.dispatchEvent(eo("streaming")),k=new Uf,zk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.Je();k.resolve()}),zk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var v;return O(function(w){if(1==w.g)return Vo(a),v=Wo(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.sa(d.textTracks,
|
|
590
|
+
"change",A);(new Nc(A)).X(1)}),2);if(e)return w.return();Xo(a);G(w)})}),d.error?k.reject(io(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.sa(d,"error",function(){k.reject(io(a))}),l=new Promise(function(v,w){(new Nc(w)).X(a.g.streaming.loadTimeout)}),E(u,Promise.race([k,
|
|
591
|
+
l]),2);if((m=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return Ro(a)},a.m.D(d,"timeupdate",n);m||(p=function(){return So(a)},a.m.D(d,"timeupdate",p),So(a));a.B&&(a.B.onManifestUpdated(m),m&&(q=a.Nb().end,a.m.D(d,"progress",function(){var v=a.Nb().end;q!=v&&(a.B.onManifestUpdated(a.U()),q=v)})));a.hb=!0;G(u)})}function Vo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Mg(b,a.g.preferredVariantRole)}
|
|
592
592
|
function Xo(a){var b=a.g.preferredTextLanguage;""!=b&&a.Mf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
593
|
-
function To(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,Yo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Nc(function(){var d=Zo(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).mc().
|
|
593
|
+
function To(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,Yo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Nc(function(){var d=Zo(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).mc().X(.5);a.jd.push(function(){c.stop()})}}
|
|
594
594
|
function Bo(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())Yo(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function Yo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(eo("metadata",b))}
|
|
595
|
-
function Io(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Nc(function(){b.mode="hidden"})).mc().
|
|
596
|
-
function Yn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?sm(b(),!0,e):e()}b||(b=function(){return null});return new gg(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(eo("downloadheadersreceived",f));d(function(){if(a.
|
|
595
|
+
function Io(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Nc(function(){b.mode="hidden"})).mc().X(.5);a.jd.push(function(){c.stop()})}}r.yi=function(){for(var a=this.W;a.g;)a.release()};r.uc=function(a){return new wh(a)};
|
|
596
|
+
function Yn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?sm(b(),!0,e):e()}b||(b=function(){return null});return new gg(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(eo("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;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],
|
|
597
597
|
Sn(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],Sn(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(eo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Cn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
598
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Cn(h,f,{ot:zn,su:!h.i})}}catch(M){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case rg: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.
|
|
599
|
-
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(!Nb(m.M(),A.M())){var z=A.M()[0],B=f.uris[0],y=new URL(z),
|
|
600
|
-
500,N=q.bandwidth;var L=N?N*(m.endTime-m.startTime)/1E3/(F/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(L)||(n.rtp=L)}}p&&n.ot!==In&&(n.tb=Mn(h,n.ot)/1E3);Cn(h,f,n)}}catch(M){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:Cn(h,f,{ot:"k"});break;case 4:Cn(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.
|
|
601
|
-
function Ko(a,b){return new Jk(a.h,a.i,a.g.streaming,b,function(){a.
|
|
602
|
-
function Lo(a,b){b=new Gm(a.
|
|
603
|
-
function Mo(a,b,c){a.L=new Nf;a.L.g=Pf;Qf(a.L,c,Math.min(.5,c/2));lo(a);a.
|
|
604
|
-
function $o(a){switch(a.l){case Uo:if(a.h.ended)var b=!0;else{var c=Hi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Ho:a:if(a.h.ended||Tj(a.F))b=!0;else{if(a.i.presentationTimeline.
|
|
605
|
-
function Xn(a){return new tn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},sb:function(){return a.sb()},getCurrentTime:function(){return a.h?a.h.currentTime:0}
|
|
606
|
-
function Go(a){return new tl(a.i,{
|
|
607
|
-
f);a.dispatchEvent(eo("segmentappended",d));a.o&&c.fastSwitching&&b.
|
|
608
|
-
return d},
|
|
598
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Cn(h,f,{ot:zn,su:!h.i})}}catch(M){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case rg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=Gn(k);var p=n.ot===Dn||n.ot===xn||n.ot===yn||n.ot===In,q=k.stream;if(q){var u=h.h.$a();if(p&&(n.bl=Kn(h,q.type),n.ot!==In)){var v=Ln(h,q.type);n.dl=u?v/Math.abs(u):v}q.bandwidth&&(n.br=q.bandwidth/1E3);
|
|
599
|
+
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(!Nb(m.M(),A.M())){var z=A.M()[0],B=f.uris[0],y=new URL(z),C=new URL(B);if(y.origin!==C.origin)var D=z;else{for(var K=y.pathname.split("/").slice(1),I=C.pathname.split("/").slice(1,-1);K[0]===I[0];)K.shift(),I.shift();for(;I.length;)I.shift(),K.unshift("..");D=K.join("/")}n.nor=D}if((A.Ba||A.ka)&&(m.Ba!=A.Ba||m.ka!=A.ka)){var J=A.Ba+"-";A.ka&&(J+=A.ka);n.nrr=J}}}var H=h.h.$a()||1,F=Ln(h,q.type)||
|
|
600
|
+
500,N=q.bandwidth;var L=N?N*(m.endTime-m.startTime)/1E3/(F/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(L)||(n.rtp=L)}}p&&n.ot!==In&&(n.tb=Mn(h,n.ot)/1E3);Cn(h,f,n)}}catch(M){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:Cn(h,f,{ot:"k"});break;case 4:Cn(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.Qd=isNaN(f.Qd)?e:f.Qd+e)})}
|
|
601
|
+
function Ko(a,b){return new Jk(a.h,a.i,a.g.streaming,b,function(){a.ib&&Vk(a.ib,!0);a.j&&a.j.Cd();a.L&&$o(a)},function(c){return a.dispatchEvent(c)})}
|
|
602
|
+
function Lo(a,b){b=new Gm(a.ed,a.U()||0<b);b.addEventListener("enter",function(d){wo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){wo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(wo(a,"timelineregionenter",e),wo(a,"timelineregionexit",e))});var c=new Uk(a.h);c.g.add(b);a.qb&&c.g.add(a.qb);return c}
|
|
603
|
+
function Mo(a,b,c){a.L=new Nf;a.L.g=Pf;Qf(a.L,c,Math.min(.5,c/2));lo(a);a.he=(new Nc(function(){$o(a)})).Ua(.25);a.m.D(b,"waiting",function(){return $o(a)});a.m.D(b,"stalled",function(){return $o(a)});a.m.D(b,"canplaythrough",function(){return $o(a)});a.m.D(b,"progress",function(){return $o(a)})}
|
|
604
|
+
function $o(a){switch(a.l){case Uo:if(a.h.ended)var b=!0;else{var c=Hi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Ho:a:if(a.h.ended||Tj(a.F))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Mb();var d=Hi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ji(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Of:Pf;c.g=d;(b=b!=d)&&d===Of&&(c.h=Date.now());b&&lo(a)}function Ao(a,b,c,d){return new Kj(a,b,c,d)}
|
|
605
|
+
function Xn(a){return new tn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},sb:function(){return a.sb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},$a:function(){return a.$a()},Zb:function(){return a.Zb()},cc:function(){return a.cc()},U:function(){return a.U()}},a.g.cmcd)}
|
|
606
|
+
function Go(a){return new tl(a.i,{Yd:function(){return a.C?a.C.Pd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},$a:function(){return a.$a()},Z:a.F,Db:a.G,onError:function(b){return jo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},pi:function(){a.J&&a.J.update&&a.J.update()},Bf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.Fg();var g=Uj(a.F,f);!a.U()&&a.h.paused&&null!=g&&0<g&&a.C.Pd()<g&&a.C.Ke(g)}$o(a);d=(new Map).set("start",d).set("end",e).set("contentType",
|
|
607
|
+
f);a.dispatchEvent(eo("segmentappended",d));a.o&&c.fastSwitching&&b.yd&&b.fe&&a.o.trySuggestStreams()},oi:function(b,c){(c=c.xf)&&a.qb&&ql(a.qb,c,b)},hg:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Rg(Bb(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;Mh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
|
|
608
|
+
return d},re:function(b,c,d){Bo(a,b,c,d)},Wd:function(b,c){return a.Wd(b,c)}})}
|
|
609
609
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=dm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(rb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(rb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
610
610
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&rb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){rb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
|
|
611
611
|
a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==
|
|
612
612
|
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&&
|
|
613
613
|
(a.drm.retryParameters.baseDelay=100));var d=qm(this.g,a,Wn(this));ap(this);return d};
|
|
614
|
-
function ap(a){a.
|
|
614
|
+
function ap(a){a.de=new ki(a.g,a.ca,a.A);if(a.J){var b=Fe(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.A&&a.A.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=fo&&mi(a.de,a.i)&&xo(a)}catch(f){jo(a,f)}a.o&&yo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||zo(a)}a.G&&(a.G.Qf(a.g.streaming.forceHTTP),a.G.Rf(a.g.streaming.forceHTTPS));if(a.F)if(a.F.configure(a.g.mediaSource),a.F.ca=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
615
615
|
a.Vf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):rb("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.Vf=b;a.j&&(b=a.j,(c=b.i.get(Od))&&Gl(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(),Qo(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
616
|
-
Qf(a.L,b,Math.min(.5,b/2)));a.i&&Eo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.
|
|
616
|
+
Qf(a.L,b,Math.min(.5,b/2)));a.i&&Eo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.aa&&a.aa.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Wn(this);qm(a,this.g,Wn(this));return a};r.Kh=function(){var a=Wn(this);qm(a,this.g,Wn(this));return fm(this.g,Wn(this))};
|
|
617
617
|
r.rg=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.Nb().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.Ci=function(){for(var a in this.g)delete this.g[a];qm(this.g,Wn(this),Wn(this));ap(this)};r.Gh=function(){return this.l};r.jf=function(){return this.i?this.i.type:null};r.Jh=function(){return this.h};
|
|
618
|
-
r.Zb=function(){return this.G};r.yc=function(){return this
|
|
619
|
-
r.Nb=function(){if(this.i){if(!this.
|
|
620
|
-
r.gf=function(){return this.A?this.A.gf():[]};r.
|
|
621
|
-
r.
|
|
622
|
-
r
|
|
618
|
+
r.Zb=function(){return this.G};r.yc=function(){return this.$};r.qg=function(){return this.B?this.B:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};r.ec=function(){return this.i?this.i.presentationTimeline.ec():!1};r.ai=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};
|
|
619
|
+
r.Nb=function(){if(this.i){if(!this.hb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.$b(),end:a.ub()}}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.Yh=function(){this.U()&&(this.h.currentTime=this.Nb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.ld=function(){return this.A?this.A.ld():Infinity};
|
|
620
|
+
r.gf=function(){return this.A?this.A.gf():[]};r.Xd=function(){return this.A?this.A.Xd():{}};r.nf=function(){return this.L?this.L.g==Pf:!1};r.$a=function(){return this.h?this.H?this.H.i:1:0};
|
|
621
|
+
r.Ed=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.Ka.ob(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Ho&&(this.o.playbackRateChanged(a),Fl(this.j,1<Math.abs(a))),this.U()&&this.Ka.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Nb(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.ad():Math.floor(c)<=Math.floor(d.start+e)&&b.ad()}))};
|
|
622
|
+
r.ad=function(){var a=this.H.Xb();this.l==Uo&&this.H.set(a);this.l==Ho&&(this.H.set(a),this.o.playbackRateChanged(a),Fl(this.j,!1));this.Ka.ob()};
|
|
623
623
|
r.cc=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,mf(e)){var f=df(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 lf(g)}):[]};
|
|
624
|
-
r.zc=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=ef(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Wo(this).map(function(f){return jf(f)}):[]};r.Dh=function(){var a=this.
|
|
625
|
-
r.wh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Ho&&b.l!=Uo)return g.return(null);c=b.
|
|
624
|
+
r.zc=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=ef(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Wo(this).map(function(f){return jf(f)}):[]};r.Dh=function(){var a=this.vd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ff(b)})};
|
|
625
|
+
r.wh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Ho&&b.l!=Uo)return g.return(null);c=b.vd;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.wc(function(h){var k=bp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Ub;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.wg(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
626
626
|
function bp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Ub:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
627
|
-
r.wg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y;return O(function(
|
|
628
|
-
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.Ub*m,A=Math.floor(z/h.Ub)*n);B=!1;if(y=g.s)B=!0,n=y.height,w=y.positionX,A=y.positionY,m=y.width;return
|
|
627
|
+
r.wg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y;return O(function(C){if(1==C.g){if(c.l!=Ho&&c.l!=Uo)return C.return(null);d=c.vd;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=bp(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.Ub;n=l/h.rows;p=h.Ub*h.rows;q=g.i-g.startTime;
|
|
628
|
+
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.Ub*m,A=Math.floor(z/h.Ub)*n);B=!1;if(y=g.s)B=!0,n=y.height,w=y.positionX,A=y.positionY,m=y.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.M(),width:m,sprite:B})})};
|
|
629
629
|
r.Ng=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&&($k(this.s.h,b,!1),Il(this.j,b),cp(this),this.Wa=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Wo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,gf(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";cp(this)}};
|
|
630
630
|
r.Nf=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&&mf(d)&&(Fo(this,d,!1,b,c),this.Ja=new Df(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),yo(this))}else if(this.h&&this.h.audioTracks)for(b=
|
|
631
631
|
Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,gf(c)==a.id){dp(this,c);break}};r.yh=function(){return ep(this.cc())};r.Rh=function(){return ep(this.zc())};r.xh=function(){return Array.from(fp(this.cc()))};r.Qh=function(){return Array.from(fp(this.zc()))};
|
|
632
632
|
r.Mg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.Ja=new Ef(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.Ja.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
633
|
-
b))c=f;c?(a=df(c),this.Nf(a,!0,d)):zo(this)}else this.h&&this.h.audioTracks&&(d=of(this.cc(),a,b||"",!1)[0])&&this.Nf(d)};r.Mf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Wa=a,this.
|
|
633
|
+
b))c=f;c?(a=df(c),this.Nf(a,!0,d)):zo(this)}else this.h&&this.h.audioTracks&&(d=of(this.cc(),a,b||"",!1)[0])&&this.Nf(d)};r.Mf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Wa=a,this.rd=b||"",this.od=c,(a=of(this.i.textStreams,this.Wa,this.rd,this.od)[0]||null)&&a!=this.j.s&&($k(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.pf()))Il(this.j,a),cp(this)}else(a=of(this.zc(),a,b||"",c)[0])&&this.Ng(a)};
|
|
634
634
|
r.Ii=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.Ja=new Ef(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),zo(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&dp(this,b)}};
|
|
635
635
|
r.pf=function(){var a=this.da;return this.F&&this.l==Ho?this.F.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Wo(this).some(function(b){return"showing"==b.mode}):a};r.sg=function(){return this.h&&this.h.src&&this.h.textTracks?gp(this).map(function(a){return jf(a)}):[]};
|
|
636
636
|
r.zh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=xe(a),c=gp(this).filter(function(h){return xe(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
637
637
|
function Wo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Zo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function gp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
638
|
-
r.Tg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Ho)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=of(this.i.textStreams,this.Wa,this.
|
|
639
|
-
r.Mh=function(){if(this.C)var a=this.C.
|
|
640
|
-
r
|
|
638
|
+
r.Tg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Ho)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=of(this.i.textStreams,this.Wa,this.rd,this.od),0<a.length&&(Il(this.j,a[0]),cp(this))):El(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Wo(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")}Po(this)}};
|
|
639
|
+
r.Mh=function(){if(this.C)var a=this.C.Pd();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.vg=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};
|
|
640
|
+
r.$d=function(){return this.U()?this.i?this.i.presentationTimeline.$d():null:null};r.sb=function(){if(this.l==Ho)return this.F.sb();var a={total:[],audio:[],video:[],text:[]};this.l==Uo&&(a.total=Ki(this.h.buffered));return a};
|
|
641
641
|
r.getStats=function(){if(this.l!=Ho&&this.l!=Uo)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:[]};Co(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
|
|
642
642
|
this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.dg(),this.s.N=this.C.eg());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.A?(c=this.A,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==Ho){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||
|
|
643
|
-
NaN,b.o=c.video.width||NaN,b.l=d);this.
|
|
644
|
-
f=t(f.h.g);for(var K=f.next();!K.done;K=f.next())K=K.value,
|
|
645
|
-
switchHistory:
|
|
646
|
-
r.ih=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,B;return O(function(y){switch(y.g){case 1:if(h.l!=Ho&&h.l!=Uo)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){y.u(2);break}return E(y,hp(h,a),3);case 3:d=y.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=Uo){y.u(4);break}g&&(c="forced");return E(y,ip(h,a,b,c,d,f||"",k),5);case 5:l=xe(b);m=h.zc();if(n=m.find(function(
|
|
647
|
-
l&&
|
|
643
|
+
NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.vg().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==Uo&&(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.L,l=f.A,m=f.i,n=f.m,p=f.F,q=f.j,u=Xk(f.g,"playing"),v=Xk(f.g,"paused"),w=Xk(f.g,"buffering"),A=f.s,z=f.C,B=f.G,y=f.Qd,C=Yk(f.g),D=[];
|
|
644
|
+
f=t(f.h.g);for(var K=f.next();!K.done;K=f.next())K=K.value,D.push({timestamp:K.timestamp,id:K.id,type:K.type,fromAdaptation:K.fromAdaptation,bandwidth:K.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:B,bytesDownloaded:y,stateHistory:C,
|
|
645
|
+
switchHistory:D}};
|
|
646
|
+
r.ih=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,B;return O(function(y){switch(y.g){case 1:if(h.l!=Ho&&h.l!=Uo)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){y.u(2);break}return E(y,hp(h,a),3);case 3:d=y.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=Uo){y.u(4);break}g&&(c="forced");return E(y,ip(h,a,b,c,d,f||"",k),5);case 5:l=xe(b);m=h.zc();if(n=m.find(function(C){return xe(C.language)==
|
|
647
|
+
l&&C.label==(f||"")&&C.kind==c}))return xo(h),y.return(n);throw new T(1,2,2012);case 4:p=Qd;q=h.h.duration;h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new T(1,4,4033);if(!k.length){y.u(6);break}return E(y,jp(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=y.h,v=kp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Nj(w),d="text/vtt";case 6:A={id:h.Zf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Qk(0,q,[a]),mimeType:d||"",
|
|
648
648
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Sd(d||"",e||"")])};z=Sd(A.mimeType,A.codecs);B=ke(z);if(!B)throw new T(2,2,2014,d);h.i.textStreams.push(A);xo(h);return y.return(ef(A))}})};
|
|
649
649
|
r.jh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z;return O(function(B){switch(B.g){case 1:if(c.l!=Ho&&c.l!=Uo)throw new T(1,7,7004);if(b){B.u(2);break}return E(B,hp(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Qd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return E(B,jp(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=B.h;g=me[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
650
|
-
vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p={};q=t(m);for(u=q.next();!u.done;p={
|
|
650
|
+
vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p={};q=t(m);for(u=q.next();!u.done;p={Xc:p.Xc,Rb:p.Rb},u=q.next())p.Rb=u.value,p.Xc=null,v=function(y){return function(){null==y.Xc&&(y.Xc=Gd([a],[y.Rb.payload]));return y.Xc||[]}}(p),w=new zi(p.Rb.startTime,p.Rb.endTime,v,0,null,null,0,0,Infinity),p.Rb.payload.includes("#xywh")&&(A=p.Rb.payload.split("#xywh=")[1].split(","),4===A.length&&w.Ug({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
651
651
|
n.push(w);z={id:c.Zf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ok(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Ie,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Sd(b||
|
|
652
|
-
"","")])};c.l==Uo?c.
|
|
652
|
+
"","")])};c.l==Uo?c.vd.push(z):c.i.imageStreams.push(z);xo(c);return B.return(ff(z))}})};
|
|
653
653
|
r.hh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Ho&&d.l!=Uo)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,hp(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),E(k,ip(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.sg();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.sa(f,"load",l);d.m.sa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return xo(d),k.return(h);case 5:throw new T(1,
|
|
654
654
|
2,2012);}})};function hp(a,b){var c;return O(function(d){switch(d.g){case 1:return ta(d,2),E(d,Ym(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:xa(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
655
655
|
function ip(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,jp(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=kp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Nj(l),e="text/vtt");m=document.createElement("track");var p=a.N,q=b;try{if(p.g.enabled){var u=wn(p);u.ot=Jn;u.su=!0;var v=An(u);var w=Bn(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")||
|
|
656
656
|
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function jp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=rg;f=lg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Cn(k,f,{ot:Jn,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)})}
|
|
657
|
-
function kp(a,b,c,d){var e=me[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Bb(b),b=c.parseMedia(b,a,null),sn(b,d);throw new T(2,2,2014,c);}r.Ni=function(a,b){this.ca.width=a;this.ca.height=b};r.If=function(a){if(this.l==Ho){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.
|
|
657
|
+
function kp(a,b,c,d){var e=me[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Bb(b),b=c.parseMedia(b,a,null),sn(b,d);throw new T(2,2,2014,c);}r.Ni=function(a,b){this.ca.width=a;this.ca.height=b};r.If=function(a){if(this.l==Ho){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.qd||d.Ra||d.xb||(d.qd=!1,Dl(b,d,a));b=!0}}else b=!1;return b};
|
|
658
658
|
r.hf=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.Hh=function(){return this.Xa};
|
|
659
|
-
function Wn(a){var b=mm();b.streaming.failureCallback=function(c){if(a.
|
|
659
|
+
function Wn(a){var b=mm();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.If(d))}};b.textDisplayFactory=function(){if(a.ee){var c=a.getConfiguration();return new jn(a.h,a.ee,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new cn(a.h,"Shaka Player TextTrack"):new fn};return b}r.Xg=function(a){this.ee=a};
|
|
660
660
|
function vo(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 Rk,l=e.closedCaptions.get(g);h={id:a.Zf++,originalId:g,groupId:null,
|
|
661
661
|
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:Od,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([Sd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
662
662
|
function No(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)})}
|
|
663
663
|
function lo(a){var b=a.nf();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Tk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Co(a)}b=(new Map).set("buffering",b);a.dispatchEvent(eo("buffering",b))}function Do(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=eo("ratechange"),a.dispatchEvent(b))}
|
|
664
664
|
function Co(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Pf?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(eo("statechanged",c)))}}
|
|
665
|
-
function Ro(a){var b=a.h.playbackRate,c=a.
|
|
665
|
+
function Ro(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.rg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Ed(d):1==e&&b!==a.H.Xb()&&a.ad()}if(c&&(e=a.Nb(),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?
|
|
666
666
|
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-
|
|
667
|
-
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==Uo){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.L.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.
|
|
668
|
-
d>f?b!=g&&a.
|
|
669
|
-
function yo(a){try{oi(a.
|
|
670
|
-
function ao(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.
|
|
667
|
+
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==Uo){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.L.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.Ed(k):f&&g&&c-
|
|
668
|
+
d>f?b!=g&&a.Ed(g):h&&k&&c-d<h?b!=k&&a.Ed(k):b!==a.H.Xb()&&a.ad()}}function So(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.T)?(a.T=c,b=!0):(c=Math.max(a.T,c),a.T!=c&&(a.T=c,b=!0)));if(b){var d;0==a.T?d=eo("started"):25==a.T?d=eo("firstquartile"):50==a.T?d=eo("midpoint"):75==a.T?d=eo("thirdquartile"):100==a.T&&(d=eo("complete"));d&&a.dispatchEvent(d)}}}
|
|
669
|
+
function yo(a){try{oi(a.de,a.i)}catch(c){return jo(a,c),!1}var b=nf(a.i.variants);b=a.Ja.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Jo(a,b){b=void 0===b?!1:b;return yo(a)?a.o.chooseVariant(b):null}
|
|
670
|
+
function ao(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.ne.stop();d&&zo(a,!0,void 0,!1,!1)}
|
|
671
671
|
function zo(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=Jo(a);f&&Fo(a,f,e,b,c,d)}function Fo(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Hl(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}));Hl(a.j,b,d,e,f,c);d=null;g&&(d=df(g));b=df(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Dj(a.K,b,a.jf()),c=eo("adaptation",c),lp(a,c)):mp(a,d,b)}}
|
|
672
672
|
function dp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=lf(c),b=lf(b),mp(a,c,b))}function Oo(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=xe(a.g.preferredTextLanguage);c=xe(c.language);if(2==a.g.autoShowText)return we(c,d);if(3==a.g.autoShowText)return a=xe(b.language),we(c,d)&&!we(a,c);ab("Invalid autoShowText setting!");return!1}function xo(a){var b=eo("trackschanged");lp(a,b)}
|
|
673
|
-
function mp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Dj(a.K,c,a.jf());c=eo("variantchanged",b);lp(a,c)}function cp(a){var b=eo("textchanged");lp(a,b)}function Po(a){var b=eo("texttrackvisibility");lp(a,b)}function Qo(a){a.g.abr.enabled||$n(a);var b=(new Map).set("newStatus",a.g.abr.enabled);lp(a,eo("abrstatuschanged",b))}function $n(a,b){b=void 0===b?!0:b;if(a.l==Ho){a.
|
|
674
|
-
r.
|
|
675
|
-
function jo(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==fo)return f.return();c=!0;if(!(a.
|
|
673
|
+
function mp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Dj(a.K,c,a.jf());c=eo("variantchanged",b);lp(a,c)}function cp(a){var b=eo("textchanged");lp(a,b)}function Po(a){var b=eo("texttrackvisibility");lp(a,b)}function Qo(a){a.g.abr.enabled||$n(a);var b=(new Map).set("newStatus",a.g.abr.enabled);lp(a,eo("abrstatuschanged",b))}function $n(a,b){b=void 0===b?!0:b;if(a.l==Ho){a.ne.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&yo(a)}}
|
|
674
|
+
r.Wd=function(a,b){if(!this.g.abr.enabled||this.l===fo||!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.ne.Ua(1);b=this.sb().video.reduce(function(f,g){return f+g.end-g.start},0);zo(this,!0,b,!0,!1);return!0}return!1};
|
|
675
|
+
function jo(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==fo)return f.return();c=!0;if(!(a.hb&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ta(f,3);return E(f,am(a.j),5);case 5:d=f.h;c=!d;wa(f,2);break;case 3:xa(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&$n(a,!1);e=eo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);G(f)}})}
|
|
676
676
|
function wo(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(eo(b,a))}function io(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)}
|
|
677
|
-
function Eo(a,b,c){0<b&&(a.
|
|
677
|
+
function Eo(a,b,c){0<b&&(a.U()||a.Wg(b));b=a.getDuration();c<b&&(a.U()||a.Ta(c))}function lp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=fo&&a.dispatchEvent(b);G(c)})}function fp(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(xe(c.language)):b.add("und");return b}
|
|
678
678
|
function ep(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=xe(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));
|
|
679
679
|
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Xg;X.prototype.getManifestParserFactory=X.prototype.Hh;X.prototype.getManifest=X.prototype.hf;X.prototype.retryStreaming=X.prototype.If;X.prototype.setMaxHardwareResolution=X.prototype.Ni;X.prototype.addChaptersTrack=X.prototype.hh;X.prototype.addThumbnailsTrack=X.prototype.jh;X.prototype.addTextTrackAsync=X.prototype.ih;X.prototype.getStats=X.prototype.getStats;
|
|
680
|
-
X.prototype.getBufferedInfo=X.prototype.sb;X.prototype.getSegmentAvailabilityDuration=X.prototype
|
|
680
|
+
X.prototype.getBufferedInfo=X.prototype.sb;X.prototype.getSegmentAvailabilityDuration=X.prototype.$d;X.prototype.getPresentationStartTimeAsDate=X.prototype.vg;X.prototype.getPlayheadTimeAsDate=X.prototype.Mh;X.prototype.setTextTrackVisibility=X.prototype.Tg;X.prototype.getChapters=X.prototype.zh;X.prototype.getChaptersTracks=X.prototype.sg;X.prototype.isTextTrackVisible=X.prototype.pf;X.prototype.selectVariantsByLabel=X.prototype.Ii;X.prototype.selectTextLanguage=X.prototype.Mf;
|
|
681
681
|
X.prototype.selectAudioLanguage=X.prototype.Mg;X.prototype.getTextLanguages=X.prototype.Qh;X.prototype.getAudioLanguages=X.prototype.xh;X.prototype.getTextLanguagesAndRoles=X.prototype.Rh;X.prototype.getAudioLanguagesAndRoles=X.prototype.yh;X.prototype.selectVariantTrack=X.prototype.Nf;X.prototype.selectTextTrack=X.prototype.Ng;X.prototype.getThumbnails=X.prototype.wg;X.prototype.getAllThumbnails=X.prototype.wh;X.prototype.getImageTracks=X.prototype.Dh;X.prototype.getTextTracks=X.prototype.zc;
|
|
682
|
-
X.prototype.getVariantTracks=X.prototype.cc;X.prototype.cancelTrickPlay=X.prototype
|
|
683
|
-
X.prototype.isAudioOnly=X.prototype.ai;X.prototype.isInProgress=X.prototype.ec;X.prototype.isLive=X.prototype.
|
|
682
|
+
X.prototype.getVariantTracks=X.prototype.cc;X.prototype.cancelTrickPlay=X.prototype.ad;X.prototype.trickPlay=X.prototype.Ed;X.prototype.getPlaybackRate=X.prototype.$a;X.prototype.isBuffering=X.prototype.nf;X.prototype.getKeyStatuses=X.prototype.Xd;X.prototype.getActiveSessionsMetadata=X.prototype.gf;X.prototype.getExpiration=X.prototype.ld;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Yh;X.prototype.seekRange=X.prototype.Nb;
|
|
683
|
+
X.prototype.isAudioOnly=X.prototype.ai;X.prototype.isInProgress=X.prototype.ec;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.qg;X.prototype.getAssetUri=X.prototype.yc;X.prototype.getNetworkingEngine=X.prototype.Zb;X.prototype.getMediaElement=X.prototype.Jh;X.prototype.getManifestType=X.prototype.jf;X.prototype.getLoadMode=X.prototype.Gh;X.prototype.resetConfiguration=X.prototype.Ci;X.prototype.getBufferFullness=X.prototype.rg;X.prototype.getNonDefaultConfiguration=X.prototype.Kh;
|
|
684
684
|
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.yi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.mg;X.prototype.unloadAndSavePreload=X.prototype.Qi;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Ui;X.prototype.unload=X.prototype.nc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.nh;X.prototype.attach=X.prototype.tc;
|
|
685
|
-
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,di(),3);case 3:b=k.h;case 2:var l={};if(
|
|
686
|
-
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=ke(n)?!0:
|
|
687
|
-
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Vc("Trident/"))return!1;var a=hd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:
|
|
688
|
-
X.registerSupportPlugin=function(a,b){np[a]=b};X.prototype.destroy=X.prototype.destroy;var fo=0,Vn=1,Ho=2,Uo=3;X.LoadMode={DESTROYED:fo,NOT_LOADED:Vn,MEDIA_SOURCE:Ho,SRC_EQUALS:Uo};X.version="v4.9.
|
|
685
|
+
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,di(),3);case 3:b=k.h;case 2:var l={};if(Oc())for(var m in si)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]=Oc()?!!si[n]:Qc(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(Td));
|
|
686
|
+
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=ke(n)?!0:Oc()?mb(n)||(mc(n)?!0:!1):Qc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,md(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=np;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
687
|
+
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Vc("Trident/"))return!1;var a=hd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Oc()?!0:Qc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Zn=a};
|
|
688
|
+
X.registerSupportPlugin=function(a,b){np[a]=b};X.prototype.destroy=X.prototype.destroy;var fo=0,Vn=1,Ho=2,Uo=3;X.LoadMode={DESTROYED:fo,NOT_LOADED:Vn,MEDIA_SOURCE:Ho,SRC_EQUALS:Uo};X.version="v4.9.10";var op=["4","9"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(op[0]),Number(op[1])));var np={},Zn=null;function pp(){this.h=[];this.j=this.i=this.g=0};function qp(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=qp.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};
|
|
689
689
|
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)};
|
|
690
690
|
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)};
|
|
691
691
|
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()};
|
|
692
692
|
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",qp);qp.prototype.release=qp.prototype.release;
|
|
693
693
|
qp.prototype.getPodIndex=qp.prototype.getPodIndex;qp.prototype.getTimeOffset=qp.prototype.getTimeOffset;qp.prototype.getMediaUrl=qp.prototype.getMediaUrl;qp.prototype.getAdvertiserName=qp.prototype.getAdvertiserName;qp.prototype.getCreativeAdId=qp.prototype.getCreativeAdId;qp.prototype.getAdId=qp.prototype.getAdId;qp.prototype.getVastMediaWidth=qp.prototype.getVastMediaWidth;qp.prototype.getVastMediaHeight=qp.prototype.getVastMediaHeight;qp.prototype.getVastMediaBitrate=qp.prototype.getVastMediaBitrate;
|
|
694
694
|
qp.prototype.getDescription=qp.prototype.getDescription;qp.prototype.getTitle=qp.prototype.getTitle;qp.prototype.getPositionInSequence=qp.prototype.getPositionInSequence;qp.prototype.getSequenceLength=qp.prototype.getSequenceLength;qp.prototype.setMuted=qp.prototype.setMuted;qp.prototype.resize=qp.prototype.resize;qp.prototype.isLinear=qp.prototype.isLinear;qp.prototype.isMuted=qp.prototype.isMuted;qp.prototype.setVolume=qp.prototype.setVolume;qp.prototype.getVolume=qp.prototype.getVolume;
|
|
695
|
-
qp.prototype.play=qp.prototype.play;qp.prototype.pause=qp.prototype.pause;qp.prototype.skip=qp.prototype.skip;qp.prototype.canSkipNow=qp.prototype.canSkipNow;qp.prototype.getTimeUntilSkippable=qp.prototype.getTimeUntilSkippable;qp.prototype.isSkippable=qp.prototype.isSkippable;qp.prototype.isPaused=qp.prototype.isPaused;qp.prototype.getRemainingTime=qp.prototype.getRemainingTime;qp.prototype.getMinSuggestedDuration=qp.prototype.getMinSuggestedDuration;qp.prototype.getDuration=qp.prototype.getDuration;function rp(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.
|
|
695
|
+
qp.prototype.play=qp.prototype.play;qp.prototype.pause=qp.prototype.pause;qp.prototype.skip=qp.prototype.skip;qp.prototype.canSkipNow=qp.prototype.canSkipNow;qp.prototype.getTimeUntilSkippable=qp.prototype.getTimeUntilSkippable;qp.prototype.isSkippable=qp.prototype.isSkippable;qp.prototype.isPaused=qp.prototype.isPaused;qp.prototype.getRemainingTime=qp.prototype.getRemainingTime;qp.prototype.getMinSuggestedDuration=qp.prototype.getMinSuggestedDuration;qp.prototype.getDuration=qp.prototype.getDuration;function rp(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.10");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
696
696
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){sp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){tp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.sa(this.i,"play",function(){f.F=!0})}rp.prototype.configure=function(a){this.s=a};rp.prototype.stop=function(){this.g&&this.g.stop();this.o&&hn(this.o)};
|
|
697
697
|
rp.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 tp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));up(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
698
698
|
function sp(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",
|
|
@@ -711,9 +711,9 @@ r.isLinear=function(){return this.m};r.resize=function(){};r.setMuted=function(a
|
|
|
711
711
|
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",yp);yp.prototype.release=yp.prototype.release;yp.prototype.getPodIndex=yp.prototype.getPodIndex;yp.prototype.getTimeOffset=yp.prototype.getTimeOffset;yp.prototype.getMediaUrl=yp.prototype.getMediaUrl;yp.prototype.getAdvertiserName=yp.prototype.getAdvertiserName;
|
|
712
712
|
yp.prototype.getCreativeAdId=yp.prototype.getCreativeAdId;yp.prototype.getAdId=yp.prototype.getAdId;yp.prototype.getVastMediaWidth=yp.prototype.getVastMediaWidth;yp.prototype.getVastMediaHeight=yp.prototype.getVastMediaHeight;yp.prototype.getVastMediaBitrate=yp.prototype.getVastMediaBitrate;yp.prototype.getDescription=yp.prototype.getDescription;yp.prototype.getTitle=yp.prototype.getTitle;yp.prototype.getPositionInSequence=yp.prototype.getPositionInSequence;yp.prototype.getSequenceLength=yp.prototype.getSequenceLength;
|
|
713
713
|
yp.prototype.setMuted=yp.prototype.setMuted;yp.prototype.resize=yp.prototype.resize;yp.prototype.isLinear=yp.prototype.isLinear;yp.prototype.isMuted=yp.prototype.isMuted;yp.prototype.setVolume=yp.prototype.setVolume;yp.prototype.getVolume=yp.prototype.getVolume;yp.prototype.play=yp.prototype.play;yp.prototype.pause=yp.prototype.pause;yp.prototype.skip=yp.prototype.skip;yp.prototype.canSkipNow=yp.prototype.canSkipNow;yp.prototype.getTimeUntilSkippable=yp.prototype.getTimeUntilSkippable;
|
|
714
|
-
yp.prototype.isSkippable=yp.prototype.isSkippable;yp.prototype.isPaused=yp.prototype.isPaused;yp.prototype.getRemainingTime=yp.prototype.getRemainingTime;yp.prototype.getMinSuggestedDuration=yp.prototype.getMinSuggestedDuration;yp.prototype.getDuration=yp.prototype.getDuration;function zp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.
|
|
715
|
-
zp.prototype.release=function(){this.stop();this.o&&this.o.release()};zp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(Bp(this,this.G,this.
|
|
716
|
-
function Cp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=lg([b],Sf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=vd(e)),f=a.K.request(7,d),ta(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=od(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new sc(b),m=new sc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.
|
|
714
|
+
yp.prototype.isSkippable=yp.prototype.isSkippable;yp.prototype.isPaused=yp.prototype.isPaused;yp.prototype.getRemainingTime=yp.prototype.getRemainingTime;yp.prototype.getMinSuggestedDuration=yp.prototype.getMinSuggestedDuration;yp.prototype.getDuration=yp.prototype.getDuration;function zp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.W=NaN;this.i=d;this.J=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new hb}zp.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);Ap(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
715
|
+
zp.prototype.release=function(){this.stop();this.o&&this.o.release()};zp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(Bp(this,this.G,this.T),this.T=!1)};zp.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};
|
|
716
|
+
function Cp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=lg([b],Sf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=vd(e)),f=a.K.request(7,d),ta(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=od(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new sc(b),m=new sc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.W,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),q=new sc(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
717
717
|
return wa(u,0)}xa(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;G(u)})}
|
|
718
718
|
function Bp(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=lg([b],Sf()),e=a.K.request(7,d),ta(z,2),E(z,e.promise,4);if(2!=z.g){f=z.h;g=[];h=od(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,Dp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
|
|
719
719
|
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Ap(a),a.j=[];c&&(a.J||0<g.length)&&Ep(a);return wa(z,0)}xa(z);G(z)})}
|
|
@@ -742,10 +742,10 @@ this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new
|
|
|
742
742
|
f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=Lp.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};
|
|
743
743
|
function Mp(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(){dg.call(this);this.g=this.h=this.i=null;this.j=new pp;this.m=navigator.language;this.l=null}pa(Y,dg);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 rp(a,b,this.m,c,function(e){return Np(d,e)});this.i.configure(this.l)};
|
|
744
744
|
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);dg.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 pp};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)};
|
|
745
|
-
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 zp(a,b,c,function(e){return Np(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 Uf,Cp(d,a,b),d.H=c||"",d.
|
|
745
|
+
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 zp(a,b,c,function(e){return Np(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 Uf,Cp(d,a,b),d.H=c||"",d.W=Date.now()/1E3,a=d.l);return a};
|
|
746
746
|
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 Lp(a,b,this.m,function(d){return Np(c,d)});this.g.configure(this.l)};
|
|
747
|
-
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.
|
|
748
|
-
(c.G=!0),c.j=new Uf,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.
|
|
747
|
+
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.10";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
748
|
+
(c.G=!0),c.j=new Uf,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.10";this.g.g.replaceAdTagParameters(a)};
|
|
749
749
|
r.getServerSideCuePoints=function(){rb("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)};
|
|
750
750
|
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)};
|
|
751
751
|
function Np(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;
|
|
@@ -759,8 +759,8 @@ function Qp(a){return{length:a.length,start:function(b){return a.start[b]},end:f
|
|
|
759
759
|
var Rp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Sp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Tp=["loop","playbackRate"],Up=["pause","play"],Vp={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
760
760
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Wp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Xp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Yp=[["getConfiguration","configure"]],Zp=[["isTextTrackVisible","setTextTrackVisibility"]],$p="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
761
761
|
aq=["attach","attachCanvas","detach","load","unload"];function bq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Nc(b);this.L=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 cq(h)};this.C=function(k,l){k=Pp(l);switch(k.type){case "event":var m=k.targetName,n=bg(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
|
|
762
|
-
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;dq.add(this)}r=bq.prototype;r.destroy=function(){dq.delete(this);eq(this);fq&&gq(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
|
|
763
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.mc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(dq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Uf;d.s=!0;hq(d,e)}},function(b){for(var c=t(dq),d=c.next();!d.done;d=c.next())d=d.value,iq="available"==b,d.l.mc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});iq&&this.l.
|
|
762
|
+
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;dq.add(this)}r=bq.prototype;r.destroy=function(){dq.delete(this);eq(this);fq&&gq(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.ab=function(){return this.h};r.Gf=function(){return this.J};
|
|
763
|
+
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.mc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(dq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Uf;d.s=!0;hq(d,e)}},function(b){for(var c=t(dq),d=c.next();!d.done;d=c.next())d=d.value,iq="available"==b,d.l.mc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});iq&&this.l.X(jq);(a=fq)&&
|
|
764
764
|
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Uf,this.s=!0,hq(this,a)):fq=null}else window.__onGCastApiAvailable!==kq&&(lq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=kq)};r.Of=function(a){this.o=a;this.h&&mq(this,{type:"appData",appData:this.o})};
|
|
765
765
|
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!iq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Uf;chrome.cast.requestSession(function(c){return hq(a,c)},function(c){return nq(a,c)});return E(b,a.j,0)})};function oq(a){a.h&&chrome.cast.requestSession(function(b){return hq(a,b)},function(b){return nq(a,b)})}r.xc=function(){if(this.h){eq(this);if(fq){gq(this);try{fq.stop(function(){},function(){})}catch(a){}fq=null}cq(this)}};
|
|
766
766
|
r.get=function(a,b){var c=this;if("video"==a){if(Up.includes(b))return function(){return c.Kg.apply(c,[a,b].concat(x(La.apply(0,arguments))))}}else if("player"==a){if(Xp[b]&&!this.get("player","isLive")())return function(){};if($p.includes(b))return function(){return c.Kg.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(aq.includes(b))return function(){return c.zi.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(Vp[b]||Wp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
@@ -768,30 +768,30 @@ r.set=function(a,b,c){this.g[a][b]=c;mq(this,{type:"set",targetName:a,property:b
|
|
|
768
768
|
r.Kg=function(a,b){mq(this,{type:"call",targetName:a,methodName:b,args:La.apply(2,arguments)})};r.zi=function(a,b){var c=La.apply(2,arguments),d=new Uf,e=this.H.toString();this.H++;this.i[e]=d;try{mq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function gq(a){var b=fq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
769
769
|
function cq(a){var b=fq?"connected"==fq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};eq(a)}a.h=b;a.J=b?fq.receiver.friendlyName:"";a.l.mc()}function eq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function mq(a,b){b=Op(b);var c=fq;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.xc(),b;}}var jq=.02,iq=!1,fq=null,lq=null,dq=new Set;
|
|
770
770
|
function kq(a){lq?window.__onGCastApiAvailable=lq:delete window.__onGCastApiAvailable;lq=null;if(a)for(var b=t(dq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function pq(a,b,c,d){d=void 0===d?!1:d;dg.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 bq(c,function(){return qq(e)},function(){return rq(e)},function(f,g){return sq(e,f,g)},function(){return tq(e)},function(){return uq(e)},d);vq(this)}pa(pq,dg);r=pq.prototype;
|
|
771
|
-
r.destroy=function(a){a&&this.g.xc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;dg.prototype.release.call(this);return Promise.all(a)};r.Wh=function(){return this.l};r.Lh=function(){return this.s};r.oh=function(){return this.g.m&&iq};r
|
|
771
|
+
r.destroy=function(a){a&&this.g.xc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;dg.prototype.release.call(this);return Promise.all(a)};r.Wh=function(){return this.l};r.Lh=function(){return this.s};r.oh=function(){return this.g.m&&iq};r.ab=function(){return this.g.ab()};r.Gf=function(){return this.g.Gf()};
|
|
772
772
|
r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.nc(),0):b.return()})};r.Of=function(a){this.g.Of(a)};r.Pi=function(){oq(this.g)};r.xc=function(){this.g.xc()};
|
|
773
773
|
r.ph=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.xc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new bq(a,function(){return qq(c)},function(){return rq(c)},function(e,f){return sq(c,e,f)},function(){return tq(c)},function(){return uq(c)},b);c.g.init();G(d)})};
|
|
774
|
-
function vq(a){a.g.init();a.m=new hb;for(var b=t(Rp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g
|
|
775
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return yq(a,f)}})});zq(a);a.j=new dg;a.j.
|
|
774
|
+
function vq(a){a.g.init();a.m=new hb;for(var b=t(Rp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.ab()||(f=bg(f),a.j.dispatchEvent(f))});for(var d in cg)a.m.D(a.h,cg[d],function(f){a.g.ab()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Qc=e,Object.defineProperty(a.l,b.Qc,{configurable:!1,enumerable:!0,get:function(f){return function(){return wq(a,f.Qc)}}(b),set:function(f){return function(g){var h=f.Qc;a.g.ab()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Qc:b.Qc};a.s={};xq(a,
|
|
775
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return yq(a,f)}})});zq(a);a.j=new dg;a.j.pe=a.l;a.o=new dg;a.o.pe=a.s}function zq(a){var b=new Map;xq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
776
776
|
function xq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
777
777
|
function uq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.yc(),startTime:null};a.i.pause();for(var c=t(Tp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(Yp);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Zp);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function qq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
|
|
778
778
|
function rq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
779
779
|
function tq(a){for(var b=t(Yp),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(Tp);for(d=c.next();!d.done;d=c.next())d=
|
|
780
780
|
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Tp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Zp);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.Tg(h);g&&a.h.Mf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new U("error",l);a.h.dispatchEvent(l)})}
|
|
781
|
-
function wq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g
|
|
781
|
+
function wq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ab()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ab()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
782
782
|
function yq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Zb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.qg()};
|
|
783
|
-
if("setVideoContainer"==b)return function(c){return a.h.Xg(c)};if(a.g
|
|
784
|
-
function sq(a,b,c){a.g
|
|
783
|
+
if("setVideoContainer"==b)return function(c){return a.h.Xg(c)};if(a.g.ab()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ab()&&0==Object.keys(a.g.g.video).length&&(Vp[b]||Wp[b])||!a.g.ab()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
784
|
+
function sq(a,b,c){a.g.ab()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",pq);pq.prototype.changeReceiverId=pq.prototype.ph;pq.prototype.forceDisconnect=pq.prototype.xc;pq.prototype.suggestDisconnect=pq.prototype.Pi;pq.prototype.setAppData=pq.prototype.Of;pq.prototype.cast=pq.prototype.cast;pq.prototype.receiverName=pq.prototype.Gf;pq.prototype.isCasting=pq.prototype.ab;pq.prototype.canCast=pq.prototype.oh;pq.prototype.getPlayer=pq.prototype.Lh;
|
|
785
785
|
pq.prototype.getVideo=pq.prototype.Wh;pq.prototype.destroy=pq.prototype.destroy;function Aq(a,b,c,d){dg.call(this);var e=this;this.g=a;this.h=b;this.j=new hb;this.H={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Nc(function(){Bq(e)});Cq(this)}pa(Aq,dg);r=Aq.prototype;r.isConnected=function(){return this.F};r.bi=function(){return this.o};r.Li=function(a){this.i=a};r.th=function(){this.i=null};
|
|
786
786
|
r.Mi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Ki=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Ji=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
787
787
|
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,dg.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();G(d)})};
|
|
788
788
|
function Cq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Dq(a)};b.onSenderDisconnected=function(){return Dq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Eq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Eq(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 Fq(a,
|
|
789
789
|
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Gq(a,e)};b.start();b=t(Rp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Hq(a,"video",e)});for(var d in cg)a.j.D(a.h,cg[d],function(e){return Hq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;Iq(a)});a.j.D(a.g,"playing",function(){a.o=!1;Iq(a)});a.j.D(a.g,"pause",function(){Iq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Iq(a)});
|
|
790
|
-
a.j.D(a.g,"ended",function(){(new Nc(function(){a.g&&a.g.ended&&(a.o=!0,Iq(a))})).
|
|
790
|
+
a.j.D(a.g,"ended",function(){(new Nc(function(){a.g&&a.g.ended&&(a.o=!0,Iq(a))})).X(Jq)})}function Dq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Iq(a)}function Iq(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);Kq(a)||Lq(a);G(c)})}
|
|
791
791
|
function Mq(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,ta(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=xa(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);
|
|
792
792
|
a.g.autoplay=f;b.manifest&&(a.g.play(),Lq(a));G(q)}})}function Hq(a,b,c){a.h&&(Bq(a),Eq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
793
|
-
function Bq(a){a.G.
|
|
794
|
-
1);Kq(a)}function Kq(a){return a.A&&(a.g.duration||a.h.
|
|
793
|
+
function Bq(a){a.G.X(Nq);for(var b={video:{},player:{}},c=t(Sp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in Xp)0==a.m%Xp[e]&&(b.player[e]=a.h[e]());for(var f in Vp)0==a.m%Vp[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Eq(a,{type:"update",update:b},a.l);for(var g in Wp)0==a.m%Wp[g]&&(b={player:{}},b.player[g]=a.h[g](),Eq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
794
|
+
1);Kq(a)}function Kq(a){return a.A&&(a.g.duration||a.h.U())?(Oq(a),a.A=!1,!0):!1}function Oq(a,b){var c={contentId:a.h.yc(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Lq(a,void 0===b?0:b,c)}
|
|
795
795
|
function Gq(a,b){var c=Pp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Mq(a,c.initState,c.appData);Bq(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;
|
|
796
796
|
"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 Pq(a,g,f,null)},function(h){return Pq(a,g,f,h)})}}
|
|
797
797
|
function Fq(a,b){var c=Pp(b.data);switch(c.type){case "PLAY":a.g.play();Lq(a);break;case "PAUSE":a.g.pause();Lq(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(),Lq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Lq(a));break;case "STOP":a.h.nc().then(function(){a.h&&Lq(a)});break;case "GET_STATUS":Oq(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));
|
|
@@ -825,10 +825,10 @@ function cs(a,b){var c=[];try{for(;b.la();){var d=Rr(b).value,e=(d&224)>>5,f=d&3
|
|
|
825
825
|
$r.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",$r);Jb=function(){return new $r};function es(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 fs(){this.j=new Map;this.i=this.h=0;this.g=gs}
|
|
826
826
|
fs.prototype.init=function(a){function b(f){f=f.name;f in hs&&(c.g=hs[f])}var c=this,d=[],e=[];(new Eg).box("moov",Jg).box("mvex",Jg).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",Jg).P("tkhd",function(f){f=Xi(f.reader,f.version);d.push(f.trackId)}).box("mdia",Jg).P("mdhd",function(f){f=Vi(f.reader,f.version);e.push(f.timescale)}).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
|
|
827
827
|
b).box("dvh1",b).box("dvhe",b).box("encv",Og).box("sinf",Jg).box("frma",function(f){f=Zi(f.reader).Ga;f in hs&&(c.g=hs[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==gs&&ab("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
828
|
-
fs.prototype.parse=function(a){var b=this;if(this.g==gs)return[];var c=[],d=0,e=[];(new Eg).box("moof",function(f){d=f.start;e=[];Jg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,
|
|
829
|
-
1];f=Ui(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);is(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.
|
|
830
|
-
function is(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Lg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].vh);b.la();){g=b.O();var p=b.R(),q=null;q=!1;h=1;switch(a.g){case js:q=p&31;q=6==q;break;case ks: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].
|
|
831
|
-
c+(n[l].Kf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",fs);var gs=0,js=1,ks=2,hs={avc1:js,avc3:js,hev1:ks,hvc1:ks,dvav:js,dva1:js,dvh1:ks,dvhe:ks};Ib["video/mp4"]=function(){return new fs};function ls(){this.g=null}ls.prototype.init=function(){};ls.prototype.parse=function(a){this.g?this.g.clearData():this.g=new tj;var b=[];a=Bb(a);if(!Aj(a))return b;a=this.g.parse(a);var c=a.
|
|
828
|
+
fs.prototype.parse=function(a){var b=this;if(this.g==gs)return[];var c=[],d=0,e=[];(new Eg).box("moof",function(f){d=f.start;e=[];Jg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,fd:b.h,Vd:b.i,Hg:[],timescale:9E4});Jg(f)}).P("trun",function(f){var g=e[e.length-1];f=Wi(f.reader,f.version,f.flags);g.Hg.push(f)}).P("tfhd",function(f){var g=e[e.length-1];f=Ti(f.reader,f.flags);g.fd=f.fd||b.h;g.Vd=f.Vd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).P("tfdt",function(f){var g=e[e.length-
|
|
829
|
+
1];f=Ui(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);is(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.fd,l.Vd,g,l.Hg,c)}}).parse(a,!1);return c};
|
|
830
|
+
function is(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Lg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].vh);b.la();){g=b.O();var p=b.R(),q=null;q=!1;h=1;switch(a.g){case js:q=p&31;q=6==q;break;case ks: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].we||0),p=(c+p)/d,h=t(es(b.nb(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?
|
|
831
|
+
c+(n[l].Kf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",fs);var gs=0,js=1,ks=2,hs={avc1:js,avc3:js,hev1:ks,hvc1:ks,dvav:js,dva1:js,dvh1:ks,dvhe:ks};Ib["video/mp4"]=function(){return new fs};function ls(){this.g=null}ls.prototype.init=function(){};ls.prototype.parse=function(a){this.g?this.g.clearData():this.g=new tj;var b=[];a=Bb(a);if(!Aj(a))return b;a=this.g.parse(a);var c=a.kd(),d=a.ae();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(es(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
832
832
|
S("shaka.cea.TsCeaParser",ls);Ib["video/mp2t"]=function(){return new ls};function ms(a,b,c){var d=ns(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.Ic});if(1<f.length)throw new T(2,4,4050);f.length&&(g=os(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ic}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ic?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
833
833
|
l.Ic});f.length&&(a=ps(e,k,f,c,h),0==a.length&&(a=[Jd("",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(Jd(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{lg:h,Sj:e,drmInfos:a,Le:g,pg:!0}}
|
|
834
834
|
function qs(a,b,c,d){var e=ms(a,c,d);if(b.pg){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.pg=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.lg||b.lg}
|
|
@@ -842,61 +842,61 @@ if(!a||!b)throw new T(2,4,4051);a=Dd(a.substr(2));if(16!=a.byteLength)throw new
|
|
|
842
842
|
var us=1,vs=(new Map).set("com.widevine.alpha",function(a){var b=eh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ah(b))?b:(a=eh(a.node,"urn:microsoft","laurl"))?yd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",ts).set("com.microsoft.playready.recommendation",ts).set("com.microsoft.playready.software",ts).set("com.microsoft.playready.hardware",ts).set("org.w3.clearkey",function(a){var b=eh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=ah(b))?b:(a=eh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
843
843
|
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=ah(a))?a:""});function xs(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&ab("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
844
844
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
845
|
-
function ys(a,b){var c=zs(a,b,"timescale"),d=1;c&&(d=nh(c)||1);c=zs(a,b,"duration");(c=nh(c||""))&&(c/=d);var e=zs(a,b,"startNumber"),f=Number(zs(a,b,"presentationTimeOffset"))||0,g=oh(e||"");if(null==e||null==g)g=1;e=null;if(b=As(a,b,"SegmentTimeline")){b=$g(b,"S");e=d;a=a.ha.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],q=gh(n,"t",oh),u=gh(n,"d",oh),v=gh(n,"r",mh);n=gh(n,"k",mh)||0;null!=q&&(q-=f);if(
|
|
846
|
-
p)break;else if(q>=p)break;v=Math.ceil((p-q)/u)-1}else{if(Infinity==a)break;else if(q/e>=a)break;v=Math.ceil((a*e-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/e);for(p=0;p<=v;++p)l=q+u,k.push({start:q/e,end:l/e,ag:q,vb:n,Hi:k.length+h}),q=l}e=k}return{timescale:d,Fa:c,
|
|
845
|
+
function ys(a,b){var c=zs(a,b,"timescale"),d=1;c&&(d=nh(c)||1);c=zs(a,b,"duration");(c=nh(c||""))&&(c/=d);var e=zs(a,b,"startNumber"),f=Number(zs(a,b,"presentationTimeOffset"))||0,g=oh(e||"");if(null==e||null==g)g=1;e=null;if(b=As(a,b,"SegmentTimeline")){b=$g(b,"S");e=d;a=a.ha.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],q=gh(n,"t",oh),u=gh(n,"d",oh),v=gh(n,"r",mh);n=gh(n,"k",mh)||0;null!=q&&(q-=f);if(u){q=null!=q?q:l;v=v||0;if(0>v)if(p){p=gh(p,"t",oh);if(null==
|
|
846
|
+
p)break;else if(q>=p)break;v=Math.ceil((p-q)/u)-1}else{if(Infinity==a)break;else if(q/e>=a)break;v=Math.ceil((a*e-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/e);for(p=0;p<=v;++p)l=q+u,k.push({start:q/e,end:l/e,ag:q,vb:n,Hi:k.length+h}),q=l}}e=k}return{timescale:d,Fa:c,Dd:g,Fb:f/d||0,$f:f,timeline:e}}function Bs(a,b){return[b(a.I),b(a.qa),b(a.ta)].filter(ue)}function zs(a,b,c){b=Bs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
847
847
|
function As(a,b,c){b=Bs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=dh(d.value,c));d=b.next());return a}
|
|
848
848
|
function Cs(a,b,c,d,e,f){for(var g=hh(a,"http://www.w3.org/1999/xlink","href"),h=hh(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=Wg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Wf(new T(2,4,4028));if("onLoad"!=h)return Wf(new T(2,4,4027));var p=Gd([d],[g]);return e.request(0,lg(p,b)).xa(function(q){q=Tg(q.data,a.tagName);if(!q)return Wf(new T(2,4,4001,g));for(a.children=
|
|
849
849
|
[];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 Ds(a,b,c,p[0],e,f+1)})}
|
|
850
850
|
function Ds(a,b,c,d,e,f){f=void 0===f?0:f;if(hh(a,"http://www.w3.org/1999/xlink","href")){var g=Cs(a,b,c,d,e,f);c&&(g=g.xa(void 0,function(){return Ds(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(Zg(a)),l=k.next();!l.done;h={rc:h.rc},l=k.next())h.rc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==hh(h.rc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.rc}}(h)):"SegmentTimeline"!=h.rc.tagName&&g.push(Ds(h.rc,b,c,d,e,f));return $f(g).xa(function(){return a})}
|
|
851
851
|
;function Es(a,b,c,d,e,f,g){var h,k=(new Eg).P("sidx",function(l){h=Fs(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
852
|
-
function Fs(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.Hc(),m=g.reader.Hc();g.reader.skip(2);var n=g.reader.ja();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
|
|
852
|
+
function Fs(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.Hc(),m=g.reader.Hc();g.reader.skip(2);var n=g.reader.ja();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 zi(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 Gs(a){this.h=Fb(a);this.g=new Bg(this.h,0)}Gs.prototype.la=function(){return this.g.la()};
|
|
853
853
|
function Hs(a){var b=Is(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=Is(a);a:{d=t(Js);for(var e=d.next();!e.done;e=d.next())if(zb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ra();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.ra()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ra();d=Fb(a.h,a.g.ra(),b);a.g.skip(b);return new Ks(c,
|
|
854
854
|
d)}function Is(a){var b=a.g.ra(),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 Bb(a.h,b,c)}var Js=[[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 Ks(a,b){this.id=a;this.g=b}
|
|
855
|
-
function Ls(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 Ms(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Gs(a.g);for(var n=null,p=null;a.la();){var q=Hs(a);if(187==q.id){var u=Ns(q);u&&(q=c*u.Ti,u=b+u.xi,null!=n&&m.push(new
|
|
855
|
+
function Ls(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 Ms(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Gs(a.g);for(var n=null,p=null;a.la();){var q=Hs(a);if(187==q.id){var u=Ns(q);u&&(q=c*u.Ti,u=b+u.xi,null!=n&&m.push(new zi(n+g,q+g,l,p,u-1,f,g,h,k)),n=q,p=u)}}null!=n&&m.push(new zi(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
856
856
|
function Ns(a){var b=new Gs(a.g);a=Hs(b);if(179!=a.id)throw new T(2,3,3013);a=Ls(a);b=Hs(b);if(183!=b.id)throw new T(2,3,3012);b=new Gs(b.g);for(var c=0;b.la();){var d=Hs(b);if(241==d.id){c=Ls(d);break}}return{Ti:a,xi:c}};function Os(a,b,c){b=As(a,b,"Initialization");if(!b)return null;var d=a.I.Aa(),e=b.attributes.sourceURL;e&&(d=Gd(d,[yd(e)]));e=0;var f=null;if(b=gh(b,"range",lh))e=b.start,f=b.end;c=new xi(function(){return d},e,f,Ps(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
|
|
857
857
|
function Qs(a,b,c){var d=Number(zs(a,Rs,"presentationTimeOffset"))||0,e=zs(a,Rs,"timescale"),f=1;e&&(f=nh(e)||1);var g=d/f||0,h=Os(a,Rs,c);Ss(a,h);var k=Ge(a);return{Wb:function(){var l=As(k,Rs,"RepresentationIndex");var m=k.I.Aa();l&&(l=yd(l.attributes.sourceURL))&&(m=Gd(m,[l]));l=Ts(k);return Us(k,b,h,m,l.start,l.end,g)}}}
|
|
858
|
-
function Us(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
859
|
-
3,3009);H=F.g.byteOffset;F=new Gs(F.g);for(var N=null;F.la();){var L=Hs(F);if(357149030==L.id){N=L;break}}if(!N)throw new T(2,3,3010);N=new Gs(N.g);L=1E6;for(F=null;N.la();){var M=Hs(N);if(2807729==M.id)L=Ls(M);else if(17545==M.id)if(4==M.g.byteLength)F=M.g.getFloat32(0);else if(8==M.g.byteLength)F=M.g.getFloat64(0);else throw new T(2,3,3003);}if(null==F)throw new T(2,3,3011);N=L/1E9;F*=N;L=Hs(new Gs(w));if(475249515!=L.id)throw new T(2,3,3007);H=Ms(L,H,N,F,d,c,B,y,
|
|
860
|
-
|
|
861
|
-
function Ps(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.Ec,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Ws(a,b,c){var d=Os(a,Xs,c),e=Ys(a);if(!e.Fa&&!e.timeline&&1<e.Cc.length)throw new T(2,4,4002);if(!e.Fa&&!a.ha.duration&&!e.timeline&&1==e.Cc.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.ta.id&&a.I.id&&(g=b[a.ta.id+","+a.I.id])&&(f=g.segmentIndex);var h=Zs(a.ha.start,a.ha.duration,a.I.Aa,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.
|
|
862
|
-
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{Wb:function(){f&&0!=f.getNumReferences()||f.
|
|
863
|
-
function Zs(a,b,c,d,e,f,g,h){var k=d.Cc.length;d.timeline&&d.timeline.length!=d.Cc.length&&(k=Math.min(d.timeline.length,d.Cc.length));for(var l=a-d.Fb,m=b?a+b:Infinity,n=[],p=d.startTime,q={},u=0;u<k;q={
|
|
864
|
-
function $s(a){return[a.I.Gb,a.qa.Gb,a.ta.Gb].filter(ue).map(function(b){return $g(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.mf&&(a.mf=!0);var c=yd(b.attributes.media);b=gh(b,"mediaRange",lh,{start:0,end:null});return{ni:c,start:b.start,end:b.end}})};function at(a,b,c,d,e,f,g,h,k){k||a.I.Bc||(a.I.Bc=zs(a,bt,"initialization"));var l=a.I.Bc?ct(a,g):null,m=dt(a);et(m);var n=Ge(a);if(m.
|
|
865
|
-
(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity,v=!(a.rb&&a.ha.
|
|
866
|
-
function dt(a){var b=ys(a,bt),c=zs(a,bt,"media"),d=zs(a,bt,"index");return{Fa:b.Fa,timescale:b.timescale,
|
|
867
|
-
function ft(a,b,c,d,e,f,g){function h(F){var N=(F-v)*u,L=N+b.Fb,M=N+n;N=M+u;var P=Math.min(N,l());M=new
|
|
868
|
-
v})}function l(){var F=null!=p&&e[p]||q;return F?n+F:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.ta.id,q=a.ha.duration,u=b.Fa,v=b.
|
|
869
|
-
h(H);L.push(M);H++}return F>l()&&!L.length?null:L})}return Promise.resolve(
|
|
858
|
+
function Us(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I;return O(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.rb||!a.ha.ud,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.M(),c.Ba,c.ka,!0):null],p=null,E(J,Promise.all(u),2);v=J.h;w=v[0];A=v[1]||null;z=null;B=l-g;y=l;C=m?l+m:Infinity;if("mp4"==n)var H=Es(w,e,d,c,B,y,C);else{H=new Gs(A);if(440786851!=Hs(H).id)throw new T(2,3,3008);var F=Hs(H);if(408125543!=F.id)throw new T(2,
|
|
859
|
+
3,3009);H=F.g.byteOffset;F=new Gs(F.g);for(var N=null;F.la();){var L=Hs(F);if(357149030==L.id){N=L;break}}if(!N)throw new T(2,3,3010);N=new Gs(N.g);L=1E6;for(F=null;N.la();){var M=Hs(N);if(2807729==M.id)L=Ls(M);else if(17545==M.id)if(4==M.g.byteLength)F=M.g.getFloat32(0);else if(8==M.g.byteLength)F=M.g.getFloat64(0);else throw new T(2,3,3003);}if(null==F)throw new T(2,3,3011);N=L/1E9;F*=N;L=Hs(new Gs(w));if(475249515!=L.id)throw new T(2,3,3007);H=Ms(L,H,N,F,d,c,B,y,C)}z=H;D=t(z);for(K=D.next();!K.done;K=
|
|
860
|
+
D.next())I=K.value,I.codecs=a.I.codecs,I.mimeType=a.I.mimeType;h.xd(z);q=new Ok(z);k&&q.vc(y,C,!0);return J.return(q)})}function Rs(a){return a.Jc}function Ts(a){var b=As(a,Rs,"RepresentationIndex");a=zs(a,Rs,"indexRange");a=lh(a||"");b&&(a=gh(b,"range",lh,a));return a}function Ss(a,b){Vs(a,b);if(!Ts(a))throw new T(2,4,4002);}function Vs(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Od&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
861
|
+
function Ps(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.Ec,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Ws(a,b,c){var d=Os(a,Xs,c),e=Ys(a);if(!e.Fa&&!e.timeline&&1<e.Cc.length)throw new T(2,4,4002);if(!e.Fa&&!a.ha.duration&&!e.timeline&&1==e.Cc.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.ta.id&&a.I.id&&(g=b[a.ta.id+","+a.I.id])&&(f=g.segmentIndex);var h=Zs(a.ha.start,a.ha.duration,a.I.Aa,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.wd(h,a.presentationTimeline.jb()):f=new Ok(h);a.presentationTimeline.xd(h);a.rb&&a.ha.ud||f.vc(a.ha.start,
|
|
862
|
+
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{Wb:function(){f&&0!=f.getNumReferences()||f.ke(h);return Promise.resolve(f)}}}function Xs(a){return a.Gb}function Ys(a){var b=$s(a);a=ys(a,Xs);var c=a.Dd;0==c&&(c=1);var d=0;a.Fa?d=a.Fa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Fa:a.Fa,startTime:d,Dd:c,Fb:a.Fb,timeline:a.timeline,Cc:b}}
|
|
863
|
+
function Zs(a,b,c,d,e,f,g,h){var k=d.Cc.length;d.timeline&&d.timeline.length!=d.Cc.length&&(k=Math.min(d.timeline.length,d.Cc.length));for(var l=a-d.Fb,m=b?a+b:Infinity,n=[],p=d.startTime,q={},u=0;u<k;q={Yc:q.Yc,Uc:q.Uc},u++){q.Uc=d.Cc[u];var v=p;p=void 0;p=null!=d.Fa?v+d.Fa:d.timeline?d.timeline[u].end:v+b;q.Yc=null;v=new zi(a+v,a+p,function(w){return function(){null==w.Yc&&(w.Yc=Gd(c(),[w.Uc.ni]));return w.Yc}}(q),q.Uc.start,q.Uc.end,e,l,a,m,[],"",null,null,Di,f);v.codecs=h;v.mimeType=g;n.push(v)}return n}
|
|
864
|
+
function $s(a){return[a.I.Gb,a.qa.Gb,a.ta.Gb].filter(ue).map(function(b){return $g(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.mf&&(a.mf=!0);var c=yd(b.attributes.media);b=gh(b,"mediaRange",lh,{start:0,end:null});return{ni:c,start:b.start,end:b.end}})};function at(a,b,c,d,e,f,g,h,k){k||a.I.Bc||(a.I.Bc=zs(a,bt,"initialization"));var l=a.I.Bc?ct(a,g):null,m=dt(a);et(m);var n=Ge(a);if(m.sd)return Vs(a,l),{Wb:function(){var w=xs(m.sd,n.I.id,null,null,n.bandwidth||null,null);w=Gd(n.I.Aa(),[w]);return Us(n,b,l,w,0,null,m.Fb)}};if(m.Fa)return d||"image"===a.qa.contentType||(a.presentationTimeline.yf(m.Fa),a.presentationTimeline.oe(a.ha.start)),{Wb:function(){return ft(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.ta.id&&a.I.id&&(d=a.ta.id+","+a.I.id,d=c[d])&&
|
|
865
|
+
(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity,v=!(a.rb&&a.ha.ud);p?(c=p,gt(c,m,q,u,v,l),c.Ha(a.presentationTimeline.jb())):p=new ht(m,a.I.id,a.bandwidth,a.I.Aa,q,u,l,v,g,a.I.Lf);m.timeline&&"image"!==a.qa.contentType&&a.presentationTimeline.Gg(m.timeline,q);d&&a.rb&&(d.segmentIndex=p);return{Wb:function(){p instanceof ht&&0==p.getNumReferences()&>(p,m,q,u,v,l);return Promise.resolve(p)}}}function bt(a){return a.Ob}
|
|
866
|
+
function dt(a){var b=ys(a,bt),c=zs(a,bt,"media"),d=zs(a,bt,"index");return{Fa:b.Fa,timescale:b.timescale,Dd:b.Dd,Fb:b.Fb,$f:b.$f,timeline:b.timeline,Dc:c&&yd(c),sd:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function et(a){var b=a.sd?1:0;b+=a.timeline?1:0;b+=a.Fa?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.sd&&(a.timeline=null),a.Fa=null);if(!a.sd&&!a.Dc)throw new T(2,4,4002);}
|
|
867
|
+
function ft(a,b,c,d,e,f,g){function h(F){var N=(F-v)*u,L=N+b.Fb,M=N+n;N=M+u;var P=Math.min(N,l());M=new zi(M,P,function(){var R=L*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(L)*BigInt(w));R=xs(A,B,F,null,z,R);return Gd(y(),[R])},0,null,d,C,n,l(),[],"",null,null,Di,f);M.codecs=a.I.codecs;M.mimeType=a.I.mimeType;M.i=N;return M}function k(){var F=[Math.max(m.jb(),n),Math.min(m.Mb(),l())].map(function(N){return N-n});F=[Math.ceil(F[0]/u),Math.ceil(F[1]/u)-1];a.I.Ca&&F[1]++;return F.map(function(N){return N+
|
|
868
|
+
v})}function l(){var F=null!=p&&e[p]||q;return F?n+F:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.ta.id,q=a.ha.duration,u=b.Fa,v=b.Dd,w=b.timescale,A=b.Dc,z=a.bandwidth||null,B=a.I.id,y=a.I.Aa,C=n-b.Fb,D=k();c=a.rb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var K=c;K<=g;++K){var I=h(K);D.push(I)}var J=new Ok(D);D=m.Mb()<l();K=m.U();if(D||K){var H=Math.max(c,g+1);c=u;a.I.Ca&&(c=.1);J.ye(c,function(){var F=m.jb();J.Ha(F);var N=t(k());N.next();N=N.next().value;for(var L=[];H<=N;){var M=
|
|
869
|
+
h(H);L.push(M);H++}return F>l()&&!L.length?null:L})}return Promise.resolve(J)}function ct(a,b){var c=a.I.Bc;c||(c=zs(a,bt,"initialization"));if(!c)return null;c=yd(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.Aa;b=new xi(function(){var g=xs(c,d,null,null,e,null);return Gd(f(),[g])},0,null,Ps(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
|
|
870
870
|
function ht(a,b,c,d,e,f,g,h,k,l){Ok.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&&it(this)}pa(ht,Ok);r=ht.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Ok.prototype.release.call(this);this.h=null};
|
|
871
871
|
r.Ha=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
872
|
function gt(a,b,c,d,e,f){jt(a,f);if(a.h){c=a.h.timeline;a.h.Dc=b.Dc;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&it(a)}function jt(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Fi(c,b)}}
|
|
873
873
|
function it(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Ha(a.i)}}r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
|
|
874
|
-
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Dc,e=this.h.timeline[a],f=e.Hi,g=this.h.$f+e.ag;c=this.i-this.h.Fb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],p=(e.end-e.start)/e.vb,q={},u=0;u<e.vb;q={
|
|
875
|
-
null==A.
|
|
876
|
-
function kt(a,b,c,d,e,f,g){a=xs(a,b,c,f,d||null,e);return Gd(g(),[a]).map(function(h){return h.toString()})};function lt(a){var b=be(a),c=b.split("/")[0];a=he(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,
|
|
877
|
-
function mt(a,b){function c(y){w=y.name;Og(y)}function d(y){var
|
|
878
|
-
h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,q=null,u=null,v=null,w;(new Eg).box("moov",Jg).box("trak",Jg).P("tkhd",function(y){y=Xi(y.reader,y.version);m=String(y.height);n=String(y.width)}).box("mdia",Jg).P("mdhd",function(y){l=Vi(y.reader,y.version).language}).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("mp4a",function(y){var
|
|
879
|
-
y.R();
|
|
880
|
-
w||"";switch(w){case "dvav":
|
|
881
|
-
y[
|
|
882
|
-
|
|
883
|
-
if("nclx"===F){H=
|
|
884
|
-
language:l,height:m,width:n,channelCount:p,sampleRate:q,closedCaptions:z,
|
|
874
|
+
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Dc,e=this.h.timeline[a],f=e.Hi,g=this.h.$f+e.ag;c=this.i-this.h.Fb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],p=(e.end-e.start)/e.vb,q={},u=0;u<e.vb;q={Zc:q.Zc,Ge:q.Ge},u++){var v=e.start+p*u,w=v+p;q.Ge=u+1;q.Zc=null;v=new zi(this.i+v,this.i+w,function(A){return function(){if(!b.h)return[];
|
|
875
|
+
null==A.Zc&&(A.Zc=kt(b.h.Dc,b.F,f,b.B,g,A.Ge,b.C));return A.Zc}}(q),0,null,this.s,c,this.i,this.l,[],"",null,null,Di,this.A);v.codecs=l;v.mimeType=m;0==this.G?0<u&&v.ie():0!=u%this.G&&v.ie();n.push(v)}c=new zi(this.i+e.start,k,function(){return 0<e.vb?[]:kt(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,Di,this.A,0<e.vb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
|
|
876
|
+
function kt(a,b,c,d,e,f,g){a=xs(a,b,c,f,d||null,e);return Gd(g(),[a]).map(function(h){return h.toString()})};function lt(a){var b=be(a),c=b.split("/")[0];a=he(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Fd:null,colorGamut:null}}
|
|
877
|
+
function mt(a,b){function c(y){w=y.name;Og(y)}function d(y){var C=Yi(y.reader);p=C.channelCount;q=C.sampleRate;e(y.name)}function e(y){y=y.toLowerCase();switch(y){case "avc1":case "avc3":g.push(y+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(y+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(y+".05.04");k=!0;break;case "vp09":g.push(y+".00.10.08");k=!0;break;case "av01":g.push(y+".0.01M.08");k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(y),
|
|
878
|
+
h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,q=null,u=null,v=null,w;(new Eg).box("moov",Jg).box("trak",Jg).P("tkhd",function(y){y=Xi(y.reader,y.version);m=String(y.height);n=String(y.width)}).box("mdia",Jg).P("mdhd",function(y){l=Vi(y.reader,y.version).language}).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("mp4a",function(y){var C=Yi(y.reader);p=C.channelCount;q=C.sampleRate;y.reader.la()?Jg(y):e(y.name)}).box("esds",function(y){y=y.reader;for(var C="mp4a",D,K;y.la();){D=y.R();for(var I=
|
|
879
|
+
y.R();I&128;)I=y.R();if(3==D)y.ja(),I=y.R(),I&128&&y.ja(),I&64&&y.skip(y.R()),I&32&&y.ja();else if(4==D)K=y.R(),y.skip(12);else if(5==D)break}K&&(C+="."+aj(K),5==D&&y.la()&&(D=y.R(),K=(D&248)>>3,31===K&&y.la()&&(K=32+((D&7)<<3)+((y.R()&224)>>5)),C+="."+K));f.push(C);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",c).box("av01",c).box("avcC",function(y){var C=
|
|
880
|
+
w||"";switch(w){case "dvav":C="avc3";break;case "dva1":C="avc1"}y=y.reader;y.skip(1);y=C+"."+aj(y.R())+aj(y.R())+aj(y.R());g.push(y);k=!0}).box("hvcC",function(y){var C=w||"";switch(w){case "dvh1":C="hvc1";break;case "dvhe":C="hev1"}var D=y.reader;D.skip(1);y=D.R();var K=["","A","B","C"][y>>6],I=y&31,J=D.O(),H=(y&32)>>5?"H":"L";y=[D.R(),D.R(),D.R(),D.R(),D.R(),D.R()];D=D.R();for(var F=0,N=0;32>N;N++){F|=J&1;if(31==N)break;F<<=1;J>>=1}C=C+("."+K+I)+("."+aj(F,!0));C+="."+H+D;K="";for(I=y.length;I--;)if((H=
|
|
881
|
+
y[I])||K)K="."+H.toString(16).toUpperCase()+K;C+=K;g.push(C);k=!0}).box("dvcC",function(y){var C=w||"";switch(w){case "hvc1":C="dvh1";break;case "hev1":C="dvhe";break;case "avc1":C="dva1";break;case "avc3":C="dvav"}var D=y.reader;D.skip(2);y=D.R();D=D.R();g.push(C+"."+bj(y>>1&127)+"."+bj(y<<5&32|D>>3&31));k=!0}).P("vpcC",function(y){var C=w||"",D=y.reader;y=D.R();var K=D.R();D=D.R()>>4&15;g.push(C+"."+bj(y)+"."+bj(K)+"."+bj(D));k=!0}).box("av1C",function(y){var C=w||"",D=y.reader;D.skip(1);y=D.R();
|
|
882
|
+
D=D.R();var K=y>>>5,I=(D&64)>>6;g.push(C+"."+K+"."+bj(y&31)+(D>>>7?"H":"M")+"."+bj(2===K&&I?(D&32)>>5?12:10:I?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+bj(1)+"."+bj(1)+"."+bj(1)+".0");k=!0}).box("enca",Pg).box("encv",Og).box("sinf",Jg).box("frma",function(y){y=Zi(y.reader).Ga;e(y)}).box("colr",function(y){g=g.map(function(K){if(K.startsWith("av01.")){var I=y.reader,J=I.ra(),H=I.nb(4);var F=String.fromCharCode(H[0]);F+=String.fromCharCode(H[1]);F+=String.fromCharCode(H[2]);F+=String.fromCharCode(H[3]);
|
|
883
|
+
if("nclx"===F){H=I.ja();F=I.ja();var N=I.ja(),L=I.R()>>7,M=K.split(".");10==M.length&&(M[6]=bj(H),M[7]=bj(F),M[8]=bj(N),M[9]=String(L),K=M.join("."))}I.seek(J)}return K});var C=$i(y.reader),D=C.colorGamut;u=C.Fd;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,z=new Map;if(k){var B=new Hb("video/mp4");a&&B.init(a);B.i(b);a=t(B.j());for(b=a.next();!b.done;b=a.next())b=b.value,z.set(b,b);B.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:nt(f.concat(g)).join(", "),
|
|
884
|
+
language:l,height:m,width:n,channelCount:p,sampleRate:q,closedCaptions:z,Fd:u,colorGamut:v}}function nt(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ae(d);b.has(e)||(c.push(d),b.add(e))}b=Pd("audio",c);d=Pd("video",c);a=Pd(Od,c);d=ot(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
885
885
|
function ot(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}function pt(a){var b=null;(new Eg).box("moov",Jg).box("trak",Jg).box("mdia",Jg).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("encv",Og).box("enca",Pg).box("sinf",Jg).box("schi",Jg).P("tenc",function(c){c=c.reader;c.R();c.R();c.R();c.R();b=Ed(c.nb(16))}).parse(a,!0);return b};function qt(a){this.o=null;this.A=a;this.G=new eg;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"}qt.prototype.configure=function(a){this.o=a};qt.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()};qt.prototype.setManifestType=function(a){this.s=a};
|
|
886
|
-
function rt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Gd(a.i,[st(a,b)]),d=lg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),fg(a.G,e),ta(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=od(f.data),h=JSON.parse(g),1==h.VERSION&&tt(a,h,f.uri),wa(l,0);if((k=xa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Nc(function(){rt(a,b)});a.g.
|
|
887
|
-
function st(a,b){if(!a.m.length)return b;b=new sc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ic(e)&&wc(b,e);return b.toString()}function tt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Nc(function(){rt(a,d)});if(c=b.TTL)a.C=c;a.g.
|
|
886
|
+
function rt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Gd(a.i,[st(a,b)]),d=lg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),fg(a.G,e),ta(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=od(f.data),h=JSON.parse(g),1==h.VERSION&&tt(a,h,f.uri),wa(l,0);if((k=xa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Nc(function(){rt(a,b)});a.g.X(a.C);G(l)})}
|
|
887
|
+
function st(a,b){if(!a.m.length)return b;b=new sc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ic(e)&&wc(b,e);return b.toString()}function tt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Nc(function(){rt(a,d)});if(c=b.TTL)a.C=c;a.g.X(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
888
888
|
function ut(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}qt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
889
889
|
function vt(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={Tb:e.Tb},g=f.next())if(e.Tb=g.value,g=b.get(e.Tb))d.push({Ef:e.Tb,location:g});else if(g=a.F.find(function(k){return function(l){return l.kj==k.Tb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].eh?(h=new sc(h),uc(h,g["URI-REPLACEMENT"].eh),d.push({Ef:e.Tb,location:h.toString()})):d.push({Ef:e.Tb,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
890
890
|
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 sc(k.location)).zb))return!1;return!0});d.length&&(a.B=d[0].Ef);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(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:Gd(a.i,d)};function wt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=wt.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.Vh=function(){return this.j};r.kf=function(){return this.l.slice()};r.Ch=function(){return this.i};
|
|
891
891
|
function xt(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[yt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[zt(n),n]})),l=new Map(h.textStreams.map(function(n){return[At(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Bt(n),n]}));if(b){var m=Ct(Od);l.set(At(m),m);m=Ct("image");h.set(Bt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{gg:c,ah:d,Yg:e,yg:f}}
|
|
892
|
-
r.Pe=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,B,y,D,
|
|
892
|
+
r.Pe=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,B,y,C,D,K,I,J,H,F,N,L,M,P,R,Q;return O(function(ja){if(1==ja.g){e=Qd;if(!b&&1==a.length)return f=xt(a,!1),g=f.gg,h=f.ah,k=f.Yg,l=f.yg,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()),ja.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 ja.return();u=xt(a,!0);v=u.gg;w=u.ah;A=u.Yg;z=u.yg;
|
|
893
893
|
return E(ja,Promise.all([Dt(d,d.h,v,n,Et,Ft,m),Dt(d,d.g,w,n,Et,Ft,m),Dt(d,d.l,A,n,Et,Ft,m),Dt(d,d.i,z,n,Et,Ft,m)]),2)}B=0;y=[];if(d.g.length&&d.h.length)for(H=t(d.h),F=H.next();!F.done;F=H.next())for(N=F.value,L=t(d.g),M=L.next();!M.done;M=L.next())P=M.value,R=hi(N.drmInfos,P.drmInfos),N.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=B++,y.push({id:Q,language:N.language,disabledUntilTime:0,primary:N.primary,audio:N,video:P,bandwidth:(N.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,
|
|
894
|
-
allowedByKeySystem:!0,decodingInfos:[]}));else for(
|
|
895
|
-
function Gt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
896
|
-
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Ie}).map(function(Q){return[Bt(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Ht(b.na),k.set(At(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=Ht(b.Ie),p.set(Bt(q),q);u=new wt;return E(P,Dt(u,[],c,0,It,Jt,0),2);case 2:return v=P.h,E(P,Dt(u,[],d,0,It,Jt,0),3);case 3:return w=P.h,E(P,Dt(u,[],e,0,It,Jt,0),4);case 4:return A=P.h,E(P,Dt(u,[],f,0,It,Jt,0),5);case 5:z=P.h;B=0;if(w.length&&v.length)for(
|
|
897
|
-
t(v),I
|
|
898
|
-
function Dt(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
899
|
-
y.next())for(
|
|
894
|
+
allowedByKeySystem:!0,decodingInfos:[]}));else for(C=d.g.length?d.g:d.h,D=t(C),K=D.next();!K.done;K=D.next())I=K.value,J=B++,y.push({id:J,language:I.language,disabledUntilTime:0,primary:I.primary,audio:I.type==e.V?I:null,video:I.type==e.ga?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=y;G(ja)})};
|
|
895
|
+
function Gt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J,H,F,N,L,M;return O(function(P){switch(P.g){case 1:b=Qd;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.V}).map(function(Q){return[yt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ga}).map(function(Q){return[zt(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.na}).map(function(Q){return[At(Q),Q]}))});
|
|
896
|
+
f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Ie}).map(function(Q){return[Bt(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Ht(b.na),k.set(At(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=Ht(b.Ie),p.set(Bt(q),q);u=new wt;return E(P,Dt(u,[],c,0,It,Jt,0),2);case 2:return v=P.h,E(P,Dt(u,[],d,0,It,Jt,0),3);case 3:return w=P.h,E(P,Dt(u,[],e,0,It,Jt,0),4);case 4:return A=P.h,E(P,Dt(u,[],f,0,It,Jt,0),5);case 5:z=P.h;B=0;if(w.length&&v.length)for(I=
|
|
897
|
+
t(v),J=I.next();!J.done;J=I.next())for(H=J.value,F=t(w),N=F.next();!N.done;N=F.next())L=N.value,M=B++,L.variantIds.push(M),H.variantIds.push(M);else for(y=w.concat(v),C=t(y),D=C.next();!D.done;D=C.next())K=D.value,K.variantIds=[B++];return P.return(w.concat(v).concat(A).concat(z))}})}
|
|
898
|
+
function Dt(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I;return O(function(J){switch(J.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){J.u(4);break}n=m.value;return E(J,Kt(a,n,c,d,f,h,g),5);case 5:p=J.h;if(!p)throw new T(2,4,4037);m=l.next();J.u(2);break;case 4: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,(B=Lt(a,z,c,e,f,h))&&b.push(B);y=t(h);for(u=y.next();!u.done;u=
|
|
899
|
+
y.next())for(C=u.value,D={},K=t(C),A=K.next();!A.done;D={Nd:D.Nd},A=K.next())if(D.Nd=A.value,!Mt(D.Nd)&&(I=b.some(function(H){return function(F){return Nt(a,H.Nd,F)}}(D))))throw new T(2,4,4037);return J.return(b)}})}function Kt(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return Ot(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,Pt(b,d+g),2):h.u(2):h.return(!1);Qt(b,d,e,f,g);return h.return(!0)})}
|
|
900
900
|
function Pt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return E(l,Promise.all(c),2)}if(a.segmentIndex instanceof Rk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);G(l)})}
|
|
901
901
|
function Lt(a,b,c,d,e,f){if(Mt(b))return null;var g=d(b);Ot(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Rk;return E(h,Pt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Qt(g,0,e,f,0);return g}
|
|
902
902
|
function Qt(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==Be(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
@@ -917,51 +917,51 @@ function Ht(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType
|
|
|
917
917
|
function Ct(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ok([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
|
|
918
918
|
function $t(a,b,c){if(b==a&&a!=c)return bu;if(c==a&&a!=b)return au;if(b>a){if(c<=a||c-a<b-a)return au;if(c-a>b-a)return bu}else{if(c>a)return bu;if(a-c<a-b)return au;if(a-c>a-b)return bu}return du}function cu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?au:b<a?bu:du}function Mt(a){switch(a.type){case Od:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
919
919
|
function zt(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 yt(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 At(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
920
|
-
function Bt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}S("shaka.util.PeriodCombiner",wt);wt.prototype.setUseStreamOnce=wt.prototype.Vg;wt.prototype.setAllowMultiTypeVariants=wt.prototype.Og;wt.prototype.combinePeriods=wt.prototype.Pe;wt.prototype.getImageStreams=wt.prototype.Ch;wt.prototype.getTextStreams=wt.prototype.kf;wt.prototype.getVariants=wt.prototype.Vh;var au=1,du=0,bu=-1,Zt=new Map;function eu(a,b){var c=new DOMParser,d=fu.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 gu(a,b){try{var c=
|
|
921
|
-
var fu=new Kc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function hu(){var a=this;this.i=this.g=null;this.A=[];this.l=null;this.
|
|
922
|
-
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.
|
|
923
|
-
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={
|
|
924
|
-
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,ju(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.i||!b)return c.return();a.i.onError(b);G(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.l&&this.l.presentationTimeline.
|
|
920
|
+
function Bt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}S("shaka.util.PeriodCombiner",wt);wt.prototype.setUseStreamOnce=wt.prototype.Vg;wt.prototype.setAllowMultiTypeVariants=wt.prototype.Og;wt.prototype.combinePeriods=wt.prototype.Pe;wt.prototype.getImageStreams=wt.prototype.Ch;wt.prototype.getTextStreams=wt.prototype.kf;wt.prototype.getVariants=wt.prototype.Vh;var au=1,du=0,bu=-1,Zt=new Map;function eu(a,b){var c=new DOMParser,d=fu.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 gu(a,b){try{var c=ud(a);return eu(c,b)}catch(d){return null}}
|
|
921
|
+
var fu=new Kc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function hu(){var a=this;this.i=this.g=null;this.A=[];this.l=null;this.T=1;this.B=[];this.j={me:"",type:"",profiles:[],Cb:null,Ca:0,Aa:null,zd:0};this.o=new Map;this.s={};this.L={};this.m=new wt;this.F=0;this.N=new Ua(5);this.G=new Nc(function(){iu(a)});this.K=new eg;this.H=null;this.W=[];this.J=Infinity;this.C=!1;this.h=null}r=hu.prototype;
|
|
922
|
+
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.U()&&this.G.mc();this.h&&this.h.configure(this.g);this.m&&(this.m.Og(this.g.dash.multiTypeVariantsAllowed&&ob()),this.m.Vg(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,ju(c),2);d=e.h;c.i&&ku(c,d);if(!c.i)throw new T(2,7,7001);return e.return(c.l)})};
|
|
923
|
+
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={me:"",type:"",profiles:[],Cb:null,Ca:0,Aa:null,zd:0};this.m=null;null!=this.G&&(this.G.stop(),this.G=null);this.h&&this.h.destroy();return this.K.destroy()};
|
|
924
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,ju(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.i||!b)return c.return();a.i.onError(b);G(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.l&&this.l.presentationTimeline.U()){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,ku(this,0))}}};
|
|
925
925
|
r.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
926
926
|
function ju(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=lu(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=vt(a.h,"Location",!0),e.length&&(d=e)),f=lg(d,a.g.retryParameters),g=Date.now(),E(m,mu(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,nu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.N.sample(1,l);return m.return(l)})}
|
|
927
927
|
function nu(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=nm;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=gu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=vd(h.outerHTML)}k=Tg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=om;l!=m&&l(k);if("Patch"===d)return v.return(ou(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(pu(a,k,c));
|
|
928
928
|
p=a.g.dash.xlinkFailGracefully;q=Ds(k,a.g.retryParameters,p,c,a.i.networkingEngine);fg(a.K,q);return E(v,q.promise,2)}u=v.h;return v.return(pu(a,u,c))})}
|
|
929
|
-
function pu(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
930
|
-
b.attributes.id||"";a.j.
|
|
931
|
-
H.next())N=F.value,L=N.attributes.serviceLocation,M=bh(N),L&&M&&(ut(a.h,"BaseURL",L,M),
|
|
932
|
-
gh(b,"suggestedPresentationDelay",kh));Ca=a.g.dash.ignoreMaxSegmentDuration;Za=null;Ca||(Za=gh(b,"maxSegmentDuration",kh));za=b.attributes.type||"static";a.j.type=za;if(a.l)for(Va=a.l.presentationTimeline,pb=t(Object.values(a.s)),
|
|
933
|
-
(ya=a.g.availabilityWindowOverride);null==ya&&(ya=Infinity);Va.xe(ya);ee=b.attributes.profiles||"";a.j.profiles=ee.split(",");fe={rb:"static"!=za,presentationTimeline:Va,ta:null,ha:null,qa:null,I:null,bandwidth:0,mf:!1,Ca:Q,Cb:null,profiles:ee.split(",")};rd=qu(a,fe,R,b);
|
|
934
|
-
Va.yf(Za||1);return E(gc,u,2);case 2:return a.C&&(ka=0,
|
|
935
|
-
case 8:ge=gc.h;if(!a.i)return gc.return();Va.Qg(ge);case 7:Va.
|
|
936
|
-
function ou(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
937
|
-
N}}else if("type"===n.Kb){a.l.presentationTimeline.lc("static"==p);a.j.type=p;N=t(a.o.values());for(L=N.next();!L.done;L=N.next())L.value.rb="dynamic"==p;"static"==p&&(a.F=-1)}else"publishTime"===n.Kb?a.j.
|
|
929
|
+
function pu(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J,H,F,N,L,M,P,R,Q,ja,ka,va,ya,Ba,Ka,Ca,Za,za,Va,pb,Pc,ce,qd,Hc,de,ee,fe,rd,Ai,xg,Bi,Ci,yg,ge;return O(function(gc){switch(gc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=$g(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=bh(l))p=Gd(d,[n])[0],m&&(a.h?ut(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=vt(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.j.me=
|
|
930
|
+
b.attributes.id||"";a.j.zd=gh(b,"publishTime",jh)||0;a.B=$g(b,"PatchLocation");u=Promise.resolve();if((v=dh(b,"ContentSteering"))&&a.i){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new qt(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=bh(v))(z=gh(v,"queryBeforeStart",qh,!1))?u=rt(a.h,A):rt(a.h,A);B=t(f.keys());for(y=B.next();!y.done;y=B.next())C=y.value,D=f.get(C),ut(a.h,"Location",C,D)}K=$g(b,"BaseURL");J=!1;if(a.h)for(H=t(K),F=H.next();!F.done;F=
|
|
931
|
+
H.next())N=F.value,L=N.attributes.serviceLocation,M=bh(N),L&&M&&(ut(a.h,"BaseURL",L,M),J=!0);J&&a.h||(P=K.map(bh),I=Gd(d,P));R=function(){return a.h&&J?vt(a.h,"BaseURL"):I?I:[]};a.j.Aa=R;Q=0;K&&K.length&&(Q=gh(K[0],"availabilityTimeOffset",ph)||0);a.j.Ca=Q;ja=a.g.dash.ignoreMinBufferTime;ka=0;ja||(ka=gh(b,"minBufferTime",kh)||0);a.F=gh(b,"minimumUpdatePeriod",kh,-1);va=gh(b,"availabilityStartTime",jh);ya=gh(b,"timeShiftBufferDepth",kh);Ba=a.g.dash.ignoreSuggestedPresentationDelay;Ka=null;Ba||(Ka=
|
|
932
|
+
gh(b,"suggestedPresentationDelay",kh));Ca=a.g.dash.ignoreMaxSegmentDuration;Za=null;Ca||(Za=gh(b,"maxSegmentDuration",kh));za=b.attributes.type||"static";a.j.type=za;if(a.l)for(Va=a.l.presentationTimeline,pb=t(Object.values(a.s)),Pc=pb.next();!Pc.done;Pc=pb.next())ce=Pc.value,ce.segmentIndex&&ce.segmentIndex.Ha(Va.jb());else qd=a.g.defaultPresentationDelay||1.5*ka,Hc=null!=Ka?Ka:qd,Va=new sk(va,Hc,a.g.dash.autoCorrectDrift);Va.lc("static"==za);(de=Va.U())&&!isNaN(a.g.availabilityWindowOverride)&&
|
|
933
|
+
(ya=a.g.availabilityWindowOverride);null==ya&&(ya=Infinity);Va.xe(ya);ee=b.attributes.profiles||"";a.j.profiles=ee.split(",");fe={rb:"static"!=za,presentationTimeline:Va,ta:null,ha:null,qa:null,I:null,bandwidth:0,mf:!1,Ca:Q,Cb:null,profiles:ee.split(",")};rd=qu(a,fe,R,b);Ai=rd.duration;xg=rd.periods;"static"!=za&&rd.ng||Va.Ta(Ai||Infinity);a.J&&!a.C&&(Bi=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.C=a.i.isLowLatencyMode());a.C?Va.Pg(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.");
|
|
934
|
+
Va.yf(Za||1);return E(gc,u,2);case 2:return a.C&&(ka=0,Ci=null!=Ka?Ka:a.g.defaultPresentationDelay,Va.Pf(Ci)),a.l?E(gc,ru(a,rd.periods,!1),4):E(gc,a.m.Pe(xg,fe.rb),6);case 6:a.l={presentationTimeline:Va,variants:a.m.j,textStreams:a.m.kf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:ka||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:su(b),nextUrl:tu(b)};if(!Va.$g()){gc.u(7);break}yg=$g(b,"UTCTiming");return E(gc,uu(a,R,yg),8);
|
|
935
|
+
case 8:ge=gc.h;if(!a.i)return gc.return();Va.Qg(ge);case 7:Va.ge();case 4:a.i.makeTextStreamsForClosedCaptions(a.l),G(gc)}})}function ru(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Pe(b,!0,c),2);a.l.variants=a.m.j;d=a.m.kf();0<d.length&&(a.l.textStreams=d);a.l.imageStreams=a.m.i;a.i.filter(a.l);G(e)})}
|
|
936
|
+
function ou(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J,H;return O(function(F){if(1==F.g){c=b.attributes.mpdId;d=gh(b,"originalPublishTime",jh);if(!c||c!==a.j.me||d!==a.j.zd)throw a.B=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(Zg(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=sh(l.attributes.sel||""),n=m[m.length-1],p=bh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Kb){q=bh(l)||"";var N=kh(q);if(null!=N){a.j.Cb=N;for(var L=t(a.o.values()),M=L.next();!M.done;M=L.next())M.value.Cb=
|
|
937
|
+
N}}else if("type"===n.Kb){a.l.presentationTimeline.lc("static"==p);a.j.type=p;N=t(a.o.values());for(L=N.next();!L.done;L=N.next())L.value.rb="dynamic"==p;"static"==p&&(a.F=-1)}else"publishTime"===n.Kb?a.j.zd=jh(p)||0:null===n.Kb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)th(a.B,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(N=n.id,L=t(a.o.keys()),M=L.next();!M.done;M=L.next())if(M=M.value,M.startsWith(N)){var P=a.o.get(M);As(P,
|
|
938
938
|
bt,"SegmentTimeline").children=[];Hu(a,M);a.o.delete(M)}}else if("SegmentTemplate"===n.name){L=sh(l.attributes.sel||"");N=L[L.length-1];if(N.Kb){L=Iu(a,L);M=bh(l)||"";P=t(L);for(var R=P.next();!R.done;R=P.next())R=a.o.get(R.value),uh(R.I.Ob,l.tagName,N.Kb,M);N=L}else N=[];u=N;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){N=sh(l.attributes.sel||"");N=Iu(a,N);L=t(N);for(M=L.next();!M.done;M=L.next())M=a.o.get(M.value),M=As(M,bt,"SegmentTimeline"),
|
|
939
|
-
P=$g(M,"S"),th(P,l),M.children=P;z=N;B=t(z);for(w=B.next();!w.done;w=B.next())y=w.value,g.add(y)}
|
|
939
|
+
P=$g(M,"S"),th(P,l),M.children=P;z=N;B=t(z);for(w=B.next();!w.done;w=B.next())y=w.value,g.add(y)}C=t(g);for(w=C.next();!w.done;w=C.next())D=w.value,Hu(a,D);K=t(f);for(I=K.next();!I.done;I=K.next())J=I.value,e.push.apply(e,x(qu(a,{rb:"dynamic"==a.j.type,presentationTimeline:a.l.presentationTimeline,ta:null,ha:null,qa:null,I:null,bandwidth:0,mf:!1,Ca:a.j.Ca,profiles:a.j.profiles,Cb:a.j.Cb},a.j.Aa,J).periods));return e.length?E(F,ru(a,e,!0),2):F.u(2)}"static"==a.j.type&&(H=a.j.Cb,a.l.presentationTimeline.Ta(H||
|
|
940
940
|
Infinity));G(F)})}function Iu(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.ta.id===c&&e.qa.id===d&&e.I.id&&b.push(c+","+e.I.id);return b}
|
|
941
941
|
function Hu(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ha(a.l.presentationTimeline.jb());try{var e=at(c,function(f,g,h,k){return Ju(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.L,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.Wb(),3)}f.segmentIndex=g.h;G(g)})}}catch(f){if(b=c.I.contentType,b!=Od&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
942
942
|
function su(a){var b=dh(a,"ServiceDescription");if(!b)return null;a=dh(b,"Latency");b=dh(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)));
|
|
943
943
|
return c}function tu(a){a=$g(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}
|
|
944
|
-
function qu(a,b,c,d){var e=b.Cb;e||(e=gh(d,"mediaPresentationDuration",kh),a.j.Cb=e);var f=[],g=0;d=$g(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=gh(k,"start",kh,g),n=k.attributes.id,p=gh(k,"duration",kh),q=null;if(l){var u=gh(l,"start",kh);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.
|
|
945
|
-
q&&(a.L[b.ta.id]=q);if(null==q){g=null;break}g=m+q}}a.
|
|
944
|
+
function qu(a,b,c,d){var e=b.Cb;e||(e=gh(d,"mediaPresentationDuration",kh),a.j.Cb=e);var f=[],g=0;d=$g(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=gh(k,"start",kh,g),n=k.attributes.id,p=gh(k,"duration",kh),q=null;if(l){var u=gh(l,"start",kh);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.W.includes(n)||h+1==d.length){null!==m&&(null===a.H||m>a.H)&&(a.H=m);g=Ku(a,b,c,{start:m,duration:q,node:k,ud:null==q||!l});f.push(g);b.ta.id&&
|
|
945
|
+
q&&(a.L[b.ta.id]=q);if(null==q){g=null;break}g=m+q}}a.W=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,ng:!1}:{periods:f,duration:g,ng:!0}}
|
|
946
946
|
function Ku(a,b,c,d){b.ta=Lu(a,d.node,null,c);b.ha=d;b.ta.Ca=b.Ca;b.ta.id||(b.ta.id="__shaka_period_"+d.start);var e=$g(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Mu(a,d.start,d.duration,f.value,c);c=$g(d.node,"AdaptationSet").map(function(m){return Nu(a,b,m)}).filter(ue);if(b.rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Bi);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);
|
|
947
|
-
}d=c.filter(function(m){return!m.Yf});c=c.filter(function(m){return m.Yf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Yf.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={
|
|
947
|
+
}d=c.filter(function(m){return!m.Yf});c=c.filter(function(m){return m.Yf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Yf.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={Od:h.Od},l=k.next())h.Od=l.value,h.Od.trickModeVideo=e.streams.find(function(m){return function(n){return Zd(m.Od.codecs)==Zd(n.codecs)}}(h))}}}c=Ou(a.g.disableAudio,d,"audio");e=Ou(a.g.disableVideo,d,"video");f=Ou(a.g.disableText,
|
|
948
948
|
d,Od);d=Ou(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.ta.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Ou(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},[])}
|
|
949
949
|
function Nu(a,b,c){function d(F){switch(F){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.qa=Lu(a,c,b.ta,null);var f=!1,g=$g(c,"Role"),h=g.map(function(F){return F.attributes.value}).filter(ue),k=void 0,l=b.qa.contentType==Od;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
|
|
950
950
|
n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,q;n=$g(c,"EssentialProperty");g=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?g=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?q=d(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=
|
|
951
951
|
w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=$g(c,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(q=d(parseInt(v.attributes.value,10)));n=$g(c,"Accessibility");var z=new Map,B;n=t(n);for(v=
|
|
952
|
-
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 y=t(w),
|
|
953
|
-
|
|
954
|
-
$g(c,"Label"))&&m.length&&(m=ah(m[0]))&&(H=m);m=$g(c,"Representation");c=m.map(function(F){if(F=Pu(a,b,
|
|
955
|
-
b.qa.contentType;l=b.qa.id||"__fake__"+a.
|
|
952
|
+
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 y=t(w),C=y.next();!C.done;C=y.next()){var D=C.value,K=C=void 0;D.includes("=")?(D=D.split("="),C=D[0].startsWith("CC")?D[0]:"CC"+D[0],K=D[1]||"und"):(C="CC"+v,2==w.length?v+=2:v++,K=D);z.set(C,xe(K))}}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,
|
|
953
|
+
D=y=void 0,C.includes("=")?(C=C.split("="),y="svc"+C[0],D=C[1].split(",")[0].split(":").pop()):(y="svc"+v,v++,D=C),z.set(y,xe(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?B="visually impaired":"2"==w&&(B="hard of hearing"));if(m)return null;m=$g(c,"ContentProtection");var I=ms(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=xe(b.qa.language||"und"),H=c.attributes.label;(m=
|
|
954
|
+
$g(c,"Label"))&&m.length&&(m=ah(m[0]))&&(H=m);m=$g(c,"Representation");c=m.map(function(F){if(F=Pu(a,b,I,k,J,H,f,h,z,F,B,A))F.hdr=F.hdr||p,F.colorGamut=F.colorGamut||q,F.fastSwitching=u;return F}).filter(function(F){return!!F});if(0==c.length){g="image"==b.qa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new T(2,4,4003);}if(!b.qa.contentType||"application"==b.qa.contentType)for(b.qa.contentType=Qu(c[0].mimeType,c[0].codecs),l=t(c),v=l.next();!v.done;v=l.next())v.value.type=
|
|
955
|
+
b.qa.contentType;l=b.qa.id||"__fake__"+a.T++;n=t(c);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(I.drmInfos);for(y=w.next();!y.done;y=w.next())y=y.value,y.keyIds=y.keyIds&&v.keyIds?new Set([].concat(x(y.keyIds),x(v.keyIds))):y.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(F){return F.attributes.id}).filter(ue);return{id:l,contentType:b.qa.contentType,language:J,Tj:f,streams:c,drmInfos:I.drmInfos,Yf:g,Bi:m}}
|
|
956
956
|
function Pu(a,b,c,d,e,f,g,h,k,l,m,n){b.I=Lu(a,l,b.qa,null);var p=b.I.id;a.J=Math.min(a.J,b.I.Ca);if(!Ru(b.I))return null;var q=b.ha.start;b.bandwidth=gh(l,"bandwidth",nh)||0;var u=b.I.contentType,v=u==Od||"application"==u;u="image"==u;try{var w=void 0;if(c.Le){var A=b.I.Aa,z=Gd(A(),[c.Le.hi]),B=lg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Le.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,F,N;return O(function(L){if(1==L.g)return E(L,mu(a,B,6),2);if(3!=L.g){H=L.h;if(!H.data||
|
|
957
|
-
16!=H.data.byteLength)throw new T(2,4,4049);F={name:"AES-CBC"};N=w;return E(L,window.crypto.subtle.importKey("raw",H.data,F,!0,["decrypt"]),3)}N.cryptoKey=L.h;w.fetchKey=void 0;G(L)})}}}b.I.aesKey=w;A=function(H,F,N,L){return Ju(a,H,F,N,L)};if(b.I.Jc)var y=Qs(b,A,w);else if(b.I.Gb)y=Ws(b,a.s,w);else if(b.I.Ob)y=at(b,A,a.s,!!a.l,a.g.dash.initialSegmentLimit,a.L,w,n,!1);else{var
|
|
957
|
+
16!=H.data.byteLength)throw new T(2,4,4049);F={name:"AES-CBC"};N=w;return E(L,window.crypto.subtle.importKey("raw",H.data,F,!0,["decrypt"]),3)}N.cryptoKey=L.h;w.fetchKey=void 0;G(L)})}}}b.I.aesKey=w;A=function(H,F,N,L){return Ju(a,H,F,N,L)};if(b.I.Jc)var y=Qs(b,A,w);else if(b.I.Gb)y=Ws(b,a.s,w);else if(b.I.Ob)y=at(b,A,a.s,!!a.l,a.g.dash.initialSegmentLimit,a.L,w,n,!1);else{var C=b.ha.duration||0,D=b.I.Aa;y={Wb:function(){var H=Qk(q,C,D());H.wc(function(F){F.mimeType=b.I.mimeType;F.codecs=b.I.codecs});
|
|
958
958
|
return Promise.resolve(H)}}}}catch(H){if((v||u)&&4002==H.code)return null;throw H;}n=$g(l,"ContentProtection");n=qs(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;$g(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.attributes.schemeIdUri&&"JOC"==H.attributes.value})&&(A=!0);z=!1;v&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(u&&((l=$g(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile",
|
|
959
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(H.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var
|
|
960
|
-
(
|
|
961
|
-
closedCaptions:k,hdr:
|
|
959
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(H.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var I;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"))&&(I="PQ");v=b.I.id?b.ta.id+","+b.I.id:"";a.B.length&&p&&a.o.set(b.ta.id+","+p,Su(b));var J=v&&a.s[v]?a.s[v]:{id:a.T++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){J.segmentIndex&&
|
|
960
|
+
(J.segmentIndex.release(),J.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.qa.language,label:f,type:b.qa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.I.Ec,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:A,
|
|
961
|
+
closedCaptions:k,hdr:I,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Sd(b.I.mimeType,b.I.codecs)])};J.createSegmentIndex=function(){var H;return O(function(F){if(1==F.g){if(J.segmentIndex)return F.u(0);H=J;return E(F,y.Wb(),3)}H.segmentIndex=F.h;G(F)})};v&&b.rb&&!a.s[v]&&(a.s[v]=J);return J}
|
|
962
962
|
function Su(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]={Jc:null,Gb:null,Ob:e.Ob,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,Ec:e.Ec,audioSamplingRate:e.audioSamplingRate,Ca:e.Ca,Bc:e.Bc}}else"periodInfo"==d?(e=a[d],
|
|
963
|
-
b[d]={start:e.start,duration:e.duration,node:null,
|
|
964
|
-
function ku(a,b){if(!(0>a.F)){var c=a.F;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.G.
|
|
963
|
+
b[d]={start:e.start,duration:e.duration,node:null,ud:e.ud}):b[d]=a[d];return b}function iu(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,ta(d,2),E(d,ju(a),4);case 4:b=d.h;wa(d,3);break;case 2:if(c=xa(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();ku(a,b);G(d)}})}
|
|
964
|
+
function ku(a,b){if(!(0>a.F)){var c=a.F;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.G.X(Math.max(c-b,Wa(a.N)))}}
|
|
965
965
|
function Lu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ec:null,audioSamplingRate:null,Ca:0,Lf:0};d=d||c.Aa;var e=b.attributes.id,f=$g(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=bh(m);l&&m&&(ut(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(bh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=hh(b,
|
|
966
966
|
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=nt(m).join(",");n=gh(b,"frameRate",rh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,q=Tu($g(b,"InbandEventStream"),c.emsgSchemeIdUris),u=$g(b,"AudioChannelConfiguration");u=Uu(u)||c.Ec;var v=gh(b,"audioSamplingRate",oh)||c.audioSamplingRate;k||(k=Qu(l,m));var w=dh(b,"SegmentBase"),A=dh(b,"SegmentTemplate"),z=w?gh(w,"availabilityTimeOffset",ph)||0:0,B=A?gh(A,"availabilityTimeOffset",ph)||0:0,y=f&&f.length?gh(f[0],"availabilityTimeOffset",
|
|
967
967
|
ph)||0:0;z=c.Ca+y+z+B;B=null;(y=dh(b,"SegmentSequenceProperties"))&&(y=dh(y,"SAP"))&&(B=gh(y,"cadence",mh));return{Aa:function(){return Gd(d(),f.length?a.h&&h?vt(a.h,e):g?g:[]:[])},Jc:w||c.Jc,Gb:dh(b,"SegmentList")||c.Gb,Ob:A||c.Ob,width:gh(b,"width",oh)||c.width,height:gh(b,"height",oh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:q,id:e,language:b.attributes.lang,Ec:u,audioSamplingRate:v,Ca:z,Bc:null,Lf:B||c.Lf}}
|
|
@@ -974,36 +974,36 @@ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return
|
|
|
974
974
|
3);break;case 5:xa(n);case 3:g=f.next();n.u(2);break;case 4:return ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
975
975
|
function Mu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=gh(d,"timescale",oh)||1;d=t($g(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=gh(k,"presentationTime",oh)||0,m=gh(k,"duration",oh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:vh(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
|
|
976
976
|
function Ju(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=rg,g=e?0:1,h=sl(b,c,d,a.g.retryParameters),E(l,mu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Qu(a,b){b=Sd(a,b);return ke(b)?Od:a.split("/")[0]}function mu(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);fg(a.K,b);return b.promise}
|
|
977
|
-
function lu(a){var b=a.j.
|
|
977
|
+
function lu(a){var b=a.j.zd;if(!a.j.me||!b||!a.B.length)return[];var c=Date.now()/1E3,d=a.B.filter(function(e){e=oh(e.attributes.ttl);return!e||b+e>c}).map(bh).filter(ue);return d.length?Gd(a.A,d):[]}S("shaka.dash.DashParser",hu);si["application/dash+xml"]=function(){return new hu};si["video/vnd.mpeg.dash.mpd"]=function(){return new hu};function Wu(){}S("shaka.dependencies",Wu);Wu.has=function(a){return Xu.has(a)};Wu.add=function(a,b){if(!Yu[a])throw Error(a+" is not supported");a==Zu?rb("mux.js","mux.js is no longer used in Shaka Player."):Xu.set(a,function(){return b})};var Zu="muxjs",Yu={Uj:Zu,ISOBoxer:"ISOBoxer"};Wu.Allowed=Yu;var Xu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function $u(a,b,c){this.type=a;this.g=b;this.segments=c||null}function av(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}av.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
978
978
|
function bv(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function cv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=cv(a,b))?a.value:c||null}function dv(a,b){a=cv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function ev(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.vb=c}function fv(a,b){this.name=a;this.value=b};function gv(a,b){return a.filter(function(c){return c.name==b})}function hv(a,b){return a.filter(function(c){return dv(c,"TYPE")==b})}function iv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function jv(a,b,c){c=void 0===c?0:c;return(a=iv(a,b))?Number(a.value):c}function kv(a,b,c){return b?lv(a,[b],c):[]}
|
|
979
979
|
function lv(a,b,c){if(!b.length)return[];b=Gd(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new T(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function mv(a){this.h=a||"";this.g=0}function nv(a){ov(a,/[ \t]+/gm)}function ov(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function pv(a){return a.g==a.h.length?null:(a=ov(a,/[^ \t\n]*/gm))?a[0]:null};function qv(){this.g=0}
|
|
980
980
|
function rv(a,b){b=od(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=sv(a,f),--a.g,tv.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=sv(a,g);if(uv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
981
981
|
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=sv(a,k),tv.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 ev(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new ev("",d,f)));return new $u(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
982
982
|
g.name&&(g.attributes.push(new fv("URI",h)),d=!0)}}return new $u(b,e)}function sv(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 mv(d);var f;(f=ov(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=ov(d,g);)c.push(new fv(f[1],f[2]||f[3])),nv(d)}return new av(a,b,c,e)}
|
|
983
983
|
var tv="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(" "),uv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function vv(){}function wv(a){try{var b=xv(a);return Yf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Wf(c)}}
|
|
984
|
-
function xv(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=Cd(a):e=vd(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",vv);vv.parse=wv;hg("data",wv);function yv(){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(Od,new Map);this.N.set("image",new Map);this.Wa=new Set;this.i=new Map;this.l=null;this.L="";this.Ka=new qv;this.J=-1;this.
|
|
985
|
-
this.K=new Map;this.va=new Map;this.oa=new Map;this.
|
|
986
|
-
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.
|
|
987
|
-
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!Dv(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(Ev(a,g));return E(m,Promise.all(b),2)}Fv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.
|
|
988
|
-
h&&Iv(a);G(m)})};function Jv(a,b){return Dv(a)?a.N.get(b.type):b.
|
|
989
|
-
function Ev(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
990
|
-
b.M().includes(m)||b.Jg.push(m);n=gv(l.g,"EXT-X-DEFINE");p=Kv(a,n,m);q=b.stream;u=Jv(a,b);return E(R,Lv(a,l,q.mimeType,b.M,p),3)}v=R.h;w=v.keyIds;A=v.drmInfos;z=function(Q,ja){return Q.size===ja.size&&[].concat(x(Q)).every(function(ka){return ja.has(ka)})};z(q.keyIds,w)||(q.keyIds=w,q.drmInfos=A,a.h.newDrmInfo(q));B=Mv(a,l,
|
|
991
|
-
|
|
984
|
+
function xv(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=Cd(a):e=vd(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",vv);vv.parse=wv;hg("data",wv);function yv(){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(Od,new Map);this.N.set("image",new Map);this.Wa=new Set;this.i=new Map;this.l=null;this.L="";this.Ka=new qv;this.J=-1;this.aa=Infinity;this.$=this.qb=!1;this.A=new Nc(function(){zv(a)});this.pa=Av;this.o=null;this.Xa=0;this.m=Infinity;this.Ja=this.wa=this.T=0;this.W=new eg;this.F=new Map;this.G=new Map;this.ca=new Map;this.fa=new Map;
|
|
985
|
+
this.K=new Map;this.va=new Map;this.oa=new Map;this.ib=this.C=!1;this.hb=new Ua(5);this.j=null;this.da=!0}r=yv.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,Bv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,E(e,Cv(c,d.data,a),3)):e.return(c.o)})};
|
|
986
|
+
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.Wa.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.va.clear();this.oa.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
987
|
+
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!Dv(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(Ev(a,g));return E(m,Promise.all(b),2)}Fv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.pd});d.length&&!h&&(k=Gv,Hv(a,k.gh),l=d.map(function(n){return n.Bb}),a.l.Ta(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
988
|
+
h&&Iv(a);G(m)})};function Jv(a,b){return Dv(a)?a.N.get(b.type):b.je}
|
|
989
|
+
function Ev(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J,H,F,N,L,M,P;return O(function(R){if(1==R.g){c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new sc(f),h=g.g,b.Sd&&(0<=b.lb&&h.add("_HLS_msn",String(b.lb)),0<=b.mb&&h.add("_HLS_part",String(b.mb))),b.Td&&h.add("_HLS_skip","YES"),Ic(h)&&wc(g,h),c.push(g.toString());return E(R,Bv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=rv(a.Ka,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
|
|
990
|
+
b.M().includes(m)||b.Jg.push(m);n=gv(l.g,"EXT-X-DEFINE");p=Kv(a,n,m);q=b.stream;u=Jv(a,b);return E(R,Lv(a,l,q.mimeType,b.M,p),3)}v=R.h;w=v.keyIds;A=v.drmInfos;z=function(Q,ja){return Q.size===ja.size&&[].concat(x(Q)).every(function(ka){return ja.has(ka)})};z(q.keyIds,w)||(q.keyIds=w,q.drmInfos=A,a.h.newDrmInfo(q));B=Mv(a,l,u,p,b.M,b.type);y=B.segments;if(C=B.bandwidth)q.bandwidth=C;q.segmentIndex.wd(y,a.l.jb());y.length&&(D=jv(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(K=iv(l.g,"EXT-X-SKIP"))?Number(Z(K,"SKIPPED-SEGMENTS")):
|
|
991
|
+
0,J=Nv(D,y),H=J.lb,F=J.mb,b.lb=H+I,b.mb=F,N=u.get(D),q.segmentIndex.Ha(N));L=q.segmentIndex.g[0]||null;b.hc=L.startTime;M=y[y.length-1];b.Bb=M.endTime;if(P=iv(l.g,"EXT-X-ENDLIST"))b.pd=!0;Ov(a,l);G(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
992
992
|
function Pv(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=Jv(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.Se=k;break}}}}if(!(0>a.J))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,Qv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.Se,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Rv(a,
|
|
993
993
|
c,d)}
|
|
994
|
-
function Sv(a,b){if(Infinity==a.
|
|
994
|
+
function Sv(a,b){if(Infinity==a.aa){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.aa=Math.min(a.aa,d.h))}}b=a.aa;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!Qv(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.M(),"Expect AV sync issues!");else for(Rv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Uf(b)}}}
|
|
995
995
|
function Rv(a,b,c){b.hc+=c;b.Bb+=c;a=Jv(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}
|
|
996
|
-
function Cv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
997
|
-
u=gv(d.g,"EXT-X-SESSION-DATA");v=gv(d.g,"EXT-X-CONTENT-STEERING");Vv(a,u);return E(za,Wv(a,v),4);case 4:return Xv(a,m),Yv(a,l),E(za,Zv(a,m,q,l,k,a.s),5);case 5:return f=za.h,g=$v(a,l),E(za,aw(a,n,p),6);case 6:h=za.h;za.u(3);break;case 7:return z=za.h,B=z.type,y=z.mimeType,
|
|
998
|
-
cw(M.stream,
|
|
999
|
-
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a
|
|
996
|
+
function Cv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J,H,F,N,L,M,P,R,Q,ja,ka,va,ya,Ba,Ka,Ca,Za;return O(function(za){switch(za.g){case 1:d=rv(a.Ka,b);e=gv(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new sk(null,0);a.l.lc(!0);k=function(){return[c]};if(1==d.type)return a.da=!1,w=gv(d.g,"EXT-X-DEFINE"),A=Kv(a,w,a.L),E(za,Tv(a,d,k,A),7);Uv(a,e);l=gv(d.g,"EXT-X-MEDIA");m=gv(d.g,"EXT-X-STREAM-INF");n=gv(d.g,"EXT-X-IMAGE-STREAM-INF");p=gv(d.g,"EXT-X-I-FRAME-STREAM-INF");q=gv(d.g,"EXT-X-SESSION-KEY");
|
|
997
|
+
u=gv(d.g,"EXT-X-SESSION-DATA");v=gv(d.g,"EXT-X-CONTENT-STEERING");Vv(a,u);return E(za,Wv(a,v),4);case 4:return Xv(a,m),Yv(a,l),E(za,Zv(a,m,q,l,k,a.s),5);case 5:return f=za.h,g=$v(a,l),E(za,aw(a,n,p),6);case 6:h=za.h;za.u(3);break;case 7:return z=za.h,B=z.type,y=z.mimeType,C=z.codecs,D=z.language,K=z.height,I=z.width,J=z.channelCount,H=z.sampleRate,F=z.closedCaptions,N=z.Fd,L=z.colorGamut,E(za,bw(a,a.B++,A,d,k,C,B,D,!0,"Media Playlist",J,F,null,!1,H,!1,y),8);case 8:M=za.h,a.i.set(c,M),"video"==B&&
|
|
998
|
+
cw(M.stream,I,K,null,N,null,L),f.push({id:0,language:xe(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==B?M.stream:null,video:"video"==B?M.stream:null,bandwidth:M.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==d.type&&(Dv(a)&&(dw(a,d),P=a.m,a.A.X(P)),R=Array.from(a.i.values()),ew(a,R),Iv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
999
|
+
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){za.u(9);break}Q=[];ja=t(a.o.variants);for(ka=ja.next();!ka.done;ka=ja.next())va=ka.value,va.audio&&""===va.audio.codecs&&Q.push(va.audio.createSegmentIndex()),va.video&&""===va.video.codecs&&Q.push(va.video.createSegmentIndex());return E(za,Promise.all(Q),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){ya=
|
|
1000
1000
|
[];Ba=f[0];Ka=t([Ba.video,Ba.audio]);for(Ca=Ka.next();!Ca.done;Ca=Ka.next())(Za=Ca.value)&&!Za.segmentIndex&&ya.push(Za.createSegmentIndex());if(0<ya.length)return E(za,Promise.all(ya),0)}za.u(0)}})}
|
|
1001
|
-
function Tv(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
1002
|
-
t(iw(null,z.value)),w=B.next().value,A=B.next().value;y=sl(g,w,A,a.g.retryParameters);return E(
|
|
1001
|
+
function Tv(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I;return O(function(J){switch(J.g){case 1:e=lt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return J.return(e);f=b.segments[0];g=kv(c(),f.h,d);h=g[0];k=new sc(h);l=k.Qa.split(".").pop();if(m=fw[l])return J.return(lt(m));n=rg;p=null;q=gw(a,b,f.g,c,d);a.ca.clear();if(!q){J.u(2);break}u=sl(q.M(),q.ac(),q.Yb(),a.g.retryParameters);return E(J,hw(a,u,n,{type:0}),3);case 3:v=J.h,p=v.data;case 2:w=0;A=null;if(z=iv(f.g,"EXT-X-BYTERANGE"))B=
|
|
1002
|
+
t(iw(null,z.value)),w=B.next().value,A=B.next().value;y=sl(g,w,A,a.g.retryParameters);return E(J,hw(a,y,n,{type:1}),4);case 4:C=J.h;(D=C.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var H=C.data;var F=Bb(H);F=(new tj).parse(F);var N=F.kd();F=F.lf();var L=[],M=!1,P=!1;switch(N.audio){case "aac":case "aac-loas":L.push("mp4a.40.2");M=!0;break;case "mp3":L.push("mp4a.40.34");M=!0;break;case "ac3":L.push("ac-3");M=!0;break;case "ec3":L.push("ec-3");M=!0;break;
|
|
1003
1003
|
case "opus":L.push("opus"),M=!0}switch(N.video){case "avc":F.Ga?L.push(F.Ga):L.push("avc1.42E01E");P=!0;break;case "hvc":F.Ga?L.push(F.Ga):L.push("hvc1.1.6.L93.90");P=!0;break;case "av1":L.push("av01.0.01M.08"),P=!0}if(L.length){N=M&&!P;M=new Map;if(P){P=new Hb("video/mp2t");P.i(H);H=t(P.j());for(var R=H.next();!R.done;R=H.next())R=R.value,M.set(R,R);P.g()}F={type:N?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:F.height,width:F.width,channelCount:null,sampleRate:null,
|
|
1004
|
-
closedCaptions:M,
|
|
1004
|
+
closedCaptions:M,Fd:null,colorGamut:null}}else F=null;if(K=F)return J.return(K)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(I=mt(p,C.data))return J.return(I);return J.return(e)}})}
|
|
1005
1005
|
function Iv(a){if(Dv(a)){if(a.pa==jw){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Bb),c=Math.min(c,e.hc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.xe(b)}}else a.l.Ta(kw(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))&&
|
|
1006
|
-
c.h&&a.l.Rg(c.h);a.l.
|
|
1006
|
+
c.h&&a.l.Rg(c.h);a.l.ge()}function Uv(a,b){var c=(new sc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
1007
1007
|
function Kv(a,b,c){c=(new sc(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}
|
|
1008
1008
|
function Xv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=lw(a,d);if(f){var g=Md(Od,d);a.G.set(f,g);Lb(d,g)}e&&(f=Md("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Md("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
1009
1009
|
function Vv(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",kv([a.L],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
@@ -1013,13 +1013,13 @@ function pw(a){a.fullMimeTypes=new Set([Sd(a.mimeType,a.codecs)])}
|
|
|
1013
1013
|
function aw(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return E(m,qw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=xa(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=dv(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"),
|
|
1014
1014
|
p=Z(g,"CHARACTERISTICS"),q=rw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;q.stream.width=Number(w)||void 0;q.stream.height=Number(A)||void 0;var z=Z(g,"BANDWIDTH");z&&(q.stream.bandwidth=Number(z));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1015
1015
|
function sw(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=bv(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)mw(a,d[g],c)}
|
|
1016
|
-
function Zv(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
1017
|
-
z(m,""):null;Za.u(6);break}return E(Za,vw(a,m,"",e,null,f),9);case 9:q=Za.h;case 6:if(q){if(q.keyIds)for(B=t(q.keyIds),y=B.next();!y.done;y=B.next())
|
|
1016
|
+
function Zv(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J,H,F,N,L,M,P,R,Q,ja,ka,va,ya,Ba,Ka,Ca;return O(function(Za){switch(Za.g){case 1:g=[];h=new Set;if(!(0<c.length)){Za.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Za.u(2);break}m=l.value;n=dv(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";q=null;if("NONE"==n){Za.u(4);break}if(tw(n)){u=kv(e(),dv(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=lg(u,a.g.retryParameters),A=hw(a,w,6),a.K.set(v,A));Za.u(4);break}if("identity"!=p){q=(z=uw[p])?
|
|
1017
|
+
z(m,""):null;Za.u(6);break}return E(Za,vw(a,m,"",e,null,f),9);case 9:q=Za.h;case 6:if(q){if(q.keyIds)for(B=t(q.keyIds),y=B.next();!y.done;y=B.next())C=y.value,h.add(C);g.push(q)}case 4:l=k.next();Za.u(3);break;case 2:D={};K=t(b);for(I=K.next();!I.done;I=K.next())J=I.value,H=bv(J),D[H]?D[H].push(J):D[H]=[J];F=[];for(N in D)L=D[N],M=L[0],P=Z(M,"FRAME-RATE"),R=Number(Z(M,"AVERAGE-BANDWIDTH"))||Number(dv(M,"BANDWIDTH")),Q=Z(M,"RESOLUTION"),ja=t(Q?Q.split("x"):[null,null]),ka=ja.next().value,va=ja.next().value,
|
|
1018
1018
|
ya=Z(M,"VIDEO-RANGE"),(Ba=Z(M,"REQ-VIDEO-LAYOUT"))&&Ba.includes(",")&&(Ka=Ba.split(",").filter(function(za){return"CH-STEREO"==za||"CH-MONO"==za}),Ba=Ka[0]),Ba=Ba||"CH-MONO",Ca=ww(a,L,d,R),F.push.apply(F,x(xw(a,Ca.audio,Ca.video,R,ka,va,P,ya,Ba,g,h)));return Za.return(F.filter(function(za){return null!=za}))}})}
|
|
1019
1019
|
function ww(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(dv(w,"GROUP-ID"))}),sw(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 dv(w,
|
|
1020
1020
|
"URI")});k=e.audio.find(function(w){return w&&w.M().find(function(A){return u.includes(A)})});h=lw(a,b[0]);p=Md("video",h);(q=Md("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=dv(w,"GROUP-ID");return"SUBTITLES"!=z&&""==A&&g.includes(w)}))&&(m=Z(c,"LANGUAGE"),
|
|
1021
1021
|
p=Z(c,"NAME"),q=yw(c),zw(c),n=Z(c,"CHARACTERISTICS"),v=Aw(c));a=Bw(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}
|
|
1022
|
-
function lw(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a
|
|
1022
|
+
function lw(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.$=0<c.length;a.$||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 nt(a)}function yw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1023
1023
|
function Aw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function zw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1024
1024
|
function xw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())cw(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var 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.M().sort().join(","):"";var u=f?f.M().sort().join(","):
|
|
1025
1025
|
"";q=q+" - "+u;h&&k&&!gi(n,p)||a.Wa.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.Wa.add(q))}return e}
|
|
@@ -1029,44 +1029,44 @@ m=n.next().value;n=n.next().value;(m=c.get(m))&&ut(a.j,l,m,n)}}c=Z(h,"LANGUAGE")
|
|
|
1029
1029
|
function qw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=dv(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=rw(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])*
|
|
1030
1030
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1031
1031
|
function Bw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var q=p.value;p=dv(q,"URI");q=Z(q,"PATHWAY-ID");a.j&&q&&ut(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=Ld(d,c);d=rw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
1032
|
-
function rw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(
|
|
1033
|
-
H.segments[0],iv(R.g,"EXT-X-GAP")&&(P=!1);if(!P){pb.u(3);break}a.da=!1;return E(pb,Tv(a,H,v,N),5);case 5:Q=pb.h,!Q.closedCaptions.size||l&&l.size==Q.closedCaptions.size||(l=Q.closedCaptions,M=!0),!a
|
|
1034
|
-
|
|
1035
|
-
(Ca=va.segmentIndex.get(0))&&Ca.ea&&(w.mimeType="application/mp4",pw(w));Cw(a)&&(a.qb?ew(a,[z]):(a.qb=!0,Za=Array.from(a.i.values()),za=Za.filter(function(
|
|
1036
|
-
y=new AbortController;return B=new Promise(function(
|
|
1037
|
-
function Fv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.wc(function(e){c.push(e)});a.l.
|
|
1032
|
+
function rw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(C){var D,K,I,J,H,F,N,L,M,P,R,Q,ja,ka,va,ya,Ba,Ka,Ca,Za,za,Va;return O(function(pb){switch(pb.g){case 1:return D=Qd,K=z.M(),E(pb,Bv(a,z.M(),!0),2);case 2:I=pb.h;if(C.aborted)return pb.return();J=I.uri;J==I.originalUri||K.includes(J)||A.push(J);H=rv(a.Ka,I.data);if(1!=H.type)throw new T(2,4,4017);F=gv(H.g,"EXT-X-DEFINE");N=Kv(a,F,J);L=void 0;M=!1;if(!(!a.$&&a.g.hls.disableCodecGuessing||a.da&&e==D.ga&&!a.g.hls.disableClosedCaptionsDetection)){pb.u(3);
|
|
1033
|
+
break}if(P=0<H.segments.length)R=H.segments[0],iv(R.g,"EXT-X-GAP")&&(P=!1);if(!P){pb.u(3);break}a.da=!1;return E(pb,Tv(a,H,v,N),5);case 5:Q=pb.h,!Q.closedCaptions.size||l&&l.size==Q.closedCaptions.size||(l=Q.closedCaptions,M=!0),!a.$&&a.g.hls.disableCodecGuessing&&(L=Q.mimeType,d=Q.codecs);case 3:return ja=Dv(a),E(pb,bw(a,0,N,H,v,d,e,f,g,h,k,l,m,n,p,q,L),6);case 6:ka=pb.h;if(C.aborted)return pb.return();va=ka.stream;Dv(a)&&!ja&&dw(a,H);z.hc=ka.hc;z.Bb=ka.Bb;z.Td=ka.Td;z.Sd=ka.Sd;z.pd=ka.pd;z.je=ka.je;
|
|
1034
|
+
z.lb=ka.lb;z.mb=ka.mb;z.vf=!0;w.segmentIndex=va.segmentIndex;w.encrypted=va.encrypted;w.drmInfos=va.drmInfos;w.keyIds=va.keyIds;w.mimeType=va.mimeType;w.bandwidth=w.bandwidth||va.bandwidth;w.codecs=w.codecs||va.codecs;w.closedCaptions=w.closedCaptions||va.closedCaptions;pw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&M&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.ga||e==D.V)for(ya=t(a.i.values()),Ba=ya.next();!Ba.done;Ba=ya.next())Ka=Ba.value,Ka.vf||Ka.type!=e||(Ka.stream.mimeType=va.mimeType,
|
|
1035
|
+
pw(Ka.stream));e==D.na&&(Ca=va.segmentIndex.get(0))&&Ca.ea&&(w.mimeType="application/mp4",pw(w));Cw(a)&&(a.qb?ew(a,[z]):(a.qb=!0,Za=Array.from(a.i.values()),za=Za.filter(function(Pc){return Pc.stream.segmentIndex}),ew(a,za),Iv(a),Va=a.m,0<Va&&a.A.X(Va)));G(pb)}})}function v(){return a.j&&1<c.length?vt(a.j,b):A.concat(lv([a.L],c,a.s))}var w=Dw(a,d,e,f,g,h,k,l,m,n,p,q),A=[],z={stream:w,type:e,Jg:A,M:v,hc:0,Bb:0,je:new Map,Td:!1,Sd:!1,pd:!1,Se:-1,lb:-1,mb:-1,vf:!1},B=null,y=new AbortController;w.createSegmentIndex=
|
|
1036
|
+
function(){if(B)return B;y=new AbortController;return B=new Promise(function(C){C(u(y.signal))})};w.closeSegmentIndex=function(){B&&!w.segmentIndex&&y.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);B=null};return z}function kw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Bb));return b}
|
|
1037
|
+
function Fv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.wc(function(e){c.push(e)});a.l.xd(c)}function ew(a,b){if(!Dv(a))for(var c=kw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.vc(0,c);Fv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Pv(a,b):(Sv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Pv(a,b))}
|
|
1038
1038
|
function Qv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Cw(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}
|
|
1039
|
-
function bw(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w){var A,z,B,y,D,
|
|
1040
|
-
D=
|
|
1041
|
-
|
|
1039
|
+
function bw(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w){var A,z,B,y,C,D,K,I,J,H,F,N,L,M,P,R,Q,ja,ka,va,ya;return O(function(Ba){switch(Ba.g){case 1:var Ka=iv(d.g,"EXT-X-PLAYLIST-TYPE"),Ca=iv(d.g,"EXT-X-ENDLIST");Ca=Ka&&"VOD"==Ka.value||Ca;Ka=Ka&&"EVENT"==Ka.value&&!Ca;Ka=!Ca&&!Ka;Ca?Hv(a,Av):Ka?Hv(a,jw):Hv(a,Ew);Dv(a)&&Ov(a,d);A=Dv(a)?a.N.get(g):new Map;z=Mv(a,d,A,c,e,g);B=z.segments;y=z.bandwidth;if(w){Ba.u(2);break}return E(Ba,Fw(a,g,f,B),3);case 3:w=Ba.h;case 2:return E(Ba,Lv(a,d,w,e,c),4);case 4:C=Ba.h;
|
|
1040
|
+
D=C.drmInfos;K=C.keyIds;I=C.encrypted;J=C.kh;if(I&&!D.length&&!J)throw new T(2,4,4026);H=Dw(a,f,g,h,k,l,m,n,p,q,u,v);H.encrypted=I;H.drmInfos=D;H.keyIds=K;H.mimeType=w;y&&(H.bandwidth=y);pw(H);Dv(a)&&Ov(a,d);F=B[0].startTime;N=B[B.length-1];L=N.endTime;M=new Ok(B);H.segmentIndex=M;R=(P=iv(d.g,"EXT-X-SERVER-CONTROL"))?null!=cv(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=cv(P,"CAN-BLOCK-RELOAD"):!1;ja=jv(d.g,"EXT-X-MEDIA-SEQUENCE",0);ka=Nv(ja,B);va=ka.lb;ya=ka.mb;return Ba.return({stream:H,type:g,Jg:[],M:e,hc:F,
|
|
1041
|
+
Bb:L,Td:R,Sd:Q,pd:!1,Se:-1,lb:va,mb:ya,je:A,vf:!1})}})}function Nv(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}}
|
|
1042
1042
|
function Dw(a,b,c,d,e,f,g,h,k,l,m,n){var p=nw(c,b)||ow(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==Od?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()},
|
|
1043
1043
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Od?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:xe(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,
|
|
1044
1044
|
fullMimeTypes:new Set};pw(a);return a}
|
|
1045
|
-
function Lv(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
1046
|
-
!0;F=Z(
|
|
1045
|
+
function Lv(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J,H,F,N,L,M,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=gv(k.g,"EXT-X-KEY"),m=null,l.length)for(m=gw(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())q=p.value,f.set(q,m);v=u=!1;w=[];A=new Set;z=t(f);B=z.next();case 2:if(B.done){Q.u(4);break}y=B.value;C=t(y);D=C.next().value;K=C.next().value;I=D;J=K;H=dv(I,"METHOD");if("NONE"==H){Q.u(3);break}u=
|
|
1046
|
+
!0;F=Z(I,"KEYFORMAT")||"identity";N=null;if(tw(H)){v=!0;Q.u(3);break}if("identity"!=F){N=(L=uw[F])?L(I,c):null;Q.u(6);break}return E(Q,vw(a,I,c,d,J,e),8);case 8:N=Q.h;case 6:if(N){if(N.keyIds)for(M=t(N.keyIds),P=M.next();!P.done;P=M.next())R=P.value,A.add(R);w.push(N)}case 3:B=z.next();Q.u(2);break;case 4:return Q.return({drmInfos:w,keyIds:A,encrypted:u,kh:v})}})}
|
|
1047
1047
|
function Gw(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=Dd(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=jv(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(dv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1048
1048
|
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=kv(d(),dv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=lg(l,a.g.retryParameters),p=hw(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;
|
|
1049
1049
|
G(w)})};a.fa.set(c,k)}return a.fa.get(c)}
|
|
1050
|
-
function Ov(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=iv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=iv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=iv(b.g,"EXT-X-PART-INF"))a.
|
|
1050
|
+
function Ov(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=iv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=iv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=iv(b.g,"EXT-X-PART-INF"))a.T=Number(dv(e,"PART-TARGET"));b=iv(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.T?(a.m=a.ib?5*a.T<=c?Math.min(a.T,a.m):Math.min(c,a.m):Math.min(a.T,a.m),a.Ja=b?Number(dv(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1051
1051
|
cv(b,"HOLD-BACK"):null,a.wa=c?Number(c.value):0);a.Xa=Math.max(d,a.Xa)}function dw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Ja)b=a.Ja;else if(a.wa)b=a.wa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Xa*c}a.l.Sg(0);a.l.Pf(b);a.l.lc(!1)}
|
|
1052
1052
|
function gw(a,b,c,d,e){var f=iv(c,"EXT-X-MAP");if(!f)return null;var g=dv(f,"URI"),h=kv(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?tw(dv(m,"METHOD"))&&m.id<f.id&&(k=Gw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Hw(h,f,l,k);a.ca.set(g,b)}return a.ca.get(g)}
|
|
1053
1053
|
function Hw(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 xi(function(){return a},e,f,null,null,null,d)}
|
|
1054
1054
|
function Iw(a,b,c,d,e,f,g,h,k){var l=d.g,m=iv(l,"EXTINF"),n=0,p=0,q=null;d.vb.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=iv(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=jh(v.value))}var w=Di;iv(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.vb.length)throw new T(2,4,4024,"EXTINF");
|
|
1055
|
-
if(!a.C)return null}var A=[];v=!1;var z=null,B=!1,y=!1;if(a.C&&d.vb.length){n=
|
|
1056
|
-
|
|
1057
|
-
|
|
1055
|
+
if(!a.C)return null}var A=[];v=!1;var z=null,B=!1,y=!1;if(a.C&&d.vb.length){n=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=u,D={},K=0;K<d.vb.length;D={Wc:D.Wc,Ld:D.Ld},K++){var I=d.vb[K],J=0==K?c:A[A.length-1],H=0==K?e:J.endTime,F=Number(Z(I,"DURATION"))||a.T;if(F){var N=H+F,L=0,M=null;"EXT-X-PRELOAD-HINT"==I.name?(L=(L=Z(I,"BYTERANGE-START"))?Number(L):0,(J=Z(I,"BYTERANGE-LENGTH"))?M=L+Number(J)-1:L&&(M=Number.MAX_SAFE_INTEGER)):(L=Z(I,"BYTERANGE"),M=t(iw(J,L)),
|
|
1056
|
+
L=M.next().value,M=M.next().value);D.Ld=Z(I,"URI");if(D.Ld){J=Di;"YES"==Z(I,"GAP")&&(J=2,B=!0);D.Wc=null;var P=function(Q){return function(){null==Q.Wc&&(Q.Wc=kv(h(),Q.Ld,f));return Q.Wc}}(D);n&&0<=L&&null!=M&&(z=P,v=!0);H=new zi(H,N,P,L,M,b,0,0,Infinity,[],"",null,C,J,k);"EXT-X-PRELOAD-HINT"==I.name&&(H.wf(),y=!0);"YES"!=Z(I,"INDEPENDENT")&&0<K&&H.ie();A.push(H);C&&(C+=F)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(A.length)n=A[A.length-1].endTime;else return null;
|
|
1057
|
+
v&&(B||0!=A[0].Ba?(v=!1,z=null):A=[]);(m=iv(l,"EXT-X-BYTERANGE"))?(q=t(iw(c,m.value)),p=q.next().value,q=q.next().value):A.length&&(p=A[0].Ba,q=A[A.length-1].ka);c="";m=null;"image"==g&&(c="1x1",g=iv(l,"EXT-X-TILES"))&&(c=dv(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var R=null;b=new zi(e,n,function(){if(z)return z();null==R&&(R=kv(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.ib=!0,b.Bg(),y&&b.wf());return b}
|
|
1058
1058
|
function iw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ka+1,d=c+b-1);return[c,d]}
|
|
1059
|
-
function Mv(a,b,c,d,e,f
|
|
1060
|
-
|
|
1061
|
-
b*1E3));if(
|
|
1062
|
-
e());if(
|
|
1059
|
+
function Mv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=jv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=jv(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=iv(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,q=0;Dv(a)&&c.has(p)&&(q=c.get(p));0===q&&a.pa==jw&&0<c.size&&!c.has(p)&&(q=a.l.jb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],z=0==w?q:v.endTime;p=l+n+w;iv(A.g,"EXT-X-DISCONTINUITY")&&k++;var B=t(A.g);for(var y=B.next();!y.done;y=B.next())y=y.value,"EXT-X-KEY"==y.name&&(tw(dv(y,"METHOD"))?
|
|
1060
|
+
h=Gw(a,y,b,e,d):h=void 0);c.set(p,z);B=gw(a,b,A.g,e,d);!a.C&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());if(z=Iw(a,B,v,A,z,d,f,e,h))(v=jv(A.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:z.endTime-z.startTime}):m.length&&(v=m.pop(),v.duration+=z.endTime-z.startTime,m.push(v)),v=z,z.j=k,Qv(a,f)&&null!=a.J&&p<a.J||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(C,D){return C+D.duration},0),b=Math.round(m.reduce(function(C,D){return C+D.bitrate*D.duration},0)/
|
|
1061
|
+
b*1E3));if(m=u.some(function(C){return null!=C.h}))for(c={},d=0;d<u.length;c={Pc:c.Pc,Oc:c.Oc,Gd:c.Gd,Ib:c.Ib,Lc:c.Lc},d++)if(c.Ib=u[d],null==c.Ib.h)for(c.Oc=0,c.Pc=d,e=function(C){return function(){var D=u[C.Pc];if(D){if(null!=D.h)return D.h+C.Oc;C.Oc-=D.endTime-D.startTime;C.Pc+=1}return null}}(c),c.Lc=0,c.Gd=d,g=function(C){return function(){var D=u[C.Gd];if(D){D!=C.Ib&&(C.Lc+=D.endTime-D.startTime);if(null!=D.h)return D.h+C.Lc;--C.Gd}return null}}(c);null==c.Ib.h;)c.Ib.h=g(),null==c.Ib.h&&(c.Ib.h=
|
|
1062
|
+
e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.aa;if(m&&Infinity!=c&&!Qv(a,f))for(a=t(u),d=a.next();!d.done;d=a.next())d.value.Uf(c);return{segments:u,bandwidth:b}}function nw(a,b){if(a==Od){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
|
|
1063
1063
|
function ow(a){return a==Od?"text/vtt":Jw[a].mp4}
|
|
1064
|
-
function Fw(a,b,c,d
|
|
1065
|
-
|
|
1066
|
-
function zv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();Dv(a)&&(d=(c-b)/1E3,a.
|
|
1067
|
-
function Dv(a){return a.pa!=Av}function Hv(a,b){a.pa=b;a.l&&a.l.lc(!Dv(a));Dv(a)||a.A.stop()}function hw(a,b,c,d){if(!a.
|
|
1068
|
-
function vw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,B,y;return O(function(
|
|
1069
|
-
3);case 3:q=
|
|
1064
|
+
function Fw(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A;return O(function(z){switch(z.g){case 1:e=rg;f=Math.trunc((d.length-1)/2);for(g=d[f];2==g.status&&f<d.length;)f++,g=d[f];if(2==g.status)return z.return(ow(b));h=g.M();k=new sc(h[0]);l=k.Qa.split(".").pop();m=Jw[b];if((n=m[l])||(n=fw[l])||(n=nw(b,c)))return z.return(n);q=1;u=lg(h,a.g.retryParameters);ta(z,2);u.method="HEAD";return E(z,hw(a,u,e,{type:q}),4);case 4:v=z.h;p=v.headers["content-type"];wa(z,3);break;case 2:w=xa(z);if(!w||1002!=w.code&&
|
|
1065
|
+
1001!=w.code){z.u(3);break}u.method="GET";return E(z,hw(a,u,e,{type:q}),6);case 6:A=z.h,p=A.headers["content-type"];case 3:return p?z.return(p.toLowerCase().split(";")[0]):z.return(ow(b))}})}function cw(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Bv(a,b,c){return hw(a,lg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1066
|
+
function zv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();Dv(a)&&(d=(c-b)/1E3,a.hb.sample(1,d),e=a.m,f=Math.max(0,e-Wa(a.hb)),a.A.X(f));wa(h,3);break;case 2:g=xa(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.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();G(h)}})}
|
|
1067
|
+
function Dv(a){return a.pa!=Av}function Hv(a,b){a.pa=b;a.l&&a.l.lc(!Dv(a));Dv(a)||a.A.stop()}function hw(a,b,c,d){if(!a.W)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);fg(a.W,b);return b.promise}function tw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1068
|
+
function vw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,B,y;return O(function(C){switch(C.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(ld())throw new T(2,4,4041);g=dv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=kv(d(),dv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ed(Cd(k[0].split("data:text/plain;base64,").pop()));C.u(2);break}m=k.sort().join("");a.va.has(m)||(n=lg(k,a.g.retryParameters),p=hw(a,n,6),a.va.set(m,p));return E(C,a.va.get(m),
|
|
1069
|
+
3);case 3:q=C.h,l=Ed(q.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.oa.has(e)){v=a.oa.get(e);C.u(5);break}w=sl(e.M(),e.ac(),e.Yb(),a.g.retryParameters);A=rg;return E(C,hw(a,w,A,{type:0}),6);case 6:z=C.h,v=pt(z.data),a.oa.set(e,v);case 5:v&&(u=v);case 4:return B=new Map,B.set(u,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),C.return(Kd(B,y))}})}S("shaka.hls.HlsParser",yv);
|
|
1070
1070
|
var fw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Jw={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",
|
|
1071
1071
|
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"}},uw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(ld())throw new T(2,4,4041);a=dv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Jd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=
|
|
1072
1072
|
dv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=dv(a,"URI");b=xv(b.split("?")[0]);b=Bb(b.data);c=Jd("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=dv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=dv(a,"URI");a=xv(a.split("?")[0]);a=
|
|
@@ -1086,7 +1086,7 @@ a=Sw(d,fx(a),c,e)}c=a}a=Sw("stsd",gx,c);return b("stbl",a,Sw("stts",hx),Sw("stsc
|
|
|
1086
1086
|
function ex(a){var b=Sw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(Xw(d,4))));c=Sw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Sw("schm",d);e=Sw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=cx(h.value)}a=new Uint8Array([0,
|
|
1087
1087
|
0,0,0,0,0,1,8]);f=Sw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1088
1088
|
function lx(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Sw;var g=new Uint8Array([0,0,0,0].concat(x(Xw(c.data?c.data.pb:0,4))));g=Sw("mfhd",g);var h;var k=c.data?c.data.Sa:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ma<<4|m.Oa<<2|m.Na}k=Sw("sdtp",l);var n=k.length+92;l=Sw;h=new Uint8Array([0,0,0,58].concat(x(Xw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Sw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1089
|
-
0;var p=Math.floor(m%(Ww+1));m=new Uint8Array([1,0,0,0].concat(x(Xw(Math.floor(m/(Ww+1)),4)),x(Xw(p,4))));m=Sw("tfdt",m);var q=n;n=c.data?c.data.Sa:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);q+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Xw(p,4)),x(Xw(q,4))),0);for(q=0;q<p;q++){var w=n[q];u=Xw(w.duration,4);var A=Xw(w.size,4),z=w.flags;w=Xw(w.Za,4);v.set([].concat(x(u),x(A),[z.
|
|
1089
|
+
0;var p=Math.floor(m%(Ww+1));m=new Uint8Array([1,0,0,0].concat(x(Xw(Math.floor(m/(Ww+1)),4)),x(Xw(p,4))));m=Sw("tfdt",m);var q=n;n=c.data?c.data.Sa:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);q+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Xw(p,4)),x(Xw(q,4))),0);for(q=0;q<p;q++){var w=n[q];u=Xw(w.duration,4);var A=Xw(w.size,4),z=w.flags;w=Xw(w.Za,4);v.set([].concat(x(u),x(A),[z.bb<<2|z.Ma,z.Oa<<6|z.Na<<4|z.cb,z.La&61440,z.La&15],x(w)),12+16*q)}n=Sw("trun",v);k=l("traf",h,m,n,k);f=f("moof",
|
|
1090
1090
|
g,k);e.call(d,b,[f,mx(c)])}return Fd.apply(zd,x(b))}function mx(a){a=(a.data?a.data.Sa:[]).map(function(b){return b.data});a=Fd.apply(zd,x(a));return Sw("mdat",a)}function Xw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function cx(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
1091
1091
|
function Sw(a){var b=La.apply(1,arguments),c=nx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],nx[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
1092
1092
|
var Qw=!1,Ww=Math.pow(2,32)-1,nx={},Yw=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Zw=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),hx=new Uint8Array([0,0,0,0,0,0,0,0]),ix=new Uint8Array([0,0,0,0,0,0,0,0]),kx=new Uint8Array([0,0,0,0,0,0,0,0]),jx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),$w=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),bx=new Uint8Array([0,
|
|
@@ -1096,10 +1096,10 @@ r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E
|
|
|
1096
1096
|
function qx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=lg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),fg(a.A,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=nm){rb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=gu(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
|
|
1097
1097
|
l);n(m);m=vd(m.outerHTML)}var p=Tg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=om&&l(p);a.i||(a.i=new sk(null,0));if(l=gh(p,"IsLive",qh,!1))throw new T(2,4,4047);a.i.lc(!l);n=gh(p,"TimeScale",oh,1E7);m=gh(p,"DVRWindowLength",oh);l&&(0===m||isNaN(m))&&(m=Infinity);var q=gh(p,"CanSeek",qh,!1);0===m&&q&&(m=Infinity);q=null;m&&0<m&&(q=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(q=a.g.availabilityWindowOverride);null==q&&(q=Infinity);a.i.xe(q);m=gh(p,
|
|
1098
1098
|
"Duration",oh,Infinity);l||a.i.Ta(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};q=$g(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];q=t(q);for(u=q.next();!u.done;u=q.next())m=m.concat($g(u.value,"ProtectionHeader"));if(m.length){q=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var z=Mw(v);if(z)a:{z=t(ch(z,"DATA"));for(var B=z.next();!B.done;B=z.next())if(B=dh(B.value,"KID")){z=Cd(ah(B));z=new Uint8Array([z[3],z[2],z[1],z[0],z[5],
|
|
1099
|
-
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Ed(z);break a}z=null}else z=null;B=Cd(ah(v));w=Dd(w.replace(/-/g,""));w=[{initData:Sg(B,w,new Set,0),initDataType:"cenc",keyId:z}];w=Jd(A,"cenc",w);z&&w.keyIds.add(z);if(A=Ow.get(A))w.licenseServerUri=A(v);q.push(w)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=$g(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=$g(v,"QualityLevel");w=l.timescale;z=l.duration;B=$g(v,"c");for(var y=[],
|
|
1100
|
-
gh(K,"d",oh);K=gh(K,"r",mh);if(!H)break;
|
|
1099
|
+
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Ed(z);break a}z=null}else z=null;B=Cd(ah(v));w=Dd(w.replace(/-/g,""));w=[{initData:Sg(B,w,new Set,0),initDataType:"cenc",keyId:z}];w=Jd(A,"cenc",w);z&&w.keyIds.add(z);if(A=Ow.get(A))w.licenseServerUri=A(v);q.push(w)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=$g(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=$g(v,"QualityLevel");w=l.timescale;z=l.duration;B=$g(v,"c");for(var y=[],C=0,D=0;D<B.length;++D){var K=B[D],I=B[D+1],J=gh(K,"t",oh),H=
|
|
1100
|
+
gh(K,"d",oh);K=gh(K,"r",mh);if(!H)break;J=null!=J?J:C;K=K||0;if(0>K)if(I){I=gh(I,"t",oh);if(null==I)break;else if(J>=I)break;K=Math.ceil((I-J)/H)-1}else{if(Infinity==z)break;else if(J/w>=z)break;K=Math.ceil((z*w-J)/H)-1}for(I=0;I<=K;++I)C=J+H,y.push({start:J/w,end:C/w,ag:J}),J=C}w=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=rx(a,v,z.value,w,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=Od||a.g.disableText||m.push(z):n.push(z):q.push(z))}p=[];q=t(0<q.length?
|
|
1101
1101
|
q:[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,v=t(0<n.length?n:[null]),z=v.next();!z.done;z=v.next())A=p,w=A.push,z=z.value,B=0,u&&u.bandwidth&&0<u.bandwidth&&(B+=u.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(B+=z.bandwidth),z={id:a.s++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!z&&z.primary,audio:u,video:z,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,z);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
|
|
1102
|
-
l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null},a.i.
|
|
1102
|
+
l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null},a.i.ge());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);G(k)})}
|
|
1103
1103
|
function rx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return ab("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=gh(c,"Bitrate",nh),m=gh(c,"MaxWidth",nh),n=gh(c,"MaxHeight",nh),p=gh(c,"Channels",nh),q=gh(c,"SamplingRate",nh),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Ta(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1104
1104
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:xe(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:q,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1105
1105
|
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=sx[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return ab('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!tx.includes(e.toUpperCase()))return ab("Codec not supported:",
|
|
@@ -1108,10 +1108,10 @@ w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.
|
|
|
1108
1108
|
A),w,b,d);w.segmentIndex=new Ok(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1109
1109
|
function ux(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;
|
|
1110
1110
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function vx(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 wx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1111
|
-
function xx(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={
|
|
1112
|
-
si["application/vnd.ms-sstr+xml"]=function(){return new ox};function yx(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=
|
|
1113
|
-
function Dx(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:return h=Ex,k=Fx,p=n=0,q=Date.now(),ta(y,2),E(y,h(a,c),4);case 4:l=y.h;f(Gx(l.headers));if("HEAD"==c.method){y.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(
|
|
1114
|
-
K.value.byteLength;if(!g){H.u(5);break}return E(H,g(K.value),5);case 5:
|
|
1111
|
+
function xx(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={Vc:g.Vc},h=e.next())g.Vc=h.value,d.push(new zi(g.Vc.start,g.Vc.end,function(k){return function(){return Gd(a.l,[f.replace("{start time}",String(k.Vc.ag))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",ox);var tx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),sx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1112
|
+
si["application/vnd.ms-sstr+xml"]=function(){return new ox};function yx(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=ud(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function zx(){}function Ax(a,b,c,d,e){var f=new Bx;zg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Cx,h={ig:!1,Zg:!1};a=Dx(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 Vf(a,function(){h.ig=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Nc(function(){h.Zg=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1113
|
+
function Dx(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:return h=Ex,k=Fx,p=n=0,q=Date.now(),ta(y,2),E(y,h(a,c),4);case 4:l=y.h;f(Gx(l.headers));if("HEAD"==c.method){y.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 K,I,J;return O(function(H){switch(H.g){case 1:return ta(H,2),E(H,u.read(),4);case 4:K=H.h;wa(H,3);break;case 2:return xa(H),H.return();case 3:if(K.done){H.u(5);break}n+=
|
|
1114
|
+
K.value.byteLength;if(!g){H.u(5);break}return E(H,g(K.value),5);case 5:I=Date.now();if(100<I-q||K.done)J=K.done?0:w-n,e(I-q,n-p,J),p=n,q=I;K.done?C.close():(C.enqueue(K.value),D());G(H)}})}D()};new k({start:A});return E(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:wa(y,3);break;case 2:z=xa(y);if(d.ig)throw new T(1,1,7001,a,b);if(d.Zg)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return B=Gx(l.headers),y.return(yx(B,m,l.status,a,l.url,b))}})}
|
|
1115
1115
|
function Gx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Hx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",zx);zx.isSupported=Hx;zx.parse=Ax;var Ex=window.fetch,Cx=window.AbortController,Fx=window.ReadableStream,Bx=window.Headers;
|
|
1116
1116
|
Hx()&&(hg("http",Ax,2,!0),hg("https",Ax,2,!0),hg("blob",Ax,2,!0));function Ix(){}
|
|
1117
1117
|
function Jx(a,b,c,d,e){var f=new Kx,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=Lx(f);e(q);n=!0}};f.onload=function(q){var u=Lx(f),v=f.response;try{d(Date.now()-g,q.loaded-h,0);var w=yx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(q){m(new T(1,
|
|
@@ -1121,26 +1121,26 @@ function Ux(a,b,c,d,e,f){ug(a.i);var g=(a.j.get(b)||Promise.resolve()).then(func
|
|
|
1121
1121
|
function Vx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=rg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Lb(a.h,e);return g.return(f.data)})};function Xx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Uf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Xx.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return E(b,a.g,4)}if(2!=b.g)return wa(b,0);xa(b);G(b)})};
|
|
1122
1122
|
function Yx(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();G(g)})}})}Xx.prototype.store=function(){return this.h};Xx.prototype.promise=function(){return this.g};function Zx(a){this.h=a;this.g=[]}Zx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function $x(a,b){return ay(a,b,"readwrite")}function ay(a,b,c){c=a.h.transaction([b],c);var d=new Xx(c,b);a.g.push(d);d.promise().then(function(){Lb(a.g,d)},function(){Lb(a.g,d)});return d};function by(a,b,c){this.h=new Zx(a);this.i=b;this.g=c}r=by.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return cy(this.i)};r.removeSegments=function(a,b){return dy(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,ey(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.jg(e)}))})};r.addManifests=function(){return cy(this.g)};
|
|
1123
1123
|
r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function fy(a,b,c){a=$x(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=$x(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return dy(this,this.g,a,b)};
|
|
1124
|
-
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,ey(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.
|
|
1125
|
-
function cy(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=$x(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={
|
|
1126
|
-
function dy(a,b,c,d){a=$x(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={
|
|
1127
|
-
function ey(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=ay(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={
|
|
1124
|
+
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,ey(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.cd(e)})))})};r.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=ay(a.h,a.g,"readonly"),c=new Map,E(d,Yx(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.cd(f),2);g=h.h;c.set(e,g);G(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};r.jg=function(a){return a};r.cd=function(a){return Promise.resolve(a)};
|
|
1125
|
+
function cy(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=$x(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Md:g.Md},k=h.next())l=k.value,g.Md=e.add(l),g.Md.onsuccess=function(n){return function(){f.push(n.Md.result)}}(g);return E(m,d.promise(),2)}return m.return(f)})};
|
|
1126
|
+
function dy(a,b,c,d){a=$x(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Kd:e.Kd},f=c.next())e.Kd=f.value,b.delete(e.Kd).onsuccess=function(g){return function(){return d(g.Kd)}}(e);return a.promise()}
|
|
1127
|
+
function ey(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=ay(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Tc:h.Tc,Rc:h.Rc},l=k.next())h.Rc=l.value,h.Tc=e.get(h.Rc),h.Tc.onsuccess=function(n){return function(){void 0==n.Tc.result&&g.push(n.Rc);f[n.Rc]=n.Tc.result}}(h);return E(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function gy(a){this.g=new Zx(a)}gy.prototype.destroy=function(){return this.g.destroy()};gy.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=ay(a.g,"session-ids","readonly"),c=[],E(d,Yx(b,function(e,f){c.push(f)}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};gy.prototype.add=function(a){var b=$x(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
1128
1128
|
gy.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=$x(b.g,"session-ids"),E(d,Yx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function hy(){this.g=new Map}hy.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};hy.prototype.init=function(){var a=this;iy.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
1129
1129
|
function jy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{kb:d,Da:f},Da:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function ky(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({kb:d,Da:f},e)})})}
|
|
1130
1130
|
function ly(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function my(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ny(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1131
1131
|
function oy(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=iy,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function py(a,b){iy.set(a,b)}S("shaka.offline.StorageMuxer",hy);hy.unregister=function(a){iy.delete(a)};hy.register=py;hy.prototype.destroy=hy.prototype.destroy;var iy=new Map;function qy(){by.apply(this,arguments)}pa(qy,by);qy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=$x(c.h,c.g);e=d.store();f=new Uf;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return E(g,Promise.all([d.promise(),f]),0)})};
|
|
1132
|
-
qy.prototype.
|
|
1132
|
+
qy.prototype.cd=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=ry(a.periods[c],e),b.push(f);return E(h,Gt(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1133
1133
|
function ry(a,b){sy(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ty(e,a.startTime,b)})}
|
|
1134
1134
|
function ty(a,b,c){var d=a.initSegmentUri?uy(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1135
1135
|
uy(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,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}}qy.prototype.jg=function(a){return{data:a.data}};
|
|
1136
1136
|
function uy(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new T(2,9,9004,"Could not parse uri "+a);}
|
|
1137
1137
|
function sy(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
1138
1138
|
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function vy(){by.apply(this,arguments)}pa(vy,by);
|
|
1139
|
-
vy.prototype.
|
|
1139
|
+
vy.prototype.cd=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(wy(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,Gt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1140
1140
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1141
1141
|
function wy(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,
|
|
1142
|
-
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 xy(){by.apply(this,arguments)}pa(xy,by);r=xy.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 fy(this,a,b)};r.
|
|
1143
|
-
r.init=function(){var a=this,b=new Uf,c=!1,d=new Nc(function(){c=!0;b.reject(new T(2,9,9017))});d.
|
|
1142
|
+
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 xy(){by.apply(this,arguments)}pa(xy,by);r=xy.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 fy(this,a,b)};r.cd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function yy(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=yy.prototype;
|
|
1143
|
+
r.init=function(){var a=this,b=new Uf,c=!1,d=new Nc(function(){c=!0;b.reject(new T(2,9,9017))});d.X(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 qy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new vy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1144
1144
|
new vy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new xy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new gy(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,
|
|
1145
1145
|
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(),G(b)}})};
|
|
1146
1146
|
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};
|
|
@@ -1151,40 +1151,40 @@ function Dy(a,b){var c=new sk(null,0);c.Ta(b.duration);var d=b.streams.filter(fu
|
|
|
1151
1151
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null}}
|
|
1152
1152
|
function Ey(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
1153
1153
|
b.next())for(e=e.value,g=Fy(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Fy(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
1154
|
-
function Fy(a,b,c){var d=b.segments.map(function(e){return Gy(a,e,b)});c.
|
|
1154
|
+
function Fy(a,b,c){var d=b.segments.map(function(e){return Gy(a,e,b)});c.xd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ok(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1155
1155
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Sd(b.mimeType,b.codecs)])}}
|
|
1156
|
-
function Gy(a,b,c){var d=new Ay("segment",a.h,a.g,b.dataKey);a=new
|
|
1156
|
+
function Gy(a,b,c){var d=new Ay("segment",a.h,a.g,b.dataKey);a=new zi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Hy(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function Hy(a,b){var c=new Ay("segment",a.h,a.g,b);return new xi(function(){return[c.toString()]},0,null)};function Iy(){this.g=null}r=Iy.prototype;r.configure=function(){};
|
|
1157
1157
|
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=By(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new hy;ua(m,2);return E(m,e.init(),4);case 4:return E(m,ly(e,d.kb(),d.Da()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Cy(d.kb(),d.Da()),l=Dy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Aa(m),E(m,e.destroy(),7);case 7:Da(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
1158
1158
|
r.update=function(){};
|
|
1159
1159
|
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new hy,ta(m,2,3),E(m,e.init(),5);case 5:return E(m,ly(e,d.kb(),d.Da()),6);case 6:return f=m.h,E(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Aa(m),E(m,e.destroy(),10);case 10:Da(m,0);break;case 2:xa(m),m.u(3)}})};
|
|
1160
1160
|
r.onInitialVariantChosen=function(){};r.banLocation=function(){};si["application/x-offline-manifest"]=function(){return new Iy};function Jy(){}function Ky(a){var b=By(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Yf(a)):a=b&&"segment"==b.g?Ly(b.key(),b):Wf(new T(2,1,9004,a));return a}
|
|
1161
1161
|
function Ly(a,b){var c=new hy;return Yf(void 0).xa(function(){return c.init()}).xa(function(){return ly(c,b.kb(),b.Da())}).xa(function(d){return d.getSegments([b.key()])}).xa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",Jy);Jy.plugin=Ky;hg("offline",Ky);function My(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Ny(v.info,p)){v.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Oy(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1162
|
-
function Oy(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new wh({Db:b,onError:function(){},
|
|
1162
|
+
function Oy(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new wh({Db:b,onError:function(){},qe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),E(f,Eh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return xa(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1163
1163
|
h.g)return ta(h,2),E(h,Qh(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);xa(h);G(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function Ny(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Mb(a.audioCapabilities,b.audioCapabilities,c)&&Mb(a.videoCapabilities,b.videoCapabilities,c)};function Py(a,b,c){var d=b.presentationTimeline.getDuration();b=Qy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ry(a,b){var c=Dy(new Cy(a.kb(),a.Da()),b),d=b.appMetadata||{};c=Qy(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
1164
1164
|
function Qy(a){var b=[],c=nf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(df(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ef(c.value));return b};function Sy(){this.g={}}function Ty(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 Uy(a,b){a.g[b.id]=b.bandwidth||2048}function Vy(a,b){a=a.g[b];null==a&&(a=0);return a};function Wy(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.Zb()):(this.h=mm(),this.g=new gg);this.i=[];this.j=[];var c=!a;this.l=new tg(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 Sx(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);
|
|
1165
|
-
case 4:b.h=null,b.g=null,G(k)}})})}function Xy(){if(
|
|
1165
|
+
case 4:b.h=null,b.g=null,G(k)}})})}function Xy(){if(Oc())a:{var a=t(iy.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=Wy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=dm(a,b));return qm(this.h,a)};r.getConfiguration=function(){var a=mm();qm(a,this.h,mm());return a};r.Zb=function(){return this.g};
|
|
1166
1166
|
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Rx(this.g);this.j.push(f);b=Yy(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):E(h,Ym(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=ri(a,c||null);return h.return(g())})},e,f);b=new Vf(b,function(){return Sx(f)});b.finally(function(){Lb(d.j,f)});return Zy(this,b)};
|
|
1167
|
-
function Yy(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:return $y(),h=g=null,k=new hy,n=m=l=null,ta(y,2,3),E(y,d(),5);case 5:return g=y.h,E(y,az(a,b,g,e),6);case 6:p=y.h;bz(a);q=!p.presentationTimeline.
|
|
1167
|
+
function Yy(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,z,B;return O(function(y){switch(y.g){case 1:return $y(),h=g=null,k=new hy,n=m=l=null,ta(y,2,3),E(y,d(),5);case 5:return g=y.h,E(y,az(a,b,g,e),6);case 6:p=y.h;bz(a);q=!p.presentationTimeline.U()&&!p.presentationTimeline.ec();if(!q)throw new T(2,9,9005,b);return E(y,a.uc(p,function(C){n=n||C},e),7);case 7:h=y.h;bz(a);if(n)throw n;return E(y,cz(p,h,e),8);case 8:return E(y,k.init(),9);case 9:return bz(a),E(y,jy(k),10);case 10:return l=y.h,bz(a),u=dz(h,
|
|
1168
1168
|
p,b,c,e,f),v=u.ii,w=u.Xf,E(y,l.Da.addManifests([v]),11);case 11:A=y.h;bz(a);m=A[0];bz(a);if(n)throw n;return E(y,ez(a,w,m,v,f,e,l.Da,p,h),12);case 12:return bz(a),fz(p,v,h,e),E(y,l.Da.updateManifest(m,v),13);case 13:return bz(a),z=new Ay("manifest",l.path.kb,l.path.Da,m),y.return(Ry(z,v));case 3:return Aa(y),E(y,k.destroy(),14);case 14:if(!g){y.u(15);break}return E(y,g.stop(),15);case 15:if(!h){y.u(17);break}return E(y,h.destroy(),17);case 17:Da(y,0);break;case 2:B=xa(y);if(null==m){y.u(19);break}return E(y,
|
|
1169
1169
|
gz(m),19);case 19:throw n||B;}})}
|
|
1170
|
-
function ez(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,v,w,A,z;return O(function(B){switch(B.g){case 1:l={};m=0;n=function(y,
|
|
1171
|
-
2)}if(!
|
|
1170
|
+
function ez(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,v,w,A,z;return O(function(B){switch(B.g){case 1:l={};m=0;n=function(y,C){var D,K,I,J,H,F,N;return O(function(L){if(1==L.g){D={};K=t(y);for(I=K.next();!I.done;D={Sb:D.Sb},I=K.next())D.Sb=I.value,J=Ox(D.Sb,f),H=D.Sb.i,F=D.Sb.h,N=function(M){return function(P){var R,Q,ja;return O(function(ka){if(1==ka.g)return E(ka,g.addSegments([{data:P}]),2);R=ka.h;bz(a);Q=M.Sb.g;ja=Nx(Q);l[ja]=R[0];m+=P.byteLength;G(ka)})}}(D),Ux(e,D.Sb.groupId,J,H,F,N);return E(L,Wx(e),
|
|
1171
|
+
2)}if(!C)return L.u(0);bz(a);fz(h,d,k,f);return E(L,g.updateManifest(c,d),0)})};p=!1;ta(B,2);if(!hz(h)||!p||iz(h)){B.u(4);break}return E(B,n(b.filter(function(y){return y.h}),!0),5);case 5:return bz(a),b=b.filter(function(y){return!y.h}),q=l,u=m,l={},m=0,E(B,jz(g,c,d,q,u,function(){return bz(a)}),6);case 6:bz(a);case 4:if(p){B.u(7);break}return E(B,n(b,!1),8);case 8:return bz(a),v=l,w=m,l={},m=0,E(B,jz(g,c,d,v,w,function(){return bz(a)}),9);case 9:bz(a);case 7:wa(B,0);break;case 2:return A=xa(B),
|
|
1172
1172
|
z=Object.values(l),E(B,g.removeSegments(z,function(){}),10);case 10:throw A;}})}function gz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new hy,E(f,b.init(),2);case 2:return E(f,jy(b),3);case 3:return c=f.h,d=new Ay("manifest",c.path.kb,c.path.Da,a),E(f,b.destroy(),4);case 4:return e=new Wy,E(f,e.remove(d.toString()),0)}})}
|
|
1173
1173
|
function jz(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;ta(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
|
|
1174
1174
|
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();wa(A,0);break;case 2:return v=xa(A),E(A,gz(b),5);case 5:if(g){A.u(6);break}w=Object.values(d);return E(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
|
|
1175
|
-
function cz(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,D,
|
|
1176
|
-
u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(ff(w));return E(P,c.offline.trackSelectionCallback(e),3);case 3:A=P.h;z=a.presentationTimeline.getDuration();B=0;y=t(A);for(
|
|
1177
|
-
L.next())M=
|
|
1175
|
+
function cz(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,z,B,y,C,D,K,I,J,H,F,N,L,M;return O(function(P){switch(P.g){case 1:return d={width:Infinity,height:Infinity},Ke(a,c.restrictions,d),E(P,Oe(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ie(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(df(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,e.push(ef(q));
|
|
1176
|
+
u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(ff(w));return E(P,c.offline.trackSelectionCallback(e),3);case 3:A=P.h;z=a.presentationTimeline.getDuration();B=0;y=t(A);for(C=y.next();!C.done;C=y.next())D=C.value,K=D.bandwidth*z/8,B+=K;ta(P,4);return E(P,c.offline.downloadSizeCallback(B),6);case 6:I=P.h;if(!I)throw new T(2,9,9014);wa(P,5);break;case 4:J=xa(P);if(J instanceof T)throw J;throw new T(2,9,9015);case 5:H=new Set;F=new Set;N=new Set;L=t(A);for(C=L.next();!C.done;C=
|
|
1177
|
+
L.next())M=C.value,"variant"==M.type&&H.add(M.id),"text"==M.type&&F.add(M.id),"image"==M.type&&N.add(M.id);a.variants=a.variants.filter(function(R){return H.has(R.id)});a.textStreams=a.textStreams.filter(function(R){return F.has(R.id)});a.imageStreams=a.imageStreams.filter(function(R){return N.has(R.id)});kz(a);G(P)}})}
|
|
1178
1178
|
function dz(a,b,c,d,e,f){var g=Py(c,b,d),h=e.offline.progressCallback;Tx(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Mh(a,"cenc",q)});var k=hz(b)&&!iz(b),l=null;k&&(l=lz.get(a.g.keySystem));for(var m=new Sy,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Uy(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Ty(m,n.value);m=mz(f,m,b,e);f=m.streams;m=m.Xf;p=a.g;n=e.offline.usePersistentLicense;
|
|
1179
|
-
p&&n&&(p.initData=[]);return{ii:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.
|
|
1180
|
-
function iz(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function fz(a,b,c,d){b.expiration=c.
|
|
1179
|
+
p&&n&&(p.initData=[]);return{ii:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ld(),streams:f,sessionIds:n?Vh(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Xf:m}}function hz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1180
|
+
function iz(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function fz(a,b,c,d){b.expiration=c.ld();c=Vh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(hz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}r.remove=function(a){return nz(this,oz(this,a))};
|
|
1181
1181
|
function oz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:$y();c=By(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new hy;ua(k,2);return E(k,e.init(),4);case 4:return E(k,ly(e,d.kb(),d.Da()),5);case 5:return f=k.h,E(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],E(k,Promise.all([pz(a,h,e),qz(f,d,h)]),2);case 2:return Aa(k),E(k,e.destroy(),8);case 8:Da(k,0)}})}
|
|
1182
1182
|
function rz(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Sd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Sd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function pz(a,b,c){return O(function(d){return E(d,sz(a.g,a.h.drm,c,b),0)})}
|
|
1183
1183
|
function qz(a,b,c){function d(){}var e=tz(c);Ry(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Ai=function(){return nz(this,uz(this))};
|
|
1184
1184
|
function uz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return $y(),b=a.g,c=a.h.drm,d=new hy,e=!1,ua(n,2),E(n,d.init(),4);case 4:f=[],my(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return E(n,k.getAll(),8);case 8:return l=n.h,E(n,My(c,b,l),9);case 9:return m=n.h,E(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return Aa(n),E(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})}
|
|
1185
1185
|
r.list=function(){return nz(this,vz())};function vz(){var a,b,c;return O(function(d){switch(d.g){case 1:return $y(),a=[],b=new hy,ua(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),ky(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Ry(new Ay("manifest",e.kb,e.Da,l),k);a.push(k)});G(h)})})}),E(d,c,2);case 2:return Aa(d),E(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})}
|
|
1186
1186
|
function az(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
|
|
1187
|
-
c.configure(d.manifest),bz(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,bz(a),k=wz(h),E(l,Promise.all(vg(k,function(m){return m.createSegmentIndex()})),3);bz(a);if(e)throw e;return l.return(h)})}r.uc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new wh({Db:d.g,onError:b,
|
|
1187
|
+
c.configure(d.manifest),bz(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,bz(a),k=wz(h),E(l,Promise.all(vg(k,function(m){return m.createSegmentIndex()})),3);bz(a);if(e)throw e;return l.return(h)})}r.uc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new wh({Db:d.g,onError:b,qe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Bh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Oh(e),3):f.return(e)})};
|
|
1188
1188
|
function mz(a,b,c,d){var e=new Map,f=wz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=xz(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Xf:Array.from(e.values())}}
|
|
1189
1189
|
function xz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1190
1190
|
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;yz(d,c.presentationTimeline.jb(),function(l){var m=Nx(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Vy(b,d.id)*p;p=Qx(a.g,p);f.set(m,new Mx(l,p,k,!1))}l.ea&&(n=Nx(l.ea),f.has(n)||(p=.5*Vy(b,d.id),p=Qx(a.g,p),f.set(n,new Mx(l.ea,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
@@ -1199,7 +1199,7 @@ function Dz(){dg.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Dz,dg);
|
|
|
1199
1199
|
function Mz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
1200
1200
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Nz);document.addEventListener("webkitfullscreenerror",Nz);document.addEventListener("mozfullscreenchange",Nz);document.addEventListener("mozfullscreenerror",Nz);document.addEventListener("MSFullscreenChange",Nz);document.addEventListener("MSFullscreenError",Nz)}}
|
|
1201
1201
|
function Nz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}zz.Fullscreen=Lz;Lz.install=Mz;Az(Mz);function Oz(){}function Pz(){var a=!0;!bd()||bd()&&Vc("Android")||bd()&&Vc("Fuchsia")||(a=!1);if(cd()||fd()||ed()||Zc()||Wc()||Vc("PC=EOS")||gd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Qz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Rz)}
|
|
1202
|
-
function Rz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=
|
|
1202
|
+
function Rz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Qc(e),!f)||d&&(g=d.contentType,h=Qc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Oc())return p.return(b);if(!c){p.u(3);break}return E(p,Sz(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var q=d.contentType;bd()&&d.spatialRendering&&
|
|
1203
1203
|
(q+="; spatialRendering=true");l=mb(q);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,Tz(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
|
|
1204
1204
|
function Sz(a){var b,c;return O(function(d){return 1==d.g?bd()?E(d,Uz(a),3):Wc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(mb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(mb(a.contentType))})}
|
|
1205
1205
|
function Tz(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Wc()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
|
|
@@ -1236,7 +1236,7 @@ function RA(a,b){a.h=b;a.g.ob();var c=KA;b&&(a.g.D(b,c+"needkey",function(d){var
|
|
|
1236
1236
|
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=SA(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?TA(e,"output-restricted"):1==f?TA(e,"expired"):TA(e,"internal-error"))}}))}
|
|
1237
1237
|
NA.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 UA(b,this.l,a);this.i.push(a);return a};NA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};NA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1238
1238
|
function SA(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 UA(a,b,c){dg.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 Uf;this.keyStatuses=new VA}pa(UA,dg);
|
|
1239
|
-
function WA(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=Bb(vd("LOAD_SESSION|"+c));else{var e=vd("PERSISTENT|");d=Fd(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new Uf;var f=QA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Nc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).
|
|
1239
|
+
function WA(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=Bb(vd("LOAD_SESSION|"+c));else{var e=vd("PERSISTENT|");d=Fd(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new Uf;var f=QA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Nc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
|
|
1240
1240
|
function XA(a,b,c){if(a.g)a.g.then(function(){return XA(a,b,c)}).catch(function(){return XA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=od(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=Cd(e.keys[0].k);e=Cd(e.keys[0].kid)}else d=Bb(c),e=null;var f=QA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1241
1241
|
function TA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r=UA.prototype;r.generateRequest=function(a,b){return WA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?WA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Uf;XA(this,b,a);return b};
|
|
1242
1242
|
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=QA("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 VA(){this.size=0;this.g=void 0}r=VA.prototype;r.bc=function(){return this.g};
|
|
@@ -1251,7 +1251,7 @@ wB.prototype.parseMedia=function(a,b,c){var d=od(a);a=[];if(""==d)return a;var e
|
|
|
1251
1251
|
2,2001,"<p> can only be inside <div> in TTML");n=t($g(d,"div"));for(p=n.next();!p.done;p=n.next())if($g(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=DB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1252
1252
|
function DB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(Yg(a)){if(!m)return null;var q={tagName:"span",children:[ah(a)],attributes:{},parent:null}}else q=a;for(var u=null,v=t(EB),w=v.next();!w.done&&!(u=FB(q,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=ih(q,EB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new sc(n),A=new sc(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(q.attributes["xml:space"]||(h?"default":"preserve"));A=q.children.every(Yg);h=
|
|
1253
1253
|
[];if(!A)for(var z=t(q.children),B=z.next();!B.done;B=z.next())(B=DB(B.value,b,c,d,e,f,g,w,k,q,m,n))&&h.push(B);d=null!=l;n=ah(q);n=q.children.length&&n&&/\S/.test(n);B=q.attributes.begin||q.attributes.end||q.attributes.dur;if(!(B||n||"br"==q.tagName||0!=h.length||d&&!w))return null;z=GB(q,c);n=z.start;for(z=z.end;p&&p.tagName&&"tt"!=p.tagName;)z=HB(p,c,n,z),n=z.start,z=z.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;z=null==z?Infinity:z+b.periodStart;n=Math.max(n,b.segmentStart);z=Math.min(z,b.segmentEnd);
|
|
1254
|
-
if(!B&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==q.tagName)return e=new Ob(n,z,""),e.lineBreak=!0,e;b="";A&&(b=yd(ah(q)||""),w&&(b=b.replace(/\s+/g," ")));b=new Ob(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=FB(q,"region",f,"")[0];if(q.attributes.region&&k&&k.attributes["xml:id"]){var y=k.attributes["xml:id"];b.region=g.filter(function(
|
|
1254
|
+
if(!B&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==q.tagName)return e=new Ob(n,z,""),e.lineBreak=!0,e;b="";A&&(b=yd(ah(q)||""),w&&(b=b.replace(/\s+/g," ")));b=new Ob(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=FB(q,"region",f,"")[0];if(q.attributes.region&&k&&k.attributes["xml:id"]){var y=k.attributes["xml:id"];b.region=g.filter(function(C){return C.id==y})[0]}g=k;l&&d&&!q.attributes.region&&
|
|
1255
1255
|
!q.attributes.style&&(g=FB(l,"region",f,"")[0]);IB(b,q,g,u,v,e,a,0==h.length);return b}
|
|
1256
1256
|
function IB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==JB(b,c,f,"direction",g)&&(a.direction="rtl");h=JB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Sb);(h=JB(b,c,f,"textAlign",!0))?(a.positionAlign=KB[h],a.lineAlign=LB[h],a.textAlign=ac[h.toUpperCase()]):a.textAlign=Rb;if(h=JB(b,c,f,"displayAlign",!0))a.displayAlign=bc[h.toUpperCase()];if(h=JB(b,c,f,"color",g))a.color=h;if(h=JB(b,c,f,"backgroundColor",
|
|
1257
1257
|
g))a.backgroundColor=h;if(h=JB(b,c,f,"border",g))a.border=h;if(h=JB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=JB(b,c,f,"fontWeight",g))&&
|
|
@@ -1286,8 +1286,8 @@ function cC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exe
|
|
|
1286
1286
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Qb);else if(d=/^region:(.*)$/.exec(b)){if(b=iC(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=cc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ub,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()])}
|
|
1287
1287
|
function iC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function aC(a){a=ov(a,eC);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",$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;var eC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1288
1288
|
me["text/vtt"]=function(){return new $B};me['text/vtt; codecs="vtt"']=function(){return new $B};me['text/vtt; codecs="wvtt"']=function(){return new $B};function jC(){this.g=null}jC.prototype.parseInit=function(a){var b=this,c=!1;(new Eg).box("moov",Jg).box("trak",Jg).box("mdia",Jg).P("mdhd",function(d){d=Vi(d.reader,d.version);b.g=d.timescale}).box("minf",Jg).box("stbl",Jg).P("stsd",Ng).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};jC.prototype.setSequenceMode=function(){};jC.prototype.setManifestType=function(){};
|
|
1289
|
-
jC.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 Eg).box("moof",Jg).box("traf",Jg).P("tfdt",function(B){g=!0;c=Ui(B.reader,B.version).baseMediaDecodeTime}).P("tfhd",function(B){l=Ti(B.reader,B.flags).
|
|
1290
|
-
p.value;var q=p.Kf||l,u=p.
|
|
1289
|
+
jC.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 Eg).box("moof",Jg).box("traf",Jg).P("tfdt",function(B){g=!0;c=Ui(B.reader,B.version).baseMediaDecodeTime}).P("tfhd",function(B){l=Ti(B.reader,B.flags).fd}).P("trun",function(B){h=!0;d=Wi(B.reader,B.version,B.flags).Lg}).box("mdat",Qg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Bg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1290
|
+
p.value;var q=p.Kf||l,u=p.we?c+p.we:a;a=u+(q||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),z=null;"vttc"==Ig(A)?8<w&&(z=m.nb(w-8)):m.skip(w-8);q&&z&&(w=kC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(ue)};function kC(a,b,c){var d,e,f;(new Eg).box("payl",Qg(function(g){d=od(g)})).box("iden",Qg(function(g){e=od(g)})).box("sttg",Qg(function(g){f=od(g)})).parse(a);return d?lC(d,e,f,b,c):null}
|
|
1291
1291
|
function lC(a,b,c,d,e){d=new Ob(d,e,"");dC(a,d,new Map);b&&(d.id=b);if(c)for(a=new mv(c),b=pv(a);b;)cC(d,b,[]),nv(a),b=pv(a);return d}S("shaka.text.Mp4VttParser",jC);jC.prototype.parseMedia=jC.prototype.parseMedia;jC.prototype.setManifestType=jC.prototype.setManifestType;jC.prototype.setSequenceMode=jC.prototype.setSequenceMode;jC.prototype.parseInit=jC.prototype.parseInit;me['application/mp4; codecs="wvtt"']=function(){return new jC};function mC(){}mC.prototype.parseInit=function(){};mC.prototype.setSequenceMode=function(){};mC.prototype.setManifestType=function(){};mC.prototype.parseMedia=function(a){var b=od(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 mv(c[0]),e=nC(d),f=ov(d,/,/g);d=nC(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 Ob(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1292
1292
|
function nC(a){a=ov(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",mC);mC.prototype.parseMedia=mC.prototype.parseMedia;mC.prototype.setManifestType=mC.prototype.setManifestType;mC.prototype.setSequenceMode=mC.prototype.setSequenceMode;mC.prototype.parseInit=mC.prototype.parseInit;me["text/x-subviewer"]=function(){return new mC};function oC(){this.g=new $B}oC.prototype.parseInit=function(){};oC.prototype.setSequenceMode=function(){};oC.prototype.setManifestType=function(){};oC.prototype.parseMedia=function(a,b,c){a=od(a);a=pC(a);a=Bb(vd(a));return this.g.parseMedia(a,b,c)};
|
|
1293
1293
|
function pC(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",oC);oC.srt2webvtt=pC;oC.prototype.parseMedia=oC.prototype.parseMedia;
|
|
@@ -1297,39 +1297,39 @@ qC.prototype.parseMedia=function(a){var b="",c="";a=od(a).split(/\r?\n\s*\r?\n/)
|
|
|
1297
1297
|
function vC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=wC(c))a.color=c;if(c=b.BackColour)if(c=wC(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=Wb;a.textAlign="start";break;case 2:a.displayAlign=Wb;a.textAlign=Rb;break;case 3:a.displayAlign=Wb;a.textAlign="end";
|
|
1298
1298
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Rb;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=Rb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1299
1299
|
function wC(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 uC(a){a=xC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",qC);qC.prototype.parseMedia=qC.prototype.parseMedia;qC.prototype.setManifestType=qC.prototype.setManifestType;qC.prototype.setSequenceMode=qC.prototype.setSequenceMode;qC.prototype.parseInit=qC.prototype.parseInit;
|
|
1300
|
-
var rC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,sC=/^\s*([^:]+):\s*(.*)/,tC=/\s*,\s*/,xC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;me["text/x-ssa"]=function(){return new qC};function yC(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)?{
|
|
1300
|
+
var rC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,sC=/^\s*([^:]+):\s*(.*)/,tC=/\s*,\s*/,xC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;me["text/x-ssa"]=function(){return new qC};function yC(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)?{be:c,Y:a}:null}function zC(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,Ga:"mp4a.40."+e}}
|
|
1301
1301
|
function AC(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}
|
|
1302
1302
|
function BC(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,
|
|
1303
1303
|
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 CC(a){this.i=a;this.h=0;this.g=new Map}r=CC.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="'+(he(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1304
|
-
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Si(e),g=f.length;g<e.length&&!AC(e,g);g++);a=1E3*c.endTime;f=Ri(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=zC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=yC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.
|
|
1305
|
-
k.
|
|
1304
|
+
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Si(e),g=f.length;g<e.length&&!AC(e,g);g++);a=1E3*c.endTime;f=Ri(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=zC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=yC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.be+k.Y;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1305
|
+
k.be,g+l),size:k.Y,duration:1024,Za:0,flags:{bb:0,Oa:0,Na:0,La:0,Ma:2,cb:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.Ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Va:[],ia:new Uint8Array([]),ua:new Uint8Array([]),ya:0,za:0,data:{pb:this.h,baseMediaDecodeTime:a,Sa:h},stream:b};c=new Pw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Vw(c),this.g.set(b.id,d));b=lx(c);this.h++;b=Fd(d,b);return Promise.resolve(b)};
|
|
1306
1306
|
S("shaka.transmuxer.AacTransmuxer",CC);CC.prototype.transmux=CC.prototype.transmux;CC.prototype.getOriginalMimeType=CC.prototype.getOriginalMimeType;CC.prototype.convertCodecs=CC.prototype.convertCodecs;CC.prototype.isSupported=CC.prototype.isSupported;CC.prototype.destroy=CC.prototype.destroy;kc("audio/aac",function(){return new CC("audio/aac")},qc);function DC(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,
|
|
1307
|
-
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,
|
|
1307
|
+
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,Y:e}}
|
|
1308
1308
|
function EC(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 FC(a){this.i=a;this.h=0;this.g=new Map}r=FC.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};
|
|
1309
|
-
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Si(a),f=e.length;f<a.length&&!EC(a,f);f++);var g=1E3*c.endTime;e=Ri(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=DC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ia;k.push({data:a.subarray(f,f+l.
|
|
1310
|
-
Za:0,flags:{
|
|
1311
|
-
FC.prototype.getOriginalMimeType=FC.prototype.getOriginalMimeType;FC.prototype.convertCodecs=FC.prototype.convertCodecs;FC.prototype.isSupported=FC.prototype.isSupported;FC.prototype.destroy=FC.prototype.destroy;kc("audio/ac3",function(){return new FC("audio/ac3")},qc);function GC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new cj(a.subarray(b+2));ej(c,2);ej(c,3);var d=fj(c,11)+1<<1,e=fj(c,2);if(3==e){e=fj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=fj(c,2);var g=fj(c,3),h=fj(c,1);c=fj(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,
|
|
1312
|
-
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Si(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ri(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=GC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ia;k.push({data:a.subarray(f,f+l.
|
|
1313
|
-
duration:1536,Za:0,flags:{
|
|
1314
|
-
HC.prototype.getOriginalMimeType=HC.prototype.getOriginalMimeType;HC.prototype.convertCodecs=HC.prototype.convertCodecs;HC.prototype.isSupported=HC.prototype.isSupported;HC.prototype.destroy=HC.prototype.destroy;kc("audio/ec3",function(){return new HC("audio/ec3")},qc);function IC(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 cj(b.data),d=jj(c);jj(c);jj(c);hj(c);if(JC.includes(d)&&(d=V(c),3===d&&ej(c,1),hj(c),hj(c),ej(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?
|
|
1309
|
+
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Si(a),f=e.length;f<a.length&&!EC(a,f);f++);var g=1E3*c.endTime;e=Ri(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=DC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ia;k.push({data:a.subarray(f,f+l.Y),size:l.Y,duration:1536,
|
|
1310
|
+
Za:0,flags:{bb:0,Oa:0,Na:0,La:0,Ma:2,cb:0}});f+=l.Y}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,Va:[],ia:h,ua:new Uint8Array([]),ya:0,za:0,data:{pb:this.h,baseMediaDecodeTime:c,Sa:k},stream:b};c=new Pw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Vw(c),this.g.set(b.id,d));b=lx(c);this.h++;b=Fd(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",FC);FC.prototype.transmux=FC.prototype.transmux;
|
|
1311
|
+
FC.prototype.getOriginalMimeType=FC.prototype.getOriginalMimeType;FC.prototype.convertCodecs=FC.prototype.convertCodecs;FC.prototype.isSupported=FC.prototype.isSupported;FC.prototype.destroy=FC.prototype.destroy;kc("audio/ac3",function(){return new FC("audio/ac3")},qc);function GC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new cj(a.subarray(b+2));ej(c,2);ej(c,3);var d=fj(c,11)+1<<1,e=fj(c,2);if(3==e){e=fj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=fj(c,2);var g=fj(c,3),h=fj(c,1);c=fj(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,Y:d}};function HC(a){this.i=a;this.h=0;this.g=new Map}r=HC.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};
|
|
1312
|
+
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Si(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ri(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=GC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ia;k.push({data:a.subarray(f,f+l.Y),size:l.Y,
|
|
1313
|
+
duration:1536,Za:0,flags:{bb:0,Oa:0,Na:0,La:0,Ma:2,cb:0}});f+=l.Y}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,Va:[],ia:h,ua:new Uint8Array([]),ya:0,za:0,data:{pb:this.h,baseMediaDecodeTime:c,Sa:k},stream:b};c=new Pw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Vw(c),this.g.set(b.id,d));b=lx(c);this.h++;b=Fd(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",HC);HC.prototype.transmux=HC.prototype.transmux;
|
|
1314
|
+
HC.prototype.getOriginalMimeType=HC.prototype.getOriginalMimeType;HC.prototype.convertCodecs=HC.prototype.convertCodecs;HC.prototype.isSupported=HC.prototype.isSupported;HC.prototype.destroy=HC.prototype.destroy;kc("audio/ec3",function(){return new HC("audio/ec3")},qc);function IC(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 cj(b.data),d=jj(c);jj(c);jj(c);hj(c);if(JC.includes(d)&&(d=V(c),3===d&&ej(c,1),hj(c),hj(c),ej(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?kj(c,16):kj(c,64))}hj(c);d=V(c);if(0===d)V(c);else if(1===d)for(ej(c,1),hj(c),hj(c),d=V(c),e=0;e<d;e++)hj(c);hj(c);ej(c,1);var f=V(c),g=V(c),h=fj(c,1);0===h&&ej(c,1);ej(c,1);var k=0,l=0,m=0,n=0;W(c)&&
|
|
1315
1315
|
(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=jj(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=fj(c,16),e=fj(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,
|
|
1316
1316
|
225].concat(k,[1],b));return{height:c,width:f,ua:a,ya:d,za:e}}
|
|
1317
1317
|
function KC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=sj(new cj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
|
|
1318
|
-
{data:Fd.apply(zd,x(c)),
|
|
1318
|
+
{data:Fd.apply(zd,x(c)),td:b}:null}var JC=[100,110,122,244,44,83,86,118,128,138,139,134];function LC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=MC(b.fullData);a=NC(c.fullData);var f=OC(d.fullData);b=PC(b.fullData,c.fullData,d.fullData,{zf:e.zf,Wf:e.Wf,ef:a.ef,ff:a.ff,Ze:a.Ze,df:a.df,$e:a.$e,af:a.af,bf:a.bf,cf:a.cf,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,Xe:a.Xe,Ye:a.Ye,Qe:a.Qe,le:a.le,Oe:a.Oe,Ne:a.Ne,Me:a.Me,Cf:f.Cf});return{height:a.height,width:a.width,
|
|
1319
1319
|
ua:b,ya:a.Gi,za:a.Fi}}function MC(a){var b=new cj(a,!0);jj(b);jj(b);fj(b,4);fj(b,2);fj(b,6);a=fj(b,3);b=W(b);return{zf:a+1,Wf:b}}
|
|
1320
|
-
function NC(a){a=new cj(a,!0);jj(a);jj(a);var b=0,c=0,d=0,e=0;fj(a,4);var f=fj(a,3);W(a);for(var g=fj(a,2),h=fj(a,1),k=fj(a,5),l=jj(a),m=jj(a),n=jj(a),p=jj(a),q=jj(a),u=jj(a),v=jj(a),w=jj(a),A=jj(a),z=jj(a),B=jj(a),y=[],
|
|
1321
|
-
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(H=0;4>H;H++)for(var F=0;F<(3===H?2:6);F++)if(W(a)){var N=Math.min(64,1<<4+(H<<1));1<H&&ij(a);for(var L=0;L<N;L++)ij(a)}else V(a);W(a);W(a);W(a)&&(jj(a),V(a),V(a),W(a));H=V(a);for(N=F=0;N<H;N++)if(L=!1,0!==N&&(L=W(a)),L){N===H&&V(a);W(a);V(a);for(var M=L=0;M<=F;M++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&L++}F=L}else{M=V(a);L=V(a);F=M+L;for(P=0;P<M;P++)V(a),W(a);for(M=0;M<L;M++)V(a),W(a)}if(W(a))for(H=V(a),F=0;F<H;F++){for(N=0;N<
|
|
1322
|
-
1)}H=
|
|
1323
|
-
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ja=!1;Q?V(a):ja=W(a);ja||(R=V(a)+1);if(N){for(Q=0;Q<R;Q++)V(a),V(a),M&&(V(a),V(a));W(a)}if(L){for(Q=0;Q<R;Q++)V(a),V(a),M&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),F=V(a),V(a),V(a),V(a),V(a))}return{Ze:B,ef:g,ff:h,df:k,$e:l,af:m,bf:n,cf:p,Te:q,Ue:u,Ve:v,We:w,Xe:A,Ye:z,
|
|
1320
|
+
function NC(a){a=new cj(a,!0);jj(a);jj(a);var b=0,c=0,d=0,e=0;fj(a,4);var f=fj(a,3);W(a);for(var g=fj(a,2),h=fj(a,1),k=fj(a,5),l=jj(a),m=jj(a),n=jj(a),p=jj(a),q=jj(a),u=jj(a),v=jj(a),w=jj(a),A=jj(a),z=jj(a),B=jj(a),y=[],C=[],D=0;D<f;D++)y.push(W(a)),C.push(W(a));if(0<f)for(D=f;8>D;D++)fj(a,2);for(D=0;D<f;D++)y[D]&&fj(a,88),C[D]&&jj(a);V(a);y=V(a);3==y&&fj(a,1);C=V(a);D=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var K=V(a),I=V(a),J=V(a);if(W(a))for(var H=0;H<=f;H++)V(a),V(a),V(a);else V(a),V(a),
|
|
1321
|
+
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(H=0;4>H;H++)for(var F=0;F<(3===H?2:6);F++)if(W(a)){var N=Math.min(64,1<<4+(H<<1));1<H&&ij(a);for(var L=0;L<N;L++)ij(a)}else V(a);W(a);W(a);W(a)&&(jj(a),V(a),V(a),W(a));H=V(a);for(N=F=0;N<H;N++)if(L=!1,0!==N&&(L=W(a)),L){N===H&&V(a);W(a);V(a);for(var M=L=0;M<=F;M++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&L++}F=L}else{M=V(a);L=V(a);F=M+L;for(P=0;P<M;P++)V(a),W(a);for(M=0;M<L;M++)V(a),W(a)}if(W(a))for(H=V(a),F=0;F<H;F++){for(N=0;N<J+4;N++)fj(a,1);fj(a,
|
|
1322
|
+
1)}H=J=1;F=0;W(a);W(a);if(W(a)){W(a)&&(N=jj(a),L=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],M=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<N&&16>=N?(J=L[N-1],H=M[N-1]):255===N&&(J=fj(a,16),H=fj(a,16)));W(a)&&W(a);W(a)&&(fj(a,3),W(a),W(a)&&(jj(a),jj(a),jj(a)));W(a)&&(V(a),V(a));W(a);W(a);W(a);if(N=W(a))V(a),V(a),V(a),V(a);if(W(a)&&(fj(a,32),fj(a,32),W(a)&&V(a),W(a))){M=!1;N=W(a);L=W(a);if(N||L){if(M=W(a))jj(a),fj(a,5),W(a),fj(a,5);fj(a,4);fj(a,4);M&&fj(a,4);fj(a,5);fj(a,5);fj(a,5)}for(P=0;P<=
|
|
1323
|
+
f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ja=!1;Q?V(a):ja=W(a);ja||(R=V(a)+1);if(N){for(Q=0;Q<R;Q++)V(a),V(a),M&&(V(a),V(a));W(a)}if(L){for(Q=0;Q<R;Q++)V(a),V(a),M&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),F=V(a),V(a),V(a),V(a),V(a))}return{Ze:B,ef:g,ff:h,df:k,$e:l,af:m,bf:n,cf:p,Te:q,Ue:u,Ve:v,We:w,Xe:A,Ye:z,le:F,Qe:0,Oe:y,Ne:K,Me:I,width:C-(b+c)*(1===y||2===y?2:1),height:D-(d+e)*(1===y?2:1),Gi:J,Fi:H}}
|
|
1324
1324
|
function OC(a){var b=new cj(a,!0);jj(b);jj(b);V(b);V(b);W(b);W(b);fj(b,3);W(b);W(b);V(b);V(b);ij(b);W(b);W(b);W(b)&&V(b);ij(b);ij(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{Cf:c}}
|
|
1325
|
-
function PC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ef&3)<<6|(d.ff?1:0)<<5|d.df&31;e[2]=d.$e;e[3]=d.af;e[4]=d.bf;e[5]=d.cf;e[6]=d.Te;e[7]=d.Ue;e[8]=d.Ve;e[9]=d.We;e[10]=d.Xe;e[11]=d.Ye;e[12]=d.Ze;e[13]=240|(d.
|
|
1326
|
-
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 QC(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*RC[14*(3===c?3-d:3===d?3:4)+e-1];f=SC[3*(3===c?0:2===c?1:2)+f];c=TC[c][d];var h=UC[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,
|
|
1327
|
-
function VC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function WC(a,b){if(b+1<a.length&&VC(a,b)){var c=QC(a,b),d=4;c&&c.
|
|
1325
|
+
function PC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ef&3)<<6|(d.ff?1:0)<<5|d.df&31;e[2]=d.$e;e[3]=d.af;e[4]=d.bf;e[5]=d.cf;e[6]=d.Te;e[7]=d.Ue;e[8]=d.Ve;e[9]=d.We;e[10]=d.Xe;e[11]=d.Ye;e[12]=d.Ze;e[13]=240|(d.le&3840)>>8;e[14]=d.le&255;e[15]=252|d.Cf&3;e[16]=252|d.Oe&3;e[17]=248|d.Ne&7;e[18]=248|d.Me&7;e[19]=0;e[20]=0;e[21]=(d.Qe&3)<<6|(d.zf&7)<<3|(d.Wf?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&
|
|
1326
|
+
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 QC(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*RC[14*(3===c?3-d:3===d?3:4)+e-1];f=SC[3*(3===c?0:2===c?1:2)+f];c=TC[c][d];var h=UC[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,Y:k,Ei:8*c*h}}return null}
|
|
1327
|
+
function VC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function WC(a,b){if(b+1<a.length&&VC(a,b)){var c=QC(a,b),d=4;c&&c.Y&&(d=c.Y);b+=d;return b===a.length||b+1<a.length&&VC(a,b)}return!1}
|
|
1328
1328
|
var RC=[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],SC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],TC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],UC=[0,1,1,4];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/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};
|
|
1329
|
-
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Si(e).length;f<e.length&&!WC(e,f);f++);var g;for(a=[];f<e.length;){var h=QC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.
|
|
1329
|
+
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Si(e).length;f<e.length&&!WC(e,f);f++);var g;for(a=[];f<e.length;){var h=QC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.Y<=e.length&&a.push({data:e.subarray(f,f+h.Y),size:h.Y,duration:1152,Za:0,flags:{bb:0,Oa:0,Na:0,La:0,Ma:2,cb:0}});f+=h.Y}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=9E4*g.Ei/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1330
1330
|
duration:d,Va:[],ia:new Uint8Array([]),ua:new Uint8Array([]),ya:0,za:0,data:{pb:this.h,baseMediaDecodeTime:c,Sa:a},stream:b};g=new Pw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Vw(g),this.g.set(b.id,d));b=lx(g);this.h++;b=Fd(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",XC);XC.prototype.transmux=XC.prototype.transmux;XC.prototype.getOriginalMimeType=XC.prototype.getOriginalMimeType;XC.prototype.convertCodecs=XC.prototype.convertCodecs;XC.prototype.isSupported=XC.prototype.isSupported;
|
|
1331
1331
|
XC.prototype.destroy=XC.prototype.destroy;kc("audio/mpeg",function(){return new XC("audio/mpeg")},qc);function YC(a){this.h=a;this.g=null}r=YC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=he(a).split(","),c=Md("audio",b);b=Md("video",b);return!c||b||"mp3"!=Zd(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};
|
|
1332
|
-
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new tj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.
|
|
1332
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new tj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.kd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[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=QC(a,b))?(b+d.Y<=a.length&&(c=Fd(c,a.subarray(b,b+d.Y))),b+=d.Y):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",YC);YC.prototype.transmux=YC.prototype.transmux;
|
|
1333
1333
|
YC.prototype.getOriginalMimeType=YC.prototype.getOriginalMimeType;YC.prototype.convertCodecs=YC.prototype.convertCodecs;YC.prototype.isSupported=YC.prototype.isSupported;YC.prototype.destroy=YC.prototype.destroy;kc("video/mp2t",function(){return new YC("video/mp2t")},pc);/*
|
|
1334
1334
|
@license
|
|
1335
1335
|
MSS Transmuxer
|
|
@@ -1347,21 +1347,21 @@ m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");
|
|
|
1347
1347
|
ZC.prototype.getOriginalMimeType=ZC.prototype.getOriginalMimeType;ZC.prototype.convertCodecs=ZC.prototype.convertCodecs;ZC.prototype.isSupported=ZC.prototype.isSupported;ZC.prototype.destroy=ZC.prototype.destroy;var aD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);kc("mss/audio/mp4",function(){return new ZC("mss/audio/mp4")},qc);kc("mss/video/mp4",function(){return new ZC("mss/video/mp4")},qc);function cD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=cD.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1348
1348
|
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=he(c).split(",");c=Md("audio",d);d=Md("video",d);if(c&&(c=Zd(c),!dD.includes(c))||d&&(c=Zd(d),!eD.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)};
|
|
1349
1349
|
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=he(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Ve(c,"audio/mp4")}).map(Ue).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
|
|
1350
|
-
r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Aj(f)){for(var g=Si(f),h=g.length;h<f.length;h++)if(WC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(AC(f,h))return this.h||(this.h=new CC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new tj;var k=this.j.parse(f),l=[],m=k.
|
|
1351
|
-
if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var B=KC(z);if(B){null==q&&(q=A.dts);var y=void 0;y=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:B.data,size:B.data.byteLength,duration:y,Za:Math.round((A.pts||0)-(A.dts||0)),flags:{
|
|
1352
|
-
b.width=
|
|
1353
|
-
P=!0;break;case 19:case 20:case 21:L=ka=P=!0;break;case 32:ka=!0;break;case 33:ka=!0;break;case 34:ka=!0;break;case 35:P=ka=!0;break;case 39:case 40:ka=!0;break;default:ka=!1}if(P&&ka){var va=ja.fullData.byteLength,ya=new Uint8Array(4);ya[0]=va>>24&255;ya[1]=va>>16&255;ya[2]=va>>8&255;ya[3]=va&255;M.push(ya);M.push(ja.fullData)}}var Ba=M.length?{data:Fd.apply(zd,x(M)),
|
|
1354
|
-
1].dts||0):9E4*(c.endTime-c.startTime);
|
|
1355
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Za=[],za,Va=null,pb=t(k.Lb()),
|
|
1356
|
-
Oa:0,Na:0,La:0,Ma:2,
|
|
1357
|
-
duration:1024,Za:0,flags:{
|
|
1358
|
-
(
|
|
1359
|
-
ya:0,za:0,data:{pb:this.g,baseMediaDecodeTime:uD,Sa:yg},stream:b};break;case "ec3":for(var wu=[],
|
|
1360
|
-
qf++}}if(0==
|
|
1361
|
-
le);rf?(
|
|
1362
|
-
|
|
1363
|
-
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 Cu=new Uint8Array([0,
|
|
1364
|
-
2,
|
|
1350
|
+
r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Aj(f)){for(var g=Si(f),h=g.length;h<f.length;h++)if(WC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(AC(f,h))return this.h||(this.h=new CC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new tj;var k=this.j.parse(f),l=[],m=k.kd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],q=null,u=[],v=k.Ac();
|
|
1351
|
+
if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var B=KC(z);if(B){null==q&&(q=A.dts);var y=void 0;y=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:B.data,size:B.data.byteLength,duration:y,Za:Math.round((A.pts||0)-(A.dts||0)),flags:{bb:0,Oa:0,Na:0,La:0,Ma:B.td?2:1,cb:B.td?0:1}})}}var C=IC(u);if(!C||null==q)throw new T(2,3,3018,c?c.M()[0]:null);b.height=C.height;
|
|
1352
|
+
b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Va:[],ia:new Uint8Array([]),ua:C.ua,ya:C.ya,za:C.za,data:{pb:this.g,baseMediaDecodeTime:q,Sa:p},stream:b};break;case "hvc":var D=[],K=null,I=[],J=k.Ac();if(!J.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var H=0;H<J.length;H++){var F=J[H],N=F.nalus;I.push.apply(I,x(N));for(var L=!1,M=[],P=!1,R=t(N),Q=R.next();!Q.done;Q=R.next()){var ja=Q.value;switch(ja.type){case 1:case 0:var ka=
|
|
1353
|
+
P=!0;break;case 19:case 20:case 21:L=ka=P=!0;break;case 32:ka=!0;break;case 33:ka=!0;break;case 34:ka=!0;break;case 35:P=ka=!0;break;case 39:case 40:ka=!0;break;default:ka=!1}if(P&&ka){var va=ja.fullData.byteLength,ya=new Uint8Array(4);ya[0]=va>>24&255;ya[1]=va>>16&255;ya[2]=va>>8&255;ya[3]=va&255;M.push(ya);M.push(ja.fullData)}}var Ba=M.length?{data:Fd.apply(zd,x(M)),td:L}:null;if(Ba){null==K&&null!=F.dts&&(K=F.dts);var Ka=void 0;Ka=H+1<J.length?(J[H+1].dts||0)-(F.dts||0):1<J.length?(F.dts||0)-(J[H-
|
|
1354
|
+
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ba.data,size:Ba.data.byteLength,duration:Ka,Za:Math.round((F.pts||0)-(F.dts||0)),flags:{bb:0,Oa:0,Na:0,La:0,Ma:Ba.td?2:1,cb:Ba.td?0:1}})}}var Ca=LC(I);if(!Ca||null==K)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Ca.height;b.width=Ca.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Va:[],ia:new Uint8Array([]),ua:Ca.ua,ya:Ca.ya,za:Ca.za,data:{pb:this.g,baseMediaDecodeTime:K,Sa:D},stream:b}}n&&
|
|
1355
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Za=[],za,Va=null,pb=t(k.Lb()),Pc=pb.next();!Pc.done;Pc=pb.next()){var ce=Pc.value,qd=ce.data;if(qd){var Hc=0;za=zC(qd,Hc);if(!za)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=za.sampleRate;b.channelsCount=za.channelCount;null==Va&&null!==ce.pts&&(Va=ce.pts);for(;Hc<qd.length;){var de=yC(qd,Hc);if(de){var ee=de.be+de.Y;Hc+ee<=qd.length&&Za.push({data:qd.subarray(Hc+de.be,Hc+ee),size:de.Y,duration:1024,Za:0,flags:{bb:0,
|
|
1356
|
+
Oa:0,Na:0,La:0,Ma:2,cb:0}});Hc+=ee}else Hc++}}}if(!za||null==Va){if(!k.Ac().length)throw new T(2,3,3018,c?c.M()[0]:null);Va=9E4*c.startTime;var fe=Md("audio",b.codecs.split(","));if(!fe||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);za={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ga:fe};var rd=BC(fe,b.channelsCount);if(!rd)throw new T(2,3,3018,c?c.M()[0]:null);for(var Ai=Va+9E4*(c.endTime-c.startTime),xg=Va;xg<Ai;)Za.push({data:rd,size:rd.byteLength,
|
|
1357
|
+
duration:1024,Za:0,flags:{bb:0,Oa:0,Na:0,La:0,Ma:2,cb:0}}),xg+=1024/za.sampleRate*9E4}var Bi=za.sampleRate,Ci=Va/9E4*Bi;n={id:b.id,type:"audio",codecs:za.Ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Bi,duration:d,Va:[],ia:new Uint8Array([]),ua:new Uint8Array([]),ya:0,za:0,data:{pb:this.g,baseMediaDecodeTime:Ci,Sa:Za},stream:b};break;case "ac3":for(var yg=[],ge=0,gc=new Uint8Array([]),lj=null,vu=t(k.Lb()),Im=vu.next();!Im.done;Im=vu.next()){var Jm=Im.value,Km=Jm.data;null==lj&&null!==Jm.pts&&
|
|
1358
|
+
(lj=Jm.pts);for(var pf=0;pf<Km.length;){var Hd=DC(Km,pf);Hd?(b.audioSamplingRate=Hd.sampleRate,b.channelsCount=Hd.channelCount,ge=Hd.sampleRate,gc=Hd.ia,yg.push({data:Km.subarray(pf,pf+Hd.Y),size:Hd.Y,duration:1536,Za:0,flags:{bb:0,Oa:0,Na:0,La:0,Ma:2,cb:0}}),pf+=Hd.Y):pf++}}if(0==ge||0==gc.byteLength||null==lj)throw new T(2,3,3018,c?c.M()[0]:null);var uD=lj/9E4*ge;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ge,duration:d,Va:[],ia:gc,ua:new Uint8Array([]),
|
|
1359
|
+
ya:0,za:0,data:{pb:this.g,baseMediaDecodeTime:uD,Sa:yg},stream:b};break;case "ec3":for(var wu=[],mj=0,Lm=new Uint8Array([]),nj=null,xu=t(k.Lb()),Mm=xu.next();!Mm.done;Mm=xu.next()){var Nm=Mm.value,Om=Nm.data;null==nj&&null!==Nm.pts&&(nj=Nm.pts);for(var qf=0;qf<Om.length;){var Id=GC(Om,qf);Id?(b.audioSamplingRate=Id.sampleRate,b.channelsCount=Id.channelCount,mj=Id.sampleRate,Lm=Id.ia,wu.push({data:Om.subarray(qf,qf+Id.Y),size:Id.Y,duration:1536,Za:0,flags:{bb:0,Oa:0,Na:0,La:0,Ma:2,cb:0}}),qf+=Id.Y):
|
|
1360
|
+
qf++}}if(0==mj||0==Lm.byteLength||null==nj)throw new T(2,3,3018,c?c.M()[0]:null);var vD=nj/9E4*mj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:mj,duration:d,Va:[],ia:Lm,ua:new Uint8Array([]),ya:0,za:0,data:{pb:this.g,baseMediaDecodeTime:vD,Sa:wu},stream:b};break;case "mp3":for(var yu=[],oj,pj=null,zu=t(k.Lb()),Pm=zu.next();!Pm.done;Pm=zu.next()){var Qm=Pm.value,Lg=Qm.data;if(Lg){null==pj&&null!==Qm.pts&&(pj=Qm.pts);for(var le=0;le<Lg.length;){var rf=QC(Lg,
|
|
1361
|
+
le);rf?(oj||(oj=rf),le+rf.Y<=Lg.length&&yu.push({data:Lg.subarray(le,le+rf.Y),size:rf.Y,duration:1152,Za:0,flags:{bb:0,Oa:0,Na:0,La:0,Ma:2,cb:0}}),le+=rf.Y):le++}}}if(!oj||null==pj)throw new T(2,3,3018,c?c.M()[0]:null);var Au=oj.sampleRate,wD=pj/9E4*Au;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Au,duration:d,Va:[],ia:new Uint8Array([]),ua:new Uint8Array([]),ya:0,za:0,data:{pb:this.g,baseMediaDecodeTime:wD,Sa:yu},stream:b};break;case "opus":var Bu=[],
|
|
1362
|
+
qj=null,Rc=k.F;if(!Rc)throw new T(2,3,3018,c?c.M()[0]:null);var yb=[];switch(Rc.qh){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,
|
|
1363
|
+
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 Cu=new Uint8Array([0,Rc.channelCount,0,0,Rc.sampleRate>>>24&255,Rc.sampleRate>>>17&255,Rc.sampleRate>>>8&255,Rc.sampleRate>>>0&255,0,0].concat(x(yb)));for(var Du=Rc.sampleRate,Eu=t(k.Lb()),Rm=Eu.next();!Rm.done;Rm=Eu.next()){var Sm=Rm.value,sf=Sm.data;null==qj&&null!==Sm.pts&&(qj=Sm.pts);for(var Mg=0;Mg<sf.length;){for(var xD=0!==(sf[Mg+1]&16),yD=0!==(sf[Mg+1]&8),td=Mg+
|
|
1364
|
+
2,rj=0;255===sf[td];)rj+=255,td+=1;rj+=sf[td];td+=1;td+=xD?2:0;td+=yD?2:0;var Fu=sf.slice(td,td+rj);Bu.push({data:Fu,size:Fu.byteLength,duration:960,Za:0,flags:{bb:0,Oa:0,Na:0,La:0,Ma:2,cb:0}});Mg=td+rj}}if(0==Cu.byteLength||null==qj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Rc.sampleRate;b.channelsCount=Rc.channelCount;var zD=qj/9E4*Du;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Du,duration:d,Va:[],ia:Cu,ua:new Uint8Array([]),ya:0,za:0,
|
|
1365
1365
|
data:{pb:this.g,baseMediaDecodeTime:zD,Sa:Bu},stream:b}}n&&(l.push(n),n=null)}}catch(Tm){return Tm&&3023==Tm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Tm)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Gu=new Pw(l);if(this.i.has(b.id))var Um=this.i.get(b.id);else Um=Vw(Gu),this.i.set(b.id,Um);var AD=lx(Gu);this.g++;var BD=Fd(Um,AD);return Promise.resolve(BD)};S("shaka.transmuxer.TsTransmuxer",cD);cD.prototype.transmux=cD.prototype.transmux;
|
|
1366
1366
|
cD.prototype.getOriginalMimeType=cD.prototype.getOriginalMimeType;cD.prototype.convertCodecs=cD.prototype.convertCodecs;cD.prototype.isSupported=cD.prototype.isSupported;cD.prototype.destroy=cD.prototype.destroy;var dD=["aac","ac-3","ec-3","mp3","opus"],eD=["avc","hevc"];kc("video/mp2t",function(){return new cD("video/mp2t")},oc);/*
|
|
1367
1367
|
@license
|