shaka-player 4.9.16 → 4.9.18
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 +2 -2
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.debug.js +107 -104
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +657 -655
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +299 -295
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +893 -890
- package/dist/shaka-player.ui.map +3 -3
- package/lib/cea/cea608_memory.js +14 -2
- package/lib/dash/dash_parser.js +29 -10
- package/lib/dash/segment_template.js +5 -4
- package/lib/media/media_source_engine.js +24 -4
- package/lib/player.js +1 -1
- package/lib/text/simple_text_displayer.js +1 -71
- package/lib/text/text_utils.js +81 -0
- package/lib/util/periods.js +17 -14
- package/package.json +1 -1
- package/ui/resolution_selection.js +35 -20
|
@@ -63,7 +63,7 @@ function Bb(a,b,c){c=void 0===c?Infinity:c;return Db(a,void 0===b?0:b,c,Uint8Arr
|
|
|
63
63
|
S("shaka.util.BufferUtils",xb);xb.toDataView=Fb;xb.toUint16=Eb;xb.toUint8=Bb;xb.toArrayBuffer=Cb;xb.equal=zb;function Gb(){}Gb.prototype.init=function(){};Gb.prototype.i=function(){};Gb.prototype.g=function(){};Gb.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Gb);function Hb(a){this.l=new wb;if(a=Ib[a.toLowerCase()])this.l=a();this.h=new vb;if(a=Jb)this.h=a()}Hb.prototype.init=function(a,b){void 0!==b&&b||(this.g(),this.l.init(a))};Hb.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Bb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
64
64
|
Hb.prototype.g=function(){this.h.clear()};Hb.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Hb);Hb.findDecoder=function(){return Jb};Hb.unregisterDecoder=function(){Jb=null};Hb.registerDecoder=function(a){Jb=a};Hb.findParser=function(a){return Ib[a]};Hb.unregisterParser=function(a){delete Ib[a]};Hb.registerParser=function(a,b){Ib[a]=b};var Ib={},Jb=null;function Kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Lb;this.scroll=Mb}S("shaka.text.CueRegion",Kb);var Lb=1;Kb.units={PX:0,PERCENTAGE:Lb,LINES:2};var Mb="";Kb.scrollMode={NONE:Mb,UP:"up"};function Nb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Ob(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Pb(a,b,c){c||(c=Nb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Ce:d.Ce},e=a.next()){d.Ce=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ce,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
65
65
|
function Qb(a,b,c){c||(c=Nb);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Rb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kb;this.position=null;this.positionAlign=Sb;this.size=0;this.textAlign=Tb;this.direction=Ub;this.writingMode=Vb;this.lineInterpretation=Wb;this.line=null;this.lineHeight="";this.lineAlign=Xb;this.displayAlign=Yb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Zb;this.fontStyle=$b;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
66
|
-
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={
|
|
66
|
+
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Wb:32,rows:15}}function ac(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}Rb.prototype.clone=function(){var a=new Rb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
67
67
|
function bc(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(!Qb(a.nestedCues,b.nestedCues,bc))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(!Qb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}S("shaka.text.Cue",Rb);Rb.equal=bc;Rb.prototype.clone=Rb.prototype.clone;var Sb="auto";
|
|
68
68
|
Rb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Sb};var Tb="center",cc={LEFT:"left",RIGHT:"right",CENTER:Tb,START:"start",END:"end"};Rb.textAlign=cc;var Yb="after",dc={BEFORE:"before",CENTER:"center",AFTER:Yb};Rb.displayAlign=dc;var Ub="ltr";Rb.direction={HORIZONTAL_LEFT_TO_RIGHT:Ub,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Vb="horizontal-tb";Rb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Vb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Wb=0;
|
|
69
69
|
Rb.lineInterpretation={LINE_NUMBER:Wb,PERCENTAGE:1};var Xb="start",ec={CENTER:"center",START:Xb,END:"end"};Rb.lineAlign=ec;var fc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Rb.defaultTextColor=fc;var gc={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Rb.defaultTextBackgroundColor=gc;var Zb=400;Rb.fontWeight={NORMAL:Zb,BOLD:700};
|
|
@@ -78,14 +78,14 @@ var rc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
78
78
|
Copyright 2006 The Closure Library Authors
|
|
79
79
|
SPDX-License-Identifier: Apache-2.0
|
|
80
80
|
*/
|
|
81
|
-
function sc(a){var b;a instanceof sc?(tc(this,a.xb),this.
|
|
82
|
-
r.toString=function(){var a=[],b=this.xb;b&&a.push(zc(b,Ac,!0),":");if(b=this.zb){a.push("//");var c=this.
|
|
83
|
-
r.resolve=function(a){var b=this.clone();"data"===b.xb&&(b=new sc);var c=!!a.xb;c?tc(b,a.xb):c=!!a.
|
|
84
|
-
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.
|
|
81
|
+
function sc(a){var b;a instanceof sc?(tc(this,a.xb),this.oc=a.oc,uc(this,a.zb),vc(this,a.Gc),this.Ua=a.Ua,wc(this,a.g.clone()),this.Xb=a.Xb):a&&(b=String(a).match(rc))?(tc(this,b[1]||"",!0),this.oc=xc(b[2]||""),uc(this,b[3]||"",!0),vc(this,b[4]),this.Ua=xc(b[5]||"",!0),wc(this,b[6]||"",!0),this.Xb=xc(b[7]||"")):this.g=new yc(null)}r=sc.prototype;r.xb="";r.oc="";r.zb="";r.Gc=null;r.Ua="";r.Xb="";
|
|
82
|
+
r.toString=function(){var a=[],b=this.xb;b&&a.push(zc(b,Ac,!0),":");if(b=this.zb){a.push("//");var c=this.oc;c&&a.push(zc(c,Ac,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Gc;null!=b&&a.push(":",String(b))}if(b=this.Ua)this.zb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zc(b,"/"==b.charAt(0)?Bc:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Xb)&&a.push("#",zc(b,Dc));return a.join("")};
|
|
83
|
+
r.resolve=function(a){var b=this.clone();"data"===b.xb&&(b=new sc);var c=!!a.xb;c?tc(b,a.xb):c=!!a.oc;c?b.oc=a.oc:c=!!a.zb;c?uc(b,a.zb):c=null!=a.Gc;var d=a.Ua;if(c)vc(b,a.Gc);else if(c=!!a.Ua){if("/"!=d.charAt(0))if(this.zb&&!this.Ua)d="/"+d;else{var e=b.Ua.lastIndexOf("/");-1!=e&&(d=b.Ua.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(""):".."==
|
|
84
|
+
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.Ua=d:c=""!==a.g.toString();c?wc(b,a.g.clone()):c=!!a.Xb;c&&(b.Xb=a.Xb);return b};r.clone=function(){return new sc(this)};function tc(a,b,c){a.xb=c?xc(b,!0):b;a.xb&&(a.xb=a.xb.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}
|
|
85
85
|
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}
|
|
86
|
-
function Gc(a){if(!a.
|
|
87
|
-
r.set=function(a,b){Gc(this);this.g=null;this.
|
|
88
|
-
r.clone=function(){var a=new yc;a.g=this.g;if(this.
|
|
86
|
+
function Gc(a){if(!a.Ia&&(a.Ia={},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.Ia=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.Ia.hasOwnProperty(a)?this.Ia[a]:null;c||(this.Ia[a]=c=[]);c.push(b);this.dd++;return this};
|
|
87
|
+
r.set=function(a,b){Gc(this);this.g=null;this.Ia.hasOwnProperty(a)?this.Ia[a]=[b]:this.add(a,b);return this};r.get=function(a){Gc(this);return this.Ia[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ia)return"";var a=[],b;for(b in this.Ia)for(var c=encodeURIComponent(b),d=this.Ia[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
88
|
+
r.clone=function(){var a=new yc;a.g=this.g;if(this.Ia){var b={},c;for(c in this.Ia)b[c]=this.Ia[c].concat();a.Ia=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};
|
|
89
89
|
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,
|
|
90
90
|
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,
|
|
91
91
|
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,
|
|
@@ -97,8 +97,8 @@ CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:90
|
|
|
97
97
|
CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Kc(a){this.h=a;this.g=void 0}Kc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a,b){return a.length&&b.length&&a!==b?0<Mc(a,b).length:!0}
|
|
98
98
|
function Mc(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
99
99
|
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}
|
|
100
|
-
function Nc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Oc=new Kc(function(){return Cb(new Uint8Array([0]))}),Qc=new Map;function Sc(a){this.h=a;this.g=null}Sc.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};Sc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Tc(a){this.h=a;this.g=null}Tc.prototype.
|
|
101
|
-
Tc.prototype.tickAfter=Tc.prototype.X;Tc.prototype.tickNow=Tc.prototype.
|
|
100
|
+
function Nc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Oc=new Kc(function(){return Cb(new Uint8Array([0]))}),Qc=new Map;function Sc(a){this.h=a;this.g=null}Sc.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};Sc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Tc(a){this.h=a;this.g=null}Tc.prototype.mc=function(){this.stop();this.h();return this};Tc.prototype.X=function(a){var b=this;this.stop();this.g=(new Sc(function(){b.h()})).X(a);return this};Tc.prototype.Xa=function(a){var b=this;this.stop();this.g=(new Sc(function(){b.g.X(a);b.h()})).X(a);return this};Tc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Tc);Tc.prototype.stop=Tc.prototype.stop;Tc.prototype.tickEvery=Tc.prototype.Xa;
|
|
101
|
+
Tc.prototype.tickAfter=Tc.prototype.X;Tc.prototype.tickNow=Tc.prototype.mc;function Uc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Vc(a){return""!=Wc().canPlayType(a)}function Xc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Yc(){return Zc("Xbox One")}function $c(){return Zc("Tizen")}function ad(){return Zc("Tizen 3")}function bd(){return Zc("Tizen 2")}function cd(){return Zc("Web0S")}function dd(){return cd()&&38===ed()}function fd(){return Zc("CrKey")}
|
|
102
102
|
function ed(){if(!Zc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function gd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!$c()&&!Zc("PC=EOS")&&!Zc("PC=APL")&&!Zc("VirginMedia")&&!hd()&&!id()&&!Zc("AFT")&&!Zc("WPE")&&!Zc("DT_STB_BCM")}function jd(){return Zc("PlayStation 5")}function id(){return Zc("PlayStation 4")}function kd(){return Zc("Hisense")||Zc("VIDAA")}
|
|
103
103
|
function hd(){return Zc("SOPOpenBrowser")}function ld(){if(!gd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function md(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1}function nd(){return Zc("Android")}
|
|
104
104
|
function Zc(a){return(navigator.userAgent||"").includes(a)}function Wc(){if(od)return od;pd||(pd=new Tc(function(){od=null}));(od=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(od=document.createElement("video"));pd.X(1);return od}function qd(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
|
|
@@ -152,7 +152,7 @@ function Xe(a,b){var c=Yc(),d=Zc("Firefox")&&nd(),e=a.video,f=e&&e.width||0,g=e&
|
|
|
152
152
|
if(e){d=$e(e.codecs,e.mimeType);c=$d(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 af(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=af(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
153
153
|
function bf(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Le(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=af(k),f.Mc=cf,f.Mc[f.Nc]?d=c(d,f.Mc[f.Nc]):e.push(df(k).then(function(m){return function(n){var p=
|
|
154
154
|
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);H(l)})}
|
|
155
|
-
function df(a){var b=[""];a.video&&(b=ne(a.video.contentType).split(","));var c=[""];a.audio&&(c=ne(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={
|
|
155
|
+
function df(a){var b=[""];a.video&&(b=ne(a.video.contentType).split(","));var c=[""];a.audio&&(c=ne(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={Sb:f.Sb},h=g.next())h=h.value,f.Sb=Ke(a),a.video&&(f.Sb.video.contentType=Xd(me(f.Sb.video.contentType),e)),a.audio&&(f.Sb.audio.contentType=Xd(me(f.Sb.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Sb).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
156
156
|
return null})}
|
|
157
157
|
function We(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.De=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){C.u(7);break}n=m.value;p=ef(n,b,c).filter(function(D){return function(K){K=K[0];return(K.keySystemConfiguration&&K.keySystemConfiguration.keySystem)===D.De}}(f));q=t(p);u=q.next();case 8:if(u.done){C.u(10);break}v=u.value;
|
|
158
158
|
return E(C,bf(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={De:f.De};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=ef(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,bf(A,y),16);case 16:u=B.next(),C.u(15)}})}
|
|
@@ -196,26 +196,26 @@ function Kf(a,b){b=Ce(b);var c=Je(b,a.map(function(d){return Ie(d)}));return c?a
|
|
|
196
196
|
function Of(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Nf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Mf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Rf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Sf(){this.g=Tf;this.i=(new Map).set(Tf,2).set(Uf,1);this.h=0}function Vf(a,b,c){a.i.set(Tf,c).set(Uf,b)}var Uf=0,Tf=1;function Wf(a,b){var c=Xf();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}
|
|
197
197
|
function Yf(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 Tc(e)).X(c/1E3)}),2)}a.h*=a.m;H(d)})}function Xf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Zf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Zf.prototype.resolve=function(){};Zf.prototype.reject=function(){};function $f(a,b){this.promise=a;this.i=b;this.g=!1}function ag(a){return new $f(Promise.reject(a),function(){return Promise.resolve()})}function bg(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new $f(a,function(){return Promise.resolve()})}function cg(a){return new $f(Promise.resolve(a),function(){return Promise.resolve()})}function dg(a){return new $f(a,function(){return a.catch(function(){})})}$f.prototype.abort=function(){this.g=!0;return this.i()};
|
|
198
198
|
function eg(a){return new $f(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}$f.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
199
|
-
$f.prototype.
|
|
200
|
-
function fg(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",$f);$f.prototype.chain=$f.prototype.
|
|
199
|
+
$f.prototype.za=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=fg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Zf,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new $f(f,function(){return d()})};
|
|
200
|
+
function fg(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",$f);$f.prototype.chain=$f.prototype.za;$f.prototype["finally"]=$f.prototype.finally;$f.all=eg;$f.prototype.abort=$f.prototype.abort;$f.notAbortable=dg;$f.completed=cg;$f.aborted=bg;$f.failed=ag;function U(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
201
201
|
function gg(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);
|
|
202
202
|
var hg={Zi:"abrstatuschanged",$i:"adaptation",aj:"buffering",bj:"complete",cj:"downloadfailed",dj:"downloadheadersreceived",ej:"drmsessionupdate",gj:"emsg",xj:"prft",Error:"error",hj:"expirationupdated",ij:"firstquartile",jj:"gapjumped",mj:"keystatuschanged",oj:"loaded",pj:"loading",rj:"manifestparsed",sj:"manifestupdated",tj:"mediaqualitychanged",Metadata:"metadata",uj:"midpoint",vj:"nospatialvideoinfo",wj:"onstatechange",zj:"ratechange",Aj:"segmentappended",Bj:"sessiondata",Cj:"spatialvideoinfo",
|
|
203
203
|
Dj:"stalldetected",Ej:"started",Fj:"statechanged",Gj:"streaming",Hj:"textchanged",Ij:"texttrackvisibility",Jj:"thirdquartile",Kj:"timelineregionadded",Lj:"timelineregionenter",Mj:"timelineregionexit",Nj:"trackschanged",Pj:"unloading",Rj:"variantchanged"};function ig(){this.wa=new gb;this.qe=this}ig.prototype.addEventListener=function(a,b){this.wa&&this.wa.push(a,b)};ig.prototype.removeEventListener=function(a,b){this.wa&&this.wa.remove(a,b)};ig.prototype.dispatchEvent=function(a){if(!this.wa)return!0;var b=this.wa.get(a.type)||[],c=this.wa.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.qe;a.currentTarget=this.qe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
204
204
|
ig.prototype.release=function(){this.wa=null};function jg(){this.g=[]}function kg(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}jg.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 lg(a,b,c,d,e,f){ig.call(this);this.i=!1;this.m=new jg;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(lg,ig);r=lg.prototype;r.Rf=function(a){this.s=a};r.Sf=function(a){this.o=a};function mg(a,b,c,d){c=c||ng;var e=og[a];if(!e||c>=e.priority)og[a]={priority:c,ve:b,ti:void 0===d?!1:d}}
|
|
205
205
|
function pg(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.wi=function(a){this.g.add(a)};r.Si=function(a){this.g.delete(a)};r.sh=function(){this.g.clear()};r.xi=function(a){this.h.add(a)};r.Ti=function(a){this.h.delete(a)};r.th=function(){this.h.clear()};
|
|
206
206
|
function qg(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();ig.prototype.release.call(this);return this.m.destroy()};
|
|
207
|
-
r.request=function(a,b,c){var d=this,e=new rg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new sg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ke(b.retryParameters):Xf();b.uris=Ke(b.uris);f=tg(this,a,b,c);var g=f.
|
|
208
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.
|
|
209
|
-
function tg(a,b,c,d){function e(h){f=f.
|
|
210
|
-
function ug(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.xb,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=og[l])?l.ve:null;if(!n)return ag(new T(2,1,1E3,k));var p=l.ti,q=null,u=null,v=!1,w=!1,A;return dg(Yf(e)).
|
|
211
|
-
var B=n(c.uris[f],c,b,function(D,K,F){q&&q.stop();u&&u.X(C/1E3);a.l&&b==wg&&(z++,c.packetNumber=z,a.l(D,K,zg(d),c),m=!0,h.g=F)},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 Tc(function(){v=!0;B.abort()}),q.X(y/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Tc(function(){v=!0;B.abort()}));return B}).
|
|
207
|
+
r.request=function(a,b,c){var d=this,e=new rg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new sg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ke(b.retryParameters):Xf();b.uris=Ke(b.uris);f=tg(this,a,b,c);var g=f.za(function(){return ug(d,a,b,c,new Wf(b.retryParameters,!1),0,null,e)}),h=g.za(function(p){return vg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
208
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.za(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.$h||!d.l||u.fromCache||"HEAD"==b.method||a!=wg||d.l(u.timeMs,u.data.byteLength,zg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new sg(n.promise,function(){return n.abort()},e);kg(this.m,f);return f};
|
|
209
|
+
function tg(a,b,c,d){function e(h){f=f.za(function(){c.body&&(c.body=Cb(c.body));return h(b,c,d)})}var f=cg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.za(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
210
|
+
function ug(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.xb,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=og[l])?l.ve:null;if(!n)return ag(new T(2,1,1E3,k));var p=l.ti,q=null,u=null,v=!1,w=!1,A;return dg(Yf(e)).za(function(){if(a.i)return bg();A=Date.now();var z=0;c.requestStartTime=Date.now();
|
|
211
|
+
var B=n(c.uris[f],c,b,function(D,K,F){q&&q.stop();u&&u.X(C/1E3);a.l&&b==wg&&(z++,c.packetNumber=z,a.l(D,K,zg(d),c),m=!0,h.g=F)},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 Tc(function(){v=!0;B.abort()}),q.X(y/1E3));var C=c.retryParameters.stallTimeout;C&&(u=new Tc(function(){v=!0;B.abort()}));return B}).za(function(z){q&&q.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-A);var B={response:z,
|
|
212
212
|
$h: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 bg();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,ug(a,b,c,d,e,f,z,h)}throw z;})}
|
|
213
|
-
function vg(a,b,c,d){var e=cg(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Fe:f.Fe},g=a.next())f.Fe=g.value,e=e.
|
|
213
|
+
function vg(a,b,c,d){var e=cg(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Fe:f.Fe},g=a.next())f.Fe=g.value,e=e.za(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return h.Fe(b,k,d)}}(f));return e.za(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function zg(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",lg);
|
|
214
214
|
lg.prototype.request=lg.prototype.request;lg.prototype.destroy=lg.prototype.destroy;lg.makeRequest=qg;lg.defaultRetryParameters=function(){return Xf()};lg.prototype.clearAllResponseFilters=lg.prototype.th;lg.prototype.unregisterResponseFilter=lg.prototype.Ti;lg.prototype.registerResponseFilter=lg.prototype.xi;lg.prototype.clearAllRequestFilters=lg.prototype.sh;lg.prototype.unregisterRequestFilter=lg.prototype.Si;lg.prototype.registerRequestFilter=lg.prototype.wi;lg.unregisterScheme=function(a){delete og[a]};
|
|
215
215
|
lg.registerScheme=mg;lg.prototype.setForceHTTPS=lg.prototype.Sf;lg.prototype.setForceHTTP=lg.prototype.Rf;function rg(){this.g=0}lg.NumBytesRemainingClass=rg;function sg(a,b,c){$f.call(this,a,b);this.h=c}pa(sg,$f);lg.PendingRequest=sg;var wg=1;lg.RequestType={MANIFEST:0,SEGMENT:wg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};lg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var ng=3;
|
|
216
216
|
lg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ng};var og={};function Ag(a){this.g=!1;this.h=new Zf;this.i=a}Ag.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 Bg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Cg(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 Dg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Eg(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 Fg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Gg(a,b){this.h=Fb(a);this.i=b==Hg;this.g=0}r=Gg.prototype;r.ka=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 Ig();}};r.ia=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ig();}};r.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};
|
|
217
217
|
r.Jg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};r.Hc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ig();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.nb=function(a){if(this.g+a>this.h.byteLength)throw Ig();var b=Bb(this.h,this.g,a);this.g+=a;return b};
|
|
218
|
-
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};r.Ei=function(a){if(this.g<a)throw Ig();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Ig();this.g=a};r.
|
|
218
|
+
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};r.Ei=function(a){if(this.g<a)throw Ig();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Ig();this.g=a};r.ic=function(){for(var a=this.g;this.ka()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Bb(this.h,a,this.g-a);this.g+=1;return wd(a)};function Ig(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Gg);Gg.prototype.readTerminatedString=Gg.prototype.ic;Gg.prototype.seek=Gg.prototype.seek;Gg.prototype.rewind=Gg.prototype.Ei;
|
|
219
219
|
Gg.prototype.skip=Gg.prototype.skip;Gg.prototype.readBytes=Gg.prototype.nb;Gg.prototype.readUint64=Gg.prototype.Hc;Gg.prototype.readInt32=Gg.prototype.Jg;Gg.prototype.readUint32=Gg.prototype.O;Gg.prototype.readUint16=Gg.prototype.ia;Gg.prototype.readUint8=Gg.prototype.R;Gg.prototype.getLength=Gg.prototype.getLength;Gg.prototype.getPosition=Gg.prototype.ra;Gg.prototype.hasMoreData=Gg.prototype.ka;var Hg=1;Gg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hg};function Jg(){this.i=[];this.h=[];this.g=!1}r=Jg.prototype;r.box=function(a,b){a=Kg(a);this.i[a]=Ng;this.h[a]=b;return this};r.P=function(a,b){a=Kg(a);this.i[a]=Og;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Gg(a,0);for(this.g=!1;a.ka()&&!this.g;)this.Fc(0,a,b,c)};
|
|
220
220
|
r.Fc=function(a,b,c,d){var e=b.ra();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=Pg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.ra()+8>b.getLength()){this.g=!0;return}f=b.Hc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Og){if(d&&b.ra()+4>b.getLength()){this.g=!0;return}n=b.O();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.ra(),b=0<d?b.nb(d):new Uint8Array(0),b=new Gg(b,0),l({name:h,parser:this,
|
|
221
221
|
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ra(),b.getLength()-b.ra()))}};function Qg(a){for(var b=Rg(a);a.reader.ka()&&!a.parser.g;)a.parser.Fc(a.start+b,a.reader,a.partialOkay)}function Sg(a){for(var b=Rg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Fc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Tg(a){var b=Rg(a);for(a.reader.skip(78);a.reader.ka()&&!a.parser.g;)a.parser.Fc(a.start+b,a.reader,a.partialOkay)}
|
|
@@ -241,16 +241,16 @@ function wh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2
|
|
|
241
241
|
function xh(a){var b=[];a=Dd(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/\[(\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}
|
|
242
242
|
function yh(a,b){var c=xh(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)?zh(a[c],e,d,gh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}function zh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
243
243
|
function Ah(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&&Ah(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=Ah(b,!1,!0),d.appendChild(c);return d}var bh=new Map([]);function Bh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ga=this.ba=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new Zf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.ca=new Map;this.L=new Tc(function(){return Ch(b)});this.T=!1;this.N=[];this.W=!1;this.K=new Tc(function(){Dh(b)});this.l.catch(function(){});this.j=new Ag(function(){return Eh(b)});this.aa=!1;this.F=this.G=null}r=Bh.prototype;r.destroy=function(){return this.j.destroy()};
|
|
244
|
-
function Eh(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,Fh(a),2);case 2:if(!a.m){b.u(3);break}ta(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:va(b,5);break;case 4:za(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,H(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.
|
|
244
|
+
function Eh(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,Fh(a),2);case 2:if(!a.m){b.u(3);break}ta(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:va(b,5);break;case 4:za(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,H(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Xa(this.h.updateExpirationTime)};
|
|
245
245
|
function Gh(a,b,c){a.ga=!0;a.A=new Map;a.T=c;return Hh(a,b)}function Ih(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 Hh(a,b)}
|
|
246
246
|
function Jh(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 Kh(a,g,[])}
|
|
247
247
|
function Hh(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=Lh(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=Eg(a.h.servers),Mh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Nh(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=
|
|
248
248
|
v.next())w=q.value,Oh(w,Eg(a.h.servers),Eg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,We(b,a.T,a.aa,a.h.preferredKeySystems),2)}Bg(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.ba=!0,B.return(Promise.resolve());z=Kh(a,void 0,b);return B.return(g?z:z.catch(function(){}))})}
|
|
249
249
|
function Ph(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 Bg(a.j),c.return();case 2:return ta(c,4),a.G=a.m.setMediaKeys(a.s),E(c,a.G,6);case 6:va(c,5);break;case 4:b=za(c),a.o(new T(2,6,6003,b.message));case 5:Bg(a.j),H(c)}})}function Qh(a,b){return O(function(c){if(1==c.g)return E(c,Ph(a),2);Rh(a,b.initDataType,Bb(b.initData));H(c)})}
|
|
250
|
-
r.
|
|
250
|
+
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())Sh(b,e.value);b.W=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Fh(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||
|
|
251
251
|
b.A.size?E(c,Ph(b),2):c.u(2)}Th(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Qh(b,d)});H(c)})};
|
|
252
252
|
function Uh(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=qg([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);va(g,4);break;case 3:throw e=za(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();
|
|
253
|
-
ta(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=za(g),new T(2,6,6004,f.message);}})}function Vh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Wh(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.
|
|
253
|
+
ta(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=za(g),new T(2,6,6004,f.message);}})}function Vh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Wh(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.hb=new Zf,d.push(e.hb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
|
|
254
254
|
function Th(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){Wh(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&&Xh(a))return g.return(a.l);a.l=new Zf;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,Rh(a,f.initDataType,f.initData);Yh(a)&&a.l.resolve();return g.return(a.l)})}
|
|
255
255
|
function Rh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(zb(c,e.value.initData))return}0<a.i.size&&Yh(a)&&(a.l.resolve(),a.l=new Zf,a.l.catch(function(){}));Zh(a,b,c,a.g.sessionType)}}function $h(a){a=a.i.keys();a=Cg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
256
256
|
r.hf=function(){var a=this,b=this.i.keys();b=Cg(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.Yd=function(){return Fg(this.ca)};
|
|
@@ -264,20 +264,20 @@ l.Ee}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next
|
|
|
264
264
|
function bi(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=
|
|
265
265
|
A.h,A.return(c);case 6:za(A);case 7:Bg(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:za(A);case 16:Bg(a.j);case 13:h=q.next();A.u(12);break;case 11:return A.return(c)}})}
|
|
266
266
|
function Lh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Pd(a)}function di(a){Yh(a)&&a.l.resolve()}function ei(a,b){(new Tc(function(){b.loaded=!0;di(a)})).X(fi)}
|
|
267
|
-
function Wh(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):Sh(a,n)});a.B.D(d,"keystatuseschange",function(n){return gi(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Bf:Infinity,
|
|
267
|
+
function Wh(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):Sh(a,n)});a.B.D(d,"keystatuseschange",function(n){return gi(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Bf:Infinity,hb:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return E(m,
|
|
268
268
|
d.load(b),4);case 4:return g=m.h,Bg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),ei(a,f),di(a),m.return(d);case 2:k=za(m),Bg(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,di(a);case 3:return m.return(Promise.resolve())}})}
|
|
269
|
-
function Zh(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):Sh(a,f)});a.B.D(e,"keystatuseschange",function(f){return gi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Bf:Infinity,
|
|
269
|
+
function Zh(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):Sh(a,f)});a.B.D(e,"keystatuseschange",function(f){return gi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Bf:Infinity,hb: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&&Gd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
270
270
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new T(2,6,6006,f.message,f,h))}})}
|
|
271
271
|
function Sh(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&&Gd(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=qg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
|
|
272
272
|
f.headers[h];if(Nc(a.g.keySystem)){var A=xd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Zg(A,"PlayReadyKeyMessage");var z=hh(A,"HttpHeader");z=t(z);for(var B=z.next();!B.done;B=z.next()){var y=B.value;B=hh(y,"name")[0];y=hh(y,"value")[0];g.headers[fh(B)]=fh(y)}A=hh(A,"Challenge")[0];g.body=Hd(fh(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;va(w,3);break;case 2:n=za(w);if(a.j.g)return w.return();
|
|
273
|
-
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.
|
|
273
|
+
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.hb&&d.hb.reject(p)):(d&&d.hb&&d.hb.reject(p),a.i.delete(c),Yh(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&&Gd(l.data);ta(w,5);return E(w,c.update(l.data),7);case 7:va(w,6);break;case 5:return q=za(w),u=new T(2,6,6008,q.message),a.o(u),d&&d.hb&&d.hb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.hb&&d.hb.resolve(),
|
|
274
274
|
ei(a,d));H(w)}})}
|
|
275
|
-
function gi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Nc(a.g.keySystem)&&16==g.byteLength&&(Xc()||id())){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=Ld(g).slice(0,32);a.$.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.
|
|
275
|
+
function gi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Nc(a.g.keySystem)&&16==g.byteLength&&(Xc()||id())){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=Ld(g).slice(0,32);a.$.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.hb&&(a.i.delete(b),b.close().catch(function(){}));Yh(a)&&
|
|
276
276
|
(a.l.resolve(),a.L.X(hi))}function Ch(a){var b=a.$,c=a.ca;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.re(Fg(c))}
|
|
277
277
|
function ii(){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,F,J;return O(function(I){if(1==I.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"'},
|
|
278
|
-
{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(G,N){var L,M,P,R,Q,ja,ka,wa;return O(function(
|
|
278
|
+
{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(G,N){var L,M,P,R,Q,ja,ka,wa;return O(function(ya){switch(ya.g){case 1:return ta(ya,2),E(ya,N.createMediaKeys(),4);case 4:va(ya,3);break;case 2:return za(ya),ya.return();case 3:M=(L=N.getConfiguration().sessionTypes)?L.includes("persistent-license"):
|
|
279
279
|
!1,ad()&&(M=!1),P=N.getConfiguration().videoCapabilities,R=N.getConfiguration().audioCapabilities,Q={persistentState:M,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(G)&&k.get(G)?Q=k.get(G):k.set(G,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),(wa=R[0].robustness)&&!Q.audioRobustnessLevels.includes(wa)&&Q.audioRobustnessLevels.push(wa),
|
|
280
|
-
H(
|
|
280
|
+
H(ya)}})};m=function(G,N,L,M){var P,R,Q,ja,ka,wa,ya,Ba,Ka;return O(function(Ca){switch(Ca.g){case 1:ta(Ca,2);P=Ke(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())wa=Q.value,wa.encryptionScheme=N,wa.robustness=M;ya=Ke(P);ya.persistentState="required";ya.sessionTypes=["persistent-license"];Ba=[ya,P];return E(Ca,navigator.requestMediaKeySystemAccess(G,Ba),4);case 4:return Ka=Ca.h,
|
|
281
281
|
E(Ca,l(G,Ka),5);case 5:va(Ca,0);break;case 2:za(Ca),H(Ca)}})};n=function(G,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:G,video:{encryptionScheme:N,robustness:L},audio:{encryptionScheme:N,robustness:M}}},E(ja,navigator.mediaCapabilities.decodingInfo(P),4);case 4:return R=
|
|
282
282
|
ja.h,Q=R.keySystemAccess,E(ja,l(G,Q),5);case 5:va(ja,0);break;case 2:za(ja),H(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&&ld()||(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]||[]),F=K.next();!F.done;F=K.next())J=F.value,v.push(m(D,null,J,"")),v.push(m(D,null,"",J)),v.push(n(D,null,
|
|
283
283
|
J,"")),v.push(n(D,null,"",J));return E(I,Promise.all(v),2)}return I.return(Fg(k))})}function ji(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Tc(e)).X(ki)}),ta(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);za(c);H(c)})}
|
|
@@ -297,18 +297,18 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
297
297
|
function li(a,b,c){this.h=a;this.i=b;this.g=c}function mi(a,b){return O(function(c){if(1==c.g)return E(c,Se(a.g,b,a.h.drm.preferredKeySystems),2);Ne(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(vf))throw new T(2,4,4032);return c.return(ni(a,b))})}
|
|
298
298
|
function ni(a,b){var c=Re(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,oi(a,d.keySystem,f.video),oi(a,d.keySystem,f.audio);pi(a,b)}return c}function oi(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,Rh(a.g,e.initDataType,e.initData)}}}
|
|
299
299
|
function pi(a,b){a=a.g?a.g.Yd():{};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?qi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
300
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var qi=["output-restricted","internal-error"];function ri(){}function si(a,b){if(b){var c=ti[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",ri);ri.unregisterParserByMime=function(a){delete ti[a]};ri.registerParserByMime=function(a,b){ti[a]=b};ri.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ri.AccessibilityPurpose={Qj:"visually impaired",kj:"hard of hearing"};var ti={};function ui(a,b){function c(){f=!0}function d(m){h.push(m);Qg(m)}var e=a=Bb(a),f=!1,g,h=[],k=[];(new Jg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).P("stsd",function(m){g=m;h.push(m);Sg(m)}).P("encv",c).P("enca",c).P("dvav",function(m){k.push({box:m,
|
|
301
|
-
function(m){k.push({box:m,
|
|
302
|
-
e=vi(e,g,l.box,h,l.
|
|
300
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var qi=["output-restricted","internal-error"];function ri(){}function si(a,b){if(b){var c=ti[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",ri);ri.unregisterParserByMime=function(a){delete ti[a]};ri.registerParserByMime=function(a,b){ti[a]=b};ri.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ri.AccessibilityPurpose={Qj:"visually impaired",kj:"hard of hearing"};var ti={};function ui(a,b){function c(){f=!0}function d(m){h.push(m);Qg(m)}var e=a=Bb(a),f=!1,g,h=[],k=[];(new Jg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).P("stsd",function(m){g=m;h.push(m);Sg(m)}).P("encv",c).P("enca",c).P("dvav",function(m){k.push({box:m,fb:1701733238})}).P("dva1",function(m){k.push({box:m,fb:1701733238})}).P("dvh1",function(m){k.push({box:m,fb:1701733238})}).P("dvhe",function(m){k.push({box:m,fb:1701733238})}).P("hev1",function(m){k.push({box:m,fb:1701733238})}).P("hvc1",
|
|
301
|
+
function(m){k.push({box:m,fb:1701733238})}).P("avc1",function(m){k.push({box:m,fb:1701733238})}).P("avc3",function(m){k.push({box:m,fb:1701733238})}).P("ac-3",function(m){k.push({box:m,fb:1701733217})}).P("ec-3",function(m){k.push({box:m,fb:1701733217})}).P("ac-4",function(m){k.push({box:m,fb:1701733217})}).P("mp4a",function(m){k.push({box:m,fb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Ld(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,
|
|
302
|
+
e=vi(e,g,l.box,h,l.fb);return Xc()&&md()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
303
303
|
function vi(a,b,c,d,e){var f=wi.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);xi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Yc()||Xc()?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,xi(e,d.start,d.size+k.byteLength);k=Fb(e,b.start);b=Rg(b);
|
|
304
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function xi(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 wi=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 yi(a,b,c,d,e,f,g){this.M=a;this.Da=b;this.na=c;this.yf=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}yi.prototype.
|
|
305
|
-
yi.prototype.getEndByte=yi.prototype
|
|
304
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function xi(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 wi=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 yi(a,b,c,d,e,f,g){this.M=a;this.Da=b;this.na=c;this.yf=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}yi.prototype.bc=function(){return this.Da};yi.prototype.$b=function(){return this.na};yi.prototype.nd=function(){return this.g};function zi(a,b){return a===b?!0:a&&b?a.bc()==b.bc()&&a.$b()==b.$b()&&Qb(a.M().sort(),b.M().sort())&&zb(a.nd(),b.nd()):a==b}S("shaka.media.InitSegmentReference",yi);
|
|
305
|
+
yi.prototype.getEndByte=yi.prototype.$b;yi.prototype.getStartByte=yi.prototype.bc;
|
|
306
306
|
function Ai(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?Bi:q;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Da=d;this.na=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.ge=this.yd=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
307
|
-
a.next())b.value.Eg();this.o&&this.g.length&&this.g[this.g.length-1].Dg();this.B=this.mimeType=this.codecs=null}r=Ai.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.Ch=function(){return this.endTime};r.
|
|
307
|
+
a.next())b.value.Eg();this.o&&this.g.length&&this.g[this.g.length-1].Dg();this.B=this.mimeType=this.codecs=null}r=Ai.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.Ch=function(){return this.endTime};r.bc=function(){return this.Da};r.$b=function(){return this.na};r.Vh=function(){return this.tilesLayout};r.Uh=function(){return this.A};r.cc=function(){return this.status};r.mi=function(){this.status=Ci};r.xf=function(){this.preload=!0};r.gi=function(){return this.preload};
|
|
308
308
|
r.je=function(){this.l=!1};r.di=function(){return this.l};r.Eg=function(){this.yd=!0};r.fi=function(){return this.yd};r.Dg=function(){this.ge=!0};r.ei=function(){return this.ge};r.Cg=function(){this.m=!0};r.ai=function(){return this.m};r.Vg=function(a){this.s=a};r.Th=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};
|
|
309
309
|
r.Vf=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.Pi=function(a){this.B=a};r.nd=function(){return this.B};function Gi(a,b){a.ea=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Gi(c.value,b)}S("shaka.media.SegmentReference",Ai);Ai.prototype.getSegmentData=Ai.prototype.nd;Ai.prototype.setSegmentData=Ai.prototype.Pi;Ai.prototype.syncAgainst=Ai.prototype.Vf;Ai.prototype.offset=Ai.prototype.offset;
|
|
310
310
|
Ai.prototype.getThumbnailSprite=Ai.prototype.Th;Ai.prototype.setThumbnailSprite=Ai.prototype.Vg;Ai.prototype.hasByterangeOptimization=Ai.prototype.ai;Ai.prototype.markAsByterangeOptimization=Ai.prototype.Cg;Ai.prototype.isLastPartial=Ai.prototype.ei;Ai.prototype.markAsLastPartial=Ai.prototype.Dg;Ai.prototype.isPartial=Ai.prototype.fi;Ai.prototype.markAsPartial=Ai.prototype.Eg;Ai.prototype.isIndependent=Ai.prototype.di;Ai.prototype.markAsNonIndependent=Ai.prototype.je;Ai.prototype.isPreload=Ai.prototype.gi;
|
|
311
|
-
Ai.prototype.markAsPreload=Ai.prototype.xf;Ai.prototype.markAsUnavailable=Ai.prototype.mi;Ai.prototype.getStatus=Ai.prototype.
|
|
311
|
+
Ai.prototype.markAsPreload=Ai.prototype.xf;Ai.prototype.markAsUnavailable=Ai.prototype.mi;Ai.prototype.getStatus=Ai.prototype.cc;Ai.prototype.getTileDuration=Ai.prototype.Uh;Ai.prototype.getTilesLayout=Ai.prototype.Vh;Ai.prototype.getEndByte=Ai.prototype.$b;Ai.prototype.getStartByte=Ai.prototype.bc;Ai.prototype.getEndTime=Ai.prototype.Ch;Ai.prototype.getStartTime=Ai.prototype.getStartTime;Ai.prototype.getUris=Ai.prototype.M;var Bi=0,Ci=1;Ai.Status={Yi:Bi,Oj:Ci,qj:2};function Hi(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ii(a){return!a||Hi(a)?null:a.length?a.end(a.length-1):null}function Ji(a,b){return!a||!a.length||Hi(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ki(a,b){if(!a||!a.length||Hi(a))return 0;var c=0;a=t(Li(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}
|
|
312
312
|
function Mi(a,b,c){if(!a||!a.length||Hi(a))return null;a=Li(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Li(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};/*
|
|
313
313
|
@license
|
|
314
314
|
Shaka Player
|
|
@@ -321,7 +321,7 @@ d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=wd(Bb(a.data,1,d));a=wd(
|
|
|
321
321
|
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=wd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=wd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Cb(a.data),b):null}
|
|
322
322
|
function Si(a){for(var b=0,c=[];Oi(a,b);){var d=Qi(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=Qi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ri(e))&&c.push(f);b+=e.size+10}Pi(a,b)&&(b+=10)}return c}function Ti(a,b){for(var c=b=void 0===b?0:b,d=0;Oi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Qi(a,b+6),Pi(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Ni);Ni.getID3Data=Ti;
|
|
323
323
|
Ni.getID3Frames=Si;function Ui(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,Wd:d,Sj:e}}function Vi(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Wi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ia();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
324
|
-
function Xi(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={Lf:null,sampleSize:null,xe:null};c&256&&(h.Lf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.xe=0==b?a.O():a.Jg());e.push(h)}return{Wj:d,Mg:e,wh:f}}function Yi(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ia();a.skip(2);a.skip(2);a.skip(2);a=a.ia()+a.ia()/65536;return{channelCount:b,sampleRate:a}}function Zi(a){a=a.O();return{
|
|
324
|
+
function Xi(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={Lf:null,sampleSize:null,xe:null};c&256&&(h.Lf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.xe=0==b?a.O():a.Jg());e.push(h)}return{Wj:d,Mg:e,wh:f}}function Yi(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ia();a.skip(2);a.skip(2);a.skip(2);a=a.ia()+a.ia()/65536;return{channelCount:b,sampleRate:a}}function Zi(a){a=a.O();return{La:Pg(a)}}
|
|
325
325
|
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.ia()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ia();a.ia();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}}
|
|
326
326
|
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};/*
|
|
327
327
|
|
|
@@ -342,7 +342,7 @@ function aj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
|
|
|
342
342
|
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 Gg(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}
|
|
343
343
|
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)}
|
|
344
344
|
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 lj(a){jj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",cj);function mj(){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=mj.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
345
|
-
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,
|
|
345
|
+
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,nj(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,de:-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<
|
|
346
346
|
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=yd(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=
|
|
347
347
|
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,rh: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.de&&(g.de=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");
|
|
348
348
|
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.de&&(this.C=f.de);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);
|
|
@@ -352,127 +352,127 @@ a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);ret
|
|
|
352
352
|
r.Ef=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Md(b.data,p),b.fullData=Md(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Md(b.data,k),b.fullData=Md(b.fullData,k)));if(n>=e-f)return h;
|
|
353
353
|
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Md(b.data,a),b.fullData=Md(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Md.apply(Ed,x(c.value)),(c=vj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Si(c.data),dts:c.dts,pts:c.pts});return a};
|
|
354
354
|
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=Md.apply(Ed,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=Md(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};
|
|
355
|
-
r.
|
|
356
|
-
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};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.
|
|
357
|
-
r.be=function(){for(var a=[],b=t(this.
|
|
358
|
-
function yj(a){var b={height:null,width:null,
|
|
359
|
-
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.
|
|
360
|
-
function xj(a){var b={height:null,width:null,
|
|
355
|
+
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=Md.apply(Ed,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=Md(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.Ef(e,
|
|
356
|
+
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};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};r.kd=function(){return{audio:this.A,video:this.m}};
|
|
357
|
+
r.be=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.Yh=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.mf();return{height:a.height,width:a.width}};r.mf=function(){return"hvc"==this.m?xj(this):yj(this)};
|
|
358
|
+
function yj(a){var b={height:null,width:null,La:null};a=a.be();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=
|
|
359
|
+
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.La="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
360
|
+
function xj(a){var b={height:null,width:null,La:null};a=a.be();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)&&
|
|
361
361
|
(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+="."+
|
|
362
|
-
a.toString(16).toUpperCase());b.
|
|
363
|
-
mj.prototype.getCodecs=mj.prototype.kd;mj.prototype.getStartTime=mj.prototype.getStartTime;mj.prototype.getVideoData=mj.prototype.
|
|
362
|
+
a.toString(16).toUpperCase());b.La=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>nj(a)?!1:!0}function nj(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",mj);mj.syncOffset=nj;mj.probe=Aj;mj.prototype.getVideoInfo=mj.prototype.mf;mj.prototype.getVideoResolution=mj.prototype.Yh;mj.prototype.getVideoNalus=mj.prototype.be;
|
|
363
|
+
mj.prototype.getCodecs=mj.prototype.kd;mj.prototype.getStartTime=mj.prototype.getStartTime;mj.prototype.getVideoData=mj.prototype.Ac;mj.prototype.getAudioData=mj.prototype.Lb;mj.prototype.getMetadata=mj.prototype.getMetadata;mj.prototype.parseNalus=mj.prototype.Ef;mj.prototype.parseAvcNalus=mj.prototype.si;mj.prototype.parse=mj.prototype.parse;mj.prototype.clearData=mj.prototype.clearData;mj.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"),
|
|
364
364
|
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")}
|
|
365
|
-
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.ba=c;this.A=null;this.F=b;this.h={};this.G={};this.
|
|
366
|
-
function Lj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.
|
|
365
|
+
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.ba=c;this.A=null;this.F=b;this.h={};this.G={};this.Ea={};this.g=null;this.ga=!1;this.$=d||null;this.j={};this.s=new hb;this.o={};this.H=null;this.L=new Zf;this.N="";this.va=!1;this.l=Lj(this,this.L);this.C=!1;this.J=new Ag(function(){return Mj(e)});this.B=!1;this.aa="UNKNOWN";this.Fa=this.Ka=!1;this.ya=new Zf;this.m=!1;this.xa=!0;this.la=this.T=this.ma=this.W=this.K=this.ca=null;this.wa=new Zf}
|
|
366
|
+
function Lj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.xa=!0});a.s.D(c,"endstreaming",function(){a.xa=!1});a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.va=!0});a.N=Nj(c);a.i.src=a.N;return c}c=new MediaSource;a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.va=!0});a.N=Nj(c);a.i.src=a.N;return c}
|
|
367
367
|
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=Vd;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.pa){if(m=Xd(h,k),!qe(m))return q.return(!1)}else if(b==c.da?k=Ze(k):b==c.V&&(k=$e(k,h)),n=
|
|
368
368
|
ae(a,h,k),p=Zd(h,k),!mb(n)&&!mc(p))return q.return(!1);return q.return(!0)})}r=Kj.prototype;r.destroy=function(){return this.J.destroy()};
|
|
369
369
|
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(ye)),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.o)b.push(a.o[k].destroy());return E(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.F=null;a.h={};a.o={};a.H=null;
|
|
370
|
-
a.j={};a.$=null;a.K=null;a.ba=null;H(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=Vd,E(m,e.L,2);case 2:e.B=b,e.aa=c,e.
|
|
370
|
+
a.j={};a.$=null;a.K=null;a.ba=null;H(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=Vd,E(m,e.L,2);case 2:e.B=b,e.aa=c,e.Ka=d,e.Fa=!e.B&&"HLS"==e.aa&&!e.Ka,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.m?(e.j[f.V]=[],e.j[f.da]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
|
|
371
371
|
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=Vd,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=Xd(c.mimeType,d);if(b==e.pa){Qj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&Yd.includes(h))k=!0;l=Zd(c.mimeType,d);if(!k){w.u(4);break}m=Rd(e.V,(d||"").split(","));n=Rd(e.da,(d||"").split(","));if(!m||!n){w.u(5);break}a.m=!0;return E(w,Pj(a,e.V,c,m),6);case 6:return E(w,
|
|
372
|
-
Pj(a,e.da,c,n),7);case 7:return w.return();case 5:if(p=mc(l))q=p(),a.o[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Bg(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.s.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.s.D(v,"updateend",function(){return Sj(a,b)});a.h[b]=v;a.G[b]=h;a.
|
|
372
|
+
Pj(a,e.da,c,n),7);case 7:return w.return();case 5:if(p=mc(l))q=p(),a.o[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Bg(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.s.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.s.D(v,"updateend",function(){return Sj(a,b)});a.h[b]=v;a.G[b]=h;a.Ea[b]=!!c.drmInfos.length;
|
|
373
373
|
H(w)}})}r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
374
374
|
function Qj(a,b,c,d){a.g||(a.g=new pe(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ga;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,re[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)}
|
|
375
375
|
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==Td?a=a.g.g:(a=Vj(a,b),a=!a||Hi(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==Td?a.g.h:Ii(Vj(a,b))}function Xj(a,b,c){if(a.C)return 0;if(b==Td)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Vj(a,b);return Ki(a,c)}
|
|
376
376
|
r.ub=function(){var a={total:this.C?[]:Li(this.i.buffered),audio:this.C?[]:Li(Vj(this,"audio")),video:this.C?[]:Li(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}}
|
|
377
377
|
function Yj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Yd.includes(e))f=Si(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ba.se([{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 Jg).box("moof",Qg).box("traf",Qg).P("tfdt",function(n){l=Vi(n.reader,
|
|
378
378
|
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 mj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ba.se(h,f,d?d.endTime:null));return g}
|
|
379
|
-
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,C,D,K;return O(function(F){switch(F.g){case 1:m=Vd;if(b!=m.pa){F.u(2);break}if(!a.B){F.u(3);break}return E(F,a.
|
|
380
|
-
case 6:if(!a.h[b])return F.return();p=a.h[b].timestampOffset;q=a.G[b];a.o[b]&&(q=a.o[b].getOriginalMimeType());d&&(u=Yj(a,b,c,d,q,p),null!=u&&(null==a.W&&b==m.da&&(a.W=u,null!=a.T&&(v=a.W-a.T,a.wa.resolve(v))),null==a.T&&b==m.V&&(a.T=u,null!=a.W&&(w=a.W-a.T,a.wa.resolve(w))),A=d.startTime-u,z=Math.abs(p-A),(.001<=z||g||h)&&(!k||0<A||!p)&&(p=A,a.
|
|
381
|
-
Qj(a,"application/cea-608",a.B,!1),a.H||(y=q.split(";",1)[0],a.H=new Hb(y)),d?(C=a.H.i(c),C.length&&we(a.g,C,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.o[b]){F.u(9);break}return E(F,a.o[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=F.h;case 9:c=dk(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.pa){F.u(11);break}if(!g&&!h){F.u(11);break}D=d.startTime;if("HLS"!=a.aa||a.m||b!=m.V||!a.h[m.da]){F.u(13);break}return E(F,
|
|
382
|
-
b)},null),ak(a,b,function(){return ck(a,b,D)},null);case 11:return E(F,ak(a,b,function(){var J=c;if("video"==b&&a.$){var I=a.$;I.g&&I.g.appendBuffer(J,"video",I.o,-p)}a.h[b].appendBuffer(J)},d?d.M()[0]:null),15);case 15:H(F)}})}function ek(a,b){var c=Wj(a,"video")||0;ue(a.g,b,c)}function fk(a){a.g&&ue(a.g,"",0)}
|
|
379
|
+
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,C,D,K;return O(function(F){switch(F.g){case 1:m=Vd;if(b!=m.pa){F.u(2);break}if(!a.B){F.u(3);break}return E(F,a.ya,4);case 4:n=F.h,a.g.s=n;case 3:return E(F,se(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return F.return();case 2:if(l||!a.m){F.u(6);break}return E(F,Zj(a,m.V,c,d,e,f,g,h,k,!0),7);case 7:return E(F,Zj(a,m.da,c,d,e,f,g,h,k,!0),8);case 8:return F.return();
|
|
380
|
+
case 6:if(!a.h[b])return F.return();p=a.h[b].timestampOffset;q=a.G[b];a.o[b]&&(q=a.o[b].getOriginalMimeType());d&&(u=Yj(a,b,c,d,q,p),null!=u&&(null==a.W&&b==m.da&&(a.W=u,a.ma=d.startTime,null!=a.T&&(v=0,a.ma==a.la&&(v=a.W-a.T),a.wa.resolve(v))),null==a.T&&b==m.V&&(a.T=u,a.la=d.startTime,null!=a.W&&(w=0,a.ma==a.la&&(w=a.W-a.T),a.wa.resolve(w))),A=d.startTime-u,z=Math.abs(p-A),(.001<=z||g||h)&&(!k||0<A||!p)&&(p=A,a.Fa&&(ak(a,b,function(){return bk(a,b)},null),ak(a,b,function(){return ck(a,b,p)},null))),
|
|
381
|
+
B=b==m.da||!(m.da in a.h),a.B&&B&&a.ya.resolve(p)));f&&b==m.da&&(a.g||Qj(a,"application/cea-608",a.B,!1),a.H||(y=q.split(";",1)[0],a.H=new Hb(y)),d?(C=a.H.i(c),C.length&&we(a.g,C,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.o[b]){F.u(9);break}return E(F,a.o[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=F.h;case 9:c=dk(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.pa){F.u(11);break}if(!g&&!h){F.u(11);break}D=d.startTime;if("HLS"!=a.aa||a.m||b!=m.V||!a.h[m.da]){F.u(13);break}return E(F,
|
|
382
|
+
a.wa,14);case 14:K=F.h,.1<Math.abs(K)&&(D-=K);case 13:ak(a,b,function(){return bk(a,b)},null),ak(a,b,function(){return ck(a,b,D)},null);case 11:return E(F,ak(a,b,function(){var J=c;if("video"==b&&a.$){var I=a.$;I.g&&I.g.appendBuffer(J,"video",I.o,-p)}a.h[b].appendBuffer(J)},d?d.M()[0]:null),15);case 15:H(F)}})}function ek(a,b){var c=Wj(a,"video")||0;ue(a.g,b,c)}function fk(a){a.g&&ue(a.g,"",0)}
|
|
383
383
|
r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Vd,a==e.pa?E(f,d.g.remove(b,c),0):E(f,ak(d,a,function(){return gk(d,a,b,c)},null),4)):d.m?E(f,ak(d,e.V,function(){return gk(d,e.V,b,c)},null),0):f.u(0)})};function hk(a,b){var c;return O(function(d){return 1==d.g?(c=Vd,b==c.pa?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.m?E(d,ak(a,c.V,function(){return gk(a,c.V,0,a.l.duration)},null),0):d.u(0)})}
|
|
384
384
|
r.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Vd,a==c.pa?d.return():E(d,ak(b,a,function(){b.i.currentTime-=.001;Sj(b,a)},null),2)):b.m?E(d,ak(b,c.V,function(){var e=c.V;b.i.currentTime-=.001;Sj(b,e)},null),0):d.u(0)})};
|
|
385
385
|
function ik(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Vd;if(b==l.pa)return f||(a.g.s=c),te(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.m&&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.m&&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,
|
|
386
386
|
b)},null));a.m&&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)})}
|
|
387
|
-
function kk(a,b,c){var d;return O(function(e){if(1==e.g){d=Vd;if(b==d.pa)return e.return();b==d.da&&(a.
|
|
388
|
-
r.
|
|
387
|
+
function kk(a,b,c){var d;return O(function(e){if(1==e.g){d=Vd;if(b==d.pa)return e.return();b==d.da&&(a.ya=new Zf);ak(a,b,function(){return bk(a,b)},null);a.m&&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.m?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)})};
|
|
388
|
+
r.Wa=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 Zf,uri:null};b.j[d].unshift(e)}b.l.duration=a;b.ca=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)}
|
|
389
389
|
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){Bg(a.J);c={start:c,p:new Zf,uri:d};a.j[b].push(c);1==a.j[b].length&&nk(a,b);return c.p}
|
|
390
390
|
function lk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.J);c=[];d={};for(e in a.h)d.Sc=new Zf,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:va(l,3);break;case 2:throw g=za(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=za(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
|
|
391
|
-
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.
|
|
391
|
+
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.Ea[d];c=a.ba.Gh();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Nc(c),f=$c()||Yc()||hd()||Xc()&&md()&&c;f&&"mp4"==ce(a.G[d])&&(b=ui(b,e));return b}
|
|
392
392
|
function ok(a,b,c,d){return ak(a,b,function(){b!==Td&&(ob()&&(a.o[b]&&(a.o[b].destroy(),delete a.o[b]),d&&(a.o[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Sj(a,b))},null)}
|
|
393
|
-
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,F,J;return O(function(I){switch(I.g){case 1:c=Vd;a.C=!0;a.m=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.
|
|
393
|
+
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,F,J;return O(function(I){switch(I.g){case 1:c=Vd;a.C=!0;a.m=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.va&&(a.i.autoplay=!1);ua(I,2);a.s.ob();g=[];for(h in a.o)g.push(a.o[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(ye)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())q=p.value,q.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.l.removeSourceBuffer(v)}catch(G){}}return E(I,
|
|
394
394
|
Promise.all(g),4);case 4:return a.o={},a.h={},w=a.l.duration,a.L=new Zf,a.l=Lj(a,a.L),E(I,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.ca)&&a.ca&&(a.l.duration=a.ca),A=new Zf,z=a.l.sourceBuffers,B=b.size,y=0,C=function(){y++;y===B&&(A.resolve(),a.s.Hb(z,"addsourcebuffer",C))},a.s.D(z,"addsourcebuffer",C),D=t(b.keys()),K=D.next();case 6:if(K.done)return a.i.currentTime=d,E(I,A,2);F=K.value;J=b.get(F);return E(I,Pj(a,F,J,J.codecs),9);case 9:a.m?(a.j[c.V]=[],a.j[c.da]=[]):a.j[F]=[];K=D.next();
|
|
395
395
|
I.u(6);break;case 2:Aa(I),a.C=!1,Bg(a.J),a.s.sa(a.i,"canplaythrough",function(){a.J.g||(a.i.autoplay=e,f||a.i.play())}),Da(I,0)}})}function qk(a,b){return lk(a,function(){return pk(a,b)})}
|
|
396
396
|
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=Vd;if(b==f.pa)return y.return(!1);g=ke(ne(a.G[b]));h=me(a.G[b]);l=!1;m=Xd(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&Yd.includes(m))n=!0;n&&(p=Zd(c,d),q=mc(p))&&(k=q(),u=Rd(f.V,(d||"").split(",")),v=Rd(f.da,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.V&&(w=u),m=k.convertCodecs(b,Zd(c,w))):m=k.convertCodecs(b,p));A=ke(ne(m));z=me(m);if(g===A&&h===z)return y.return(!1);B=!0;if(a.m||l&&k&&!a.o[b])B=!1;if(B&&"smooth"===
|
|
397
|
-
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==Td)var e=!1;else{e=ke(ne(a.G[b]));var f=me(a.G[b]),g=Xd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Yd.includes(g))h=!0;c=Zd(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ke(ne(g));g=me(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.m:!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.Jh=function(){return this.g};r.Tg=function(a){this.i=a};r.
|
|
397
|
+
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==Td)var e=!1;else{e=ke(ne(a.G[b]));var f=me(a.G[b]),g=Xd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Yd.includes(g))h=!0;c=Zd(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ke(ne(g));g=me(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!ob()||a.m:!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.Jh=function(){return this.g};r.Tg=function(a){this.i=a};r.Wa=function(a){this.j=a};r.Oh=function(){return this.i};r.Rg=function(a){this.A=a};r.lc=function(a){this.F=a};r.ye=function(a){this.m=a};r.ae=function(){return this.m};r.Qf=function(a){this.s=a};r.Bh=function(){return this.s};
|
|
398
398
|
r.Hg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.pe(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)}};
|
|
399
399
|
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.pe(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.he=function(){this.o=!0};r.hi=function(){return this.o};r.Sg=function(a){this.B=a};r.Fh=function(){return this.B};
|
|
400
|
-
r.pe=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.zf=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.
|
|
401
|
-
r.
|
|
402
|
-
r.Qg=function(a){this.H=a};S("shaka.media.PresentationTimeline",sk);sk.prototype.setAvailabilityTimeOffset=sk.prototype.Qg;sk.prototype.usingPresentationStartTime=sk.prototype.ah;sk.prototype.getSeekRangeEnd=sk.prototype.vb;sk.prototype.getSeekRangeStart=sk.prototype
|
|
403
|
-
sk.prototype.isInProgress=sk.prototype.
|
|
404
|
-
sk.prototype.getDelay=sk.prototype.Bh;sk.prototype.setDelay=sk.prototype.Qf;sk.prototype.getSegmentAvailabilityDuration=sk.prototype.ae;sk.prototype.setSegmentAvailabilityDuration=sk.prototype.ye;sk.prototype.setStatic=sk.prototype.
|
|
405
|
-
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(Li(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 Tc(function(){yk(f)})).
|
|
400
|
+
r.pe=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.zf=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.fc=function(){return Infinity!=this.j&&!this.F};r.jb=function(){return Math.max(this.G,this.Nb()-this.m)};r.Xg=function(a){this.G=a};
|
|
401
|
+
r.Nb=function(){return this.U()||this.fc()?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.Nb()-this.m+a,this.vb()))};r.Mb=function(){return this.md(0)};r.vb=function(){return Math.max(0,this.Nb()-(this.U()||this.fc()?this.s:0))};r.ah=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
|
|
402
|
+
r.Qg=function(a){this.H=a};S("shaka.media.PresentationTimeline",sk);sk.prototype.setAvailabilityTimeOffset=sk.prototype.Qg;sk.prototype.usingPresentationStartTime=sk.prototype.ah;sk.prototype.getSeekRangeEnd=sk.prototype.vb;sk.prototype.getSeekRangeStart=sk.prototype.Mb;sk.prototype.getSafeSeekRangeStart=sk.prototype.md;sk.prototype.getSegmentAvailabilityEnd=sk.prototype.Nb;sk.prototype.setUserSeekStart=sk.prototype.Xg;sk.prototype.getSegmentAvailabilityStart=sk.prototype.jb;
|
|
403
|
+
sk.prototype.isInProgress=sk.prototype.fc;sk.prototype.isLive=sk.prototype.U;sk.prototype.offset=sk.prototype.offset;sk.prototype.notifyMaxSegmentDuration=sk.prototype.zf;sk.prototype.notifyMinSegmentStartTime=sk.prototype.pe;sk.prototype.getInitialProgramDateTime=sk.prototype.Fh;sk.prototype.setInitialProgramDateTime=sk.prototype.Sg;sk.prototype.isStartTimeLocked=sk.prototype.hi;sk.prototype.lockStartTime=sk.prototype.he;sk.prototype.notifySegments=sk.prototype.xd;sk.prototype.notifyTimeRange=sk.prototype.Hg;
|
|
404
|
+
sk.prototype.getDelay=sk.prototype.Bh;sk.prototype.setDelay=sk.prototype.Qf;sk.prototype.getSegmentAvailabilityDuration=sk.prototype.ae;sk.prototype.setSegmentAvailabilityDuration=sk.prototype.ye;sk.prototype.setStatic=sk.prototype.lc;sk.prototype.setClockOffset=sk.prototype.Rg;sk.prototype.getPresentationStartTime=sk.prototype.Oh;sk.prototype.setDuration=sk.prototype.Wa;sk.prototype.setPresentationStartTime=sk.prototype.Tg;sk.prototype.getMaxSegmentDuration=sk.prototype.Jh;
|
|
405
|
+
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(Li(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 Tc(function(){yk(f)})).Xa(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.Cf=function(){this.o=!0;yk(this)};
|
|
406
406
|
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=Mi(c,b,a.s.gapDetectionThreshold),
|
|
407
407
|
null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Yc())e=Math.ceil(100*(e+.01))/100;e>=a.B.vb()||.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()}
|
|
408
408
|
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)}
|
|
409
|
-
function Ck(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Tc(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.
|
|
409
|
+
function Ck(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Tc(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.Xa(.1)};function Ik(a){this.h=a;this.j=!1;this.g=null;this.i=new hb}r=Ik.prototype;r.Ke=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.Le=function(a){this.g=this.j?this.g:a};
|
|
410
410
|
r.Qd=function(){return(this.j?this.h.currentTime:this.g)||0};r.fg=function(){return 0};r.eg=function(){return 0};r.Gg=function(){};
|
|
411
411
|
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=!1;if(!fd()||fd()&&nd())k=!0;else{var l=Date.now()/1E3;if(!g.s||g.s<l-1)g.s=l,k=!0}if(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)},
|
|
412
|
-
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g
|
|
412
|
+
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Mb():g.g.vb():0>h&&(h=g.g.vb()+h);return Mk(g,Nk(g,h))});this.m=new Tc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ek(g.h),k=g.g.Mb(),l=g.g.vb();3>l-k&&(k=l-3);h<k&&(h=Lk(g,h),g.i.currentTime=h)}})}r=Jk.prototype;r.Ke=function(){this.m.Xa(.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(){}};
|
|
413
413
|
r.Le=function(a){Fk(this.h,a)};r.Qd=function(){var a=Ek(this.h);return 0<this.i.readyState&&!this.i.paused?Nk(this,a):a};r.fg=function(){return this.o?this.o.o:0};r.eg=function(){return this.j.C};r.Gg=function(){this.j.Cf()};function Mk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
414
|
-
function Lk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g
|
|
415
|
-
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.ni=function(){this.o=!0};r.
|
|
414
|
+
function Lk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Mb(),f=a.g.vb(),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?Ji(a.i.buffered,k)?k:c:b>=h||Ji(a.i.buffered,b)?b:c}function Nk(a,b){var c=a.g.Mb();if(b<c)return c;a=a.g.vb();return b>a?a:b}
|
|
415
|
+
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.ni=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)};
|
|
416
416
|
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)};
|
|
417
|
-
r.le=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.le(a);this.
|
|
418
|
-
r.
|
|
419
|
-
r.ze=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Tc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.
|
|
417
|
+
r.le=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.le(a);this.Ma(b)};r.Ma=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}};
|
|
418
|
+
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 Ai(a.startTime,b,a.C,a.Da,a.na,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)}};
|
|
419
|
+
r.ze=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Tc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Xa(a))};Ok.prototype[Symbol.iterator]=function(){return this.Ab(0)};
|
|
420
420
|
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 Ai(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Ok([a])}
|
|
421
|
-
S("shaka.media.SegmentIndex",Ok);Ok.forSingleSegment=Qk;Ok.prototype.getIteratorForTime=Ok.prototype.Ab;Ok.prototype.updateEvery=Ok.prototype.ze;Ok.prototype.fit=Ok.prototype.
|
|
421
|
+
S("shaka.media.SegmentIndex",Ok);Ok.forSingleSegment=Qk;Ok.prototype.getIteratorForTime=Ok.prototype.Ab;Ok.prototype.updateEvery=Ok.prototype.ze;Ok.prototype.fit=Ok.prototype.vc;Ok.prototype.evict=Ok.prototype.Ma;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.ni;Ok.prototype.release=Ok.prototype.release;Ok.prototype.getNumEvicted=Ok.prototype.getNumEvicted;
|
|
422
422
|
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.vh=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};
|
|
423
423
|
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.vh;
|
|
424
|
-
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.
|
|
425
|
-
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.le=function(){};r.
|
|
426
|
-
Rk.prototype.offset=Rk.prototype.offset;Rk.prototype.get=Rk.prototype.get;Rk.prototype.find=Rk.prototype.find;Rk.prototype.forEachTopLevelReference=Rk.prototype.
|
|
427
|
-
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.na&&(c=!1);2==b.
|
|
428
|
-
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.
|
|
424
|
+
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};
|
|
425
|
+
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.le=function(){};r.Ma=function(){};r.wd=function(){};r.vc=function(){};r.ze=function(){};S("shaka.media.MetaSegmentIndex",Rk);Rk.prototype.updateEvery=Rk.prototype.ze;Rk.prototype.fit=Rk.prototype.vc;Rk.prototype.mergeAndEvict=Rk.prototype.wd;Rk.prototype.evict=Rk.prototype.Ma;Rk.prototype.merge=Rk.prototype.le;
|
|
426
|
+
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.$d();this.h=new Tc(function(){b.g.Fg(.25*b.i)})}Sk.prototype.release=function(){this.set(this.Zb());this.h&&(this.h.stop(),this.h=null);this.g=null};Sk.prototype.set=function(a){this.i=a;Tk(this)};Sk.prototype.Zb=function(){return this.g.Zb()};function Tk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.$d()!=b&&a.g.Tf(b);return}catch(c){}a.h.Xa(.25);0!=a.g.$d()&&a.g.Tf(0)};function Uk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Tc(function(){Vk(b,!1)})).Xa(.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.Rd=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}
|
|
427
|
+
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.na&&(c=!1);2==b.cc()&&(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.ge)break}hl(a)}}function el(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return zi(d,b)})){var c=new fl(a.l);gl(c,b,a.i);a.j.set(b,c)}}
|
|
428
|
+
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.Ma=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)};
|
|
429
429
|
function hl(a){for(var b=Array.from(a.h.keys()),c={},d=t(a.j.keys()),e=d.next();!e.done;c={Kd:c.Kd},e=d.next())c.Kd=e.value,b.some(function(f){return function(g){return zi(g.ea,f.Kd)}}(c))||jl(a,c.Kd)}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 yi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function fl(a){this.g=a;this.te=this.Uf=null}
|
|
430
|
-
function gl(a,b,c){var d=new Uint8Array(0);a.te=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Md(d,e):d=e,a.Uf?E(f,a.Uf(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}fl.prototype.abort=function(){this.te&&this.te.abort()};function nl(a){ig.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Tc(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))})).
|
|
430
|
+
function gl(a,b,c){var d=new Uint8Array(0);a.te=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Md(d,e):d=e,a.Uf?E(f,a.Uf(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}fl.prototype.abort=function(){this.te&&this.te.abort()};function nl(a){ig.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Tc(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))})).Xa(2)}pa(nl,ig);nl.prototype.release=function(){this.g.clear();this.h.stop();ig.prototype.release.call(this)};function ol(a){ig.call(this);this.g=new Map;this.h=a}pa(ol,ig);ol.prototype.release=function(){this.g.clear();ig.prototype.release.call(this)};function pl(a,b){var c=a.g.get(b);c||(c={Bd:[],lg: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={yf: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)}
|
|
431
431
|
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.yf;break a}}d=null}if(e=d)e=c.lg,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);
|
|
432
432
|
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.lg=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=qg(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 Ag(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()};
|
|
433
433
|
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;H(k)})}
|
|
434
434
|
r.configure=function(a){this.h=a;this.J=new Wf({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(Td))&&
|
|
435
435
|
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)}
|
|
436
436
|
r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,Al(b,a||new Map),2);Bg(b.l);b.C=!0;H(c)})};function Bl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Vd,a.H++,d=a.H,ta(l,2),E(l,hk(a.g.Z,c.pa),4);case 4:va(l,3);break;case 2:if(e=za(l),a.g)a.g.onError(e);case 3:f=Xd(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.pa,k),Dl(a,k,0)),H(l)}})}
|
|
437
|
-
function El(a){var b=a.i.get(Td);b&&(vl(b),wl(b).catch(function(){}),a.i.delete(Td));a.s=null}function Fl(a,b){for(var c=0>a.g
|
|
437
|
+
function El(a){var b=a.i.get(Td);b&&(vl(b),wl(b).catch(function(){}),a.i.delete(Td));a.s=null}function Fl(a,b){for(var c=0>a.g.ab(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.fa&&e.fa.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)}
|
|
438
438
|
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);H(c)})}
|
|
439
|
-
function Gl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Td?g&&(g.
|
|
439
|
+
function Gl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Td?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==Td&&(e=Xd(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.fa=null,g.gg=!!f,c?g.bd?g.Ae=!0:g.Na?(g.Rb=!0,g.Vd=d,g.Ae=!0):(vl(g),Jl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Na||g.qb||Dl(a,g,0),
|
|
440
440
|
Kl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Bl(a,b)}
|
|
441
|
-
function Kl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.
|
|
442
|
-
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.
|
|
443
|
-
r.Cd=function(){if(this.g)for(var a=this.g.Zd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.Z;e.C?e=!1:d==Td?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Vj(e,d),e=Ji(e,a));if(!e){c.S&&(c.S.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.fa=null;(null!=Wj(this.g.Z,d)||c.
|
|
444
|
-
function Ll(a,b){b.bd||b.
|
|
441
|
+
function Kl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.gb)return e.return();c=b.stream;d=b.gb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.gb!=d||b.stream!=c)return e.return();var f=a.g.Zd();var g=Wj(a.g.Z,b.type),h=b.stream.segmentIndex.find(b.Ta?b.Ta.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.na?k.na-k.Da:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ea)&&(h+=(k.na?k.na-k.Da:null)||0),k=a.g.getBandwidthEstimate(),
|
|
442
|
+
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.gb.h.g>h?!0:!1):f=!1;f&&b.gb.abort();H(e)})}
|
|
443
|
+
r.Cd=function(){if(this.g)for(var a=this.g.Zd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.Z;e.C?e=!1:d==Td?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Vj(e,d),e=Ji(e,a));if(!e){c.S&&(c.S.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.fa=null;(null!=Wj(this.g.Z,d)||c.Na)&&Ll(this,c);c.gb&&(c.gb.abort(),c.gb=null);d===Td&&(d=this.g.Z,d.H&&d.H.g());c.Cd=!0}}};
|
|
444
|
+
function Ll(a,b){b.bd||b.Rb||(b.Na?(b.Rb=!0,b.Vd=0):null==Uj(a.g.Z,b.type)?null==b.qb&&Dl(a,b,0):(vl(b),Jl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
445
445
|
function Al(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Vd;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.da,a.j.video),e.add(a.j.video));a.s&&(d.set(c.pa,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)}Bg(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=
|
|
446
|
-
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));H(p)})}function Cl(a,b){return{stream:b,type:b.type,fa:null,S:xl(a,b),
|
|
447
|
-
function xl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Td&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Td&&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
|
|
448
|
-
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={
|
|
449
|
-
(d.
|
|
450
|
-
function Nl(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Bg(a.l);if(b.
|
|
451
|
-
za(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:Bg(a.l),g=a.g.Z.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.
|
|
452
|
-
function Ol(a,b){if(Ql(b))return ek(a.g.Z,b.stream.originalId||""),null;b.type==Td&&fk(a.g.Z);if(!a.g.Z.
|
|
453
|
-
!0,"video"==b.type&&(a=a.i.get(Td))&&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.fa&&!h.fa.current()||(f=Math.min(f,h.
|
|
454
|
-
return null}function Rl(a,b,c,d){if(b.fa)return b.fa.current();if(b.
|
|
455
|
-
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=Vd;f=b.stream;g=b.fa;b.
|
|
456
|
-
ta(I,2);n=Ul(n,C);D=!1;K=0;(new Jg).box("mdat",function(G){K=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D){I.u(4);break}F=n.subarray(0,K);n=n.subarray(K);return E(I,Vl(a,b,c,f,d,F,!0),5);case 5:b.S&&b.fa&&dl(b.S,d.startTime,!0);case 4:va(I,0);break;case 2:u=J=za(I),H(I)}})},E(y,Wl(a,b,d,v),9);l=Wl(a,b,d);return E(y,l,7);case 7:m=y.h;Bg(a.l);if(a.A)return y.return();Bg(a.l);return b.
|
|
457
|
-
y.return():b.
|
|
446
|
+
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));H(p)})}function Cl(a,b){return{stream:b,type:b.type,fa:null,S:xl(a,b),Ta:null,Cc:null,vf:null,tf:null,rf:null,kc:null,endOfStream:!1,Na:!1,qb:null,Rb:!1,Vd:0,Ae:!1,bd:!1,Cd:!0,If:!1,qd:!1,gb:null}}
|
|
447
|
+
function xl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Td&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Td&&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.ab()):null}
|
|
448
|
+
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={Oa:d.Oa},f=e.next())if(d.Oa=f.value,d.Oa.audio)if(a.o.has(d.Oa.audio)){if(f=a.o.get(d.Oa.audio),ll(f,b),!(0<b&&c.some(function(h){return function(k){return Be(h.Oa.audio.language,k)}}(d)))){var g=a.i.get(d.Oa.audio.type);f!==(g&&g.S)&&kl(f);a.o.delete(d.Oa.audio)}}else 0>=b||!c.some(function(h){return function(k){return Be(h.Oa.audio.language,k)}}(d))||!(f=xl(a,d.Oa.audio))||
|
|
449
|
+
(d.Oa.audio.segmentIndex||d.Oa.audio.createSegmentIndex(),a.o.set(d.Oa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Z.Wa(a):this.g.Z.Wa(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
450
|
+
function Nl(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Bg(a.l);if(b.Na||null==b.qb||b.bd)return h.return();b.qb=null;if(!b.Rb){h.u(2);break}return E(h,Jl(a,b,b.Ae,b.Vd),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.Na||b.qb||Dl(a,b,0),h.return();case 4:ta(h,6);d=Ol(a,b);null!=d&&(Dl(a,b,d),b.qd=!1);va(h,7);break;case 6:return e=
|
|
451
|
+
za(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:Bg(a.l),g=a.g.Z.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Wa(g),H(h)}})}
|
|
452
|
+
function Ol(a,b){if(Ql(b))return ek(a.g.Z,b.stream.originalId||""),null;b.type==Td&&fk(a.g.Z);if(!a.g.Z.xa&&b.type!=Td)return a.h.updateIntervalSeconds/2;var c=a.g.Zd();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.Ma(c,!0),dl(e,c);d=b.Ta?b.Ta.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=
|
|
453
|
+
!0,"video"==b.type&&(a=a.i.get(Td))&&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.fa&&!h.fa.current()||(f=Math.min(f,h.Ta?h.Ta.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.S&&b.fa&&!a.o.has(b.stream)&&(b.S.Ma(e.startTime),dl(b.S,e.startTime));Sl(a,b,c,e).catch(function(){});
|
|
454
|
+
return null}function Rl(a,b,c,d){if(b.fa)return b.fa.current();if(b.Ta||d)return b.fa=b.stream.segmentIndex.Ab(b.Ta?b.Ta.endTime:d,!1,0>a.g.ab()),b.fa&&b.fa.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.ab();var f=null;d&&(b.fa=b.stream.segmentIndex.Ab(e,!1,a),f=b.fa&&b.fa.next().value);f||(b.fa=b.stream.segmentIndex.Ab(c,!1,a),f=b.fa&&b.fa.next().value);return f}
|
|
455
|
+
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=Vd;f=b.stream;g=b.fa;b.Na=!0;ta(y,2);if(2==d.cc())throw new T(1,1,1011);return E(y,Tl(a,b,d),4);case 4:Bg(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,F,J;return O(function(I){switch(I.g){case 1:if(p)return I.return();q=!0;Bg(a.l);if(a.A)return I.return();
|
|
456
|
+
ta(I,2);n=Ul(n,C);D=!1;K=0;(new Jg).box("mdat",function(G){K=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D){I.u(4);break}F=n.subarray(0,K);n=n.subarray(K);return E(I,Vl(a,b,c,f,d,F,!0),5);case 5:b.S&&b.fa&&dl(b.S,d.startTime,!0);case 4:va(I,0);break;case 2:u=J=za(I),H(I)}})},E(y,Wl(a,b,d,v),9);l=Wl(a,b,d);return E(y,l,7);case 7:m=y.h;Bg(a.l);if(a.A)return y.return();Bg(a.l);return b.Rb?(b.Na=!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;Bg(a.l);return a.A?
|
|
457
|
+
y.return():b.Rb?(b.Na=!1,Dl(a,b,0),y.return()):E(y,Vl(a,b,c,f,d,w),10);case 10:b.S&&b.fa&&dl(b.S,d.startTime,!0);case 6:Bg(a.l);if(a.A)return y.return();b.Ta=d;g.next();b.Na=!1;b.If=!1;A=a.g.Z.ub();z=A[b.type];eb(JSON.stringify(z));b.Rb||a.g.Cf(d,b.stream);Dl(a,b,0);va(y,0);break;case 2:B=za(y);Bg(a.l,B);if(a.A)return y.return();b.Na=!1;if(7001==B.code)b.Na=!1,vl(b),Dl(a,b,0),y.u(0);else if(b.type==e.pa&&a.h.ignoreTextStreamFailures)a.i.delete(e.pa),y.u(0);else if(3017==B.code)Xl(a,b,B),y.u(0);else return b.qd=
|
|
458
458
|
!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))})}
|
|
459
459
|
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.If})){if(0<a.h.maxDisabledTime&&a.g.Xd(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.If=!0}Dl(a,b,4)}
|
|
460
|
-
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=Vd;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=ke(b.stream.codecs);k=me(b.stream.mimeType);l=c.timestampOffset;if(l==b.vf&&f==b.tf&&g==b.rf&&h==b.uf&&k==b.Bg){w.u(2);break}m=b.uf&&b.Bg&&rk(a.g.Z,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.da?n=a.i.get(d.V):b.type===d.V&&(n=a.i.get(d.da));if(!n){w.u(3);break}return E(w,wl(n).catch(function(){}),5);case 5:n.
|
|
461
|
-
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.da,a.j.video),ta(y,2),b.tf=f,b.rf=g,b.uf=h,b.Bg=k,b.vf=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 va(y,0);B=za(y);b.tf=null;b.rf=null;b.uf=null;b.vf=null;throw B;})},E(w,p(),2);case 2:return zi(c.ea,b.
|
|
462
|
-
z,B,y,C,D,K;return O(function(F){switch(F.g){case 1:return ta(F,2),E(F,q,4);case 4:return A=F.h,Bg(a.l),z=null,B=new Map,y={projection:null,hfov:null},C=new Jg,C.box("moov",Qg).box("trak",Qg).box("mdia",Qg).P("mdhd",function(J){z=Wi(J.reader,J.version).timescale}).box("hdlr",function(J){J=J.reader;J.skip(8);switch(J.
|
|
463
|
-
Tg).box("dvav",Tg).box("dva1",Tg).box("dvh1",Tg).box("dvhe",Tg).box("vexu",Qg).box("proj",Qg).P("prji",function(J){J=J.reader.
|
|
464
|
-
c.ea),e.push(u()))),a.m.sequenceMode&&(v=b.
|
|
465
|
-
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 Jg;l&&k.P("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.
|
|
466
|
-
z+e.timestampOffset,B=D-e.startTime,y=u.reader.O(),C=u.reader.O(),w=u.reader.
|
|
460
|
+
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=Vd;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=ke(b.stream.codecs);k=me(b.stream.mimeType);l=c.timestampOffset;if(l==b.vf&&f==b.tf&&g==b.rf&&h==b.uf&&k==b.Bg){w.u(2);break}m=b.uf&&b.Bg&&rk(a.g.Z,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.da?n=a.i.get(d.V):b.type===d.V&&(n=a.i.get(d.da));if(!n){w.u(3);break}return E(w,wl(n).catch(function(){}),5);case 5:n.Cc=
|
|
461
|
+
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.da,a.j.video),ta(y,2),b.tf=f,b.rf=g,b.uf=h,b.Bg=k,b.vf=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 va(y,0);B=za(y);b.tf=null;b.rf=null;b.uf=null;b.vf=null;throw B;})},E(w,p(),2);case 2:return zi(c.ea,b.Cc)||(b.Cc=c.ea,c.l&&c.ea&&(q=Wl(a,b,c.ea),u=function(){var A,
|
|
462
|
+
z,B,y,C,D,K;return O(function(F){switch(F.g){case 1:return ta(F,2),E(F,q,4);case 4:return A=F.h,Bg(a.l),z=null,B=new Map,y={projection:null,hfov:null},C=new Jg,C.box("moov",Qg).box("trak",Qg).box("mdia",Qg).P("mdhd",function(J){z=Wi(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.da,z)}z=null}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("encv",Tg).box("avc1",Tg).box("avc3",Tg).box("hev1",Tg).box("hvc1",
|
|
463
|
+
Tg).box("dvav",Tg).box("dva1",Tg).box("dvh1",Tg).box("dvhe",Tg).box("vexu",Qg).box("proj",Qg).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(F,a.g.ig(b.type,A),5);case 5:return E(F,Zj(a.g.Z,b.type,A,null,b.stream,D),6);case 6:va(F,0);break;case 2:throw K=za(F),b.Cc=null,K;}})},a.g.pi(c.startTime,
|
|
464
|
+
c.ea),e.push(u()))),a.m.sequenceMode&&(v=b.Ta?b.Ta.j:null,c.j!=v&&e.push(kk(a.g.Z,b.type,c.startTime))),E(w,Promise.all(e),0)}})}
|
|
465
|
+
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 Jg;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()/
|
|
466
|
+
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.ri():(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"!=
|
|
467
467
|
w||(w=Si(u),w.length&&e&&a.g.se([{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);
|
|
468
468
|
a.F=!0}});(l||m)&&k.parse(f);return E(q,$l(a,b,c),2);case 2:return Bg(a.l),n=b.Cd,b.Cd=!1,p=b.gg,b.gg=!1,E(q,a.g.ig(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:Bg(a.l),H(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)}Bg(a.l);H(h)})}
|
|
469
469
|
function Ql(a){return a&&a.type==Td&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
470
|
-
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 yi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Uf=d),f=m.te):f=null}f||(f=Ml(c,b.stream,d||null,a.h.retryParameters,a.g.Db));g=0;b.fa&&(g=b.fa.h);b.
|
|
470
|
+
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 yi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Uf=d),f=m.te):f=null}f||(f=Ml(c,b.stream,d||null,a.h.retryParameters,a.g.Db));g=0;b.fa&&(g=b.fa.h);b.gb=f;return E(l,f.promise,2);case 2:h=l.h;b.gb=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)}})}
|
|
471
471
|
function Ml(a,b,c,d,e){var f=a instanceof Ai?a:void 0,g=f?1:0;a=sl(a.M(),a.Da,a.na,d,c);a.contentType=b.type;return e.request(wg,a,{type:g,stream:b,segment:f})}
|
|
472
|
-
function Jl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.
|
|
473
|
-
function Dl(a,b,c){var d=b.type;if(d!=Td||a.i.has(d))b.qb=(new Sc(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 va(f,0);e=za(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function vl(a){null!=a.qb&&(a.qb.stop(),a.qb=null)}function wl(a){return O(function(b){return a.
|
|
472
|
+
function Jl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Rb=!1,b.Ae=!1,b.Vd=0,b.bd=!0,b.Ta=null,b.fa=null,b.S&&!a.o.has(b.stream)&&kl(b.S),d?(e=a.g.Zd(),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 Bg(a.l),c?E(g,a.g.Z.flush(b.type),3):g.u(3);Bg(a.l);b.bd=!1;b.endOfStream=!1;b.Na||b.qb||Dl(a,b,0);H(g)})}
|
|
473
|
+
function Dl(a,b,c){var d=b.type;if(d!=Td||a.i.has(d))b.qb=(new Sc(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 va(f,0);e=za(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function vl(a){null!=a.qb&&(a.qb.stop(),a.qb=null)}function wl(a){return O(function(b){return a.gb?E(b,a.gb.abort(),0):b.u(0)})}
|
|
474
474
|
function Pl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Yf(a.J),2);Bg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Xd(b.stream,d),c.handled&&(c.severity=1));if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
|
|
475
|
-
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=Vd;if(e=a.i.get(d.V))e.
|
|
475
|
+
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=Vd;if(e=a.i.get(d.V))e.Cc=null,Ll(a,e),wl(e).catch(function(){});if(f=a.i.get(d.da))f.Cc=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.da,a.j.video);return E(h,qk(a.g.Z,g),2)}return h.return(!0)})}
|
|
476
476
|
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(){}
|
|
477
477
|
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]=Ke(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ke(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),
|
|
478
478
|
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}
|
|
@@ -497,39 +497,40 @@ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth
|
|
|
497
497
|
drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(pm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
498
498
|
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,"")}
|
|
499
499
|
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=Je(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Ce(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-
|
|
500
|
-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Td&&"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){ig.call(this);this.K=a;this.T=b;this.
|
|
501
|
-
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.
|
|
500
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Td&&"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){ig.call(this);this.K=a;this.T=b;this.xa=e.networkingEngine;this.W=d;this.o=null;this.rb=c;this.va=0;this.Ka=e.uc;this.B=e.ki;this.ib=e.li;this.g=e.config;this.j=this.C=this.h=null;this.ca=!1;this.F=e.vi;this.la=!1;this.l=null;this.ba=!1;this.i=this.A=null;this.aa=!1;this.J=new Map;this.ma=!1;this.ya=e.ui;this.$=new al;this.m=new Zf;this.L=null;this.s=!1;this.Ea=e.nh;this.ga=null;this.Fa=e.mh;this.N=!1;this.H=[];this.G=[]}pa(rm,ig);
|
|
501
|
+
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.jf=function(){return this.h};function vm(a){a.aa=!0;return a.i}function wm(a){a.ca=!0;return a.j}function xm(a){a.la=!0;return a.F}r.getStats=function(){return this.$};
|
|
502
502
|
function ym(a){a.ba=!0;return a.l}function zm(a){a.ma=!0;return a.J}
|
|
503
503
|
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 Jf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
|
|
504
|
-
if(a.
|
|
504
|
+
if(a.Fa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ea){d=a.h.presentationTimeline.U();var e=wf(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.ga=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();va(c,0);break;case 3:b=za(c),a.m.reject(b),H(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):ig.prototype.dispatchEvent.call(this,a)};
|
|
505
505
|
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)))}
|
|
506
506
|
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=si(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;H(g)})}
|
|
507
|
-
function Cm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Em(a,"drm-engine");a.va=Date.now()/1E3;a.l=a.
|
|
507
|
+
function Cm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Em(a,"drm-engine");a.va=Date.now()/1E3;a.l=a.Ka();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Re(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=wf(a.h.variants),E(g,Ih(a.l,d,a.h.offlineSessionIds),4);case 4:return Bm(a),E(g,mi(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,
|
|
508
508
|
Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}r.configure=function(a,b){a=dm(a,b);qm(this.g,a)};r.getConfiguration=function(){return Ke(this.g)};
|
|
509
|
-
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.
|
|
509
|
+
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.xa)},!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));H(k)})}r.Wi=function(){return this.m};
|
|
510
510
|
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.ca){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.la&&a.F.release();if(!a.l||a.ba){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.ma)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,kl(d);H(e)}})};
|
|
511
|
-
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.Wi;function Gm(a,b){ig.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{
|
|
512
|
-
"regionremove",function(d){c.g.delete(d.region)})}pa(Gm,ig);Gm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ig.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?
|
|
513
|
-
function Im(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var
|
|
511
|
+
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.Wi;function Gm(a,b){ig.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{qc:null,pc:Hm,ec:function(d,e){return Im(c,"enter",d,e)}},{qc:Jm,pc:Hm,ec:function(d,e){return Im(c,"enter",d,e)}},{qc:Xm,pc:Hm,ec:function(d,e){return Im(c,"enter",d,e)}},{qc:Hm,pc:Jm,ec:function(d,e){return Im(c,"exit",d,e)}},{qc:Hm,pc:Xm,ec:function(d,e){return Im(c,"exit",d,e)}},{qc:Jm,pc:Xm,ec:function(d,e){return Im(c,"skip",d,e)}},{qc:Xm,pc:Jm,ec:function(d,e){return Im(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
|
|
512
|
+
"regionremove",function(d){c.g.delete(d.region)})}pa(Gm,ig);Gm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ig.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?Jm: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.ec(d,b)}}};
|
|
513
|
+
function Im(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Jm=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)).Ua.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Zm[d])return m.return(e);f=0;g=qg([a],c);ta(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=za(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?
|
|
514
514
|
e.toLowerCase().split(";").shift():"")}})}
|
|
515
515
|
var Zm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function $m(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return $m(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=an(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=an(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;k=k.next().value;
|
|
516
516
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
517
517
|
function an(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
518
518
|
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function bn(a,b){var c=[];a=t(cn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(bn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=$m(d,b);c.push(e)}return c}
|
|
519
|
-
function cn(a){var b=[],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 bc(e.Hd,f)}}(c))||b.push(c.Hd);return b}
|
|
520
|
-
|
|
521
|
-
c.
|
|
522
|
-
function
|
|
523
|
-
|
|
524
|
-
|
|
519
|
+
function cn(a){var b=[],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 bc(e.Hd,f)}}(c))||b.push(c.Hd);return b}
|
|
520
|
+
function dn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
|
|
521
|
+
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function en(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=en.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;fn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
522
|
+
r.append=function(a){var b=bn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={sc:d.sc},e=b.next())d.sc=e.value,a.some(function(f){return function(g){return g.startTime==f.sc.startTime&&g.endTime==f.sc.endTime&&g.text==f.sc.payload?!0:!1}}(d))||(e=dn(d.sc))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
|
|
523
|
+
c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(fn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
524
|
+
function fn(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",en);en.prototype.setTextVisibility=en.prototype.setTextVisibility;en.prototype.isTextVisible=en.prototype.isTextVisible;en.prototype.destroy=en.prototype.destroy;en.prototype.append=en.prototype.append;en.prototype.remove=en.prototype.remove;en.prototype.configure=en.prototype.configure;function gn(){}r=gn.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",gn);gn.prototype.setTextVisibility=gn.prototype.setTextVisibility;gn.prototype.isTextVisible=gn.prototype.isTextVisible;gn.prototype.destroy=gn.prototype.destroy;gn.prototype.append=gn.prototype.append;gn.prototype.remove=gn.prototype.remove;gn.prototype.configure=gn.prototype.configure;function hn(){}function jn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",hn);hn.removeAllChildren=jn;function kn(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 Tc(function(){d.A.paused||
|
|
525
|
+
ln(d)})).Xa(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new hb;this.j.D(document,"fullscreenchange",function(){ln(d,!0)});this.j.D(this.A,"seeking",function(){ln(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(){ln(d,!0)}),this.o.observe(this.g));this.B=new Map}r=kn.prototype;r.configure=function(a){this.C&&this.C.Xa(a.captionsUpdatePeriod)};
|
|
525
526
|
r.append=function(a){var b=[].concat(x(this.h)),c={};a=t(cn(a));for(var d=a.next();!d.done;c={Id:c.Id},d=a.next())c.Id=d.value,b.some(function(e){return function(f){return bc(f,e.Id)}}(c))||this.h.push(c.Id);ln(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()};
|
|
526
527
|
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});ln(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function mn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
527
|
-
function nn(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.dh:null;l&&(g.push(l.Se),l.
|
|
528
|
-
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.
|
|
528
|
+
function nn(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.dh:null;l&&(g.push(l.Se),l.jc&&g.push(l.jc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?mn(a,n)||(f=!0):(on(a,k,e),l=a.i.get(k),n=l.dh,f=!0));0<k.nestedCues.length&&n&&nn(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!=
|
|
529
|
+
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.Se)):c.appendChild(d.Se)}}function ln(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())jn(d.value);jn(a.g);a.i.clear();a.B.clear()}a.m&&nn(a,a.h,a.g,c,[])}}
|
|
529
530
|
function on(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&pn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Lb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Lb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Lb?"%":"px",l=g.widthUnits==
|
|
530
531
|
Lb?"%":"px",m=g.viewportAnchorUnits==Lb?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";e.style.height=2===g.heightUnits?5.33*g.height+"%":g.height+k;e.style.width=2===g.widthUnits?g.width*h+"%":g.width+l;2===g.viewportAnchorUnits?(k=g.viewportAnchorY/75*100,l=g.viewportAnchorX/(a.l===4/3?160:210)*100,k-=g.regionAnchorY*g.height*5.33/100,l-=g.regionAnchorX*g.width*h/100,e.style.top=k+"%",e.style.left=l+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*
|
|
531
532
|
g.height/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*g.width/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
|
|
532
|
-
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Se:f,dh:e,
|
|
533
|
+
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Se:f,dh:e,jc:c})}
|
|
533
534
|
function qn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sb?c:"left"===a||"start"===a&&b===Ub||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ub?"line-right":"center"}
|
|
534
535
|
function pn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=rn(c.linePadding,c,a.s);f.paddingRight=rn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
535
536
|
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=sn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=sn(d,function(m){return m.fontFamily}))&&
|
|
@@ -541,75 +542,75 @@ kn.prototype.isTextVisible=kn.prototype.isTextVisible;kn.prototype.remove=kn.pro
|
|
|
541
542
|
break;case "right":g.push("align:right");break;case Tb: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 un(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}un.prototype.configure=function(a){this.g=a};function vn(a){a.i=!1;a.l=!0;a.j=!1}
|
|
542
543
|
function wn(a,b,c){try{if(!a.g.enabled)return b;var d=xn(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=yn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=zn;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=An;break a}e=void 0}d.ot=e;d.su=
|
|
543
544
|
!0;var f=Bn(d);return Cn(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function xn(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}}
|
|
544
|
-
function Dn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,xn(a));c.pr=a.h
|
|
545
|
+
function Dn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,xn(a));c.pr=a.h.ab();var e=c.ot===En||c.ot===zn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Fn(a,c);if(d)d=Gn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=Bn(a);f&&(b.uris=b.uris.map(function(g){return Cn(g,f)}))}}}function Fn(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}
|
|
545
546
|
function Hn(a){if(0===a.type)return In;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?zn:En;if("audio"==b)return yn;if("text"==b)return"application/mp4"===a.mimeType?Jn:Kn}}function Ln(a,b){b=a.h.ub()[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}
|
|
546
|
-
function Mn(a,b){b=a.h.ub()[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 Nn(a,b){var c=a.h.
|
|
547
|
+
function Mn(a,b){b=a.h.ub()[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 Nn(a,b){var c=a.h.dc();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 En:return a.videoBandwidth||NaN;case yn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
547
548
|
function Bn(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"===
|
|
548
549
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Gn(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=Bn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
549
550
|
function Cn(a,b){if(!b||a.includes("offline:"))return a;a=new sc(a);a.g.set("CMCD",b);return a.toString()}var An="m",yn="a",En="v",zn="av",In="i",Kn="c",Jn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",gh:"s",OTHER:"o"});function On(a){this.h=a;this.g=null}r=On.prototype;r.configure=function(a){this.h=a};r.vg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Pn)?1E3*this.g.get(Pn):null};r.ug=function(){return this.h.enabled&&this.g&&this.g.has(Qn)?1E3*this.g.get(Qn):null};r.Ph=function(){return this.h.enabled&&this.g&&this.g.has(Rn)?this.g.get(Rn):null};r.Qh=function(){return this.h.enabled&&this.g&&this.g.has(Sn)?this.g.get(Sn):null};
|
|
550
551
|
r.getBandwidthEstimate=function(a){var b=this.ug();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Tn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",On);On.prototype.getBandwidthEstimate=On.prototype.getBandwidthEstimate;On.prototype.getRoundTripTime=On.prototype.Qh;On.prototype.getResponseDelay=On.prototype.Ph;On.prototype.getEstimatedThroughput=On.prototype.ug;
|
|
551
|
-
On.prototype.getMaxBitrate=On.prototype.vg;var Qn="etp",Pn="mb",Rn="rd",Sn="rtt";function Un(){this.g=null;this.h=[]}function Vn(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;H(c)})}Un.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ig.call(this);var c=this;this.l=Wn;this.fe=this.h=null;this.ca=!1;this.ue=new hb;this.hd=new hb;this.m=new hb;this.
|
|
552
|
-
this.Kf=[];this.s=null;this.
|
|
553
|
-
this.G=Zn(this);this.G.Rf(this.g.streaming.forceHTTP);this.G.Sf(this.g.streaming.forceHTTPS);this.dg=this.la=this.B=null;this.cg=new Tc(function(){return O(function(d){if(1==d.g)return c.la?E(d,c.
|
|
552
|
+
On.prototype.getMaxBitrate=On.prototype.vg;var Qn="etp",Pn="mb",Rn="rd",Sn="rtt";function Un(){this.g=null;this.h=[]}function Vn(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;H(c)})}Un.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ig.call(this);var c=this;this.l=Wn;this.fe=this.h=null;this.ca=!1;this.ue=new hb;this.hd=new hb;this.m=new hb;this.ya=new hb;this.gd=new hb;this.C=this.F=this.A=this.G=null;this.we=0;this.W=new Un;this.ga=this.Gf=this.$=this.i=this.Fa=this.J=this.j=this.rb=this.K=this.eh=this.aa=this.N=this.ed=this.L=this.ie=this.H=this.ib=null;this.Ka=!1;this.va=this.o=null;this.$f=1E9;this.vd=[];this.T=NaN;this.g=Xn(this);this.ba={width:Infinity,height:Infinity};this.ee=new li(this.g,this.ba,null);
|
|
553
|
+
this.Kf=[];this.s=null;this.xa=new Jf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Ea=this.g.preferredTextLanguage;this.rd=this.g.preferredTextRole;this.od=this.g.preferForcedSubs;this.jd=[];b&&b(this);this.N=Yn(this);this.aa=new On(this.g.cmsd);
|
|
554
|
+
this.G=Zn(this);this.G.Rf(this.g.streaming.forceHTTP);this.G.Sf(this.g.streaming.forceHTTPS);this.dg=this.la=this.B=null;this.cg=new Tc(function(){return O(function(d){if(1==d.g)return c.la?E(d,c.tc(c.dg,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.la),4);c.dg.play();c.la=null;H(d)})});$n&&(this.B=$n(),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();
|
|
554
555
|
f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return h.return();c.cg.stop();if(c.la)return h.u(0);c.dg=c.h;g=c;return E(h,c.ng(!0),3)}g.la=h.h;H(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.cg.X(.1)}));this.ue.D(window,"online",function(){ao(c);c.Jf()});this.oe=new Tc(function(){return bo(c)});this.ma=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
|
|
555
|
-
this.
|
|
556
|
-
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==go)return g.return();co(a);b=a.detach();a.l=go;return E(g,b,2);case 2:c=[];d=t(a.Kf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.Kf=[];return E(g,Promise.all(c),3);case 3:a.ue&&(a.ue.release(),a.ue=null);a.hd&&(a.hd.release(),a.hd=null);a.m&&(a.m.release(),a.m=null);a.
|
|
556
|
+
this.tc(a,!0))}pa(X,ig);function co(a){null!=a.K&&(Cj(a.K),a.K.release(),a.K=null)}function eo(a,b){b.lcevc.enabled?(co(a),null==a.K&&(a.K=new Bj(a.h,a.eh,b.lcevc),a.F&&(a.F.$=a.K))):co(a)}function fo(a,b){return new U(a,b)}r=X.prototype;
|
|
557
|
+
r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==go)return g.return();co(a);b=a.detach();a.l=go;return E(g,b,2);case 2:c=[];d=t(a.Kf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.Kf=[];return E(g,Promise.all(c),3);case 3:a.ue&&(a.ue.release(),a.ue=null);a.hd&&(a.hd.release(),a.hd=null);a.m&&(a.m.release(),a.m=null);a.ya&&(a.ya.release(),a.ya=null);a.gd&&(a.gd.release(),a.gd=null);a.va=null;a.g=null;a.s=null;a.fe=null;a.N=null;a.aa=
|
|
557
558
|
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),ig.prototype.release.call(a),H(g)}})};function ho(a,b){a.dispatchEvent(fo("onstatechange",(new Map).set("state",b)))}
|
|
558
|
-
r.
|
|
559
|
-
}})};r.oh=function(a){this.eh=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==go)throw new T(2,7,7E3);return E(c,b.
|
|
560
|
-
r.
|
|
561
|
-
if(!c.J){p.u(6);break}return E(p,c.J.stop(),7);case 7:c.J=null,c.
|
|
562
|
-
null);b||c.cg.stop();c.N&&vn(c.N);c.aa&&(c.aa.g=null);c.h&&jn(c.h);if(!c.h||!c.h.src){p.u(16);break}return E(p,new Promise(function(q){return(new Tc(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.ma&&c.$!=c.ma.
|
|
559
|
+
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==go)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,io(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(ho(c,"attach"),e=function(){var h=jo(c);h&&ko(c,h)},c.hd.D(a,"error",e),c.h=a);if(!b||!Uc()||c.F){g.u(6);break}return E(g,lo(c),6);case 6:Aa(g);c.W.release();Da(g,0);break;case 5:return f=za(g),E(g,c.detach(),10);case 10:throw f;
|
|
560
|
+
}})};r.oh=function(a){this.eh=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==go)throw new T(2,7,7E3);return E(c,b.nc(!1,a),2)}if(3!=c.g)return E(c,io(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.hd.ob(),b.h=null),ho(b,"detach"),b.B&&!a&&b.B.release()}finally{b.W.release()}H(c)})};function io(a,b){var c;return O(function(d){return 1==d.g?(c=++a.we,E(d,Vn(a.W,b),2)):c!=a.we?(a.W.release(),d.return(!0)):d.return(!1)})}
|
|
561
|
+
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!=go&&(c.l=Wn),E(p,io(c,"unload"),2);case 2:if(p.h)return p.return();ua(p,3);c.Ka=!1;ho(c,"unload");a&&!Uc()&&(a=!1);co(c);d=c.jd.map(function(q){return q()});c.jd=[];return E(p,Promise.all(d),5);case 5:c.dispatchEvent(fo("unloading"));c.ed&&(c.ed.release(),c.ed=null);c.h&&(c.m.ob(),c.ya.ob());c.oe.stop();c.ib&&(c.ib.release(),c.ib=null);c.ie&&(c.ie.stop(),c.ie=null);
|
|
562
|
+
if(!c.J){p.u(6);break}return E(p,c.J.stop(),7);case 7:c.J=null,c.Fa=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(!qd("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.la&&!b&&(c.la.destroy(),c.la=
|
|
563
|
+
null);b||c.cg.stop();c.N&&vn(c.N);c.aa&&(c.aa.g=null);c.h&&jn(c.h);if(!c.h||!c.h.src){p.u(16);break}return E(p,new Promise(function(q){return(new Tc(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.ma&&c.$!=c.ma.yc()&&(c.ma.s||c.ma.destroy(),c.ma=null);c.$=null;c.Gf=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=
|
|
563
564
|
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&&(cf={},Qc.clear());c.i=null;c.s=new al;c.Wf=null;c.vd=[];c.T=NaN;mo(c);case 3:Aa(p);c.W.release();Da(p,4);break;case 4:if(a&&Uc()&&!c.F)return E(p,lo(c),0);p.u(0)}})};r.Vi=function(a){this.ga=a};
|
|
564
|
-
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==go)throw new T(2,7,7E3);e=null;f="";a instanceof rm?(e=a,f=e.
|
|
565
|
-
2),E(y,Vn(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.ga=b;d.
|
|
565
|
+
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==go)throw new T(2,7,7E3);e=null;f="";a instanceof rm?(e=a,f=e.yc()||""):f=a||"";return E(A,Vn(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.we;h=function(){return O(function(z){if(1==z.g)return d.we==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,
|
|
566
|
+
2),E(y,Vn(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.ga=b;d.Ka=!1;d.dispatchEvent(fo("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,no(d,f),2);c=z.h;H(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){um(e,d);d.s=e.getStats();A.u(11);break}return E(A,oo(d,f,b,c,!0),12);case 12:(e=
|
|
566
567
|
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.rb:Date.now()/1E3;d.s=e?e.getStats():new al;d.$=f;d.Gf=c||null;if(m)return E(A,k(function(){return O(function(z){return E(z,po(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){A.u(15);break}return E(A,k(function(){return O(function(z){return E(z,lo(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=
|
|
567
|
-
e.getConfiguration();d.ee=e.B;d.
|
|
568
|
+
e.getConfiguration();d.ee=e.B;d.Fa=e.C;d.J=wm(e);d.ed=xm(e);d.rb=e.ya;d.i=e.jf();if(p=e.o)d.xa=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(qo(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.va&&d.va==q||(d.o=vm(e),d.va=e.A,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
|
|
568
569
|
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.ga,E(A,k(function(){return O(function(z){return E(z,ro(d,n,v,u),0)})},"loadInner_"),19);case 19:tm(e);A.u(14);break;case 20:return E(A,
|
|
569
|
-
k(function(){return O(function(z){return E(z,so(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(fo("loaded"));case 6:Aa(A);if(!e){A.u(22);break}return E(A,e.destroy(),22);case 22:d.ma=null;Da(A,0);break;case 5:w=za(A);if(7E3==w.code){A.u(24);break}return E(A,d.
|
|
570
|
-
function qo(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.Ri=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,to(c),2):3!=e.g?(d=e.h,E(e,c.
|
|
570
|
+
k(function(){return O(function(z){return E(z,so(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(fo("loaded"));case 6:Aa(A);if(!e){A.u(22);break}return E(A,e.destroy(),22);case 22:d.ma=null;Da(A,0);break;case 5:w=za(A);if(7E3==w.code){A.u(24);break}return E(A,d.nc(!1),24);case 24:throw w;}})};
|
|
571
|
+
function qo(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.Ri=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,to(c),2):3!=e.g?(d=e.h,E(e,c.nc(a,b),3)):e.return(d)})};
|
|
571
572
|
r.ng=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,to(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
|
|
572
|
-
function to(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.
|
|
573
|
+
function to(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Fa&&a.$))return e.u(2);c=a.h.currentTime;a.U()&&(c=null);d=Date.now()/1E3;return E(e,uo(a,a.$,c,a.Gf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Fa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.va;f.i=a.o;f.A=g;b.o=a.xa;b.start();a.i=null;a.J=null;a.Fa=null;a.o=null;a.va=null}return e.return(b)})}
|
|
573
574
|
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,oo(d,a,b,c),2);(e=f.h)?e.start():ko(d,new T(2,7,7005));return f.return(e)})};function oo(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,no(a,b),3);2!=l.g&&(d=l.h);if(g=vo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.va==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(uo(a,b,c,d||null,f,!e,h,k))})}
|
|
574
575
|
function uo(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=Ke(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(F,J){m()?k.configure(F,J):a.configure(F,J)},Infinity!=a.ba.width||Infinity!=a.ba.height?K.u(2):E(K,td(),3);2!=K.g&&(q=K.h,a.ba.width=q.width,a.ba.height=q.height);u=new li(l,a.ba,null);v={networkingEngine:a.G,
|
|
575
576
|
filter:function(F){var J,I;return O(function(G){if(1==G.g)return E(G,mi(u,F),2);if(4!=G.g){J=G.h;if(!J)return G.u(0);I=fo("trackschanged");return E(G,Promise.resolve(),4)}k.dispatchEvent(I);H(G)})},makeTextStreamsForClosedCaptions:function(F){return wo(a,F)},onTimelineRegionAdded:function(F){var J=k.F;a:{var I=t(J.g);for(var G=I.next();!G.done;G=I.next())if(G=G.value,G.schemeIdUri==F.schemeIdUri&&G.id==F.id&&G.startTime==F.startTime&&G.endTime==F.endTime){I=G;break a}I=null}null==I&&(J.g.add(F),F=
|
|
576
577
|
new U("regionadd",new Map([["region",F]])),J.dispatchEvent(F))},onEvent:function(F){return k.dispatchEvent(F)},onError:function(F){return k.onError(F)},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(F){var J=k.l,I=J?J.g:null;I&&J.s&&oi(u,I.keySystem,F)},onManifestUpdated:function(){var F=
|
|
577
|
-
(new Map).set("isLive",a.U());k.dispatchEvent(fo("manifestupdated",F));sm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new nl(function(){return a.
|
|
578
|
+
(new Map).set("isLive",a.U());k.dispatchEvent(fo("manifestupdated",F));sm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new nl(function(){return a.Pb()});w.addEventListener("regionadd",function(F){var J=F.region;xo(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.ub()}),A.addEventListener("qualitychange",function(F){var J=
|
|
578
579
|
F.quality;F=F.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",F);a.dispatchEvent(fo("mediaqualitychanged",J))}));z=!0;B={Db:a.G,onError:function(F){return k.onError(F)},re:function(F){sm(k,!0,function(){a:{var J=F,I=fo("keystatuschanged");a.dispatchEvent(I);
|
|
579
580
|
var G=Object.keys(J);1==G.length&&""==G[0]&&(G=["00"],J={"00":J[""]});I=1==G.length&&"00"==G[0];var N=!1;if(G.length){G=t(a.i.variants);for(var L=G.next();!L.done;L=G.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[I?"00":Q])||a.A.F)L.allowedByKeySystem=L.allowedByKeySystem&&!!Q&&
|
|
580
|
-
!qi.includes(Q)}P!=L.allowedByKeySystem&&(N=!0)}}}if(N&&(yo(a),!zo(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&Ao(a)}})},onExpirationUpdated:function(F,J){var I=fo("expirationupdated");k.dispatchEvent(I);if((I=k.j)&&I.onExpirationUpdated)I.onExpirationUpdated(F,J)},onEvent:function(F){k.dispatchEvent(F);"drmsessionupdate"==F.type&&z&&(z=!1,F=Date.now()/1E3-k.va,(a.s||k.getStats()).j=F,a.K&&Cj(a.K))}};y=Zn(a,m);pg(a.G,y);C=function(){return a.
|
|
581
|
+
!qi.includes(Q)}P!=L.allowedByKeySystem&&(N=!0)}}}if(N&&(yo(a),!zo(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&Ao(a)}})},onExpirationUpdated:function(F,J){var I=fo("expirationupdated");k.dispatchEvent(I);if((I=k.j)&&I.onExpirationUpdated)I.onExpirationUpdated(F,J)},onEvent:function(F){k.dispatchEvent(F);"drmsessionupdate"==F.type&&z&&(z=!1,F=Date.now()/1E3-k.va,(a.s||k.getStats()).j=F,a.K&&Cj(a.K))}};y=Zn(a,m);pg(a.G,y);C=function(){return a.uc(B)};D={config:l,li:v,vi:w,ui:A,uc:C,ki:u,networkingEngine:y,
|
|
581
582
|
nh:f,mh:h};k=new rm(b,d,e,c,D);a.Kf.push(k);return K.return(k)})}function no(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&&gd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
582
583
|
function vo(a,b){if(!Uc())return!0;if(b){if(""==(a.h||Wc()).canPlayType(b))return!1;if(!(Uc()&&b in ti))return!0;if(oe(b)){if(a.g.streaming.preferNativeHls)return!0;if(gd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(gd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
|
|
583
584
|
function lo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return ho(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.Wf=b,d=Bo(a.h,c,{Gh:function(){return a.keySystem()},se:function(h,k,l){Co(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ga=f,E(g,d.L,2);a.F=d;H(g)})}
|
|
584
|
-
function ro(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,F,J;return O(function(I){switch(I.g){case 1:ho(a,"load");e=a.h;a.H=new Sk({$d:function(){return e.playbackRate},
|
|
585
|
+
function ro(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,F,J;return O(function(I){switch(I.g){case 1:ho(a,"load");e=a.h;a.H=new Sk({$d:function(){return e.playbackRate},Zb:function(){return e.defaultPlaybackRate},Tf:function(G){e.playbackRate=G},Fg:function(G){e.currentTime+=G}});f=function(){return Do(a)};g=function(){return Eo(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);eo(a,a.g);a.Ea=a.g.preferredTextLanguage;a.rd=a.g.preferredTextRole;a.od=a.g.preferForcedSubs;
|
|
585
586
|
Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,N,L){a.i&&a.j&&G!=a.j.j&&Go(a,G,!0,void 0===N?!1:N,void 0===L?0:L)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=Ho(a);a.j.configure(a.g.streaming);a.l=Io;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Jo(a,G)}});a.dispatchEvent(fo("streaming"));h=c;(k=a.j.j)||h||(h=Ko(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(q=
|
|
586
587
|
p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){I.u(2);break}return E(I,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);zl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.C=Lo(a,G);a.ib=Mo(a,G);No(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ga);if(k){I.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){I.u(5);
|
|
587
|
-
break}v=a.i.presentationTimeline;w=a.ga||a.h.currentTime;A=v
|
|
588
|
+
break}v=a.i.presentationTimeline;w=a.ga||a.h.currentTime;A=v.Mb();z=v.vb();w<A?w=A:w>z&&(w=z);return E(I,Oo(h,w),6);case 6:B=I.h,u(B);case 5:Go(a,h,!0,!1,0);case 4:return a.C.Ke(),y=a.zc().find(function(G){return G.active}),y||((C=xf(a.i.textStreams,a.Ea,a.rd,a.od)[0]||null)&&$k(a.s.h,C,!0),h&&(C?(Po(a,h.audio,C)&&(a.ca=!0),a.ca&&a.F.F.setTextVisibility(!0),Qo(a)):a.ca=!1),C&&(a.g.streaming.alwaysStreamText||a.qf())&&Il(a.j,C)),E(I,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Ro(a));yo(a);
|
|
588
589
|
zo(a);a.i.variants.some(function(G){return G.primary});if((D=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)K=function(){return So(a)},a.m.D(e,"timeupdate",K);D||(F=function(){return To(a)},a.m.D(e,"timeupdate",F),To(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(J=function(){var G,N;return O(function(L){if(1==L.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return L.u(0);
|
|
589
|
-
a.m.Hb(e,"timeupdate",J);N=a;return E(L,a.preload(a.i.nextUrl),4)}N.ma=L.h;H(L)})},a.m.D(e,"timeupdate",J)),a.m.D(e,"ended",function(){a.load(a.ma||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(D);a.
|
|
590
|
-
function po(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Vd,d=Date.now()/1E3,e=!0,a.A=a.
|
|
590
|
+
a.m.Hb(e,"timeupdate",J);N=a;return E(L,a.preload(a.i.nextUrl),4)}N.ma=L.h;H(L)})},a.m.D(e,"timeupdate",J)),a.m.D(e,"ended",function(){a.load(a.ma||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(D);a.Ka=!0;a.m.sa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(I)}})}
|
|
591
|
+
function po(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Vd,d=Date.now()/1E3,e=!0,a.A=a.uc({Db:a.G,onError:function(k){ko(a,k)},re:function(){},onExpirationUpdated:function(){var k=fo("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:[]},
|
|
591
592
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?me(b):"",codecs:b?ne(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.da,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(Xd(g.mimeType,
|
|
592
|
-
g.codecs)),b.startsWith("audio/")?(g.type=c.V,f.audio=g):f.video=g,a.A.aa=!0,E(h,Ih(a.A,[f],[]),2)):E(h,a.A.
|
|
593
|
-
function so(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return ho(a,"src-equals"),d=a.h,a.C=new Ik(d),e=!1,a.jd.push(function(){e=!0}),null!=a.ga&&a.C.Le(a.ga),a.H=new Sk({$d:function(){return d.playbackRate},
|
|
593
|
+
g.codecs)),b.startsWith("audio/")?(g.type=c.V,f.audio=g):f.video=g,a.A.aa=!0,E(h,Ih(a.A,[f],[]),2)):E(h,a.A.tc(a.h),0)})}
|
|
594
|
+
function so(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return ho(a,"src-equals"),d=a.h,a.C=new Ik(d),e=!1,a.jd.push(function(){e=!0}),null!=a.ga&&a.C.Le(a.ga),a.H=new Sk({$d:function(){return d.playbackRate},Zb:function(){return d.defaultPlaybackRate},Tf:function(v){d.playbackRate=v},Fg:function(v){d.currentTime+=v}}),f=a.g.streaming.rebufferingGoal,No(a,d,f),g=function(){return Do(a)},h=function(){return Eo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
594
595
|
"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 yo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return yo(a)}),a.m.D(d.audioTracks,"change",function(){return yo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "metadata":Uo(a,v);break;case "chapters":Jo(a,v);break;default:yo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return yo(a)}),
|
|
595
596
|
a.m.D(d.textTracks,"change",function(){return yo(a)})),d.src=wn(a.N,a.$,c),($c()||cd())&&d.load(),"none"!=d.preload&&!d.autoplay&&oe(c)&&ld()&&d.load(),a.l=Vo,a.dispatchEvent(fo("streaming")),k=new Zf,zk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.Ke();k.resolve()}),zk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var v;return O(function(w){if(1==w.g)return Wo(a),v=Xo(a),v.find(function(A){return"disabled"!=A.mode})?(0<v.length&&(a.ca=!0),w.u(2)):E(w,new Promise(function(A){a.m.sa(d.textTracks,
|
|
596
597
|
"change",A);(new Tc(A)).X(1)}),2);if(e)return w.return();Yo(a);H(w)})}),d.error?k.reject(jo(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(jo(a))}),l=new Promise(function(v,w){(new Tc(w)).X(a.g.streaming.loadTimeout)}),E(u,Promise.race([k,
|
|
597
|
-
l]),2);if((m=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return So(a)},a.m.D(d,"timeupdate",n);m||(p=function(){return To(a)},a.m.D(d,"timeupdate",p),To(a));a.B&&(a.B.onManifestUpdated(m),m&&(q=a.
|
|
598
|
+
l]),2);if((m=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return So(a)},a.m.D(d,"timeupdate",n);m||(p=function(){return To(a)},a.m.D(d,"timeupdate",p),To(a));a.B&&(a.B.onManifestUpdated(m),m&&(q=a.Pb().end,a.m.D(d,"progress",function(){var v=a.Pb().end;q!=v&&(a.B.onManifestUpdated(a.U()),q=v)})));a.Ka=!0;H(u)})}function Wo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Ng(b,a.g.preferredVariantRole)}
|
|
598
599
|
function Yo(a){var b=a.g.preferredTextLanguage;""!=b&&a.Nf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
599
|
-
function Uo(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,Zo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Tc(function(){var d=$o(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).
|
|
600
|
+
function Uo(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,Zo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Tc(function(){var d=$o(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()})}}
|
|
600
601
|
function Co(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())Zo(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function Zo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(fo("metadata",b))}
|
|
601
|
-
function Jo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Tc(function(){b.mode="hidden"})).
|
|
602
|
+
function Jo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Tc(function(){b.mode="hidden"})).mc().X(.5);a.jd.push(function(){c.stop()})}}r.zi=function(){for(var a=this.W;a.g;)a.release()};r.uc=function(a){return new Bh(a)};
|
|
602
603
|
function Zn(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 lg(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(fo("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],
|
|
603
604
|
Tn(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],Tn(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(fo("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)Dn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
604
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Dn(h,f,{ot:An,su:!h.i})}}catch(M){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case wg: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=Hn(k);var p=n.ot===En||n.ot===yn||n.ot===zn||n.ot===Jn,q=k.stream;if(q){var u=h.h
|
|
605
|
-
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(!Qb(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),F=C.pathname.split("/").slice(1,-1);K[0]===F[0];)K.shift(),F.shift();for(;F.length;)F.shift(),K.unshift("..");D=K.join("/")}n.nor=D}if((A.Da||A.na)&&(m.Da!=A.Da||m.na!=A.na)){var J=A.Da+"-";A.na&&(J+=A.na);n.nrr=J}}}var I=h.h
|
|
605
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Dn(h,f,{ot:An,su:!h.i})}}catch(M){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case wg: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=Hn(k);var p=n.ot===En||n.ot===yn||n.ot===zn||n.ot===Jn,q=k.stream;if(q){var u=h.h.ab();if(p&&(n.bl=Ln(h,q.type),n.ot!==Jn)){var v=Mn(h,q.type);n.dl=u?v/Math.abs(u):v}q.bandwidth&&(n.br=q.bandwidth/1E3);
|
|
606
|
+
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(!Qb(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),F=C.pathname.split("/").slice(1,-1);K[0]===F[0];)K.shift(),F.shift();for(;F.length;)F.shift(),K.unshift("..");D=K.join("/")}n.nor=D}if((A.Da||A.na)&&(m.Da!=A.Da||m.na!=A.na)){var J=A.Da+"-";A.na&&(J+=A.na);n.nrr=J}}}var I=h.h.ab()||1,G=Mn(h,q.type)||
|
|
606
607
|
500,N=q.bandwidth;var L=N?N*(m.endTime-m.startTime)/1E3/(G/I/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(L)||(n.rtp=L)}}p&&n.ot!==Jn&&(n.tb=Nn(h,n.ot)/1E3);Dn(h,f,n)}}catch(M){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:Dn(h,f,{ot:"k"});break;case 4:Dn(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.Rd=isNaN(f.Rd)?e:f.Rd+e)})}
|
|
607
608
|
function Lo(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&&ap(a)},function(c){return a.dispatchEvent(c)})}
|
|
608
609
|
function Mo(a,b){b=new Gm(a.ed,a.U()||0<b);b.addEventListener("enter",function(d){xo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){xo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(xo(a,"timelineregionenter",e),xo(a,"timelineregionexit",e))});var c=new Uk(a.h);c.g.add(b);a.rb&&c.g.add(a.rb);return c}
|
|
609
|
-
function No(a,b,c){a.L=new Sf;a.L.g=Uf;Vf(a.L,c,Math.min(.5,c/2));mo(a);a.ie=(new Tc(function(){ap(a)})).
|
|
610
|
-
function ap(a){switch(a.l){case Vo:if(a.h.ended)var b=!0;else{var c=Ii(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Io:a:if(a.h.ended||Tj(a.F))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.
|
|
611
|
-
function Yn(a){return new un({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ub:function(){return a.ub()},getCurrentTime:function(){return a.h?a.h.currentTime:0}
|
|
612
|
-
function Ho(a){return new tl(a.i,{Zd:function(){return a.C?a.C.Qd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}
|
|
610
|
+
function No(a,b,c){a.L=new Sf;a.L.g=Uf;Vf(a.L,c,Math.min(.5,c/2));mo(a);a.ie=(new Tc(function(){ap(a)})).Xa(.25);a.m.D(b,"waiting",function(){return ap(a)});a.m.D(b,"stalled",function(){return ap(a)});a.m.D(b,"canplaythrough",function(){return ap(a)});a.m.D(b,"progress",function(){return ap(a)})}
|
|
611
|
+
function ap(a){switch(a.l){case Vo:if(a.h.ended)var b=!0;else{var c=Ii(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Io:a:if(a.h.ended||Tj(a.F))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Nb();var d=Ii(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ki(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?Tf:Uf;c.g=d;(b=b!=d)&&d===Tf&&(c.h=Date.now());b&&mo(a)}function Bo(a,b,c,d){return new Kj(a,b,c,d)}
|
|
612
|
+
function Yn(a){return new un({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ub:function(){return a.ub()},getCurrentTime:function(){return a.h?a.h.currentTime:0},ab:function(){return a.ab()},ac:function(){return a.ac()},dc:function(){return a.dc()},U:function(){return a.U()}},a.g.cmcd)}
|
|
613
|
+
function Ho(a){return new tl(a.i,{Zd:function(){return a.C?a.C.Qd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},ab:function(){return a.ab()},Z:a.F,Db:a.G,onError:function(b){return ko(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ri:function(){a.J&&a.J.update&&a.J.update()},Cf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.C){a.C.Gg();var h=Uj(a.F,f);!a.U()&&a.h.paused&&null!=h&&0<h&&a.C.Qd()<h&&a.C.Le(h)}ap(a);d=(new Map).set("start",
|
|
613
614
|
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(fo("segmentappended",d));a.o&&c.fastSwitching&&b.yd&&b.ge&&a.o.trySuggestStreams()},pi:function(b,c){(c=c.yf)&&a.rb&&ql(a.rb,c,b)},ig:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Wg(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,
|
|
614
615
|
f),f+=b.length;Rh(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},se:function(b,c,d){Co(a,b,c,d)},Xd:function(b,c){return a.Xd(b,c)}})}
|
|
615
616
|
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);
|
|
@@ -620,28 +621,28 @@ a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=10
|
|
|
620
621
|
function bp(a){a.ee=new li(a.g,a.ba,a.A);if(a.J){var b=Ke(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!=go&&ni(a.ee,a.i)&&yo(a)}catch(f){ko(a,f)}a.o&&zo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Ao(a)}a.G&&(a.G.Rf(a.g.streaming.forceHTTP),a.G.Sf(a.g.streaming.forceHTTPS));if(a.F)if(a.F.configure(a.g.mediaSource),a.F.ga=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
|
|
621
622
|
a.Wf!=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.Wf=b;a.j&&(b=a.j,(c=b.i.get(Td))&&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(),Ro(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
622
623
|
Vf(a.L,b,Math.min(.5,b/2)));a.i&&Fo(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=Xn(this);qm(a,this.g,Xn(this));return a};r.Lh=function(){var a=Xn(this);qm(a,this.g,Xn(this));return fm(this.g,Xn(this))};
|
|
623
|
-
r.sg=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.
|
|
624
|
-
r.
|
|
625
|
-
r.
|
|
626
|
-
r.hf=function(){return this.A?this.A.hf():[]};r.Yd=function(){return this.A?this.A.Yd():{}};r.pf=function(){return this.L?this.L.g==Uf:!1};r
|
|
627
|
-
r.Ed=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.
|
|
628
|
-
r.ad=function(){var a=this.H.
|
|
629
|
-
r.
|
|
630
|
-
r.
|
|
631
|
-
r.xh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Io&&b.l!=Vo)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.
|
|
632
|
-
function cp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{
|
|
633
|
-
r.xg=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!=Io&&c.l!=Vo)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=cp(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.
|
|
634
|
-
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.
|
|
635
|
-
r.Og=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),dp(this),this.
|
|
636
|
-
r.Of=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&vf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Go(this,d,!1,b,c);this.
|
|
637
|
-
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);zo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,mf(c)==a.id){ep(this,c);break}};r.zh=function(){return fp(this.
|
|
638
|
-
r.Ng=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.
|
|
639
|
-
b))c=f;c!=b&&(c?(a=jf(c),this.Of(a,!0,d)):Ao(this))}else this.h&&this.h.audioTracks&&(d=xf(this.
|
|
640
|
-
r.Ji=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.
|
|
624
|
+
r.sg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.Di=function(){for(var a in this.g)delete this.g[a];qm(this.g,Xn(this),Xn(this));bp(this)};r.Hh=function(){return this.l};r.kf=function(){return this.i?this.i.type:null};r.Kh=function(){return this.h};
|
|
625
|
+
r.ac=function(){return this.G};r.yc=function(){return this.$};r.rg=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.fc=function(){return this.i?this.i.presentationTimeline.fc():!1};r.bi=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};
|
|
626
|
+
r.Pb=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Mb(),end:a.vb()}}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.Zh=function(){this.U()&&(this.h.currentTime=this.Pb().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};
|
|
627
|
+
r.hf=function(){return this.A?this.A.hf():[]};r.Yd=function(){return this.A?this.A.Yd():{}};r.pf=function(){return this.L?this.L.g==Uf:!1};r.ab=function(){return this.h?this.H?this.H.i:1:0};
|
|
628
|
+
r.Ed=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.ya.ob(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Io&&(this.o.playbackRateChanged(a),Fl(this.j,1<Math.abs(a))),this.U()&&this.ya.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Pb(),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()}))};
|
|
629
|
+
r.ad=function(){var a=this.H.Zb();this.l==Vo&&this.H.set(a);this.l==Io&&(this.H.set(a),this.o.playbackRateChanged(a),Fl(this.j,!1));this.ya.ob()};
|
|
630
|
+
r.dc=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,vf(e)){var f=jf(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return uf(g)}):[]};
|
|
631
|
+
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=kf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Xo(this).map(function(f){return of(f)}):[]};r.Eh=function(){var a=this.vd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return lf(b)})};
|
|
632
|
+
r.xh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Io&&b.l!=Vo)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=cp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Wb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.xg(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
633
|
+
function cp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Wb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
634
|
+
r.xg=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!=Io&&c.l!=Vo)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=cp(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.Wb;n=l/h.rows;p=h.Wb*h.rows;q=g.i-g.startTime;
|
|
635
|
+
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.Wb*m,A=Math.floor(z/h.Wb)*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})})};
|
|
636
|
+
r.Og=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),dp(this),this.Ea=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Xo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,mf(c)==a.id?c.mode=this.ca?"showing":"hidden":c.mode="disabled";dp(this)}};
|
|
637
|
+
r.Of=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&vf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Go(this,d,!1,b,c);this.xa=new If(d,
|
|
638
|
+
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);zo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,mf(c)==a.id){ep(this,c);break}};r.zh=function(){return fp(this.dc())};r.Sh=function(){return fp(this.zc())};r.yh=function(){return Array.from(gp(this.dc()))};r.Rh=function(){return Array.from(gp(this.zc()))};
|
|
639
|
+
r.Ng=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.xa=new Jf(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.xa.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,
|
|
640
|
+
b))c=f;c!=b&&(c?(a=jf(c),this.Of(a,!0,d)):Ao(this))}else this.h&&this.h.audioTracks&&(d=xf(this.dc(),a,b||"",!1)[0])&&this.Of(d)};r.Nf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ea=a,this.rd=b||"",this.od=c,(a=xf(this.i.textStreams,this.Ea,this.rd,this.od)[0]||null)&&a!=this.j.s&&($k(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.qf()))Il(this.j,a),dp(this)}else(a=xf(this.zc(),a,b||"",c)[0])&&this.Og(a)};
|
|
641
|
+
r.Ji=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.xa=new Jf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Ao(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&&ep(this,b)}};
|
|
641
642
|
r.qf=function(){var a=this.ca;return this.F&&this.l==Io?this.F.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Xo(this).some(function(b){return"showing"==b.mode}):a};r.tg=function(){return this.h&&this.h.src&&this.h.textTracks?hp(this).map(function(a){return of(a)}):[]};
|
|
642
643
|
r.Ah=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Ce(a),c=hp(this).filter(function(h){return Ce(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};
|
|
643
644
|
function Xo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function $o(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function hp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
644
|
-
r.Ug=function(a){a=!!a;if(this.ca!=a){this.ca=a;if(this.l==Io)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=xf(this.i.textStreams,this.
|
|
645
|
+
r.Ug=function(a){a=!!a;if(this.ca!=a){this.ca=a;if(this.l==Io)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=xf(this.i.textStreams,this.Ea,this.rd,this.od),0<a.length&&(Il(this.j,a[0]),dp(this))):El(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Xo(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")}Qo(this)}};
|
|
645
646
|
r.Nh=function(){if(this.C)var a=this.C.Qd();else{if(null==this.ga)return new Date;a=this.ga}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.wg=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};
|
|
646
647
|
r.ae=function(){return this.U()?this.i?this.i.presentationTimeline.ae():null:null};r.ub=function(){if(this.l==Io)return this.F.ub();var a={total:[],audio:[],video:[],text:[]};this.l==Vo&&(a.total=Li(this.h.buffered));return a};
|
|
647
648
|
r.getStats=function(){if(this.l!=Io&&this.l!=Vo)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:[]};Do(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&
|
|
@@ -649,57 +650,57 @@ r.getStats=function(){if(this.l!=Io&&this.l!=Vo)return{width:NaN,height:NaN,stre
|
|
|
649
650
|
this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.wg().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==Vo&&(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=
|
|
650
651
|
f.G,y=f.Rd,C=Yk(f.g),D=[];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,
|
|
651
652
|
stateHistory:C,switchHistory:D}};
|
|
652
|
-
r.jh=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!=Io&&h.l!=Vo)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,ip(h,a),3);case 3:d=y.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=Vo){y.u(4);break}g&&(c="forced");return E(y,jp(h,a,b,c,d,f||"",k),5);case 5:l=Ce(b);m=h.
|
|
653
|
+
r.jh=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!=Io&&h.l!=Vo)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,ip(h,a),3);case 3:d=y.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=Vo){y.u(4);break}g&&(c="forced");return E(y,jp(h,a,b,c,d,f||"",k),5);case 5:l=Ce(b);m=h.zc();if(n=m.find(function(C){return Ce(C.language)==
|
|
653
654
|
l&&C.label==(f||"")&&C.kind==c}))return yo(h),y.return(n);throw new T(1,2,2012);case 4:p=Vd;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,kp(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=y.h,v=lp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Nj(w),d="text/vtt";case 6:A={id:h.$f++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Qk(0,q,[a]),mimeType:d||"",
|
|
654
655
|
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.pa,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([Xd(d||"",e||"")])};z=Xd(A.mimeType,A.codecs);B=qe(z);if(!B)throw new T(2,2,2014,d);h.i.textStreams.push(A);yo(h);return y.return(kf(A))}})};
|
|
655
656
|
r.kh=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!=Io&&c.l!=Vo)throw new T(1,7,7004);if(b){B.u(2);break}return E(B,ip(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Vd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return E(B,kp(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=B.h;g=re[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
656
|
-
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,
|
|
657
|
+
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,Tb:p.Tb},u=q.next())p.Tb=u.value,p.Xc=null,v=function(y){return function(){null==y.Xc&&(y.Xc=Nd([a],[y.Tb.payload]));return y.Xc||[]}}(p),w=new Ai(p.Tb.startTime,p.Tb.endTime,v,0,null,null,0,0,Infinity),p.Tb.payload.includes("#xywh")&&(A=p.Tb.payload.split("#xywh=")[1].split(","),4===A.length&&w.Vg({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
|
|
657
658
|
n.push(w);z={id:c.$f++,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.Je,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([Xd(b||
|
|
658
659
|
"","")])};c.l==Vo?c.vd.push(z):c.i.imageStreams.push(z);yo(c);return B.return(lf(z))}})};
|
|
659
660
|
r.ih=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Io&&d.l!=Vo)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,ip(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),E(k,jp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.tg();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 yo(d),k.return(h);case 5:throw new T(1,
|
|
660
661
|
2,2012);}})};function ip(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;va(d,3);break;case 2:za(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
661
662
|
function jp(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,kp(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=lp(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=xn(p);u.ot=Kn;u.su=!0;var v=Bn(u);var w=Cn(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")||
|
|
662
663
|
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function kp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=wg;f=qg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Dn(k,f,{ot:Kn,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)})}
|
|
663
|
-
function lp(a,b,c,d){var e=re[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),tn(b,d);throw new T(2,2,2014,c);}r.Oi=function(a,b){this.ba.width=a;this.ba.height=b};r.Jf=function(a){if(this.l==Io){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.
|
|
664
|
-
r.jf=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.Ih=function(){return this.
|
|
665
|
-
function Xn(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.Jf(d))}};b.textDisplayFactory=function(){if(a.fe){var c=a.getConfiguration();return new kn(a.h,a.fe,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new
|
|
664
|
+
function lp(a,b,c,d){var e=re[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),tn(b,d);throw new T(2,2,2014,c);}r.Oi=function(a,b){this.ba.width=a;this.ba.height=b};r.Jf=function(a){if(this.l==Io){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.Na||d.qb||(d.qd=!1,Dl(b,d,a));b=!0}}else b=!1;return b};
|
|
665
|
+
r.jf=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.Ih=function(){return this.Fa};
|
|
666
|
+
function Xn(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.Jf(d))}};b.textDisplayFactory=function(){if(a.fe){var c=a.getConfiguration();return new kn(a.h,a.fe,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new en(a.h,"Shaka Player TextTrack"):new gn};return b}r.Yg=function(a){this.fe=a};
|
|
666
667
|
function wo(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.$f++,originalId:g,groupId:null,
|
|
667
668
|
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:Td,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([Xd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
668
669
|
function Oo(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)})}
|
|
669
670
|
function mo(a){var b=a.pf();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);Do(a)}b=(new Map).set("buffering",b);a.dispatchEvent(fo("buffering",b))}function Eo(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=fo("ratechange"),a.dispatchEvent(b))}
|
|
670
671
|
function Do(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Uf?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(fo("statechanged",c)))}}
|
|
671
|
-
function So(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.sg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Ed(d):1==e&&b!==a.H.
|
|
672
|
+
function So(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.sg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Ed(d):1==e&&b!==a.H.Zb()&&a.ad()}if(c&&(e=a.Pb(),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?
|
|
672
673
|
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-
|
|
673
674
|
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==Vo){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-
|
|
674
|
-
d>f?b!=g&&a.Ed(g):h&&k&&c-d<h?b!=k&&a.Ed(k):b!==a.H.
|
|
675
|
-
function zo(a){try{pi(a.ee,a.i)}catch(c){return ko(a,c),!1}var b=wf(a.i.variants);b=a.
|
|
675
|
+
d>f?b!=g&&a.Ed(g):h&&k&&c-d<h?b!=k&&a.Ed(k):b!==a.H.Zb()&&a.ad()}}function To(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=fo("started"):25==a.T?d=fo("firstquartile"):50==a.T?d=fo("midpoint"):75==a.T?d=fo("thirdquartile"):100==a.T&&(d=fo("complete"));d&&a.dispatchEvent(d)}}}
|
|
676
|
+
function zo(a){try{pi(a.ee,a.i)}catch(c){return ko(a,c),!1}var b=wf(a.i.variants);b=a.xa.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Ko(a,b){b=void 0===b?!1:b;return zo(a)?a.o.chooseVariant(b):null}
|
|
676
677
|
function bo(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.oe.stop();d&&Ao(a,!1,void 0,!1,!1)}
|
|
677
678
|
function Ao(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=Ko(a);f&&Go(a,f,e,b,c,d)}function Go(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=jf(g));b=jf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Dj(a.K,b,a.kf()),c=fo("adaptation",c),mp(a,c)):np(a,d,b)}}
|
|
678
679
|
function ep(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=uf(c),b=uf(b),np(a,c,b))}function Po(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Ce(a.g.preferredTextLanguage);c=Ce(c.language);if(2==a.g.autoShowText)return Be(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Ce(b.language);return Be(c,d)&&!Be(a,c)}ab("Invalid autoShowText setting!");return!1}
|
|
679
680
|
function yo(a){var b=fo("trackschanged");mp(a,b)}function np(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Dj(a.K,c,a.kf());c=fo("variantchanged",b);mp(a,c)}function dp(a){var b=fo("textchanged");mp(a,b)}function Qo(a){var b=fo("texttrackvisibility");mp(a,b)}function Ro(a){a.g.abr.enabled||ao(a);var b=(new Map).set("newStatus",a.g.abr.enabled);mp(a,fo("abrstatuschanged",b))}
|
|
680
681
|
function ao(a,b){b=void 0===b?!0:b;if(a.l==Io){a.oe.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&zo(a)}}
|
|
681
|
-
r.Xd=function(a,b){if(!this.g.abr.enabled||this.l===go||!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.oe.
|
|
682
|
-
function ko(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==go)return f.return();c=!0;if(!(a.
|
|
682
|
+
r.Xd=function(a,b){if(!this.g.abr.enabled||this.l===go||!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.oe.Xa(1);b=this.ub().video.reduce(function(f,g){return f+g.end-g.start},0);Ao(this,!1,b,!0,!1);return!0}return!1};
|
|
683
|
+
function ko(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==go)return f.return();c=!0;if(!(a.Ka&&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;va(f,2);break;case 3:za(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&ao(a,!1);e=fo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);H(f)}})}
|
|
683
684
|
function xo(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(fo(b,a))}function jo(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)}
|
|
684
|
-
function Fo(a,b,c){0<b&&(a.U()||a.Xg(b));b=a.getDuration();c<b&&(a.U()||a.
|
|
685
|
+
function Fo(a,b,c){0<b&&(a.U()||a.Xg(b));b=a.getDuration();c<b&&(a.U()||a.Wa(c))}function mp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=go&&a.dispatchEvent(b);H(c)})}function gp(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(Ce(c.language)):b.add("und");return b}
|
|
685
686
|
function fp(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=Ce(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));
|
|
686
687
|
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Yg;X.prototype.getManifestParserFactory=X.prototype.Ih;X.prototype.getManifest=X.prototype.jf;X.prototype.retryStreaming=X.prototype.Jf;X.prototype.setMaxHardwareResolution=X.prototype.Oi;X.prototype.addChaptersTrack=X.prototype.ih;X.prototype.addThumbnailsTrack=X.prototype.kh;X.prototype.addTextTrackAsync=X.prototype.jh;X.prototype.getStats=X.prototype.getStats;
|
|
687
688
|
X.prototype.getBufferedInfo=X.prototype.ub;X.prototype.getSegmentAvailabilityDuration=X.prototype.ae;X.prototype.getPresentationStartTimeAsDate=X.prototype.wg;X.prototype.getPlayheadTimeAsDate=X.prototype.Nh;X.prototype.setTextTrackVisibility=X.prototype.Ug;X.prototype.getChapters=X.prototype.Ah;X.prototype.getChaptersTracks=X.prototype.tg;X.prototype.isTextTrackVisible=X.prototype.qf;X.prototype.selectVariantsByLabel=X.prototype.Ji;X.prototype.selectTextLanguage=X.prototype.Nf;
|
|
688
|
-
X.prototype.selectAudioLanguage=X.prototype.Ng;X.prototype.getTextLanguages=X.prototype.Rh;X.prototype.getAudioLanguages=X.prototype.yh;X.prototype.getTextLanguagesAndRoles=X.prototype.Sh;X.prototype.getAudioLanguagesAndRoles=X.prototype.zh;X.prototype.selectVariantTrack=X.prototype.Of;X.prototype.selectTextTrack=X.prototype.Og;X.prototype.getThumbnails=X.prototype.xg;X.prototype.getAllThumbnails=X.prototype.xh;X.prototype.getImageTracks=X.prototype.Eh;X.prototype.getTextTracks=X.prototype.
|
|
689
|
-
X.prototype.getVariantTracks=X.prototype.
|
|
690
|
-
X.prototype.isAudioOnly=X.prototype.bi;X.prototype.isInProgress=X.prototype.
|
|
691
|
-
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.zi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.ng;X.prototype.unloadAndSavePreload=X.prototype.Ri;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Vi;X.prototype.unload=X.prototype.
|
|
689
|
+
X.prototype.selectAudioLanguage=X.prototype.Ng;X.prototype.getTextLanguages=X.prototype.Rh;X.prototype.getAudioLanguages=X.prototype.yh;X.prototype.getTextLanguagesAndRoles=X.prototype.Sh;X.prototype.getAudioLanguagesAndRoles=X.prototype.zh;X.prototype.selectVariantTrack=X.prototype.Of;X.prototype.selectTextTrack=X.prototype.Og;X.prototype.getThumbnails=X.prototype.xg;X.prototype.getAllThumbnails=X.prototype.xh;X.prototype.getImageTracks=X.prototype.Eh;X.prototype.getTextTracks=X.prototype.zc;
|
|
690
|
+
X.prototype.getVariantTracks=X.prototype.dc;X.prototype.cancelTrickPlay=X.prototype.ad;X.prototype.trickPlay=X.prototype.Ed;X.prototype.getPlaybackRate=X.prototype.ab;X.prototype.isBuffering=X.prototype.pf;X.prototype.getKeyStatuses=X.prototype.Yd;X.prototype.getActiveSessionsMetadata=X.prototype.hf;X.prototype.getExpiration=X.prototype.ld;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Zh;X.prototype.seekRange=X.prototype.Pb;
|
|
691
|
+
X.prototype.isAudioOnly=X.prototype.bi;X.prototype.isInProgress=X.prototype.fc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.rg;X.prototype.getAssetUri=X.prototype.yc;X.prototype.getNetworkingEngine=X.prototype.ac;X.prototype.getMediaElement=X.prototype.Kh;X.prototype.getManifestType=X.prototype.kf;X.prototype.getLoadMode=X.prototype.Hh;X.prototype.resetConfiguration=X.prototype.Di;X.prototype.getBufferFullness=X.prototype.sg;X.prototype.getNonDefaultConfiguration=X.prototype.Lh;
|
|
692
|
+
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.zi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.ng;X.prototype.unloadAndSavePreload=X.prototype.Ri;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Vi;X.prototype.unload=X.prototype.nc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.oh;X.prototype.attach=X.prototype.tc;
|
|
692
693
|
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,ii(),3);case 3:b=k.h;case 2:var l={};if(Uc())for(var m in ti)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]=Uc()?!!ti[n]:Vc(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(Yd));
|
|
693
694
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=qe(n)?!0:Uc()?mb(n)||(mc(n)?!0:!1):Vc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,td(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=op;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
694
695
|
X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Uc()?!0:Vc("application/x-mpegurl")};X.setAdManagerFactory=function(a){$n=a};
|
|
695
|
-
X.registerSupportPlugin=function(a,b){op[a]=b};X.prototype.destroy=X.prototype.destroy;var go=0,Wn=1,Io=2,Vo=3;X.LoadMode={DESTROYED:go,NOT_LOADED:Wn,MEDIA_SOURCE:Io,SRC_EQUALS:Vo};X.version="v4.9.
|
|
696
|
+
X.registerSupportPlugin=function(a,b){op[a]=b};X.prototype.destroy=X.prototype.destroy;var go=0,Wn=1,Io=2,Vo=3;X.LoadMode={DESTROYED:go,NOT_LOADED:Wn,MEDIA_SOURCE:Io,SRC_EQUALS:Vo};X.version="v4.9.18";var pp=["4","9"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(pp[0]),Number(pp[1])));var op={},$n=null;function qp(){this.h=[];this.j=this.i=this.g=0};function rp(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=rp.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};
|
|
696
697
|
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)};
|
|
697
698
|
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)};
|
|
698
699
|
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()};
|
|
699
700
|
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",rp);rp.prototype.release=rp.prototype.release;
|
|
700
701
|
rp.prototype.getPodIndex=rp.prototype.getPodIndex;rp.prototype.getTimeOffset=rp.prototype.getTimeOffset;rp.prototype.getMediaUrl=rp.prototype.getMediaUrl;rp.prototype.getAdvertiserName=rp.prototype.getAdvertiserName;rp.prototype.getCreativeAdId=rp.prototype.getCreativeAdId;rp.prototype.getAdId=rp.prototype.getAdId;rp.prototype.getVastMediaWidth=rp.prototype.getVastMediaWidth;rp.prototype.getVastMediaHeight=rp.prototype.getVastMediaHeight;rp.prototype.getVastMediaBitrate=rp.prototype.getVastMediaBitrate;
|
|
701
702
|
rp.prototype.getDescription=rp.prototype.getDescription;rp.prototype.getTitle=rp.prototype.getTitle;rp.prototype.getPositionInSequence=rp.prototype.getPositionInSequence;rp.prototype.getSequenceLength=rp.prototype.getSequenceLength;rp.prototype.setMuted=rp.prototype.setMuted;rp.prototype.resize=rp.prototype.resize;rp.prototype.isLinear=rp.prototype.isLinear;rp.prototype.isMuted=rp.prototype.isMuted;rp.prototype.setVolume=rp.prototype.setVolume;rp.prototype.getVolume=rp.prototype.getVolume;
|
|
702
|
-
rp.prototype.play=rp.prototype.play;rp.prototype.pause=rp.prototype.pause;rp.prototype.skip=rp.prototype.skip;rp.prototype.canSkipNow=rp.prototype.canSkipNow;rp.prototype.getTimeUntilSkippable=rp.prototype.getTimeUntilSkippable;rp.prototype.isSkippable=rp.prototype.isSkippable;rp.prototype.isPaused=rp.prototype.isPaused;rp.prototype.getRemainingTime=rp.prototype.getRemainingTime;rp.prototype.getMinSuggestedDuration=rp.prototype.getMinSuggestedDuration;rp.prototype.getDuration=rp.prototype.getDuration;function sp(a,b,c,d,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.
|
|
703
|
+
rp.prototype.play=rp.prototype.play;rp.prototype.pause=rp.prototype.pause;rp.prototype.skip=rp.prototype.skip;rp.prototype.canSkipNow=rp.prototype.canSkipNow;rp.prototype.getTimeUntilSkippable=rp.prototype.getTimeUntilSkippable;rp.prototype.isSkippable=rp.prototype.isSkippable;rp.prototype.isPaused=rp.prototype.isPaused;rp.prototype.getRemainingTime=rp.prototype.getRemainingTime;rp.prototype.getMinSuggestedDuration=rp.prototype.getMinSuggestedDuration;rp.prototype.getDuration=rp.prototype.getDuration;function sp(a,b,c,d,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.18");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
703
704
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){tp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){up(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.sa(this.i,"play",function(){f.F=!0})}sp.prototype.configure=function(a){this.s=a};sp.prototype.stop=function(){this.g&&this.g.stop();this.o&&jn(this.o)};
|
|
704
705
|
sp.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 up(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));vp(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
705
706
|
function tp(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",
|
|
@@ -751,8 +752,8 @@ function Sp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
751
752
|
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);ig.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 qp};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)};
|
|
752
753
|
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 Fp(a,b,c,function(e){return Tp(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 Zf,Ip(d,a,b),d.H=c||"",d.W=Date.now()/1E3,a=d.l);return a};
|
|
753
754
|
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 Rp(a,b,this.m,function(d){return Tp(c,d)});this.g.configure(this.l)};
|
|
754
|
-
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.
|
|
755
|
-
(c.G=!0),c.j=new Zf,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.
|
|
755
|
+
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.18";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
756
|
+
(c.G=!0),c.j=new Zf,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.18";this.g.g.replaceAdTagParameters(a)};
|
|
756
757
|
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)};
|
|
757
758
|
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)};
|
|
758
759
|
function Tp(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;
|
|
@@ -766,29 +767,29 @@ function Wp(a){return{length:a.length,start:function(b){return a.start[b]},end:f
|
|
|
766
767
|
var Xp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Yp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Zp=["loop","playbackRate"],$p=["pause","play"],aq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
767
768
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},bq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},cq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},dq=[["getConfiguration","configure"]],eq=[["isTextTrackVisible","setTextTrackVisibility"]],fq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
768
769
|
gq=["attach","attachCanvas","detach","load","unload"];function hq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Tc(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 iq(h)};this.C=function(k,l){k=Vp(l);switch(k.type){case "event":var m=k.targetName,n=gg(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,
|
|
769
|
-
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;jq.add(this)}r=hq.prototype;r.destroy=function(){jq.delete(this);kq(this);lq&&mq(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.
|
|
770
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.
|
|
770
|
+
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;jq.add(this)}r=hq.prototype;r.destroy=function(){jq.delete(this);kq(this);lq&&mq(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.bb=function(){return this.h};r.Hf=function(){return this.J};
|
|
771
|
+
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(jq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Zf;d.s=!0;nq(d,e)}},function(b){for(var c=t(jq),d=c.next();!d.done;d=c.next())d=d.value,oq="available"==b,d.l.mc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});oq&&this.l.X(pq);(a=lq)&&
|
|
771
772
|
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Zf,this.s=!0,nq(this,a)):lq=null}else window.__onGCastApiAvailable!==qq&&(rq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=qq)};r.Pf=function(a){this.o=a;this.h&&sq(this,{type:"appData",appData:this.o})};
|
|
772
|
-
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!oq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Zf;chrome.cast.requestSession(function(c){return nq(a,c)},function(c){return tq(a,c)});return E(b,a.j,0)})};function uq(a){a.h&&chrome.cast.requestSession(function(b){return nq(a,b)},function(b){return tq(a,b)})}r.
|
|
773
|
+
r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!oq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Zf;chrome.cast.requestSession(function(c){return nq(a,c)},function(c){return tq(a,c)});return E(b,a.j,0)})};function uq(a){a.h&&chrome.cast.requestSession(function(b){return nq(a,b)},function(b){return tq(a,b)})}r.xc=function(){if(this.h){kq(this);if(lq){mq(this);try{lq.stop(function(){},function(){})}catch(a){}lq=null}iq(this)}};
|
|
773
774
|
r.get=function(a,b){var c=this;if("video"==a){if($p.includes(b))return function(){return c.Lg.apply(c,[a,b].concat(x(La.apply(0,arguments))))}}else if("player"==a){if(cq[b]&&!this.get("player","isLive")())return function(){};if(fq.includes(b))return function(){return c.Lg.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(gq.includes(b))return function(){return c.Ai.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(aq[b]||bq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
774
775
|
r.set=function(a,b,c){this.g[a][b]=c;sq(this,{type:"set",targetName:a,property:b,value:c})};function nq(a,b){var c=a.N();lq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);iq(a);sq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function tq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
|
|
775
776
|
r.Lg=function(a,b){sq(this,{type:"call",targetName:a,methodName:b,args:La.apply(2,arguments)})};r.Ai=function(a,b){var c=La.apply(2,arguments),d=new Zf,e=this.H.toString();this.H++;this.i[e]=d;try{sq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function mq(a){var b=lq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
776
|
-
function iq(a){var b=lq?"connected"==lq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};kq(a)}a.h=b;a.J=b?lq.receiver.friendlyName:"";a.l.
|
|
777
|
+
function iq(a){var b=lq?"connected"==lq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};kq(a)}a.h=b;a.J=b?lq.receiver.friendlyName:"";a.l.mc()}function kq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function sq(a,b){b=Up(b);var c=lq;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 pq=.02,oq=!1,lq=null,rq=null,jq=new Set;
|
|
777
778
|
function qq(a){rq?window.__onGCastApiAvailable=rq:delete window.__onGCastApiAvailable;rq=null;if(a)for(var b=t(jq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function vq(a,b,c,d){d=void 0===d?!1:d;ig.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 hq(c,function(){return wq(e)},function(){return xq(e)},function(f,g){return yq(e,f,g)},function(){return zq(e)},function(){return Aq(e)},d);Bq(this)}pa(vq,ig);r=vq.prototype;
|
|
778
|
-
r.destroy=function(a){a&&this.g.
|
|
779
|
-
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.
|
|
780
|
-
r.qh=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.
|
|
781
|
-
function Bq(a){a.g.init();a.m=new hb;for(var b=t(Xp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.
|
|
779
|
+
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;ig.prototype.release.call(this);return Promise.all(a)};r.Xh=function(){return this.l};r.Mh=function(){return this.s};r.ph=function(){return this.g.m&&oq};r.bb=function(){return this.g.bb()};r.Hf=function(){return this.g.Hf()};
|
|
780
|
+
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.Pf=function(a){this.g.Pf(a)};r.Qi=function(){uq(this.g)};r.xc=function(){this.g.xc()};
|
|
781
|
+
r.qh=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 hq(a,function(){return wq(c)},function(){return xq(c)},function(e,f){return yq(c,e,f)},function(){return zq(c)},function(){return Aq(c)},b);c.g.init();H(d)})};
|
|
782
|
+
function Bq(a){a.g.init();a.m=new hb;for(var b=t(Xp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.bb()||(f=gg(f),a.j.dispatchEvent(f))});for(var d in hg)a.m.D(a.h,hg[d],function(f){a.g.bb()||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 Cq(a,f.Qc)}}(b),set:function(f){return function(g){var h=f.Qc;a.g.bb()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Qc:b.Qc};a.s={};Dq(a,
|
|
782
783
|
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Eq(a,f)}})});Fq(a);a.j=new ig;a.j.qe=a.l;a.o=new ig;a.o.qe=a.s}function Fq(a){var b=new Map;Dq(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)})}
|
|
783
784
|
function Dq(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)}}
|
|
784
|
-
function Aq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.
|
|
785
|
+
function Aq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.yc(),startTime:null};a.i.pause();for(var c=t(Zp),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(dq);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(eq);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 wq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
|
|
785
786
|
function xq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
786
787
|
function zq(a){for(var b=t(dq),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(Zp);for(d=c.next();!d.done;d=c.next())d=
|
|
787
788
|
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Zp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(eq);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.Ug(h);g&&a.h.Nf(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)})}
|
|
788
|
-
function Cq(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.
|
|
789
|
-
function Eq(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.
|
|
790
|
-
if("setVideoContainer"==b)return function(c){return a.h.Yg(c)};if(a.g.
|
|
791
|
-
function yq(a,b,c){a.g.
|
|
789
|
+
function Cq(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.bb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.bb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
790
|
+
function Eq(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.ac()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.rg()};
|
|
791
|
+
if("setVideoContainer"==b)return function(c){return a.h.Yg(c)};if(a.g.bb()){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.bb()&&0==Object.keys(a.g.g.video).length&&(aq[b]||bq[b])||!a.g.bb()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
792
|
+
function yq(a,b,c){a.g.bb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",vq);vq.prototype.changeReceiverId=vq.prototype.qh;vq.prototype.forceDisconnect=vq.prototype.xc;vq.prototype.suggestDisconnect=vq.prototype.Qi;vq.prototype.setAppData=vq.prototype.Pf;vq.prototype.cast=vq.prototype.cast;vq.prototype.receiverName=vq.prototype.Hf;vq.prototype.isCasting=vq.prototype.bb;vq.prototype.canCast=vq.prototype.ph;vq.prototype.getPlayer=vq.prototype.Mh;
|
|
792
793
|
vq.prototype.getVideo=vq.prototype.Xh;vq.prototype.destroy=vq.prototype.destroy;function Gq(a,b,c,d){ig.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 Tc(function(){Hq(e)});Iq(this)}pa(Gq,ig);r=Gq.prototype;r.isConnected=function(){return this.F};r.ci=function(){return this.o};r.Mi=function(a){this.i=a};r.uh=function(){this.i=null};
|
|
793
794
|
r.Ni=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Li=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Ki=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
794
795
|
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,ig.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
|
|
@@ -798,15 +799,15 @@ a.j.D(a.g,"ended",function(){(new Tc(function(){a.g&&a.g.ended&&(a.o=!0,Oq(a))})
|
|
|
798
799
|
function Sq(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:va(q,3);break;case 5:return g=za(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);
|
|
799
800
|
a.g.autoplay=f;b.manifest&&(a.g.play(),Rq(a));H(q)}})}function Nq(a,b,c){a.h&&(Hq(a),Kq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
800
801
|
function Hq(a){a.G.X(Tq);for(var b={video:{},player:{}},c=t(Yp),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 cq)0==a.m%cq[e]&&(b.player[e]=a.h[e]());for(var f in aq)0==a.m%aq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Kq(a,{type:"update",update:b},a.l);for(var g in bq)0==a.m%bq[g]&&(b={player:{}},b.player[g]=a.h[g](),Kq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
801
|
-
1);Qq(a)}function Qq(a){return a.A&&(a.g.duration||a.h.U())?(Uq(a),a.A=!1,!0):!1}function Uq(a,b){var c={contentId:a.h.
|
|
802
|
+
1);Qq(a)}function Qq(a){return a.A&&(a.g.duration||a.h.U())?(Uq(a),a.A=!1,!0):!1}function Uq(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);Rq(a,void 0===b?0:b,c)}
|
|
802
803
|
function Mq(a,b){var c=Vp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Sq(a,c.initState,c.appData);Hq(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;
|
|
803
804
|
"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 Vq(a,g,f,null)},function(h){return Vq(a,g,f,h)})}}
|
|
804
|
-
function Lq(a,b){var c=Vp(b.data);switch(c.type){case "PLAY":a.g.play();Rq(a);break;case "PAUSE":a.g.pause();Rq(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(),Rq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Rq(a));break;case "STOP":a.h.
|
|
805
|
+
function Lq(a,b){var c=Vp(b.data);switch(c.type){case "PLAY":a.g.play();Rq(a);break;case "PAUSE":a.g.pause();Rq(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(),Rq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Rq(a));break;case "STOP":a.h.nc().then(function(){a.h&&Rq(a)});break;case "GET_STATUS":Uq(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));
|
|
805
806
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Rq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Uq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Kq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Kq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
806
807
|
function Vq(a,b,c,d){a.h&&Kq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Kq(a,b,c,d){a.F&&(a=Up(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Rq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Wq:a.h.pf()?Xq:a.g.paused?Yq:Zq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Kq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
807
808
|
S("shaka.cast.CastReceiver",Gq);Gq.prototype.destroy=Gq.prototype.destroy;Gq.prototype.setContentArtist=Gq.prototype.Ki;Gq.prototype.setContentImage=Gq.prototype.Li;Gq.prototype.setContentTitle=Gq.prototype.Ni;Gq.prototype.clearContentMetadata=Gq.prototype.uh;Gq.prototype.setContentMetadata=Gq.prototype.Mi;Gq.prototype.isIdle=Gq.prototype.ci;Gq.prototype.isConnected=Gq.prototype.isConnected;var Tq=.5,Pq=5,Wq="IDLE",Zq="PLAYING",Xq="BUFFERING",Yq="PAUSED";function $q(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(y){return null!=y&&""!=y.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(y){return null!=y&&""!=y.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=ar(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){q=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
808
809
|
q||-1===u)p=br(d,e),a.nestedCues.push(p);else{for(;q<=u;q++)if(v=p[q]){var w=v.l,A=v.i,z=v.j,B=v.h;if(w!=h||A!=k||z!=l||B!=m)n.payload&&a.nestedCues.push(n),n=ar(d,e,w,A,z,B),h=w,k=A,l=z,m=B;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=br(d,e),a.nestedCues.push(n));n=ar(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
809
|
-
function ar(a,b,c,d,e,f){a=new Rb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function br(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}function cr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function dr(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";er(this)}function fr(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Rb(b,c,"");e.lineInterpretation=1;var f=gr.get(a.g);f&&(e.line=f);
|
|
810
|
+
function ar(a,b,c,d,e,f){a=new Rb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function br(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}function cr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function dr(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";er(this)}function fr(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Rb(b,c,"");e.lineInterpretation=1;var f=gr.get(a.g);f&&(e.line=f);(b=$q(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=gr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function er(a){hr(a,0,15);a.g=1}
|
|
810
811
|
function ir(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case jr:d=kr.has(c)?kr.get(c):String.fromCharCode(c);break;case lr:d=mr.get(c);break;case nr:a.i[a.g].pop();d=or.get(c);break;case pr:a.i[a.g].pop(),d=qr.get(c)}d&&a.i[a.g].push(new cr(d,a.m,a.j,a.o,a.l))}}function rr(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function hr(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
811
812
|
var jr=0,lr=1,nr=2,pr=3,kr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),mr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),or=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
|
|
812
813
|
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),qr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
@@ -820,18 +821,18 @@ b.skip(1),d=Xr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&
|
|
|
820
821
|
function $r(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function as(a,b,c){var d=null;b=t($r(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Ir(f,c,a.i));a.h[e]=null}return d}function bs(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function cs(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return ds[a<<2|b<<1|c]}
|
|
821
822
|
var es=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),ds="black blue green cyan red magenta yellow white".split(" ");function fs(){this.h=[];this.g=[];this.i=new Ur;this.l=0;this.m=new Map([["CC1",new sr(0,0)],["CC2",new sr(0,1)],["CC3",new sr(1,0)],["CC4",new sr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;gs(this)}fs.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;gs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())bs(b.value)};
|
|
822
823
|
function gs(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=tr,c.g=c.j,c.m=null,er(c.i),er(c.j),er(c.o);a.B=!0}
|
|
823
|
-
fs.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Gg(a,0);if(!(8>a.getLength())&&181===a.R()&&49===a.ia()&&1195456820===a.O()&&3===a.R()&&(c=a.R(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.R(),f=(e&4)>>2,g=a.R(),h=a.R();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,
|
|
824
|
+
fs.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Gg(a,0);if(!(8>a.getLength())&&181===a.R()&&49===a.ia()&&1195456820===a.O()&&3===a.R()&&(c=a.R(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.R(),f=(e&4)>>2,g=a.R(),h=a.R();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Za:g,yb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
824
825
|
fs.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=hs(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Vr(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=is(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
825
|
-
function hs(a,b){var c=b.type;if(16===(b.
|
|
826
|
+
function hs(a,b){var c=b.type;if(16===(b.Za&112)){var d=b.Za>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Za&&255===b.yb||!b.Za&&!b.yb||!js(b.Za)||!js(b.yb))return 45<=++a.l&&gs(a),null;a.l=0;b.Za&=127;b.yb&=127;var e=b.Za;if(1<=e&&15>=e||!b.Za&&!b.yb)return null;e=null;if(16===(b.Za&112))a:{a.A.add(d),d=b.Za;a=b.yb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
826
827
|
"white";e=!1;7>f?d=Br[f]:7===f&&(e=!0);a=1===(a&1);c.h!==wr&&(f=c.g,c.h===vr&&b!==f.g&&(c=1+b-f.h,rr(f,c,1+f.g-f.h,f.h),hr(f,0,c-1),hr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ir(c.g,jr,32),d=!1,b=Br[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Ar[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))ir(c.g,
|
|
827
828
|
lr,a);else if(18===(d&246)&&32===(a&224))ir(c.g,d&1?pr:nr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.yb){case 32:xr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=ur(c,2,a);break;case 38:d=ur(c,3,a);break;case 39:d=ur(c,4,a);break;case 40:ir(c.g,jr,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:er(c.o);zr(c);break;case 43:zr(c);break;case 44:b=c.i;d=null;c.h!==wr&&(d=fr(b,c.l,a));hr(b,0,15);break;case 45:b=c.g;c.h!==vr?d=null:(d=fr(b,c.l,a),e=b.g-b.h+1,rr(b,
|
|
828
|
-
e-1,e,b.h),hr(b,0,e-1),hr(b,b.g,15-b.g),c.l=a);break;case 46:hr(c.j,0,15);break;case 47:b=null,c.h!==wr&&(b=fr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,xr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.yb,ir(c.g,jr,b.
|
|
829
|
+
e-1,e,b.h),hr(b,0,e-1),hr(b,b.g,15-b.g),c.l=a);break;case 46:hr(c.j,0,15);break;case 47:b=null,c.h!==wr&&(b=fr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,xr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.yb,ir(c.g,jr,b.Za),ir(c.g,jr,a);return e}
|
|
829
830
|
function is(a,b){var c=[];try{for(;b.ka();){var d=Xr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Xr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Yr(e));for(var g=a.j.get(e),h=b.ra();b.ra()-h<f;){e=b;var k=Xr(e),l=k.value,m=k.pts;if(16===l){var n=Xr(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Hr(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.m-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Ir(q,p,g.i));if(q.h+1>=q.o){p=q;for(var u=
|
|
830
831
|
0,v=1;16>v;v++,u++)p.i[u]=p.i[v];for(v=0;1>v;v++,u++)p.i[u]=Fr()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Ir(q,p,g.i));q.i[q.h]=Fr();q.g=0;break;case 12:q.isVisible()&&(e=Ir(q,p,g.i)),Er(q),p=q,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Zr(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Gr(g.g,
|
|
831
832
|
"\u266a"):Gr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Gr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(es.has(e)){var A=es.get(e);Gr(g.g,A)}else Gr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Gr(g.g,"_"):Gr(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(z){if(z instanceof T&&3E3===z.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw z;}return c}function js(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
832
833
|
fs.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",fs);Jb=function(){return new fs};function ks(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 ls(){this.j=new Map;this.i=this.h=0;this.g=ms}
|
|
833
834
|
ls.prototype.init=function(a){function b(f){f=f.name;f in ns&&(c.g=ns[f])}var c=this,d=[],e=[];(new Jg).box("moov",Qg).box("mvex",Qg).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",Qg).P("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.O();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.ia();g.ia();g.ia();g.ia();d.push(h)}).box("mdia",Qg).P("mdhd",
|
|
834
|
-
function(f){f=Wi(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Tg).box("sinf",Qg).box("frma",function(f){f=Zi(f.reader).
|
|
835
|
+
function(f){f=Wi(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Tg).box("sinf",Qg).box("frma",function(f){f=Zi(f.reader).La;f in ns&&(c.g=ns[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==ms&&ab("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
835
836
|
ls.prototype.parse=function(a){var b=this;if(this.g==ms)return[];var c=[],d=0,e=[];(new Jg).box("moof",function(f){d=f.start;e=[];Qg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,fd:b.h,Wd:b.i,Ig:[],timescale:9E4});Qg(f)}).P("trun",function(f){var g=e[e.length-1];f=Xi(f.reader,f.version,f.flags);g.Ig.push(f)}).P("tfhd",function(f){var g=e[e.length-1];f=Ui(f.reader,f.flags);g.fd=f.fd||b.h;g.Wd=f.Wd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).P("tfdt",function(f){var g=e[e.length-
|
|
836
837
|
1];f=Vi(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);os(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.fd,l.Wd,g,l.Ig,c)}}).parse(a,!1);return c};
|
|
837
838
|
function os(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Mg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].wh);b.ka();){g=b.O();var p=b.R(),q=null;q=!1;h=1;switch(a.g){case ps:q=p&31;q=6==q;break;case qs: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].xe||0),p=(c+p)/d,h=t(ks(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?
|
|
@@ -850,50 +851,50 @@ var As=1,Bs=(new Map).set("com.widevine.alpha",function(a){var b=jh(a.node,"http
|
|
|
850
851
|
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=fh(a))?a:""});function Ds(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&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();
|
|
851
852
|
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})}
|
|
852
853
|
function Es(a,b){var c=Fs(a,b,"timescale"),d=1;c&&(d=sh(c)||1);c=Fs(a,b,"duration");(c=sh(c||""))&&(c/=d);var e=Fs(a,b,"startNumber"),f=Number(Fs(a,b,"presentationTimeOffset"))||0,g=th(e||"");if(null==e||null==g)g=1;e=null;if(b=Gs(a,b,"SegmentTimeline")){b=eh(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=lh(n,"t",th),u=lh(n,"d",th),v=lh(n,"r",rh);n=lh(n,"k",rh)||0;null!=q&&(q-=f);if(u){q=null!=q?q:l;v=v||0;if(0>v)if(p){p=lh(p,"t",th);if(null==
|
|
853
|
-
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,bg:q,wb:n,Ii:k.length+h}),q=l}}e=k}return{timescale:d,
|
|
854
|
+
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,bg:q,wb:n,Ii:k.length+h}),q=l}}e=k}return{timescale:d,Ja:c,Dd:g,Fb:f/d||0,ag:f,timeline:e}}function Hs(a,b){return[b(a.I),b(a.qa),b(a.ta)].filter(ze)}function Fs(a,b,c){b=Hs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
854
855
|
function Gs(a,b,c){b=Hs(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=ih(d.value,c));d=b.next());return a}
|
|
855
|
-
function Is(a,b,c,d,e,f){for(var g=mh(a,"http://www.w3.org/1999/xlink","href"),h=mh(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=ah("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return ag(new T(2,4,4028));if("onLoad"!=h)return ag(new T(2,4,4027));var p=Nd([d],[g]);return e.request(0,qg(p,b)).
|
|
856
|
+
function Is(a,b,c,d,e,f){for(var g=mh(a,"http://www.w3.org/1999/xlink","href"),h=mh(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=ah("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return ag(new T(2,4,4028));if("onLoad"!=h)return ag(new T(2,4,4027));var p=Nd([d],[g]);return e.request(0,qg(p,b)).za(function(q){q=Yg(q.data,a.tagName);if(!q)return ag(new T(2,4,4001,g));for(a.children=
|
|
856
857
|
[];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 Js(a,b,c,p[0],e,f+1)})}
|
|
857
|
-
function Js(a,b,c,d,e,f){f=void 0===f?0:f;if(mh(a,"http://www.w3.org/1999/xlink","href")){var g=Is(a,b,c,d,e,f);c&&(g=g.
|
|
858
|
+
function Js(a,b,c,d,e,f){f=void 0===f?0:f;if(mh(a,"http://www.w3.org/1999/xlink","href")){var g=Is(a,b,c,d,e,f);c&&(g=g.za(void 0,function(){return Js(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(dh(a)),l=k.next();!l.done;h={rc:h.rc},l=k.next())h.rc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==mh(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(Js(h.rc,b,c,d,e,f));return eg(g).za(function(){return a})}
|
|
858
859
|
;function Ks(a,b,c,d,e,f,g){var h,k=(new Jg).P("sidx",function(l){h=Ls(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
859
860
|
function Ls(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.ia();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 Ai(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Ms(a){this.h=Fb(a);this.g=new Gg(this.h,0)}Ms.prototype.ka=function(){return this.g.ka()};
|
|
860
861
|
function Ns(a){var b=Os(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Os(a);a:{d=t(Ps);for(var e=d.next();!e.done;e=d.next())if(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 Qs(c,
|
|
861
862
|
d)}function Os(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 Ps=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Qs(a,b){this.id=a;this.g=b}
|
|
862
863
|
function Rs(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ss(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ms(a.g);for(var n=null,p=null;a.ka();){var q=Ns(a);if(187==q.id){var u=Ts(q);u&&(q=c*u.Ui,u=b+u.yi,null!=n&&m.push(new Ai(n+g,q+g,l,p,u-1,f,g,h,k)),n=q,p=u)}}null!=n&&m.push(new Ai(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
863
864
|
function Ts(a){var b=new Ms(a.g);a=Ns(b);if(179!=a.id)throw new T(2,3,3013);a=Rs(a);b=Ns(b);if(183!=b.id)throw new T(2,3,3012);b=new Ms(b.g);for(var c=0;b.ka();){var d=Ns(b);if(241==d.id){c=Rs(d);break}}return{Ui:a,yi:c}};function Us(a,b,c){b=Gs(a,b,"Initialization");if(!b)return null;var d=a.I.Ca(),e=b.attributes.sourceURL;e&&(d=Nd(d,[Dd(e)]));e=0;var f=null;if(b=lh(b,"range",qh))e=b.start,f=b.end;c=new yi(function(){return d},e,f,Vs(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
|
|
864
|
-
function Ws(a,b,c){var d=Number(Fs(a,Xs,"presentationTimeOffset"))||0,e=Fs(a,Xs,"timescale"),f=1;e&&(f=sh(e)||1);var g=d/f||0,h=Us(a,Xs,c);Ys(a,h);var k=Le(a);return{
|
|
865
|
+
function Ws(a,b,c){var d=Number(Fs(a,Xs,"presentationTimeOffset"))||0,e=Fs(a,Xs,"timescale"),f=1;e&&(f=sh(e)||1);var g=d/f||0,h=Us(a,Xs,c);Ys(a,h);var k=Le(a);return{Yb:function(){var l=Gs(k,Xs,"RepresentationIndex");var m=k.I.Ca();l&&(l=Dd(l.attributes.sourceURL))&&(m=Nd(m,[l]));l=Zs(k);return $s(k,b,h,m,l.start,l.end,g)}}}
|
|
865
866
|
function $s(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,F;return O(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.sb||!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.Da,c.na,!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 I=Ks(w,e,d,c,B,y,C);else{I=new Ms(A);if(440786851!=Ns(I).id)throw new T(2,3,3008);var G=Ns(I);if(408125543!=G.id)throw new T(2,
|
|
866
867
|
3,3009);I=G.g.byteOffset;G=new Ms(G.g);for(var N=null;G.ka();){var L=Ns(G);if(357149030==L.id){N=L;break}}if(!N)throw new T(2,3,3010);N=new Ms(N.g);L=1E6;for(G=null;N.ka();){var M=Ns(N);if(2807729==M.id)L=Rs(M);else if(17545==M.id)if(4==M.g.byteLength)G=M.g.getFloat32(0);else if(8==M.g.byteLength)G=M.g.getFloat64(0);else throw new T(2,3,3003);}if(null==G)throw new T(2,3,3011);N=L/1E9;G*=N;L=Ns(new Ms(w));if(475249515!=L.id)throw new T(2,3,3007);I=Ss(L,I,N,G,d,c,B,y,C)}z=I;D=t(z);for(K=D.next();!K.done;K=
|
|
867
|
-
D.next())F=K.value,F.codecs=a.I.codecs,F.mimeType=a.I.mimeType;h.xd(z);q=new Ok(z);k&&q.
|
|
868
|
-
function Vs(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 bt(a,b,c){var d=Us(a,ct,c),e=dt(a);if(!e.
|
|
869
|
-
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{
|
|
870
|
-
function et(a,b,c,d,e,f,g,h){var k=d.
|
|
871
|
-
function ft(a){return[a.I.Gb,a.qa.Gb,a.ta.Gb].filter(ze).map(function(b){return eh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.nf&&(a.nf=!0);var c=Dd(b.attributes.media);b=lh(b,"mediaRange",qh,{start:0,end:null});return{oi:c,start:b.start,end:b.end}})};function gt(a,b,c,d,e,f,g,h,k){k||a.I.
|
|
872
|
-
(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity,v=!(a.sb&&a.ha.ud);p?(c=p,mt(c,m,q,u,v,l),c.
|
|
873
|
-
function jt(a){var b=Es(a,ht),c=Fs(a,ht,"media"),d=Fs(a,ht,"index");return{
|
|
874
|
-
function lt(a,b,c,d,e,f,g){function h(G){var N=(G-v)*u,L=N+b.Fb,M=N+n;N=M+u;var P=Math.min(N,l());M=new Ai(M,P,function(){var R=L*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(L)*BigInt(w));R=Ds(A,B,G,null,z,R);return Nd(y(),[R])},0,null,d,C,n,l(),[],"",null,null,Bi,f);M.codecs=a.I.codecs;M.mimeType=a.I.mimeType;M.i=N;return M}function k(){var G=[Math.max(m.jb(),n),Math.min(m.
|
|
875
|
-
v})}function l(){var G=null!=p&&e[p]||q;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.ta.id,q=a.ha.duration,u=b.
|
|
876
|
-
h(I);L.push(M);I++}return G>l()&&!L.length?null:L})}return Promise.resolve(J)}function it(a,b){var c=a.I.
|
|
868
|
+
D.next())F=K.value,F.codecs=a.I.codecs,F.mimeType=a.I.mimeType;h.xd(z);q=new Ok(z);k&&q.vc(y,C,!0);return J.return(q)})}function Xs(a){return a.Jc}function Zs(a){var b=Gs(a,Xs,"RepresentationIndex");a=Fs(a,Xs,"indexRange");a=qh(a||"");b&&(a=lh(b,"range",qh,a));return a}function Ys(a,b){at(a,b);if(!Zs(a))throw new T(2,4,4002);}function at(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Td&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
869
|
+
function Vs(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 bt(a,b,c){var d=Us(a,ct,c),e=dt(a);if(!e.Ja&&!e.timeline&&1<e.Dc.length)throw new T(2,4,4002);if(!e.Ja&&!a.ha.duration&&!e.timeline&&1==e.Dc.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=et(a.ha.start,a.ha.duration,a.I.Ca,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.sb&&a.ha.ud||f.vc(a.ha.start,
|
|
870
|
+
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{Yb:function(){f&&0!=f.getNumReferences()||f.le(h);return Promise.resolve(f)}}}function ct(a){return a.Gb}function dt(a){var b=ft(a);a=Es(a,ct);var c=a.Dd;0==c&&(c=1);var d=0;a.Ja?d=a.Ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ja:a.Ja,startTime:d,Dd:c,Fb:a.Fb,timeline:a.timeline,Dc:b}}
|
|
871
|
+
function et(a,b,c,d,e,f,g,h){var k=d.Dc.length;d.timeline&&d.timeline.length!=d.Dc.length&&(k=Math.min(d.timeline.length,d.Dc.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.Dc[u];var v=p;p=void 0;p=null!=d.Ja?v+d.Ja:d.timeline?d.timeline[u].end:v+b;q.Yc=null;v=new Ai(a+v,a+p,function(w){return function(){null==w.Yc&&(w.Yc=Nd(c(),[w.Uc.oi]));return w.Yc}}(q),q.Uc.start,q.Uc.end,e,l,a,m,[],"",null,null,Bi,f);v.codecs=h;v.mimeType=g;n.push(v)}return n}
|
|
872
|
+
function ft(a){return[a.I.Gb,a.qa.Gb,a.ta.Gb].filter(ze).map(function(b){return eh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.nf&&(a.nf=!0);var c=Dd(b.attributes.media);b=lh(b,"mediaRange",qh,{start:0,end:null});return{oi:c,start:b.start,end:b.end}})};function gt(a,b,c,d,e,f,g,h,k){k||a.I.Bc||(a.I.Bc=Fs(a,ht,"initialization"));var l=a.I.Bc?it(a,g):null,m=jt(a);kt(m);var n=Le(a);if(m.sd)return at(a,l),{Yb:function(){var w=Ds(m.sd,n.I.id,null,null,n.bandwidth||null,null);w=Nd(n.I.Ca(),[w]);return $s(n,b,l,w,0,null,m.Fb)}};if(m.Ja)return d||"image"===a.qa.contentType||(a.presentationTimeline.zf(m.Ja),a.presentationTimeline.pe(a.ha.start)),{Yb:function(){return lt(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])&&
|
|
873
|
+
(p=d.segmentIndex);var q=a.ha.start,u=a.ha.duration?q+a.ha.duration:Infinity,v=!(a.sb&&a.ha.ud);p?(c=p,mt(c,m,q,u,v,l),c.Ma(a.presentationTimeline.jb())):p=new nt(m,a.I.id,a.bandwidth,a.I.Ca,q,u,l,v,g,a.I.Mf);m.timeline&&"image"!==a.qa.contentType&&a.presentationTimeline.Hg(m.timeline,q);d&&a.sb&&(d.segmentIndex=p);return{Yb:function(){p instanceof nt&&0==p.getNumReferences()&&mt(p,m,q,u,v,l);return Promise.resolve(p)}}}function ht(a){return a.Qb}
|
|
874
|
+
function jt(a){var b=Es(a,ht),c=Fs(a,ht,"media"),d=Fs(a,ht,"index");return{Ja:b.Ja,timescale:b.timescale,Dd:b.Dd,Fb:b.Fb,ag:b.ag,timeline:b.timeline,Ob:c&&Dd(c),sd:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function kt(a){var b=a.sd?1:0;b+=a.timeline?1:0;b+=a.Ja?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.sd&&(a.timeline=null),a.Ja=null);if(!a.sd&&!a.Ob)throw new T(2,4,4002);}
|
|
875
|
+
function lt(a,b,c,d,e,f,g){function h(G){var N=(G-v)*u,L=N+b.Fb,M=N+n;N=M+u;var P=Math.min(N,l());M=new Ai(M,P,function(){var R=L*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(L)*BigInt(w));R=Ds(A,B,G,null,z,R);return Nd(y(),[R])},0,null,d,C,n,l(),[],"",null,null,Bi,f);M.codecs=a.I.codecs;M.mimeType=a.I.mimeType;M.i=N;return M}function k(){var G=[Math.max(m.jb(),n),Math.min(m.Nb(),l())].map(function(N){return N-n});G=[Math.ceil(G[0]/u),Math.ceil(G[1]/u)-1];a.I.Ga&&G[1]++;return G.map(function(N){return N+
|
|
876
|
+
v})}function l(){var G=null!=p&&e[p]||q;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ha.start,p=a.ta.id,q=a.ha.duration,u=b.Ja,v=b.Dd,w=b.timescale,A=b.Ob,z=a.bandwidth||null,B=a.I.id,y=a.I.Ca,C=n-b.Fb,D=k();c=a.sb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var K=c;K<=g;++K){var F=h(K);D.push(F)}var J=new Ok(D);D=m.Nb()<l();K=m.U();if(D||K){var I=Math.max(c,g+1);c=u;a.I.Ga&&(c=.1);J.ze(c,function(){var G=m.jb();J.Ma(G);var N=t(k());N.next();N=N.next().value;for(var L=[];I<=N;){var M=
|
|
877
|
+
h(I);L.push(M);I++}return G>l()&&!L.length?null:L})}return Promise.resolve(J)}function it(a,b){var c=a.I.Bc;c||(c=Fs(a,ht,"initialization"));if(!c)return null;c=Dd(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.Ca;b=new yi(function(){var g=Ds(c,d,null,null,e,null);return Nd(f(),[g])},0,null,Vs(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
|
|
877
878
|
function nt(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&&ot(this)}pa(nt,Ok);r=nt.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Ok.prototype.release.call(this);this.h=null};
|
|
878
|
-
r.
|
|
879
|
-
function mt(a,b,c,d,e,f){pt(a,f);if(a.h){c=a.h.timeline;a.h.
|
|
880
|
-
function ot(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.
|
|
881
|
-
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.
|
|
882
|
-
|
|
879
|
+
r.Ma=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())}};
|
|
880
|
+
function mt(a,b,c,d,e,f){pt(a,f);if(a.h){c=a.h.timeline;a.h.Ob!==b.Ob&&(a.h.Ob=b.Ob);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&&ot(a)}function pt(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)&&Gi(c,b)}}
|
|
881
|
+
function ot(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.Ma(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};
|
|
882
|
+
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.timeline[a],e=d.Ii,f=this.h.ag+d.bg;c=this.i-this.h.Fb;var g=this.i+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=[],n=(d.end-d.start)/d.wb,p={},q=0;q<d.wb;p={Zc:p.Zc,He:p.He},q++){var u=d.start+n*q,v=u+n;p.He=q+1;p.Zc=null;u=new Ai(this.i+u,this.i+v,function(w){return function(){if(!b.h)return[];null==
|
|
883
|
+
w.Zc&&(w.Zc=qt(b.h.Ob,b.F,e,b.B,f,w.He,b.C));return w.Zc}}(p),0,null,this.s,c,this.i,this.l,[],"",null,null,Bi,this.A);u.codecs=k;u.mimeType=l;0==this.G?0<q&&u.je():0!=q%this.G&&u.je();m.push(u)}c=new Ai(this.i+d.start,h,function(){return 0<d.wb||!b.h?[]:qt(b.h.Ob,b.F,e,b.B,f,null,b.C)},0,null,this.s,c,this.i,this.l,m,"",null,null,Bi,this.A,0<d.wb);c.codecs=k;c.mimeType=l;c.i=g;this.g[a]=c}return c};
|
|
883
884
|
function qt(a,b,c,d,e,f,g){a=Ds(a,b,c,f,d||null,e);return Nd(g(),[a]).map(function(h){return h.toString()})};function rt(a){var b=me(a),c=b.split("/")[0];a=ne(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}}
|
|
884
885
|
function st(a,b){function c(y){w=y.name;var C=y.reader;C.skip(24);var D=C.ia(),K=C.ia();C.skip(50);n=String(D);m=String(K);y.reader.ka()&&Qg(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");
|
|
885
886
|
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),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 Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).P("mdhd",function(y){l=Wi(y.reader,y.version).language}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("mp4a",function(y){var C=Yi(y.reader);p=C.channelCount;q=C.sampleRate;y.reader.ka()?Qg(y):e(y.name)}).box("esds",function(y){y=y.reader;for(var C=
|
|
886
887
|
"mp4a",D,K;y.ka();){D=y.R();for(var F=y.R();F&128;)F=y.R();if(3==D)y.ia(),F=y.R(),F&128&&y.ia(),F&64&&y.skip(y.R()),F&32&&y.ia();else if(4==D)K=y.R(),y.skip(12);else if(5==D)break}K&&(C+="."+aj(K),5==D&&y.ka()&&(D=y.R(),K=(D&248)>>3,31===K&&y.ka()&&(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",
|
|
887
888
|
c).box("av01",c).box("avcC",function(y){var C=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],F=y&31,J=D.O(),I=(y&32)>>5?"H":"L";y=[D.R(),D.R(),D.R(),D.R(),D.R(),D.R()];D=D.R();for(var G=0,N=0;32>N;N++){G|=J&1;if(31==N)break;G<<=1;J>>=1}C=C+("."+K+F)+("."+
|
|
888
889
|
aj(G,!0));C+="."+I+D;K="";for(F=y.length;F--;)if((I=y[F])||K)K="."+I.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",
|
|
889
|
-
function(y){var C=w||"",D=y.reader;D.skip(1);y=D.R();D=D.R();var K=y>>>5,F=(D&64)>>6;g.push(C+"."+K+"."+bj(y&31)+(D>>>7?"H":"M")+"."+bj(2===K&&F?(D&32)>>5?12:10:F?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+bj(1)+"."+bj(1)+"."+bj(1)+".0");k=!0}).box("enca",Ug).box("encv",Tg).box("sinf",Qg).box("frma",function(y){y=Zi(y.reader).
|
|
890
|
+
function(y){var C=w||"",D=y.reader;D.skip(1);y=D.R();D=D.R();var K=y>>>5,F=(D&64)>>6;g.push(C+"."+K+"."+bj(y&31)+(D>>>7?"H":"M")+"."+bj(2===K&&F?(D&32)>>5?12:10:F?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+bj(1)+"."+bj(1)+"."+bj(1)+".0");k=!0}).box("enca",Ug).box("encv",Tg).box("sinf",Qg).box("frma",function(y){y=Zi(y.reader).La;e(y)}).box("colr",function(y){g=g.map(function(K){if(K.startsWith("av01.")){var F=y.reader,J=F.ra(),I=F.nb(4);var G=String.fromCharCode(I[0]);G+=String.fromCharCode(I[1]);
|
|
890
891
|
G+=String.fromCharCode(I[2]);G+=String.fromCharCode(I[3]);if("nclx"===G){I=F.ia();G=F.ia();var N=F.ia(),L=F.R()>>7,M=K.split(".");10==M.length&&(M[6]=bj(I),M[7]=bj(G),M[8]=bj(N),M[9]=String(L),K=M.join("."))}F.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",
|
|
891
892
|
mimeType:A?"audio/mp4":"video/mp4",codecs:tt(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:q,closedCaptions:z,Fd:u,colorGamut:v}}function tt(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ke(d);b.has(e)||(c.push(d),b.add(e))}b=Ud("audio",c);d=Ud("video",c);a=Ud(Td,c);d=ut(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
892
893
|
function ut(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 vt(a){var b=null;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("encv",Tg).box("enca",Ug).box("sinf",Qg).box("schi",Qg).P("tenc",function(c){c=c.reader;c.R();c.R();c.R();c.R();b=Ld(c.nb(16))}).parse(a,!0);return b};function wt(a){this.o=null;this.A=a;this.G=new jg;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"}wt.prototype.configure=function(a){this.o=a};wt.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()};wt.prototype.setManifestType=function(a){this.s=a};
|
|
893
894
|
function xt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Nd(a.i,[yt(a,b)]),d=qg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),kg(a.G,e),ta(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=wd(f.data),h=JSON.parse(g),1==h.VERSION&&zt(a,h,f.uri),va(l,0);if((k=za(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Tc(function(){xt(a,b)});a.g.X(a.C);H(l)})}
|
|
894
895
|
function yt(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 zt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Tc(function(){xt(a,d)});if(c=b.TTL)a.C=c;a.g.X(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
895
896
|
function At(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}wt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
896
|
-
function Bt(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={
|
|
897
|
+
function Bt(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={Vb:e.Vb},g=f.next())if(e.Vb=g.value,g=b.get(e.Vb))d.push({Ff:e.Vb,location:g});else if(g=a.F.find(function(k){return function(l){return l.lj==k.Vb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].fh?(h=new sc(h),uc(h,g["URI-REPLACEMENT"].fh),d.push({Ff:e.Vb,location:h.toString()})):d.push({Ff:e.Vb,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
897
898
|
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].Ff);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:Nd(a.i,d)};function Ct(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=Ct.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.Wh=function(){return this.j};r.lf=function(){return this.l.slice()};r.Dh=function(){return this.i};
|
|
898
899
|
function Dt(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[Et(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Ft(n),n]})),l=new Map(h.textStreams.map(function(n){return[Gt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ht(n),n]}));if(b){var m=It(Td);l.set(Gt(m),m);m=It("image");h.set(Ht(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{hg:c,bh:d,Zg:e,zg:f}}
|
|
899
900
|
r.Qe=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,F,J,I,G,N,L,M,P,R,Q;return O(function(ja){if(1==ja.g){e=Vd;if(!b&&1==a.length)return f=Dt(a,!1),g=f.hg,h=f.bh,k=f.Zg,l=f.zg,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=Dt(a,!0);v=u.hg;w=u.bh;A=u.Zg;z=u.zg;
|
|
@@ -914,7 +915,7 @@ d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions|
|
|
|
914
915
|
b)}function Pt(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
915
916
|
function Ut(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=Xt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
916
917
|
function Xt(a,b,c){var d={audio:Et,video:Ft,text:Gt,image:Ht}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return Tt(a,l,m)},video:function(l,m){return Tt(a,l,m)},text:Yt,image:Zt}[c.type];for(var g={audio:$t,video:au,text:bu,image:cu}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!St(e)&&b.delete(d(e));return e}
|
|
917
|
-
function du(a,b){
|
|
918
|
+
function du(a,b){return a.mimeType!=b.mimeType?!1:eu(a.codecs)===eu(b.codecs)}r.Pg=function(a){this.o=a};r.Wg=function(a){this.s=a};function Tt(a,b,c){return!du(b,c)&&!a.o||b.drmInfos&&!Lc(b.drmInfos,c.drmInfos)?!1:!0}function Yt(a,b){return b.language?a.forced!==b.forced||0==Ge(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Zt(){return!0}
|
|
918
919
|
function $t(a,b,c){var d=du(a,b),e=du(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Ge(a.language,b.language);e=Ge(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
|
|
919
920
|
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=fu(a.channelsCount,b.channelsCount,c.channelsCount);if(d==gu)return!0;if(d==hu)return!1;d=fu(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==gu?!0:d==hu?!1:a.bandwidth&&iu(a.bandwidth,b.bandwidth,c.bandwidth)==gu?!0:!1}
|
|
920
921
|
function au(a,b,c){var d=du(a,b),e=du(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=fu(a.width*a.height,b.width*b.height,c.width*c.height);if(d==gu)return!0;if(d==hu)return!1;if(a.frameRate){d=fu(a.frameRate,b.frameRate,c.frameRate);if(d==gu)return!0;if(d==hu)return!1}return a.bandwidth&&iu(a.bandwidth,b.bandwidth,c.bandwidth)==gu?!0:!1}
|
|
@@ -923,475 +924,476 @@ if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.cod
|
|
|
923
924
|
function Nt(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
|
|
924
925
|
function It(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}}
|
|
925
926
|
function fu(a,b,c){if(b==a&&a!=c)return hu;if(c==a&&a!=b)return gu;if(b>a){if(c<=a||c-a<b-a)return gu;if(c-a>b-a)return hu}else{if(c>a)return hu;if(a-c<a-b)return gu;if(a-c>a-b)return hu}return ju}function iu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?gu:b<a?hu:ju}function St(a){switch(a.type){case Td:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
926
|
-
function Ft(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 Et(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 Gt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
927
|
-
function Ht(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}S("shaka.util.PeriodCombiner",Ct);Ct.prototype.setUseStreamOnce=Ct.prototype.Wg;Ct.prototype.setAllowMultiTypeVariants=Ct.prototype.Pg;Ct.prototype.combinePeriods=Ct.prototype.Qe;Ct.prototype.getImageStreams=Ct.prototype.Dh;Ct.prototype.getTextStreams=Ct.prototype.lf;Ct.prototype.getVariants=Ct.prototype.Wh;var gu=1,ju=0,hu=-1,
|
|
928
|
-
var
|
|
929
|
-
r.configure=function(a){var b=this.
|
|
930
|
-
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.
|
|
931
|
-
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,
|
|
927
|
+
function Ft(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,eu(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Et(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,eu(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Gt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
928
|
+
function Ht(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function eu(a){if(!ku.has(a)){var b=de(a);ku.set(a,b)}return ku.get(a)}S("shaka.util.PeriodCombiner",Ct);Ct.prototype.setUseStreamOnce=Ct.prototype.Wg;Ct.prototype.setAllowMultiTypeVariants=Ct.prototype.Pg;Ct.prototype.combinePeriods=Ct.prototype.Qe;Ct.prototype.getImageStreams=Ct.prototype.Dh;Ct.prototype.getTextStreams=Ct.prototype.lf;Ct.prototype.getVariants=Ct.prototype.Wh;var gu=1,ju=0,hu=-1,ku=new Map;function lu(a,b){var c=new DOMParser,d=mu.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 nu(a,b){try{var c=zd(a);return lu(c,b)}catch(d){return null}}
|
|
929
|
+
var mu=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 ou(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.W=1;this.B=[];this.l={ne:"",type:"",profiles:[],Cb:null,Ga:0,Ca:null,zd:0};this.o=new Map;this.s={};this.N={};this.m=new Ct;this.F=0;this.T=new Ua(5);this.G=new Tc(function(){pu(a)});this.K=new jg;this.H=null;this.$=[];this.J=Infinity;this.C=!1;this.h=null;this.L=!1}r=ou.prototype;
|
|
930
|
+
r.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.G.mc();this.h&&this.h.configure(this.g);this.m&&(this.m.Pg(this.g.dash.multiTypeVariantsAllowed&&ob()),this.m.Wg(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.j=b,E(e,qu(c),2);d=e.h;c.j&&ru(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
931
|
+
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.j=null;this.A=[];this.i=null;this.s={};this.o.clear();this.l={ne:"",type:"",profiles:[],Cb:null,Ga:0,Ca:null,zd:0};this.m=null;null!=this.G&&(this.G.stop(),this.G=null);this.h&&this.h.destroy();return this.K.destroy()};
|
|
932
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,qu(a),4);if(2!=c.g)return va(c,0);b=za(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Nb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,ru(this,0))}}};
|
|
932
933
|
r.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
933
|
-
function
|
|
934
|
-
function
|
|
935
|
-
p=a.g.dash.xlinkFailGracefully;q=Js(k,a.g.retryParameters,p,c,a.
|
|
936
|
-
function
|
|
937
|
-
b.attributes.id||"";a.
|
|
938
|
-
I.next())N=G.value,L=N.attributes.serviceLocation,M=gh(N),L&&M&&(At(a.h,"BaseURL",L,M),J=!0);J&&a.h||(P=K.map(gh),F=Nd(d,P));R=function(){return a.h&&J?Bt(a.h,"BaseURL"):F?F:[]};a.
|
|
939
|
-
lh(b,"suggestedPresentationDelay",ph));Ca=a.g.dash.ignoreMaxSegmentDuration;Za=null;Ca||(Za=lh(b,"maxSegmentDuration",ph));
|
|
940
|
-
(xa=a.g.availabilityWindowOverride);null==
|
|
941
|
-
Va.zf(Za||1);return E(ic,u,2);case 2:return a.C&&(ka=0,
|
|
942
|
-
case 8:ie=ic.h;if(!a.
|
|
943
|
-
function
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
function
|
|
949
|
-
function
|
|
950
|
-
|
|
951
|
-
function
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
d
|
|
956
|
-
|
|
934
|
+
function qu(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=su(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=Bt(a.h,"Location",!0),e.length&&(d=e)),f=qg(d,a.g.retryParameters),g=Date.now(),E(m,tu(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.j)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,uu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.T.sample(1,l);return m.return(l)})}
|
|
935
|
+
function uu(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=nu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ad(h.outerHTML)}k=Yg(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(vu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(wu(a,k,c));
|
|
936
|
+
p=a.g.dash.xlinkFailGracefully;q=Js(k,a.g.retryParameters,p,c,a.j.networkingEngine);kg(a.K,q);return E(v,q.promise,2)}u=v.h;return v.return(wu(a,u,c))})}
|
|
937
|
+
function wu(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,F,J,I,G,N,L,M,P,R,Q,ja,ka,wa,ya,Ba,Ka,Ca,Za,xa,Va,pb,Pc,ee,rd,Hc,fe,ge,he,sd,Di,xg,Ei,Fi,yg,ie;return O(function(ic){switch(ic.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=eh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=gh(l))p=Nd(d,[n])[0],m&&(a.h?At(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=Bt(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.l.ne=
|
|
938
|
+
b.attributes.id||"";a.l.zd=lh(b,"publishTime",oh)||0;a.B=eh(b,"PatchLocation");u=Promise.resolve();if((v=ih(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new wt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=gh(v))(z=lh(v,"queryBeforeStart",vh,!1))?u=xt(a.h,A):xt(a.h,A);B=t(f.keys());for(y=B.next();!y.done;y=B.next())C=y.value,D=f.get(C),At(a.h,"Location",C,D)}K=eh(b,"BaseURL");J=!1;if(a.h)for(I=t(K),G=I.next();!G.done;G=
|
|
939
|
+
I.next())N=G.value,L=N.attributes.serviceLocation,M=gh(N),L&&M&&(At(a.h,"BaseURL",L,M),J=!0);J&&a.h||(P=K.map(gh),F=Nd(d,P));R=function(){return a.h&&J?Bt(a.h,"BaseURL"):F?F:[]};a.l.Ca=R;Q=0;K&&K.length&&(Q=lh(K[0],"availabilityTimeOffset",uh)||0);a.l.Ga=Q;ja=a.g.dash.ignoreMinBufferTime;ka=0;ja||(ka=lh(b,"minBufferTime",ph)||0);a.F=lh(b,"minimumUpdatePeriod",ph,-1);wa=lh(b,"availabilityStartTime",oh);ya=lh(b,"timeShiftBufferDepth",ph);Ba=a.g.dash.ignoreSuggestedPresentationDelay;Ka=null;Ba||(Ka=
|
|
940
|
+
lh(b,"suggestedPresentationDelay",ph));Ca=a.g.dash.ignoreMaxSegmentDuration;Za=null;Ca||(Za=lh(b,"maxSegmentDuration",ph));xa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.L=a.i.presentationTimeline.U()&&"static"==xa);a.l.type=xa;if(a.i)for(Va=a.i.presentationTimeline,pb=t(Object.values(a.s)),Pc=pb.next();!Pc.done;Pc=pb.next())ee=Pc.value,ee.segmentIndex&&ee.segmentIndex.Ma(Va.jb());else rd=a.g.defaultPresentationDelay||1.5*ka,Hc=null!=Ka?Ka:rd,Va=new sk(wa,Hc,a.g.dash.autoCorrectDrift);
|
|
941
|
+
Va.lc("static"==xa);(fe=Va.U())&&!isNaN(a.g.availabilityWindowOverride)&&(ya=a.g.availabilityWindowOverride);null==ya&&(ya=Infinity);Va.ye(ya);ge=b.attributes.profiles||"";a.l.profiles=ge.split(",");he={sb:"static"!=xa,presentationTimeline:Va,ta:null,ha:null,qa:null,I:null,bandwidth:0,nf:!1,Ga:Q,Cb:null,profiles:ge.split(",")};sd=xu(a,he,R,b);Di=sd.duration;xg=sd.periods;("static"!=xa||a.L)&&sd.og||Va.Wa(Di||Infinity);a.J&&!a.C&&(Ei=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.C=a.j.isLowLatencyMode());
|
|
942
|
+
a.C?Va.Qg(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.");Va.zf(Za||1);return E(ic,u,2);case 2:return a.C&&(ka=0,Fi=null!=Ka?Ka:a.g.defaultPresentationDelay,Va.Qf(Fi)),a.i?E(ic,Ku(a,sd.periods,!1),4):E(ic,a.m.Qe(xg,he.sb),6);case 6:a.i={presentationTimeline:Va,variants:a.m.j,textStreams:a.m.lf(),imageStreams:a.m.i,offlineSessionIds:[],
|
|
943
|
+
minBufferTime:ka||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Lu(b),nextUrl:Mu(b)};if(!Va.ah()){ic.u(7);break}yg=eh(b,"UTCTiming");return E(ic,Nu(a,R,yg),8);case 8:ie=ic.h;if(!a.j)return ic.return();Va.Rg(ie);case 7:Va.he();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(ic)}})}
|
|
944
|
+
function Ku(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Qe(b,!0,c),2);a.i.variants=a.m.j;d=a.m.lf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
|
|
945
|
+
function vu(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,F,J,I;return O(function(G){if(1==G.g){c=b.attributes.mpdId;d=lh(b,"originalPublishTime",oh);if(!c||c!==a.l.ne||d!==a.l.zd)throw a.B=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(dh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=xh(l.attributes.sel||""),n=m[m.length-1],p=gh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Kb){q=gh(l)||"";var N=ph(q);if(null!=N){a.l.Cb=N;for(var L=t(a.o.values()),M=L.next();!M.done;M=L.next())M.value.Cb=
|
|
946
|
+
N}}else if("type"===n.Kb){a.i.presentationTimeline.lc("static"==p);a.l.type=p;N=t(a.o.values());for(L=N.next();!L.done;L=N.next())L.value.sb="dynamic"==p;"static"==p&&(a.F=-1)}else"publishTime"===n.Kb?a.l.zd=oh(p)||0:null===n.Kb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)yh(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);Gs(P,
|
|
947
|
+
ht,"SegmentTimeline").children=[];Ou(a,M);a.o.delete(M)}}else if("SegmentTemplate"===n.name){L=xh(l.attributes.sel||"");N=L[L.length-1];if(N.Kb){L=Pu(a,L);M=gh(l)||"";P=t(L);for(var R=P.next();!R.done;R=P.next())R=a.o.get(R.value),zh(R.I.Qb,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=xh(l.attributes.sel||"");N=Pu(a,N);L=t(N);for(M=L.next();!M.done;M=L.next())M=a.o.get(M.value),M=Gs(M,ht,"SegmentTimeline"),
|
|
948
|
+
P=eh(M,"S"),yh(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,Ou(a,D);K=t(f);for(F=K.next();!F.done;F=K.next())J=F.value,e.push.apply(e,x(xu(a,{sb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,ta:null,ha:null,qa:null,I:null,bandwidth:0,nf:!1,Ga:a.l.Ga,profiles:a.l.profiles,Cb:a.l.Cb},a.l.Ca,J).periods));return e.length?E(G,Ku(a,e,!0),2):G.u(2)}"static"==a.l.type&&(I=a.l.Cb,a.i.presentationTimeline.Wa(I||
|
|
949
|
+
Infinity));H(G)})}function Pu(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.o.values()),e=a.next();!e.done;e=a.next())e=e.value,e.ta.id===c&&e.qa.id===d&&e.I.id&&b.push(c+","+e.I.id);return b}
|
|
950
|
+
function Ou(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ma(a.i.presentationTimeline.jb());try{var e=gt(c,function(f,g,h,k){return Qu(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.N,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.Yb(),3)}f.segmentIndex=g.h;H(g)})}}catch(f){if(b=c.I.contentType,b!=Td&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
951
|
+
function Lu(a){var b=ih(a,"ServiceDescription");if(!b)return null;a=ih(b,"Latency");b=ih(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)));
|
|
952
|
+
return c}function Mu(a){a=eh(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}
|
|
953
|
+
function xu(a,b,c,d){var e=b.Cb;e||(e=lh(d,"mediaPresentationDuration",ph),a.l.Cb=e);var f=0;a.i&&a.i.presentationTimeline&&a.L&&(f=a.i.presentationTimeline.Mb());var g=[],h=f;d=eh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=lh(l,"start",ph,h),p=l.attributes.id,q=lh(l,"duration",ph),u=null;if(m){var v=lh(m,"start",ph);null!=v&&(u=v-n)}else null!=e&&(u=e-n+f);null==u&&(u=q);if(!(null!==a.H&&null!==p&&null!==n&&n<a.H)||a.$.includes(p)||k+1==d.length){null!==n&&(null===a.H||n>a.H)&&
|
|
954
|
+
(a.H=n);h=Ru(a,b,c,{start:n,duration:u,node:l,ud:null==u||!m});g.push(h);b.ta.id&&u&&(a.N[b.ta.id]=u);if(null==u){h=null;break}h=n+u}}a.$=g.map(function(w){return w.id});return null!=e?{periods:g,duration:e+f,og:!1}:{periods:g,duration:h,og:!0}}
|
|
955
|
+
function Ru(a,b,c,d){b.ta=Su(a,d.node,null,c);b.ha=d;b.ta.Ga=b.Ga;b.ta.id||(b.ta.id="__shaka_period_"+d.start);var e=eh(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Tu(a,d.start,d.duration,f.value,c);c=eh(d.node,"AdaptationSet").map(function(m){return Uu(a,b,m)}).filter(ze);if(b.sb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ci);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);
|
|
956
|
+
}d=c.filter(function(m){return!m.Zf});c=c.filter(function(m){return m.Zf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Zf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Pd:h.Pd},l=k.next())h.Pd=l.value,h.Pd.trickModeVideo=e.streams.find(function(m){return function(n){return de(m.Pd.codecs)==de(n.codecs)}}(h))}}}c=Vu(a.g.disableAudio,d,"audio");e=Vu(a.g.disableVideo,d,"video");f=Vu(a.g.disableText,
|
|
957
|
+
d,Td);d=Vu(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 Vu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
958
|
+
function Uu(a,b,c){function d(G){switch(G){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.qa=Su(a,c,b.ta,null);var f=!1,g=eh(c,"Role"),h=g.map(function(G){return G.attributes.value}).filter(ze),k=void 0,l=b.qa.contentType==Td;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==
|
|
957
959
|
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=eh(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"!=
|
|
958
960
|
w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=eh(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=eh(c,"Accessibility");var z=new Map,B;n=t(n);for(v=
|
|
959
961
|
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,Ce(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,
|
|
960
962
|
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,Ce(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=eh(c,"ContentProtection");var F=ss(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=Ce(b.qa.language||"und"),I=c.attributes.label;(m=
|
|
961
|
-
eh(c,"Label"))&&m.length&&(m=fh(m[0]))&&(I=m);m=eh(c,"Representation");c=m.map(function(G){if(G=
|
|
962
|
-
b.qa.contentType;l=b.qa.id||"__fake__"+a.
|
|
963
|
-
function
|
|
964
|
-
16!=I.data.byteLength)throw new T(2,4,4049);G={name:"AES-CBC"};N=w;return E(L,window.crypto.subtle.importKey("raw",I.data,G,!0,["decrypt"]),3)}N.cryptoKey=L.h;w.fetchKey=void 0;H(L)})}}}b.I.aesKey=w;A=function(I,G,N,L){return
|
|
963
|
+
eh(c,"Label"))&&m.length&&(m=fh(m[0]))&&(I=m);m=eh(c,"Representation");c=m.map(function(G){if(G=Wu(a,b,F,k,J,I,f,h,z,G,B,A))G.hdr=G.hdr||p,G.colorGamut=G.colorGamut||q,G.fastSwitching=u;return G}).filter(function(G){return!!G});if(0==c.length){g="image"==b.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=Xu(c[0].mimeType,c[0].codecs),l=t(c),v=l.next();!v.done;v=l.next())v.value.type=
|
|
964
|
+
b.qa.contentType;l=b.qa.id||"__fake__"+a.W++;n=t(c);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(F.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(G){return G.attributes.id}).filter(ze);return{id:l,contentType:b.qa.contentType,language:J,Uj:f,streams:c,drmInfos:F.drmInfos,Zf:g,Ci:m}}
|
|
965
|
+
function Wu(a,b,c,d,e,f,g,h,k,l,m,n){b.I=Su(a,l,b.qa,null);var p=b.I.id;a.J=Math.min(a.J,b.I.Ga);if(!Yu(b.I))return null;var q=b.ha.start;b.bandwidth=lh(l,"bandwidth",sh)||0;var u=b.I.contentType,v=u==Td||"application"==u;u="image"==u;try{var w=void 0;if(c.Me){var A=b.I.Ca,z=Nd(A(),[c.Me.ii]),B=qg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Me.iv,firstMediaSequenceNumber:0,fetchKey:function(){var I,G,N;return O(function(L){if(1==L.g)return E(L,tu(a,B,6),2);if(3!=L.g){I=L.h;if(!I.data||
|
|
966
|
+
16!=I.data.byteLength)throw new T(2,4,4049);G={name:"AES-CBC"};N=w;return E(L,window.crypto.subtle.importKey("raw",I.data,G,!0,["decrypt"]),3)}N.cryptoKey=L.h;w.fetchKey=void 0;H(L)})}}}b.I.aesKey=w;A=function(I,G,N,L){return Qu(a,I,G,N,L)};if(b.I.Jc)var y=Ws(b,A,w);else if(b.I.Gb)y=bt(b,a.s,w);else if(b.I.Qb)y=gt(b,A,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.N,w,n,!1);else{var C=b.ha.duration||0,D=b.I.Ca;y={Yb:function(){var I=Qk(q,C,D());I.wc(function(G){G.mimeType=b.I.mimeType;G.codecs=b.I.codecs});
|
|
965
967
|
return Promise.resolve(I)}}}}catch(I){if((v||u)&&4002==I.code)return null;throw I;}n=eh(l,"ContentProtection");n=ws(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;eh(l,"SupplementalProperty").some(function(I){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==I.attributes.schemeIdUri&&"JOC"==I.attributes.value})&&(A=!0);z=!1;v&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(u&&((l=eh(l,"EssentialProperty").find(function(I){return["http://dashif.org/thumbnail_tile",
|
|
966
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(I.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var F;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"))&&(F="PQ");v=b.I.id?b.ta.id+","+b.I.id:"";a.B.length&&p&&a.o.set(b.ta.id+","+p,
|
|
968
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(I.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var F;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"))&&(F="PQ");v=b.I.id?b.ta.id+","+b.I.id:"";a.B.length&&p&&a.o.set(b.ta.id+","+p,Zu(b));var J=v&&a.s[v]?a.s[v]:{id:a.W++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){J.segmentIndex&&
|
|
967
969
|
(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,
|
|
968
|
-
closedCaptions:k,hdr:F,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Xd(b.I.mimeType,b.I.codecs)])};J.createSegmentIndex=function(){var I;return O(function(G){if(1==G.g){if(J.segmentIndex)return G.u(0);I=J;return E(G,y.
|
|
969
|
-
function
|
|
970
|
-
b[d]={start:e.start,duration:e.duration,node:null,ud:e.ud}):b[d]=a[d];return b}function
|
|
971
|
-
function
|
|
972
|
-
function
|
|
973
|
-
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=tt(m).join(",");n=lh(b,"frameRate",wh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,q
|
|
974
|
-
uh)||0:0;z=c.
|
|
975
|
-
function
|
|
976
|
-
function
|
|
977
|
-
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function
|
|
978
|
-
function
|
|
979
|
-
function
|
|
980
|
-
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,
|
|
970
|
+
closedCaptions:k,hdr:F,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Xd(b.I.mimeType,b.I.codecs)])};J.createSegmentIndex=function(){var I;return O(function(G){if(1==G.g){if(J.segmentIndex)return G.u(0);I=J;return E(G,y.Yb(),3)}I.segmentIndex=G.h;H(G)})};v&&b.sb&&!a.s[v]&&(a.s[v]=J);return J}
|
|
971
|
+
function Zu(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,Qb:e.Qb,Ca:e.Ca,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,Ga:e.Ga,Bc:e.Bc}}else"periodInfo"==d?(e=a[d],
|
|
972
|
+
b[d]={start:e.start,duration:e.duration,node:null,ud:e.ud}):b[d]=a[d];return b}function pu(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,ta(d,2),E(d,qu(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=za(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();ru(a,b);H(d)}})}
|
|
973
|
+
function ru(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.T)))}}
|
|
974
|
+
function Su(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ec:null,audioSamplingRate:null,Ga:0,Mf:0};d=d||c.Ca;var e=b.attributes.id,f=eh(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=gh(m);l&&m&&(At(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(gh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=mh(b,
|
|
975
|
+
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=tt(m).join(",");n=lh(b,"frameRate",wh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,q=$u(eh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=eh(b,"AudioChannelConfiguration");u=av(u)||c.Ec;var v=lh(b,"audioSamplingRate",th)||c.audioSamplingRate;k||(k=Xu(l,m));var w=ih(b,"SegmentBase"),A=ih(b,"SegmentTemplate"),z=w?lh(w,"availabilityTimeOffset",uh)||0:0,B=A?lh(A,"availabilityTimeOffset",uh)||0:0,y=f&&f.length?lh(f[0],"availabilityTimeOffset",
|
|
976
|
+
uh)||0:0;z=c.Ga+y+z+B;B=null;(y=ih(b,"SegmentSequenceProperties"))&&(y=ih(y,"SAP"))&&(B=lh(y,"cadence",rh));return{Ca:function(){return Nd(d(),f.length?a.h&&h?Bt(a.h,e):g?g:[]:[])},Jc:w||c.Jc,Gb:ih(b,"SegmentList")||c.Gb,Qb:A||c.Qb,width:lh(b,"width",th)||c.width,height:lh(b,"height",th)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:q,id:e,language:b.attributes.lang,Ec:u,audioSamplingRate:v,Ga:z,Bc:null,Mf:B||c.Mf}}
|
|
977
|
+
function $u(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
978
|
+
function av(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
979
|
+
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function Yu(a){var b=a.Jc?1:0;b+=a.Gb?1:0;b+=a.Qb?1:0;if(0==b)return a.contentType==Td||"application"==a.contentType?!0:!1;1!=b&&(a.Jc&&(a.Gb=null),a.Qb=null);return!0}
|
|
980
|
+
function bv(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=Nd(b(),e),g=qg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),kg(a.K,h),E(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=wd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
981
|
+
function Nu(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ta(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.u(8);
|
|
982
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,bv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return E(n,bv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
|
|
981
983
|
3);break;case 5:za(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)}})}
|
|
982
|
-
function
|
|
983
|
-
function
|
|
984
|
-
function
|
|
985
|
-
function
|
|
986
|
-
function
|
|
987
|
-
function
|
|
988
|
-
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=
|
|
989
|
-
g.name&&(g.attributes.push(new
|
|
990
|
-
var
|
|
991
|
-
function
|
|
992
|
-
this.K=new Map;this.wa=new Map;this.la=new Map;this.ib=this.C=!1;this.
|
|
993
|
-
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.
|
|
994
|
-
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!
|
|
995
|
-
h&&
|
|
996
|
-
function
|
|
997
|
-
b.M().includes(m)||b.Kg.push(m);n=
|
|
998
|
-
0,J=
|
|
999
|
-
function
|
|
984
|
+
function Tu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=lh(d,"timescale",th)||1;d=t(eh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=lh(k,"presentationTime",th)||0,m=lh(k,"duration",th)||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:Ah(k),eventNode:k},a.j.onTimelineRegionAdded(k))}}
|
|
985
|
+
function Qu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=wg,g=e?0:1,h=sl(b,c,d,a.g.retryParameters),E(l,tu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Xu(a,b){b=Xd(a,b);return qe(b)?Td:a.split("/")[0]}function tu(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);kg(a.K,b);return b.promise}
|
|
986
|
+
function su(a){var b=a.l.zd;if(!a.l.ne||!b||!a.B.length)return[];var c=Date.now()/1E3,d=a.B.filter(function(e){e=th(e.attributes.ttl);return!e||b+e>c}).map(gh).filter(ze);return d.length?Nd(a.A,d):[]}S("shaka.dash.DashParser",ou);ti["application/dash+xml"]=function(){return new ou};ti["video/vnd.mpeg.dash.mpd"]=function(){return new ou};function cv(){}S("shaka.dependencies",cv);cv.has=function(a){return dv.has(a)};cv.add=function(a,b){if(!ev[a])throw Error(a+" is not supported");a==fv?rb("mux.js","mux.js is no longer used in Shaka Player."):dv.set(a,function(){return b})};var fv="muxjs",ev={Vj:fv,ISOBoxer:"ISOBoxer"};cv.Allowed=ev;var dv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function gv(a,b,c){this.type=a;this.g=b;this.segments=c||null}function hv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}hv.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};
|
|
987
|
+
function iv(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function jv(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=jv(a,b))?a.value:c||null}function kv(a,b){a=jv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function lv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.wb=c}function mv(a,b){this.name=a;this.value=b};function nv(a,b){return a.filter(function(c){return c.name==b})}function ov(a,b){return a.filter(function(c){return kv(c,"TYPE")==b})}function pv(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 qv(a,b,c){c=void 0===c?0:c;return(a=pv(a,b))?Number(a.value):c}function rv(a,b,c){return b?sv(a,[b],c):[]}
|
|
988
|
+
function sv(a,b,c){if(!b.length)return[];b=Nd(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 tv(){this.g=0}
|
|
989
|
+
function uv(a,b){b=wd(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=vv(a,f),--a.g,wv.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=vv(a,g);if(xv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
990
|
+
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=vv(a,k),wv.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 lv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new lv("",d,f)));return new gv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
991
|
+
g.name&&(g.attributes.push(new mv("URI",h)),d=!0)}}return new gv(b,e)}function vv(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 zp(d);var f;(f=Bp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Bp(d,g);)c.push(new mv(f[1],f[2]||f[3])),Ap(d)}return new hv(a,b,c,e)}
|
|
992
|
+
var wv="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(" "),xv="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 yv(){}function zv(a){try{var b=Av(a);return cg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return ag(c)}}
|
|
993
|
+
function Av(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",yv);yv.parse=zv;mg("data",zv);function Bv(){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(Td,new Map);this.N.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.L="";this.ya=new tv;this.J=-1;this.aa=Infinity;this.$=this.rb=!1;this.A=new Tc(function(){Cv(a)});this.ma=Dv;this.o=null;this.Fa=0;this.m=Infinity;this.xa=this.va=this.T=0;this.W=new jg;this.F=new Map;this.G=new Map;this.ba=new Map;this.ga=new Map;
|
|
994
|
+
this.K=new Map;this.wa=new Map;this.la=new Map;this.ib=this.C=!1;this.Ka=new Ua(5);this.j=null;this.ca=!0}r=Bv.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,Ev(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,E(e,Fv(c,d.data,a),3)):e.return(c.o)})};
|
|
995
|
+
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.Ea.clear();this.o=null;this.i.clear();this.H.clear();this.G.clear();this.s.clear();this.ba.clear();this.ga.clear();this.K.clear();this.wa.clear();this.la.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
996
|
+
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!Gv(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(Hv(a,g));return E(m,Promise.all(b),2)}Iv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.pd});d.length&&!h&&(k=Jv,Kv(a,k.hh),l=d.map(function(n){return n.Bb}),a.l.Wa(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
997
|
+
h&&Lv(a);H(m)})};function Mv(a,b){return Gv(a)?a.N.get(b.type):b.ke}
|
|
998
|
+
function Hv(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,F,J,I,G,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.Td&&(0<=b.lb&&h.add("_HLS_msn",String(b.lb)),0<=b.mb&&h.add("_HLS_part",String(b.mb))),b.Ud&&h.add("_HLS_skip","YES"),Ic(h)&&wc(g,h),c.push(g.toString());return E(R,Ev(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=uv(a.ya,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
|
|
999
|
+
b.M().includes(m)||b.Kg.push(m);n=nv(l.g,"EXT-X-DEFINE");p=Nv(a,n,m);q=b.stream;u=Mv(a,b);return E(R,Ov(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=Pv(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=qv(l.g,"EXT-X-MEDIA-SEQUENCE",0),F=(K=pv(l.g,"EXT-X-SKIP"))?Number(Z(K,"SKIPPED-SEGMENTS")):
|
|
1000
|
+
0,J=Qv(D,y),I=J.lb,G=J.mb,b.lb=I+F,b.mb=G,N=u.get(D),q.segmentIndex.Ma(N));L=q.segmentIndex.g[0]||null;b.hc=L.startTime;M=y[y.length-1];b.Bb=M.endTime;if(P=pv(l.g,"EXT-X-ENDLIST"))b.pd=!0;Rv(a,l);H(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
1001
|
+
function Sv(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=Mv(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.Te=k;break}}}}if(!(0>a.J))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,Tv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.Te,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Uv(a,
|
|
1000
1002
|
c,d)}
|
|
1001
|
-
function
|
|
1002
|
-
function
|
|
1003
|
-
function
|
|
1004
|
-
u=
|
|
1005
|
-
|
|
1006
|
-
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){
|
|
1007
|
-
[];Ba=f[0];Ka=t([Ba.video,Ba.audio]);for(Ca=Ka.next();!Ca.done;Ca=Ka.next())(Za=Ca.value)&&!Za.segmentIndex&&
|
|
1008
|
-
function
|
|
1009
|
-
t(
|
|
1010
|
-
case "opus":L.push("opus"),M=!0}switch(N.video){case "avc":G.
|
|
1003
|
+
function Vv(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,!Tv(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(Uv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Vf(b)}}}
|
|
1004
|
+
function Uv(a,b,c){b.hc+=c;b.Bb+=c;a=Mv(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()}
|
|
1005
|
+
function Fv(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,F,J,I,G,N,L,M,P,R,Q,ja,ka,wa,ya,Ba,Ka,Ca,Za;return O(function(xa){switch(xa.g){case 1:d=uv(a.ya,b);e=nv(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.ca=!1,w=nv(d.g,"EXT-X-DEFINE"),A=Nv(a,w,a.L),E(xa,Wv(a,d,k,A),7);Xv(a,e);l=nv(d.g,"EXT-X-MEDIA");m=nv(d.g,"EXT-X-STREAM-INF");n=nv(d.g,"EXT-X-IMAGE-STREAM-INF");p=nv(d.g,"EXT-X-I-FRAME-STREAM-INF");q=nv(d.g,"EXT-X-SESSION-KEY");
|
|
1006
|
+
u=nv(d.g,"EXT-X-SESSION-DATA");v=nv(d.g,"EXT-X-CONTENT-STEERING");Yv(a,u);return E(xa,Zv(a,v),4);case 4:return $v(a,m),aw(a,l),E(xa,bw(a,m,q,l,k,a.s),5);case 5:return f=xa.h,g=cw(a,l),E(xa,dw(a,n,p),6);case 6:h=xa.h;xa.u(3);break;case 7:return z=xa.h,B=z.type,y=z.mimeType,C=z.codecs,D=z.language,K=z.height,F=z.width,J=z.channelCount,I=z.sampleRate,G=z.closedCaptions,N=z.Fd,L=z.colorGamut,E(xa,ew(a,a.B++,A,d,k,C,B,D,!0,"Media Playlist",J,G,null,!1,I,!1,y),8);case 8:M=xa.h,a.i.set(c,M),"video"==B&&
|
|
1007
|
+
fw(M.stream,F,K,null,N,null,L),f.push({id:0,language:Ce(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&&(Gv(a)&&(gw(a,d),P=a.m,a.A.X(P)),R=Array.from(a.i.values()),hw(a,R),Lv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
1008
|
+
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){xa.u(9);break}Q=[];ja=t(a.o.variants);for(ka=ja.next();!ka.done;ka=ja.next())wa=ka.value,wa.audio&&""===wa.audio.codecs&&Q.push(wa.audio.createSegmentIndex()),wa.video&&""===wa.video.codecs&&Q.push(wa.video.createSegmentIndex());return E(xa,Promise.all(Q),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){ya=
|
|
1009
|
+
[];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(xa,Promise.all(ya),0)}xa.u(0)}})}
|
|
1010
|
+
function Wv(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,F;return O(function(J){switch(J.g){case 1:e=rt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return J.return(e);f=b.segments[0];g=rv(c(),f.h,d);h=g[0];k=new sc(h);l=k.Ua.split(".").pop();if(m=iw[l])return J.return(rt(m));n=wg;p=null;q=jw(a,b,f.g,c,d);a.ba.clear();if(!q){J.u(2);break}u=sl(q.M(),q.bc(),q.$b(),a.g.retryParameters);return E(J,kw(a,u,n,{type:0}),3);case 3:v=J.h,p=v.data;case 2:w=0;A=null;if(z=pv(f.g,"EXT-X-BYTERANGE"))B=
|
|
1011
|
+
t(lw(null,z.value)),w=B.next().value,A=B.next().value;y=sl(g,w,A,a.g.retryParameters);return E(J,kw(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 I=C.data;var G=Bb(I);G=(new mj).parse(G);var N=G.kd();G=G.mf();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;
|
|
1012
|
+
case "opus":L.push("opus"),M=!0}switch(N.video){case "avc":G.La?L.push(G.La):L.push("avc1.42E01E");P=!0;break;case "hvc":G.La?L.push(G.La):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(I);I=t(P.j());for(var R=I.next();!R.done;R=I.next())R=R.value,M.set(R,R);P.g()}G={type:N?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:G.height,width:G.width,channelCount:null,sampleRate:null,
|
|
1011
1013
|
closedCaptions:M,Fd:null,colorGamut:null}}else G=null;if(K=G)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(F=st(p,C.data))return J.return(F);return J.return(e)}})}
|
|
1012
|
-
function
|
|
1013
|
-
c.h&&a.l.Sg(c.h);a.l.he()}function
|
|
1014
|
-
function
|
|
1015
|
-
function
|
|
1016
|
-
function
|
|
1017
|
-
function
|
|
1018
|
-
function
|
|
1019
|
-
function
|
|
1020
|
-
function
|
|
1021
|
-
p=Z(g,"CHARACTERISTICS"),q=
|
|
1022
|
-
function
|
|
1023
|
-
function
|
|
1024
|
-
z(m,""):null;Za.u(6);break}return E(Za,
|
|
1025
|
-
|
|
1026
|
-
function
|
|
1027
|
-
"URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return q.includes(w)})});g=
|
|
1028
|
-
n=Z(c,"NAME"),p=
|
|
1029
|
-
function
|
|
1030
|
-
function
|
|
1031
|
-
function
|
|
1032
|
-
q=q?q.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";q=q+" - "+u;h&&k&&!Lc(n,p)||a.
|
|
1033
|
-
function
|
|
1034
|
-
function
|
|
1035
|
-
m=n.next().value;n=n.next().value;(m=c.get(m))&&At(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?
|
|
1036
|
-
function
|
|
1014
|
+
function Lv(a){if(Gv(a)){if(a.ma==mw){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.ye(b)}}else a.l.Wa(nw(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))&&
|
|
1015
|
+
c.h&&a.l.Sg(c.h);a.l.he()}function Xv(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)}}
|
|
1016
|
+
function Nv(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}
|
|
1017
|
+
function $v(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=ow(a,d);if(f){var g=Rd(Td,d);a.G.set(f,g);Ob(d,g)}e&&(f=Rd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Rd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
1018
|
+
function Yv(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",rv([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)}}
|
|
1019
|
+
function Zv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new wt(a.h);a.j.configure(a.g);a.j.i=[a.L];a.j.setManifestType("HLS");a.j.h=g;c=xt(a.j,h);break}return E(k,c,0)})}
|
|
1020
|
+
function cw(a,b){var c=ov(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return pw(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=kv(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=qw(Td,d)||rw(Td),sw(f.stream)}}return b.filter(function(g){return g})}
|
|
1021
|
+
function sw(a){a.fullMimeTypes=new Set([Xd(a.mimeType,a.codecs)])}
|
|
1022
|
+
function dw(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,tw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=za(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=kv(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"),
|
|
1023
|
+
p=Z(g,"CHARACTERISTICS"),q=uw(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}))})}
|
|
1024
|
+
function vw(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=iv(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)pw(a,d[g],c)}
|
|
1025
|
+
function bw(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,F,J,I,G,N,L,M,P,R,Q,ja,ka,wa,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=kv(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";q=null;if("NONE"==n){Za.u(4);break}if(ww(n)){u=rv(e(),kv(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=qg(u,a.g.retryParameters),A=kw(a,w,6),a.K.set(v,A));Za.u(4);break}if("identity"!=p){q=(z=xw[p])?
|
|
1026
|
+
z(m,""):null;Za.u(6);break}return E(Za,yw(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(F=K.next();!F.done;F=K.next())J=F.value,I=iv(J),D[I]?D[I].push(J):D[I]=[J];G=[];for(N in D)L=D[N],M=L[0],P=Z(M,"FRAME-RATE"),R=Number(Z(M,"AVERAGE-BANDWIDTH"))||Number(kv(M,"BANDWIDTH")),Q=Z(M,"RESOLUTION"),ja=t(Q?Q.split("x"):[null,null]),ka=ja.next().value,wa=ja.next().value,
|
|
1027
|
+
ya=Z(M,"VIDEO-RANGE"),(Ba=Z(M,"REQ-VIDEO-LAYOUT"))&&Ba.includes(",")&&(Ka=Ba.split(",").filter(function(xa){return"CH-STEREO"==xa||"CH-MONO"==xa}),Ba=Ka[0]),Ba=Ba||"CH-MONO",Ca=zw(a,L,d),G.push.apply(G,x(Aw(a,Ca.audio,Ca.video,R,ka,wa,P,ya,Ba,g,h)));return Za.return(G.filter(function(xa){return null!=xa}))}})}
|
|
1028
|
+
function zw(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Z(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(kv(v,"GROUP-ID"))}),vw(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var q=b.map(function(v){return kv(v,
|
|
1029
|
+
"URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return q.includes(w)})});g=ow(a,b[0]);n=Rd("video",g);(p=Rd("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(v){var w=Z(v,"URI")||"",A=Z(v,"TYPE");v=kv(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
|
|
1030
|
+
n=Z(c,"NAME"),p=Bw(c),Cw(c),m=Z(c,"CHARACTERISTICS"),u=Dw(c));a=Ew(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
1031
|
+
function ow(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 tt(a)}function Bw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1032
|
+
function Dw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function Cw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1033
|
+
function Aw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())fw(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;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=q?q.stream.drmInfos:null;
|
|
1034
|
+
q=q?q.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";q=q+" - "+u;h&&k&&!Lc(n,p)||a.Ea.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.Ea.add(q))}return e}
|
|
1035
|
+
function aw(a,b){b=ov(b,"CLOSED-CAPTIONS");a.ca=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=Ce(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=kv(d,"GROUP-ID");d=kv(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
|
|
1036
|
+
function pw(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=kv(k,"URI");k=kv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=kv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Td);if(k==Td)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
1037
|
+
m=n.next().value;n=n.next().value;(m=c.get(m))&&At(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?Bw(h):null;var p="audio"==k?Cw(h):!1,q=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?Dw(h):null;d=uw(a,l,d,b,k,c,m,f,n,null,q,u,h,p);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.i.set(e,d);return d}
|
|
1038
|
+
function tw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=kv(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=uw(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])*
|
|
1037
1039
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1038
|
-
function
|
|
1039
|
-
function
|
|
1040
|
-
break}if(P=0<I.segments.length)R=I.segments[0],
|
|
1041
|
-
z.lb=ka.lb;z.mb=ka.mb;z.wf=!0;w.segmentIndex=wa.segmentIndex;w.encrypted=wa.encrypted;w.drmInfos=wa.drmInfos;w.keyIds=wa.keyIds;w.mimeType=wa.mimeType;w.bandwidth=w.bandwidth||wa.bandwidth;w.codecs=w.codecs||wa.codecs;w.closedCaptions=w.closedCaptions||wa.closedCaptions;
|
|
1042
|
-
|
|
1043
|
-
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
|
|
1044
|
-
function
|
|
1045
|
-
function
|
|
1046
|
-
function
|
|
1047
|
-
D=C.drmInfos;K=C.keyIds;F=C.encrypted;J=C.lh;if(F&&!D.length&&!J)throw new T(2,4,4026);I=
|
|
1048
|
-
Bb:L,Ud:R,Td:Q,pd:!1,Te:-1,lb:wa,mb:
|
|
1049
|
-
function
|
|
1040
|
+
function Ew(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=kv(q,"URI");q=Z(q,"PATHWAY-ID");a.j&&q&&At(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.ca=!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=Qd(d,c);d=uw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
1041
|
+
function uw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(C){var D,K,F,J,I,G,N,L,M,P,R,Q,ja,ka,wa,ya,Ba,Ka,Ca,Za,xa,Va;return O(function(pb){switch(pb.g){case 1:return D=Vd,K=z.M(),E(pb,Ev(a,z.M(),!0),2);case 2:F=pb.h;if(C.aborted)return pb.return();J=F.uri;J==F.originalUri||K.includes(J)||A.push(J);I=uv(a.ya,F.data);if(1!=I.type)throw new T(2,4,4017);G=nv(I.g,"EXT-X-DEFINE");N=Nv(a,G,J);L=void 0;M=!1;if(!(!a.$&&a.g.hls.disableCodecGuessing||a.ca&&e==D.da&&!a.g.hls.disableClosedCaptionsDetection)){pb.u(3);
|
|
1042
|
+
break}if(P=0<I.segments.length)R=I.segments[0],pv(R.g,"EXT-X-GAP")&&(P=!1);if(!P){pb.u(3);break}a.ca=!1;return E(pb,Wv(a,I,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=Gv(a),E(pb,ew(a,0,N,I,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();wa=ka.stream;Gv(a)&&!ja&&gw(a,I);z.hc=ka.hc;z.Bb=ka.Bb;z.Ud=ka.Ud;z.Td=ka.Td;z.pd=ka.pd;z.ke=ka.ke;
|
|
1043
|
+
z.lb=ka.lb;z.mb=ka.mb;z.wf=!0;w.segmentIndex=wa.segmentIndex;w.encrypted=wa.encrypted;w.drmInfos=wa.drmInfos;w.keyIds=wa.keyIds;w.mimeType=wa.mimeType;w.bandwidth=w.bandwidth||wa.bandwidth;w.codecs=w.codecs||wa.codecs;w.closedCaptions=w.closedCaptions||wa.closedCaptions;sw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&M&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.da||e==D.V)for(ya=t(a.i.values()),Ba=ya.next();!Ba.done;Ba=ya.next())Ka=Ba.value,Ka.wf||Ka.type!=e||(Ka.stream.mimeType=wa.mimeType,
|
|
1044
|
+
sw(Ka.stream));e==D.pa&&(Ca=wa.segmentIndex.get(0))&&Ca.ea&&(w.mimeType="application/mp4",sw(w));Fw(a)&&(a.rb?hw(a,[z]):(a.rb=!0,Za=Array.from(a.i.values()),xa=Za.filter(function(Pc){return Pc.stream.segmentIndex}),hw(a,xa),Lv(a),Va=a.m,0<Va&&a.A.X(Va)));H(pb)}})}function v(){return a.j&&1<c.length?Bt(a.j,b):A.concat(sv([a.L],c,a.s))}var w=Gw(a,d,e,f,g,h,k,l,m,n,p,q),A=[],z={stream:w,type:e,Kg:A,M:v,hc:0,Bb:0,ke:new Map,Ud:!1,Td:!1,pd:!1,Te:-1,lb:-1,mb:-1,wf:!1},B=null,y=new AbortController;w.createSegmentIndex=
|
|
1045
|
+
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 nw(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}
|
|
1046
|
+
function Iv(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 hw(a,b){if(!Gv(a))for(var c=nw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.vc(0,c);Iv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Sv(a,b):(Vv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Sv(a,b))}
|
|
1047
|
+
function Tv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Fw(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}
|
|
1048
|
+
function ew(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,F,J,I,G,N,L,M,P,R,Q,ja,ka,wa,ya;return O(function(Ba){switch(Ba.g){case 1:var Ka=pv(d.g,"EXT-X-PLAYLIST-TYPE"),Ca=pv(d.g,"EXT-X-ENDLIST");Ca=Ka&&"VOD"==Ka.value||Ca;Ka=Ka&&"EVENT"==Ka.value&&!Ca;Ka=!Ca&&!Ka;Ca?Kv(a,Dv):Ka?Kv(a,mw):Kv(a,Hw);Gv(a)&&Rv(a,d);A=Gv(a)?a.N.get(g):new Map;z=Pv(a,d,A,c,e,g);B=z.segments;y=z.bandwidth;if(w){Ba.u(2);break}return E(Ba,Iw(a,g,f,B),3);case 3:w=Ba.h;case 2:return E(Ba,Ov(a,d,w,e,c),4);case 4:C=Ba.h;
|
|
1049
|
+
D=C.drmInfos;K=C.keyIds;F=C.encrypted;J=C.lh;if(F&&!D.length&&!J)throw new T(2,4,4026);I=Gw(a,f,g,h,k,l,m,n,p,q,u,v);I.encrypted=F;I.drmInfos=D;I.keyIds=K;I.mimeType=w;y&&(I.bandwidth=y);sw(I);Gv(a)&&Rv(a,d);G=B[0].startTime;N=B[B.length-1];L=N.endTime;M=new Ok(B);I.segmentIndex=M;R=(P=pv(d.g,"EXT-X-SERVER-CONTROL"))?null!=jv(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=jv(P,"CAN-BLOCK-RELOAD"):!1;ja=qv(d.g,"EXT-X-MEDIA-SEQUENCE",0);ka=Qv(ja,B);wa=ka.lb;ya=ka.mb;return Ba.return({stream:I,type:g,Kg:[],M:e,hc:G,
|
|
1050
|
+
Bb:L,Ud:R,Td:Q,pd:!1,Te:-1,lb:wa,mb:ya,ke:A,wf:!1})}})}function Qv(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}}
|
|
1051
|
+
function Gw(a,b,c,d,e,f,g,h,k,l,m,n){var p=qw(c,b)||rw(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==Td?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()},
|
|
1050
1052
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Td?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ce(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,
|
|
1051
|
-
fullMimeTypes:new Set};
|
|
1052
|
-
function
|
|
1053
|
-
!0;G=Z(F,"KEYFORMAT")||"identity";N=null;if(
|
|
1054
|
-
function
|
|
1055
|
-
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=
|
|
1053
|
+
fullMimeTypes:new Set};sw(a);return a}
|
|
1054
|
+
function Ov(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,F,J,I,G,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=nv(k.g,"EXT-X-KEY"),m=null,l.length)for(m=jw(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;F=D;J=K;I=kv(F,"METHOD");if("NONE"==I){Q.u(3);break}u=
|
|
1055
|
+
!0;G=Z(F,"KEYFORMAT")||"identity";N=null;if(ww(I)){v=!0;Q.u(3);break}if("identity"!=G){N=(L=xw[G])?L(F,c):null;Q.u(6);break}return E(Q,yw(a,F,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,lh:v})}})}
|
|
1056
|
+
function Jw(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=Kd(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=qv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ga.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(kv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1057
|
+
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=rv(d(),kv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=qg(l,a.g.retryParameters),p=kw(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;
|
|
1056
1058
|
H(w)})};a.ga.set(c,k)}return a.ga.get(c)}
|
|
1057
|
-
function
|
|
1058
|
-
|
|
1059
|
-
function
|
|
1060
|
-
function
|
|
1061
|
-
function
|
|
1062
|
-
if(!a.C)return null}var A=[];v=!1;var z=null,B=!1,y=!1;if(a.C&&d.wb.length){n=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=u,D={},K=0;K<d.wb.length;D={Wc:D.Wc,Md:D.Md},K++){var F=d.wb[K],J=0==K?c:A[A.length-1],I=0==K?e:J.endTime,G=Number(Z(F,"DURATION"))||a.T;if(G){var N=I+G,L=0,M=null;"EXT-X-PRELOAD-HINT"==F.name?(L=(L=Z(F,"BYTERANGE-START"))?Number(L):0,(J=Z(F,"BYTERANGE-LENGTH"))?M=L+Number(J)-1:L&&(M=Number.MAX_SAFE_INTEGER)):(L=Z(F,"BYTERANGE"),M=t(
|
|
1063
|
-
L=M.next().value,M=M.next().value);D.Md=Z(F,"URI");if(D.Md){J=Bi;"YES"==Z(F,"GAP")&&(J=2,B=!0);D.Wc=null;var P=function(Q){return function(){null==Q.Wc&&(Q.Wc=
|
|
1064
|
-
v&&(B||0!=A[0].Da?(v=!1,z=null):A=[]);(m=
|
|
1065
|
-
function
|
|
1066
|
-
function
|
|
1067
|
-
h=
|
|
1059
|
+
function Rv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=pv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=pv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=pv(b.g,"EXT-X-PART-INF"))a.T=Number(kv(e,"PART-TARGET"));b=pv(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.xa=b?Number(kv(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1060
|
+
jv(b,"HOLD-BACK"):null,a.va=c?Number(c.value):0);a.Fa=Math.max(d,a.Fa)}function gw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.xa)b=a.xa;else if(a.va)b=a.va;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Fa*c}a.l.Tg(0);a.l.Qf(b);a.l.lc(!1)}
|
|
1061
|
+
function jw(a,b,c,d,e){var f=pv(c,"EXT-X-MAP");if(!f)return null;var g=kv(f,"URI"),h=rv(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ba.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?ww(kv(m,"METHOD"))&&m.id<f.id&&(k=Jw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Kw(h,f,l,k);a.ba.set(g,b)}return a.ba.get(g)}
|
|
1062
|
+
function Kw(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 yi(function(){return a},e,f,null,null,null,d)}
|
|
1063
|
+
function Lw(a,b,c,d,e,f,g,h,k){var l=d.g,m=pv(l,"EXTINF"),n=0,p=0,q=null;d.wb.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=pv(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=oh(v.value))}var w=Bi;pv(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.wb.length)throw new T(2,4,4024,"EXTINF");
|
|
1064
|
+
if(!a.C)return null}var A=[];v=!1;var z=null,B=!1,y=!1;if(a.C&&d.wb.length){n=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=u,D={},K=0;K<d.wb.length;D={Wc:D.Wc,Md:D.Md},K++){var F=d.wb[K],J=0==K?c:A[A.length-1],I=0==K?e:J.endTime,G=Number(Z(F,"DURATION"))||a.T;if(G){var N=I+G,L=0,M=null;"EXT-X-PRELOAD-HINT"==F.name?(L=(L=Z(F,"BYTERANGE-START"))?Number(L):0,(J=Z(F,"BYTERANGE-LENGTH"))?M=L+Number(J)-1:L&&(M=Number.MAX_SAFE_INTEGER)):(L=Z(F,"BYTERANGE"),M=t(lw(J,L)),
|
|
1065
|
+
L=M.next().value,M=M.next().value);D.Md=Z(F,"URI");if(D.Md){J=Bi;"YES"==Z(F,"GAP")&&(J=2,B=!0);D.Wc=null;var P=function(Q){return function(){null==Q.Wc&&(Q.Wc=rv(h(),Q.Md,f));return Q.Wc}}(D);n&&0<=L&&null!=M&&(z=P,v=!0);I=new Ai(I,N,P,L,M,b,0,0,Infinity,[],"",null,C,J,k);"EXT-X-PRELOAD-HINT"==F.name&&(I.xf(),y=!0);"YES"!=Z(F,"INDEPENDENT")&&0<K&&I.je();A.push(I);C&&(C+=G)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(A.length)n=A[A.length-1].endTime;else return null;
|
|
1066
|
+
v&&(B||0!=A[0].Da?(v=!1,z=null):A=[]);(m=pv(l,"EXT-X-BYTERANGE"))?(q=t(lw(c,m.value)),p=q.next().value,q=q.next().value):A.length&&(p=A[0].Da,q=A[A.length-1].na);c="";m=null;"image"==g&&(c="1x1",g=pv(l,"EXT-X-TILES"))&&(c=kv(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var R=null;b=new Ai(e,n,function(){if(z)return z();null==R&&(R=rv(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.Cg(),y&&b.xf());return b}
|
|
1067
|
+
function lw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.na+1,d=c+b-1);return[c,d]}
|
|
1068
|
+
function Pv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=qv(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=qv(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=pv(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,q=0;Gv(a)&&c.has(p)&&(q=c.get(p));0===q&&a.ma==mw&&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;pv(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&&(ww(kv(y,"METHOD"))?
|
|
1069
|
+
h=Jw(a,y,b,e,d):h=void 0);c.set(p,z);B=jw(a,b,A.g,e,d);!a.C&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());if(z=Lw(a,B,v,A,z,d,f,e,h))(v=qv(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,Tv(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)/
|
|
1068
1070
|
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=
|
|
1069
|
-
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&&!
|
|
1070
|
-
function
|
|
1071
|
-
function
|
|
1072
|
-
1001!=w.code){z.u(3);break}u.method="GET";return E(z,
|
|
1073
|
-
function
|
|
1074
|
-
function
|
|
1075
|
-
function
|
|
1076
|
-
3);case 3:q=C.h,l=Ld(q.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.la.has(e)){v=a.la.get(e);C.u(5);break}w=sl(e.M(),e.
|
|
1077
|
-
var
|
|
1078
|
-
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},
|
|
1079
|
-
|
|
1080
|
-
Bb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xg(a,b,new Set,0);return Od("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},
|
|
1081
|
-
function
|
|
1082
|
-
function
|
|
1083
|
-
2)),[0,0]));h=
|
|
1084
|
-
case "audio":g=
|
|
1085
|
-
255]));e=
|
|
1086
|
-
a.byteLength);b.set(
|
|
1087
|
-
function
|
|
1088
|
-
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(
|
|
1089
|
-
a.encrypted&&(g=
|
|
1090
|
-
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=
|
|
1091
|
-
a.ja);else{c=
|
|
1092
|
-
a=
|
|
1093
|
-
function
|
|
1094
|
-
0,0,0,0,0,1,8]);f=
|
|
1095
|
-
function
|
|
1096
|
-
0;var p=Math.floor(m%(
|
|
1097
|
-
g,k);e.call(d,b,[f,
|
|
1098
|
-
function
|
|
1099
|
-
var
|
|
1100
|
-
0,0,0,0,0,0,0]),
|
|
1101
|
-
function
|
|
1102
|
-
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,
|
|
1103
|
-
function
|
|
1104
|
-
l);n(m);m=Ad(m.outerHTML)}var p=Yg(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=lh(p,"IsLive",vh,!1))throw new T(2,4,4047);a.i.
|
|
1105
|
-
"Duration",th,Infinity);l||a.i.
|
|
1106
|
-
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Ld(z);break a}z=null}else z=null;B=Hd(fh(v));w=Kd(w.replace(/-/g,""));w=[{initData:Xg(B,w,new Set,0),initDataType:"cenc",keyId:z}];w=Od(A,"cenc",w);z&&w.keyIds.add(z);if(A=
|
|
1107
|
-
lh(K,"d",th);K=lh(K,"r",rh);if(!I)break;J=null!=J?J:C;K=K||0;if(0>K)if(F){F=lh(F,"t",th);if(null==F)break;else if(J>=F)break;K=Math.ceil((F-J)/I)-1}else{if(Infinity==z)break;else if(J/w>=z)break;K=Math.ceil((z*w-J)/I)-1}for(F=0;F<=K;++F)C=J+I,y.push({start:J/w,end:C/w,bg:J}),J=C}w=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=
|
|
1071
|
+
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&&!Tv(a,f))for(a=t(u),d=a.next();!d.done;d=a.next())d.value.Vf(c);return{segments:u,bandwidth:b}}function qw(a,b){if(a==Td){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"}
|
|
1072
|
+
function rw(a){return a==Td?"text/vtt":Mw[a].mp4}
|
|
1073
|
+
function Iw(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=wg;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(rw(b));h=g.M();k=new sc(h[0]);l=k.Ua.split(".").pop();m=Mw[b];if((n=m[l])||(n=iw[l])||(n=qw(b,c)))return z.return(n);q=1;u=qg(h,a.g.retryParameters);ta(z,2);u.method="HEAD";return E(z,kw(a,u,e,{type:q}),4);case 4:v=z.h;p=v.headers["content-type"];va(z,3);break;case 2:w=za(z);if(!w||1002!=w.code&&
|
|
1074
|
+
1001!=w.code){z.u(3);break}u.method="GET";return E(z,kw(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(rw(b))}})}function fw(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 Ev(a,b,c){return kw(a,qg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1075
|
+
function Cv(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();Gv(a)&&(d=(c-b)/1E3,a.Ka.sample(1,d),e=a.m,f=Math.max(0,e-Wa(a.Ka)),a.A.X(f));va(h,3);break;case 2:g=za(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();H(h)}})}
|
|
1076
|
+
function Gv(a){return a.ma!=Dv}function Kv(a,b){a.ma=b;a.l&&a.l.lc(!Gv(a));Gv(a)||a.A.stop()}function kw(a,b,c,d){if(!a.W)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);kg(a.W,b);return b.promise}function ww(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1077
|
+
function yw(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(qd())throw new T(2,4,4041);g=kv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return C.return(null);k=rv(d(),kv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ld(Hd(k[0].split("data:text/plain;base64,").pop()));C.u(2);break}m=k.sort().join("");a.wa.has(m)||(n=qg(k,a.g.retryParameters),p=kw(a,n,6),a.wa.set(m,p));return E(C,a.wa.get(m),
|
|
1078
|
+
3);case 3:q=C.h,l=Ld(q.data);case 2:u="00000000000000000000000000000000";if(!e){C.u(4);break}if(a.la.has(e)){v=a.la.get(e);C.u(5);break}w=sl(e.M(),e.bc(),e.$b(),a.g.retryParameters);A=wg;return E(C,kw(a,w,A,{type:0}),6);case 6:z=C.h,v=vt(z.data),a.la.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(Pd(B,y))}})}S("shaka.hls.HlsParser",Bv);
|
|
1079
|
+
var iw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Mw={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",
|
|
1080
|
+
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"}},xw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(qd())throw new T(2,4,4041);a=kv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Od("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=
|
|
1081
|
+
kv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=kv(a,"URI");b=Av(b.split("?")[0]);b=Bb(b.data);c=Od("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=kv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=kv(a,"URI");a=Av(a.split("?")[0]);a=
|
|
1082
|
+
Bb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xg(a,b,new Set,0);return Od("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},Dv="VOD",Hw="EVENT",mw="LIVE",Jv={hh:Dv,fj:Hw,nj:mw};ti["application/x-mpegurl"]=function(){return new Bv};ti["application/vnd.apple.mpegurl"]=function(){return new Bv};function Nw(a){var b=0,c=Fb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ow(a){if(a=Pw(a))a:{a=t(hh(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=ih(b.value,"LA_URL")){a=fh(b);break a}a=""}else a="";return a}
|
|
1083
|
+
function Pw(a){a=Hd(fh(a));a=Nw(a).filter(function(b){return b.type===Qw})[0];if(!a)return null;a=xd(a.value,!0);return(a=Zg(a,"WRMHEADER"))?a:null}var Qw=1,Rw=(new Map).set("com.microsoft.playready",Ow).set("com.microsoft.playready.recommendation",Ow).set("com.microsoft.playready.software",Ow).set("com.microsoft.playready.hardware",Ow);function Sw(a){if(!Tw){Tw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Uw=Vw("ftyp",b,d,b,c);b=Vw("dref",Ww);Xw=Vw("dinf",b)}this.g=a}
|
|
1084
|
+
function Yw(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Vw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Zw+1));m=Math.floor(m%(Zw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x($w(h,4)),[0,0,0,0],x($w(n,4)),x($w(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x($w(k,2)),[0,0],x($w(l,
|
|
1085
|
+
2)),[0,0]));h=Vw("tkhd",h);k=Vw;n=g.duration*g.timescale;l=Math.floor(n/(Zw+1));n=Math.floor(n%(Zw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x($w(g.timescale,4)),x($w(l,4)),x($w(n,4)),x($w(m,2)),[0,0]));l=Vw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=ax;break;case "audio":m=bx}n=Vw("hdlr",m);a:{switch(g.type){case "video":g=Vw("minf",Vw("vmhd",cx),Xw,dx(g));break a;
|
|
1086
|
+
case "audio":g=Vw("minf",Vw("smhd",ex),Xw,dx(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Md.apply(Ed,x(b));f=a.g[0];c=Vw;d=f.duration*f.timescale;e=Math.floor(d/(Zw+1));d=Math.floor(d%(Zw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x($w(f.timescale,4)),x($w(e,4)),x($w(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
1087
|
+
255]));e=Vw("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x($w(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Vw("trex",k),h.call(g,k);a=Md.apply(Ed,x(d));a=Vw("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Md.apply(Ed,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Uw.byteLength+
|
|
1088
|
+
a.byteLength);b.set(Uw);b.set(a,Uw.byteLength);return b}
|
|
1089
|
+
function dx(a){var b=Vw,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.ua.byteLength)var e=Vw("avcC",a.ua);else{e=Vw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Ya.length;n++){var p=fx(a.Ya[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1090
|
+
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x($w(c,2)),x($w(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=gx(a);g=new Uint8Array([]);
|
|
1091
|
+
a.encrypted&&(g=hx(a),d="encv");c=Vw(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.ua.byteLength&&(c=Vw("hvcC",a.ua)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x($w(d,2)),x($w(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=gx(a),g=new Uint8Array([]),a.encrypted&&(g=hx(a),e="encv"),c=Vw(e,d,
|
|
1092
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Vw(".mp3",ix(a));else if(a.codecs.includes("ac-3"))c=Vw("dac3",a.ja),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=hx(a),d="enca"),a=Vw(d,ix(a),c,e);else if(a.codecs.includes("ec-3"))c=Vw("dec3",a.ja),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=hx(a),d="enca"),a=Vw(d,ix(a),c,e);else if(a.codecs.includes("opus"))c=Vw("dOps",a.ja),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=hx(a),d="enca"),a=Vw(d,ix(a),c,e);else{if(0<a.ja.byteLength)c=Vw("esds",
|
|
1093
|
+
a.ja);else{c=Vw;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Qd("audio",a.codecs.split(","));l={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};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x($w(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=hx(a),d="enca");
|
|
1094
|
+
a=Vw(d,ix(a),c,e)}c=a}a=Vw("stsd",jx,c);return b("stbl",a,Vw("stts",kx),Vw("stsc",lx),Vw("stsz",mx),Vw("stco",nx))}function gx(a){if(!a.Aa&&!a.Ba)return new Uint8Array([]);var b=a.Ba;a=new Uint8Array([].concat(x($w(a.Aa,4)),x($w(b,4))));return Vw("pasp",a)}function ix(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x($w(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1095
|
+
function hx(a){var b=Vw;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($w(d,4))));c=Vw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Vw("schm",d);e=Vw;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=fx(h.value)}a=new Uint8Array([0,
|
|
1096
|
+
0,0,0,0,0,1,8]);f=Vw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1097
|
+
function ox(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=Vw;var g=new Uint8Array([0,0,0,0].concat(x($w(c.data?c.data.pb:0,4))));g=Vw("mfhd",g);var h;var k=c.data?c.data.Va:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Qa<<4|m.Sa<<2|m.Ra}k=Vw("sdtp",l);var n=k.length+92;l=Vw;h=new Uint8Array([0,0,0,58].concat(x($w(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Vw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1098
|
+
0;var p=Math.floor(m%(Zw+1));m=new Uint8Array([1,0,0,0].concat(x($w(Math.floor(m/(Zw+1)),4)),x($w(p,4))));m=Vw("tfdt",m);var q=n;n=c.data?c.data.Va:[];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($w(p,4)),x($w(q,4))),0);for(q=0;q<p;q++){var w=n[q];u=$w(w.duration,4);var A=$w(w.size,4),z=w.flags;w=$w(w.$a,4);v.set([].concat(x(u),x(A),[z.cb<<2|z.Qa,z.Sa<<6|z.Ra<<4|z.eb,z.Pa&61440,z.Pa&15],x(w)),12+16*q)}n=Vw("trun",v);k=l("traf",h,m,n,k);f=f("moof",
|
|
1099
|
+
g,k);e.call(d,b,[f,px(c)])}return Md.apply(Ed,x(b))}function px(a){a=(a.data?a.data.Va:[]).map(function(b){return b.data});a=Md.apply(Ed,x(a));return Vw("mdat",a)}function $w(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function fx(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}
|
|
1100
|
+
function Vw(a){var b=La.apply(1,arguments),c=qx[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],qx[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}
|
|
1101
|
+
var Tw=!1,Zw=Math.pow(2,32)-1,qx={},ax=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]),bx=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]),kx=new Uint8Array([0,0,0,0,0,0,0,0]),lx=new Uint8Array([0,0,0,0,0,0,0,0]),nx=new Uint8Array([0,0,0,0,0,0,0,0]),mx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),cx=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ex=new Uint8Array([0,
|
|
1102
|
+
0,0,0,0,0,0,0]),jx=new Uint8Array([0,0,0,0,0,0,0,1]),Uw=new Uint8Array([]),Ww=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Xw=new Uint8Array([]);function rx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Ua(5);this.o=new Tc(function(){sx(a)});this.A=new jg;this.m=new Map}r=rx.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,tx(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
|
|
1103
|
+
function sx(a){var b;O(function(c){switch(c.g){case 1:return ta(c,2),E(c,tx(a),4);case 4:va(c,3);break;case 2:b=za(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
|
|
1104
|
+
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,tx(a),4);if(2!=c.g)return va(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
|
|
1105
|
+
function tx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=qg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),kg(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=nu(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
|
|
1106
|
+
l);n(m);m=Ad(m.outerHTML)}var p=Yg(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=lh(p,"IsLive",vh,!1))throw new T(2,4,4047);a.i.lc(!l);n=lh(p,"TimeScale",th,1E7);m=lh(p,"DVRWindowLength",th);l&&(0===m||isNaN(m))&&(m=Infinity);var q=lh(p,"CanSeek",vh,!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.ye(q);m=lh(p,
|
|
1107
|
+
"Duration",th,Infinity);l||a.i.Wa(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};q=eh(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(eh(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=Pw(v);if(z)a:{z=t(hh(z,"DATA"));for(var B=z.next();!B.done;B=z.next())if(B=ih(B.value,"KID")){z=Hd(fh(B));z=new Uint8Array([z[3],z[2],z[1],z[0],z[5],
|
|
1108
|
+
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Ld(z);break a}z=null}else z=null;B=Hd(fh(v));w=Kd(w.replace(/-/g,""));w=[{initData:Xg(B,w,new Set,0),initDataType:"cenc",keyId:z}];w=Od(A,"cenc",w);z&&w.keyIds.add(z);if(A=Rw.get(A))w.licenseServerUri=A(v);q.push(w)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=eh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=eh(v,"QualityLevel");w=l.timescale;z=l.duration;B=eh(v,"c");for(var y=[],C=0,D=0;D<B.length;++D){var K=B[D],F=B[D+1],J=lh(K,"t",th),I=
|
|
1109
|
+
lh(K,"d",th);K=lh(K,"r",rh);if(!I)break;J=null!=J?J:C;K=K||0;if(0>K)if(F){F=lh(F,"t",th);if(null==F)break;else if(J>=F)break;K=Math.ceil((F-J)/I)-1}else{if(Infinity==z)break;else if(J/w>=z)break;K=Math.ceil((z*w-J)/I)-1}for(F=0;F<=K;++F)C=J+I,y.push({start:J/w,end:C/w,bg:J}),J=C}w=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=ux(a,v,z.value,w,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=Td||a.g.disableText||m.push(z):n.push(z):q.push(z))}p=[];q=t(0<q.length?
|
|
1108
1110
|
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=
|
|
1109
1111
|
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.he());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);H(k)})}
|
|
1110
|
-
function
|
|
1112
|
+
function ux(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=lh(c,"Bitrate",sh),m=lh(c,"MaxWidth",sh),n=lh(c,"MaxHeight",sh),p=lh(c,"Channels",sh),q=lh(c,"SamplingRate",sh),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Wa(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1111
1113
|
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:Ce(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,
|
|
1112
|
-
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=
|
|
1113
|
-
e),null;c=
|
|
1114
|
-
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,
|
|
1114
|
+
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=vx[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(!wx.includes(e.toUpperCase()))return ab("Codec not supported:",
|
|
1115
|
+
e),null;c=xx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=yx(e,c);break;case "video":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=zx(c);break;case "text":if(w.type=Td,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Xd(w.mimeType,w.codecs));
|
|
1116
|
+
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Ya:A,ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:w},A=Yw(new Sw([A])),a.m.set(w.id,A);A=Ax(a,new yi(function(){return[]},0,null,null,void 0,
|
|
1115
1117
|
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}
|
|
1116
|
-
function
|
|
1117
|
-
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function
|
|
1118
|
-
function
|
|
1119
|
-
ti["application/vnd.ms-sstr+xml"]=function(){return new
|
|
1120
|
-
function
|
|
1121
|
-
K.value.byteLength;if(!g){I.u(5);break}return E(I,g(K.value),5);case 5:F=Date.now();if(100<F-q||K.done)J=K.done?0:w-n,e(F-q,n-p,J),p=n,q=F;K.done?C.close():(C.enqueue(K.value),D());H(I)}})}D()};new k({start:A});return E(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:va(y,3);break;case 2:z=za(y);if(d.jg)throw new T(1,1,7001,a,b);if(d.$g)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return B=
|
|
1122
|
-
function
|
|
1123
|
-
|
|
1124
|
-
function
|
|
1118
|
+
function xx(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;
|
|
1119
|
+
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function yx(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 zx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1120
|
+
function Ax(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 Ai(g.Vc.start,g.Vc.end,function(k){return function(){return Nd(a.l,[f.replace("{start time}",String(k.Vc.bg))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",rx);var wx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),vx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1121
|
+
ti["application/vnd.ms-sstr+xml"]=function(){return new rx};function Bx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=zd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Cx(){}function Dx(a,b,c,d,e){var f=new Ex;Eg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Fx,h={jg:!1,$g:!1};a=Gx(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 $f(a,function(){h.jg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Tc(function(){h.$g=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1122
|
+
function Gx(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=Hx,k=Ix,p=n=0,q=Date.now(),ta(y,2),E(y,h(a,c),4);case 4:l=y.h;f(Jx(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,F,J;return O(function(I){switch(I.g){case 1:return ta(I,2),E(I,u.read(),4);case 4:K=I.h;va(I,3);break;case 2:return za(I),I.return();case 3:if(K.done){I.u(5);break}n+=
|
|
1123
|
+
K.value.byteLength;if(!g){I.u(5);break}return E(I,g(K.value),5);case 5:F=Date.now();if(100<F-q||K.done)J=K.done?0:w-n,e(F-q,n-p,J),p=n,q=F;K.done?C.close():(C.enqueue(K.value),D());H(I)}})}D()};new k({start:A});return E(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:va(y,3);break;case 2:z=za(y);if(d.jg)throw new T(1,1,7001,a,b);if(d.$g)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,z,b);case 3:return B=Jx(l.headers),y.return(Bx(B,m,l.status,a,l.url,b))}})}
|
|
1124
|
+
function Jx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Kx(){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",Cx);Cx.isSupported=Kx;Cx.parse=Dx;var Hx=window.fetch,Fx=window.AbortController,Ix=window.ReadableStream,Ex=window.Headers;
|
|
1125
|
+
Kx()&&(mg("http",Dx,2,!0),mg("https",Dx,2,!0),mg("blob",Dx,2,!0));function Lx(){}
|
|
1126
|
+
function Mx(a,b,c,d,e){var f=new Nx,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=Ox(f);e(q);n=!0}};f.onload=function(q){var u=Ox(f),v=f.response;try{d(Date.now()-g,q.loaded-h,0);var w=Bx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(q){m(new T(1,
|
|
1125
1127
|
1,1002,a,q,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(q){var u=Date.now();if(100<u-g||q.lengthComputable&&q.loaded==q.total)d(u-g,q.loaded-h,4==f.readyState?0:q.total-q.loaded),h=q.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new $f(k,function(){f.abort();return Promise.resolve()})}
|
|
1126
|
-
function
|
|
1127
|
-
function
|
|
1128
|
-
function
|
|
1129
|
-
function
|
|
1130
|
-
r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
1131
|
-
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,
|
|
1132
|
-
function
|
|
1133
|
-
function
|
|
1134
|
-
function
|
|
1135
|
-
|
|
1136
|
-
function
|
|
1137
|
-
function
|
|
1138
|
-
function
|
|
1139
|
-
|
|
1140
|
-
function
|
|
1141
|
-
function
|
|
1142
|
-
|
|
1143
|
-
function
|
|
1144
|
-
function
|
|
1145
|
-
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
|
|
1146
|
-
|
|
1128
|
+
function Ox(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Lx);Lx.parse=Mx;var Nx=window.XMLHttpRequest;mg("http",Mx,1,!0);mg("https",Mx,1,!0);mg("blob",Mx,1,!0);function Px(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Qx(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Da+":"+a.na}function Rx(a,b){return sl(a.g.M(),a.g.Da,a.g.na,b.streaming.retryParameters)};function Sx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Tx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Sx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function Ux(a){var b=this;this.o=a;this.j=new Map;this.i=new Ag(function(){return Vx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Sx}Ux.prototype.destroy=function(){return this.i.destroy()};function Wx(a,b,c){a.m=b;a.l=c}function Vx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1129
|
+
function Xx(a,b,c,d,e,f){Bg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return E(u,Yx(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Bb(h),l=new Wg(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Zx(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1130
|
+
function Yx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=wg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Ob(a.h,e);return g.return(f.data)})};function $x(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Zf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}$x.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return E(b,a.g,4)}if(2!=b.g)return va(b,0);za(b);H(b)})};
|
|
1131
|
+
function ay(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();H(g)})}})}$x.prototype.store=function(){return this.h};$x.prototype.promise=function(){return this.g};function by(a){this.h=a;this.g=[]}by.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function cy(a,b){return dy(a,b,"readwrite")}function dy(a,b,c){c=a.h.transaction([b],c);var d=new $x(c,b);a.g.push(d);d.promise().then(function(){Ob(a.g,d)},function(){Ob(a.g,d)});return d};function ey(a,b,c){this.h=new by(a);this.i=b;this.g=c}r=ey.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return fy(this.i)};r.removeSegments=function(a,b){return gy(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,hy(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.kg(e)}))})};r.addManifests=function(){return fy(this.g)};
|
|
1132
|
+
r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function iy(a,b,c){a=cy(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=cy(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 gy(this,this.g,a,b)};
|
|
1133
|
+
r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,hy(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=dy(a.h,a.g,"readonly"),c=new Map,E(d,ay(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);H(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};r.kg=function(a){return a};r.cd=function(a){return Promise.resolve(a)};
|
|
1134
|
+
function fy(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=cy(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Nd:g.Nd},k=h.next())l=k.value,g.Nd=e.add(l),g.Nd.onsuccess=function(n){return function(){f.push(n.Nd.result)}}(g);return E(m,d.promise(),2)}return m.return(f)})};
|
|
1135
|
+
function gy(a,b,c,d){a=cy(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Ld:e.Ld},f=c.next())e.Ld=f.value,b.delete(e.Ld).onsuccess=function(g){return function(){return d(g.Ld)}}(e);return a.promise()}
|
|
1136
|
+
function hy(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=dy(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 jy(a){this.g=new by(a)}jy.prototype.destroy=function(){return this.g.destroy()};jy.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=dy(a.g,"session-ids","readonly"),c=[],E(d,ay(b,function(e,f){c.push(f)}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};jy.prototype.add=function(a){var b=cy(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()};
|
|
1137
|
+
jy.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=cy(b.g,"session-ids"),E(d,ay(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function ky(){this.g=new Map}ky.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)};ky.prototype.init=function(){var a=this;ly.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)};
|
|
1138
|
+
function my(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{kb:d,Ha:f},Ha:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function ny(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({kb:d,Ha:f},e)})})}
|
|
1139
|
+
function oy(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 py(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function qy(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()}
|
|
1140
|
+
function ry(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=ly,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 sy(a,b){ly.set(a,b)}S("shaka.offline.StorageMuxer",ky);ky.unregister=function(a){ly.delete(a)};ky.register=sy;ky.prototype.destroy=ky.prototype.destroy;var ly=new Map;function ty(){ey.apply(this,arguments)}pa(ty,ey);ty.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=cy(c.h,c.g);e=d.store();f=new Zf;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)})};
|
|
1141
|
+
ty.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=uy(a.periods[c],e),b.push(f);return E(h,Mt(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})})};
|
|
1142
|
+
function uy(a,b){vy(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return wy(e,a.startTime,b)})}
|
|
1143
|
+
function wy(a,b,c){var d=a.initSegmentUri?xy(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=
|
|
1144
|
+
xy(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}}ty.prototype.kg=function(a){return{data:a.data}};
|
|
1145
|
+
function xy(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);}
|
|
1146
|
+
function vy(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++,
|
|
1147
|
+
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 yy(){ey.apply(this,arguments)}pa(yy,ey);
|
|
1148
|
+
yy.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(zy(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,Mt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1147
1149
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1148
|
-
function
|
|
1149
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function
|
|
1150
|
-
r.init=function(){var a=this,b=new Zf,c=!1,d=new Tc(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
|
|
1151
|
-
new
|
|
1150
|
+
function zy(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,
|
|
1151
|
+
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 Ay(){ey.apply(this,arguments)}pa(Ay,ey);r=Ay.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 iy(this,a,b)};r.cd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function By(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=By.prototype;
|
|
1152
|
+
r.init=function(){var a=this,b=new Zf,c=!1,d=new Tc(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 ty(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new yy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1153
|
+
new yy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Ay(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new jy(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,
|
|
1152
1154
|
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(),H(b)}})};
|
|
1153
1155
|
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};
|
|
1154
|
-
r.erase=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:return a.l&&a.l.close(),E(b,
|
|
1155
|
-
function
|
|
1156
|
-
function
|
|
1157
|
-
function
|
|
1156
|
+
r.erase=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:return a.l&&a.l.close(),E(b,Cy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
|
|
1157
|
+
function Cy(){var a=new Zf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}sy("idb",function(){return fd()||Yc()||!window.indexedDB?null:new By});function Dy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Dy.prototype.kb=function(){return this.i};Dy.prototype.Ha=function(){return this.h};Dy.prototype.key=function(){return this.l};Dy.prototype.toString=function(){return this.j};
|
|
1158
|
+
function Ey(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Dy(b,c,d,Number(a[4])):null};function Fy(a,b){this.h=a;this.g=b}
|
|
1159
|
+
function Gy(a,b){var c=new sk(null,0);c.Wa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Hy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Td}).map(function(l){return Iy(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Iy(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
1158
1160
|
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}}
|
|
1159
|
-
function
|
|
1160
|
-
b.next())for(e=e.value,g=
|
|
1161
|
-
function
|
|
1161
|
+
function Hy(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=
|
|
1162
|
+
b.next())for(e=e.value,g=Iy(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=Iy(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}
|
|
1163
|
+
function Iy(a,b,c){var d=b.segments.map(function(e){return Jy(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||
|
|
1162
1164
|
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([Xd(b.mimeType,b.codecs)])}}
|
|
1163
|
-
function
|
|
1164
|
-
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=
|
|
1165
|
+
function Jy(a,b,c){var d=new Dy("segment",a.h,a.g,b.dataKey);a=new Ai(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Ky(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 Ky(a,b){var c=new Dy("segment",a.h,a.g,b);return new yi(function(){return[c.toString()]},0,null)};function Ly(){this.g=null}r=Ly.prototype;r.configure=function(){};
|
|
1166
|
+
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=Ey(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new ky;ua(m,2);return E(m,e.init(),4);case 4:return E(m,oy(e,d.kb(),d.Ha()),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 Fy(d.kb(),d.Ha()),l=Gy(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()};
|
|
1165
1167
|
r.update=function(){};
|
|
1166
|
-
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
|
|
1167
|
-
r.onInitialVariantChosen=function(){};r.banLocation=function(){};ti["application/x-offline-manifest"]=function(){return new
|
|
1168
|
-
function
|
|
1169
|
-
function
|
|
1170
|
-
h.g)return ta(h,2),E(h,Vh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);za(h);H(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function
|
|
1171
|
-
function
|
|
1172
|
-
case 4:b.h=null,b.g=null,H(k)}})})}function
|
|
1173
|
-
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
1174
|
-
function
|
|
1175
|
-
p,b,c,e,f),v=u.ji,w=u.Yf,E(y,l.
|
|
1176
|
-
|
|
1177
|
-
function
|
|
1178
|
-
2)}if(!C)return L.u(0);
|
|
1179
|
-
z=Object.values(l),E(B,g.removeSegments(z,function(){}),10);case 10:throw A;}})}function
|
|
1180
|
-
function
|
|
1181
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();va(A,0);break;case 2:return v=za(A),E(A,
|
|
1182
|
-
function
|
|
1168
|
+
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 ky,ta(m,2,3),E(m,e.init(),5);case 5:return E(m,oy(e,d.kb(),d.Ha()),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:za(m),m.u(3)}})};
|
|
1169
|
+
r.onInitialVariantChosen=function(){};r.banLocation=function(){};ti["application/x-offline-manifest"]=function(){return new Ly};function My(){}function Ny(a){var b=Ey(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=cg(a)):a=b&&"segment"==b.g?Oy(b.key(),b):ag(new T(2,1,9004,a));return a}
|
|
1170
|
+
function Oy(a,b){var c=new ky;return cg(void 0).za(function(){return c.init()}).za(function(){return oy(c,b.kb(),b.Ha())}).za(function(d){return d.getSegments([b.key()])}).za(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",My);My.plugin=Ny;mg("offline",Ny);function Py(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,Qy(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=Ry(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)}})}
|
|
1171
|
+
function Ry(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Bh({Db:b,onError:function(){},re:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),E(f,Jh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return za(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==
|
|
1172
|
+
h.g)return ta(h,2),E(h,Vh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);za(h);H(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function Qy(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pb(a.audioCapabilities,b.audioCapabilities,c)&&Pb(a.videoCapabilities,b.videoCapabilities,c)};function Sy(a,b,c){var d=b.presentationTimeline.getDuration();b=Ty(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Uy(a,b){var c=Gy(new Fy(a.kb(),a.Ha()),b),d=b.appMetadata||{};c=Ty(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}}
|
|
1173
|
+
function Ty(a){var b=[],c=wf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(jf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(kf(c.value));return b};function Vy(){this.g={}}function Wy(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 Xy(a,b){a.g[b.id]=b.bandwidth||2048}function Yy(a,b){a=a.g[b];null==a&&(a=0);return a};function Zy(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.ac()):(this.h=mm(),this.g=new lg);this.i=[];this.j=[];var c=!a;this.l=new Ag(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 Vx(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);
|
|
1174
|
+
case 4:b.h=null,b.g=null,H(k)}})})}function $y(){if(Uc())a:{var a=t(ly.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=Zy.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.ac=function(){return this.g};
|
|
1175
|
+
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Ux(this.g);this.j.push(f);b=az(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=si(a,c||null);return h.return(g())})},e,f);b=new $f(b,function(){return Vx(f)});b.finally(function(){Ob(d.j,f)});return bz(this,b)};
|
|
1176
|
+
function az(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 cz(),h=g=null,k=new ky,n=m=l=null,ta(y,2,3),E(y,d(),5);case 5:return g=y.h,E(y,dz(a,b,g,e),6);case 6:p=y.h;ez(a);q=!p.presentationTimeline.U()&&!p.presentationTimeline.fc();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;ez(a);if(n)throw n;return E(y,fz(p,h,e),8);case 8:return E(y,k.init(),9);case 9:return ez(a),E(y,my(k),10);case 10:return l=y.h,ez(a),u=gz(h,
|
|
1177
|
+
p,b,c,e,f),v=u.ji,w=u.Yf,E(y,l.Ha.addManifests([v]),11);case 11:A=y.h;ez(a);m=A[0];ez(a);if(n)throw n;return E(y,hz(a,w,m,v,f,e,l.Ha,p,h),12);case 12:return ez(a),iz(p,v,h,e),E(y,l.Ha.updateManifest(m,v),13);case 13:return ez(a),z=new Dy("manifest",l.path.kb,l.path.Ha,m),y.return(Uy(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=za(y);if(null==m){y.u(19);break}return E(y,
|
|
1178
|
+
jz(m),19);case 19:throw n||B;}})}
|
|
1179
|
+
function hz(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,F,J,I,G,N;return O(function(L){if(1==L.g){D={};K=t(y);for(F=K.next();!F.done;D={Ub:D.Ub},F=K.next())D.Ub=F.value,J=Rx(D.Ub,f),I=D.Ub.i,G=D.Ub.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;ez(a);Q=M.Ub.g;ja=Qx(Q);l[ja]=R[0];m+=P.byteLength;H(ka)})}}(D),Xx(e,D.Ub.groupId,J,I,G,N);return E(L,Zx(e),
|
|
1180
|
+
2)}if(!C)return L.u(0);ez(a);iz(h,d,k,f);return E(L,g.updateManifest(c,d),0)})};p=!1;ta(B,2);if(!kz(h)||!p||lz(h)){B.u(4);break}return E(B,n(b.filter(function(y){return y.h}),!0),5);case 5:return ez(a),b=b.filter(function(y){return!y.h}),q=l,u=m,l={},m=0,E(B,mz(g,c,d,q,u,function(){return ez(a)}),6);case 6:ez(a);case 4:if(p){B.u(7);break}return E(B,n(b,!1),8);case 8:return ez(a),v=l,w=m,l={},m=0,E(B,mz(g,c,d,v,w,function(){return ez(a)}),9);case 9:ez(a);case 7:va(B,0);break;case 2:return A=za(B),
|
|
1181
|
+
z=Object.values(l),E(B,g.removeSegments(z,function(){}),10);case 10:throw A;}})}function jz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new ky,E(f,b.init(),2);case 2:return E(f,my(b),3);case 3:return c=f.h,d=new Dy("manifest",c.path.kb,c.path.Ha,a),E(f,b.destroy(),4);case 4:return e=new Zy,E(f,e.remove(d.toString()),0)}})}
|
|
1182
|
+
function mz(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&&
|
|
1183
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();va(A,0);break;case 2:return v=za(A),E(A,jz(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;}})}
|
|
1184
|
+
function fz(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,F,J,I,G,N,L,M;return O(function(P){switch(P.g){case 1:return d={width:Infinity,height:Infinity},Pe(a,c.restrictions,d),E(P,Te(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ne(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(jf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,e.push(kf(q));
|
|
1183
1185
|
u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(lf(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:F=P.h;if(!F)throw new T(2,9,9014);va(P,5);break;case 4:J=za(P);if(J instanceof T)throw J;throw new T(2,9,9015);case 5:I=new Set;G=new Set;N=new Set;L=t(A);for(C=L.next();!C.done;C=
|
|
1184
|
-
L.next())M=C.value,"variant"==M.type&&I.add(M.id),"text"==M.type&&G.add(M.id),"image"==M.type&&N.add(M.id);a.variants=a.variants.filter(function(R){return I.has(R.id)});a.textStreams=a.textStreams.filter(function(R){return G.has(R.id)});a.imageStreams=a.imageStreams.filter(function(R){return N.has(R.id)});
|
|
1185
|
-
function
|
|
1186
|
-
p&&n&&(p.initData=[]);return{ji:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ld(),streams:f,sessionIds:n?$h(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Yf:m}}function
|
|
1187
|
-
function
|
|
1188
|
-
function
|
|
1189
|
-
function
|
|
1190
|
-
function
|
|
1191
|
-
function
|
|
1192
|
-
r.list=function(){return
|
|
1193
|
-
function
|
|
1194
|
-
c.configure(d.manifest),
|
|
1195
|
-
function
|
|
1196
|
-
function
|
|
1197
|
-
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;
|
|
1198
|
-
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function
|
|
1199
|
-
function
|
|
1200
|
-
function
|
|
1201
|
-
function
|
|
1202
|
-
function
|
|
1203
|
-
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1206
|
-
function
|
|
1207
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
1208
|
-
function
|
|
1209
|
-
function
|
|
1210
|
-
(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,
|
|
1211
|
-
function
|
|
1212
|
-
function
|
|
1186
|
+
L.next())M=C.value,"variant"==M.type&&I.add(M.id),"text"==M.type&&G.add(M.id),"image"==M.type&&N.add(M.id);a.variants=a.variants.filter(function(R){return I.has(R.id)});a.textStreams=a.textStreams.filter(function(R){return G.has(R.id)});a.imageStreams=a.imageStreams.filter(function(R){return N.has(R.id)});nz(a);H(P)}})}
|
|
1187
|
+
function gz(a,b,c,d,e,f){var g=Sy(c,b,d),h=e.offline.progressCallback;Wx(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Rh(a,"cenc",q)});var k=kz(b)&&!lz(b),l=null;k&&(l=oz.get(a.g.keySystem));for(var m=new Vy,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())Xy(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Wy(m,n.value);m=pz(f,m,b,e);f=m.streams;m=m.Yf;p=a.g;n=e.offline.usePersistentLicense;
|
|
1188
|
+
p&&n&&(p.initData=[]);return{ji:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ld(),streams:f,sessionIds:n?$h(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Yf:m}}function kz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1189
|
+
function lz(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 iz(a,b,c,d){b.expiration=c.ld();c=$h(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(kz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}r.remove=function(a){return qz(this,rz(this,a))};
|
|
1190
|
+
function rz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:cz();c=Ey(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new ky;ua(k,2);return E(k,e.init(),4);case 4:return E(k,oy(e,d.kb(),d.Ha()),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([sz(a,h,e),tz(f,d,h)]),2);case 2:return Aa(k),E(k,e.destroy(),8);case 8:Da(k,0)}})}
|
|
1191
|
+
function uz(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:Xd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function sz(a,b,c){return O(function(d){return E(d,vz(a.g,a.h.drm,c,b),0)})}
|
|
1192
|
+
function tz(a,b,c){function d(){}var e=wz(c);Uy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Bi=function(){return qz(this,xz(this))};
|
|
1193
|
+
function xz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return cz(),b=a.g,c=a.h.drm,d=new ky,e=!1,ua(n,2),E(n,d.init(),4);case 4:f=[],py(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,Py(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)}})}
|
|
1194
|
+
r.list=function(){return qz(this,yz())};function yz(){var a,b,c;return O(function(d){switch(d.g){case 1:return cz(),a=[],b=new ky,ua(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),ny(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=Uy(new Dy("manifest",e.kb,e.Ha,l),k);a.push(k)});H(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)}})}
|
|
1195
|
+
function dz(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}},
|
|
1196
|
+
c.configure(d.manifest),ez(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,ez(a),k=zz(h),E(l,Promise.all(Cg(k,function(m){return m.createSegmentIndex()})),3);ez(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 Bh({Db:d.g,onError:b,re:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Gh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Th(e),3):f.return(e)})};
|
|
1197
|
+
function pz(a,b,c,d){var e=new Map,f=zz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Az(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Yf:Array.from(e.values())}}
|
|
1198
|
+
function Az(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,
|
|
1199
|
+
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;Bz(d,c.presentationTimeline.jb(),function(l){var m=Qx(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Yy(b,d.id)*p;p=Tx(a.g,p);f.set(m,new Px(l,p,k,!1))}l.ea&&(n=Qx(l.ea),f.has(n)||(p=.5*Yy(b,d.id),p=Tx(a.g,p),f.set(n,new Px(l.ea,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
1200
|
+
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function Bz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function ez(a){if(a.l.g)throw new T(2,9,7001);}function cz(){if(!$y())throw new T(2,9,9E3);}
|
|
1201
|
+
function qz(a,b){return O(function(c){if(1==c.g)return a.i.push(b),ua(c,2),E(c,b,4);if(2!=c.g)return c.return(c.h);Aa(c);Ob(a.i,b);return Da(c,0)})}function bz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Ob(a.i,c)})}function wz(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
1202
|
+
function vz(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=qy(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:uz(d,!1),videoCapabilities:uz(d,!0)}});return E(h,Py(b,a,f),2)}return 3!=h.g?(g=h.h,E(h,e.remove(g),3)):E(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1203
|
+
function zz(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
1204
|
+
function nz(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",Zy);Zy.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new ky,ua(b,2),E(b,ry(a),2)):5!=b.g?(Aa(b),E(b,a.destroy(),5)):Da(b,0)})};
|
|
1205
|
+
Zy.prototype.list=Zy.prototype.list;Zy.prototype.removeEmeSessions=Zy.prototype.Bi;Zy.prototype.remove=Zy.prototype.remove;Zy.prototype.store=Zy.prototype.store;Zy.prototype.getNetworkingEngine=Zy.prototype.ac;Zy.prototype.getConfiguration=Zy.prototype.getConfiguration;Zy.prototype.configure=Zy.prototype.configure;Zy.prototype.destroy=Zy.prototype.destroy;Zy.support=$y;
|
|
1206
|
+
var oz=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");op.offline=$y;function Cz(){}function Dz(a,b){a={priority:b||0,callback:a};for(b=0;b<Ez.length;b++)if(Ez[b].priority<a.priority){Ez.splice(b,0,a);return}Ez.push(a)}S("shaka.polyfill",Cz);Cz.register=Dz;Cz.installAll=function(){for(var a=t(Ez),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){ab("Error installing polyfill!",c)}}};var Ez=[];function Fz(){this.g=new Gz}function Hz(){window.AbortController||(window.AbortController=Fz,window.AbortSignal=Gz)}Fz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(Fz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Cz.AbortController=Fz;Fz.install=Hz;
|
|
1207
|
+
function Gz(){ig.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Gz,ig);da.Object.defineProperties(Gz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Dz(Hz);function Iz(){}function Jz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Kz(b.value)}function Kz(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Cz.Aria=Iz;Iz.install=Jz;Dz(Jz);function Lz(){}function Mz(){Nz()}Cz.EncryptionScheme=Lz;Lz.install=Mz;Dz(Mz,-2);function Oz(){}
|
|
1208
|
+
function Pz(){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}}),
|
|
1209
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Qz);document.addEventListener("webkitfullscreenerror",Qz);document.addEventListener("mozfullscreenchange",Qz);document.addEventListener("mozfullscreenerror",Qz);document.addEventListener("MSFullscreenChange",Qz);document.addEventListener("MSFullscreenError",Qz)}}
|
|
1210
|
+
function Qz(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)}Cz.Fullscreen=Oz;Oz.install=Pz;Dz(Pz);function Rz(){}function Sz(){var a=!0;!fd()||fd()&&nd()||fd()&&Zc("Fuchsia")||(a=!1);if(gd()||jd()||id()||cd()||$c()||Zc("PC=EOS")||kd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Tz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Uz)}
|
|
1211
|
+
function Uz(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=Vc(e),!f)||d&&(g=d.contentType,h=Vc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Uc())return p.return(b);if(!c){p.u(3);break}return E(p,Vz(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var q=d.contentType;fd()&&d.spatialRendering&&
|
|
1212
|
+
(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,Wz(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
|
|
1213
|
+
function Vz(a){var b,c;return O(function(d){return 1==d.g?fd()?E(d,Xz(a),3):$c()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(mb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(mb(a.contentType))})}
|
|
1214
|
+
function Wz(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},$c()&&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],
|
|
1213
1215
|
distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=c.keySystem;n=null;ta(p,2);if(Qc.has(k+"#"+l+"#"+m)){n=Qc.get(k+"#"+l+"#"+m)||null;p.u(4);break}return E(p,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:n=p.h,Qc.set(k+"#"+l+"#"+m,n);case 4:va(p,3);break;case 2:za(p);case 3:return p.return(n)}})}
|
|
1214
|
-
function
|
|
1215
|
-
var
|
|
1216
|
-
function
|
|
1217
|
-
function
|
|
1218
|
-
function
|
|
1219
|
-
function
|
|
1220
|
-
function
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
function
|
|
1216
|
+
function Xz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(mb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Yz?(c=Yz[b],d.u(2)):E(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Yz[b]=c);return d.return(c)})}Cz.MediaCapabilities=Rz;Rz.install=Sz;
|
|
1217
|
+
var Tz=null;Rz.originalMcap=Tz;var Yz={};Rz.memoizedCanDisplayTypeRequests_=Yz;Dz(Sz,-1);function Zz(){}function $z(){var a=ld();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(aA(),bA()):15>=a&&aA():Zc("DT_STB_BCM")?(aA(),bA()):(bd()||ad()||Zc("Tizen 4"))&&cA();(window.MediaSource||window.ManagedMediaSource)&&dA();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&eA()}
|
|
1218
|
+
function aA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,La.apply(0,arguments));b.abort=function(){};return b}}function bA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1219
|
+
function dA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ce(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ce(c)&&b(c)}}}
|
|
1220
|
+
function cA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=ke(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=ke(c)&&b(c)}}}
|
|
1221
|
+
function eA(){var a=MediaSource.isTypeSupported;cd()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Cz.MediaSource=Zz;Zz.install=$z;Dz($z);function fA(){}function gA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?hA():void 0!=window.orientation&&iA())}function hA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1222
|
+
function iA(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new jA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}Cz.Orientation=fA;fA.install=gA;function jA(){ig.call(this);this.type="";this.angle=0}pa(jA,ig);
|
|
1223
|
+
jA.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
1224
|
+
jA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Dz(gA);function kA(){}var lA,mA,nA,oA,pA,qA;function rA(a,b){try{var c=new sA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function tA(a){var b=this.mediaKeys;b&&b!=a&&uA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?uA(a,this):Promise.resolve()}
|
|
1225
|
+
function vA(a){a=Bb(a.initData);if(Fb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=xd(a.subarray(4),!0);a=Ad(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Cb(a);this.dispatchEvent(b)}Cz.PatchedMediaKeysApple=kA;
|
|
1226
|
+
kA.uninstall=function(){lA&&(lA=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",mA),HTMLMediaElement.prototype.setMediaKeys=nA,window.MediaKeys=oA,window.MediaKeySystemAccess=pA,navigator.requestMediaKeySystemAccess=qA,mA=qA=nA=pA=oA=null,window.shakaMediaKeysPolyfill="")};
|
|
1227
|
+
kA.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)lA=!0,mA=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),nA=HTMLMediaElement.prototype.setMediaKeys,oA=window.MediaKeys,pA=window.MediaKeySystemAccess,qA=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=tA;window.MediaKeys=wA;window.MediaKeySystemAccess=sA;navigator.requestMediaKeySystemAccess=
|
|
1228
|
+
rA;window.shakaMediaKeysPolyfill=xA}};
|
|
1229
|
+
function sA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1228
1230
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1229
|
-
|
|
1230
|
-
function
|
|
1231
|
-
r.generateRequest=function(a,b){var c=this;this.h=new Zf;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.
|
|
1232
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
1233
|
-
r.update=function(a){this.g=new Zf;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function
|
|
1234
|
-
function
|
|
1235
|
-
function
|
|
1236
|
-
|
|
1237
|
-
function
|
|
1238
|
-
function
|
|
1239
|
-
function
|
|
1231
|
+
sA.prototype.createMediaKeys=function(){var a=new wA(this.keySystem);return Promise.resolve(a)};sA.prototype.getConfiguration=function(){return this.g};function wA(a){this.h=new WebKitMediaKeys(a);this.g=new hb}wA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new yA(this.h,a)};wA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1232
|
+
function uA(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",vA);try{return zk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}wA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function yA(a){ig.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hb;this.sessionId="";this.expiration=NaN;this.closed=new Zf;this.keyStatuses=new zA}pa(yA,ig);r=yA.prototype;
|
|
1233
|
+
r.generateRequest=function(a,b){var c=this;this.h=new Zf;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.cc()?"license-request":"license-renewal").set("message",Cb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(AA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1234
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:AA(c,"output-not-allowed");break;default:AA(c,"internal-error")}});AA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1235
|
+
r.update=function(a){this.g=new Zf;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function AA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
|
|
1236
|
+
function zA(){this.size=0;this.g=void 0}r=zA.prototype;r.cc=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var xA="apple";function BA(){}function CA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ad()||Zc("Tizen 4")||Zc("Tizen 5.0")||dd())&&(MediaKeys.prototype.setServerCertificate=DA)}function DA(){return Promise.resolve(!1)}Cz.PatchedMediaKeysCert=BA;BA.install=CA;Dz(CA);function EA(){}function FA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=GA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=HA,window.MediaKeys=IA,window.MediaKeySystemAccess=JA,window.shakaMediaKeysPolyfill=KA)}function GA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1237
|
+
function HA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Cz.PatchedMediaKeysNop=EA;EA.install=FA;function IA(){throw new TypeError("Illegal constructor.");}IA.prototype.createSession=function(){};IA.prototype.setServerCertificate=function(){};IA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function JA(){this.keySystem="";throw new TypeError("Illegal constructor.");}JA.prototype.getConfiguration=function(){};
|
|
1238
|
+
JA.prototype.createMediaKeys=function(){};var KA="nop";Dz(FA,-10);function LA(){}
|
|
1239
|
+
function MA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)NA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=OA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=PA;window.MediaKeys=QA;window.MediaKeySystemAccess=RA;window.shakaMediaKeysPolyfill=SA}}
|
|
1240
|
+
function TA(a){var b=NA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function OA(a,b){try{var c=new RA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function PA(a){var b=this.mediaKeys;b&&b!=a&&UA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&UA(a,this);return Promise.resolve()}Cz.PatchedMediaKeysWebkit=LA;LA.install=MA;
|
|
1241
|
+
function RA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
1240
1242
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1241
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1242
|
-
function
|
|
1243
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=
|
|
1244
|
-
|
|
1245
|
-
function
|
|
1246
|
-
function
|
|
1247
|
-
function
|
|
1248
|
-
function
|
|
1249
|
-
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=
|
|
1250
|
-
r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var
|
|
1251
|
-
function
|
|
1252
|
-
function
|
|
1253
|
-
function
|
|
1254
|
-
S("shaka.text.LrcTextParser",
|
|
1255
|
-
|
|
1256
|
-
{
|
|
1257
|
-
100*q.height/w)),q.widthUnits=A||null!=v?Lb:0,q.heightUnits=A||null!=w?Lb:0)}if(u=
|
|
1258
|
-
2,2001,"<p> can only be inside <div> in TTML");n=t(eh(d,"div"));for(p=n.next();!p.done;p=n.next())if(eh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
1259
|
-
function
|
|
1260
|
-
[];if(!A)for(var z=t(q.children),B=z.next();!B.done;B=z.next())(B=
|
|
1261
|
-
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 Rb(n,z,""),e.lineBreak=!0,e;b="";A&&(b=Dd(fh(q)||""),w&&(b=b.replace(/\s+/g," ")));b=new Rb(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
1262
|
-
!q.attributes.style&&(g=
|
|
1263
|
-
function
|
|
1264
|
-
g))a.backgroundColor=h;if(h=
|
|
1265
|
-
k}).join(",")}(h=
|
|
1266
|
-
e);if(d=
|
|
1243
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}RA.prototype.createMediaKeys=function(){var a=new QA(this.g);return Promise.resolve(a)};RA.prototype.getConfiguration=function(){return this.h};function QA(a){this.l=a;this.h=null;this.g=new hb;this.i=[];this.j=new Map}
|
|
1244
|
+
function UA(a,b){a.h=b;a.g.ob();var c=NA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Cb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=VA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.cc()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=VA(a,d.sessionId))WA(d,"usable"),
|
|
1245
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=VA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?WA(e,"output-restricted"):1==f?WA(e,"expired"):WA(e,"internal-error"))}}))}
|
|
1246
|
+
QA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new XA(b,this.l,a);this.i.push(a);return a};QA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};QA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1247
|
+
function VA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function XA(a,b,c){ig.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 Zf;this.keyStatuses=new YA}pa(XA,ig);
|
|
1248
|
+
function ZA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Bb(Ad("LOAD_SESSION|"+c));else{var e=Ad("PERSISTENT|");d=Md(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new Zf;var f=TA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Tc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
|
|
1249
|
+
function $A(a,b,c){if(a.g)a.g.then(function(){return $A(a,b,c)}).catch(function(){return $A(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=wd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Hd(e.keys[0].k);e=Hd(e.keys[0].kid)}else d=Bb(c),e=null;var f=TA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1250
|
+
function WA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r=XA.prototype;r.generateRequest=function(a,b){return ZA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?ZA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Zf;$A(this,b,a);return b};
|
|
1251
|
+
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=TA("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 YA(){this.size=0;this.g=void 0}r=YA.prototype;r.cc=function(){return this.g};
|
|
1252
|
+
r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var NA="",SA="webkit";Dz(MA);function aB(){}function bB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=cB,Object.defineProperty(a,"disablePictureInPicture",{get:dB,set:eB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=fB,document.addEventListener("webkitpresentationmodechanged",gB,!0))}}
|
|
1253
|
+
function gB(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
1254
|
+
function cB(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function fB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1255
|
+
function dB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function eB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Cz.PiPWebkit=aB;aB.install=bB;Dz(bB);function hB(){}function iB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=jB))}function jB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Cz.RandomUUID=hB;hB.install=iB;Dz(iB);function kB(){}function lB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:mB})}function mB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Cz.Symbol=kB;kB.install=lB;Dz(lB);function nB(){}function oB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Cz.VideoPlayPromise=nB;nB.install=oB;Dz(oB);function pB(){}function qB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||dd())&&(a.getVideoPlaybackQuality=rB)}}function rB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Cz.VideoPlaybackQuality=pB;pB.install=qB;Dz(qB);function sB(){}function tB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=uB;else if(6==b)a=vB;else{try{var c=!!uB(1,2,"")}catch(d){c=!1}c&&(a=uB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function uB(a,b,c){return new window.TextTrackCue(a,b,c)}function vB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Cz.VTTCue=sB;sB.install=tB;Dz(tB);function wB(){}wB.prototype.parseInit=function(){};wB.prototype.setSequenceMode=function(){};wB.prototype.setManifestType=function(){};wB.prototype.parseMedia=function(a,b){var c=null,d=[];a=wd(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=xB.exec(e))){var f=yB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Rb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1256
|
+
S("shaka.text.LrcTextParser",wB);wB.prototype.parseMedia=wB.prototype.parseMedia;wB.prototype.setManifestType=wB.prototype.setManifestType;wB.prototype.setSequenceMode=wB.prototype.setSequenceMode;wB.prototype.parseInit=wB.prototype.parseInit;var xB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,yB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;re["application/x-subtitle-lrc"]=function(){return new wB};function zB(){}zB.prototype.parseInit=function(){};zB.prototype.setSequenceMode=function(){};zB.prototype.setManifestType=function(){};
|
|
1257
|
+
zB.prototype.parseMedia=function(a,b,c){var d=wd(a);a=[];if(""==d)return a;var e=Zg(d,"tt");if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=hh(e,"body")[0];if(!d)return[];var f=nh(e,AB,"frameRate"),g=nh(e,AB,"subFrameRate"),h=nh(e,AB,"frameRateMultiplier"),k=nh(e,AB,"tickRate"),l=nh(e,AB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=nh(e,BB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new CB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
|
|
1258
|
+
{Wb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=hh(e,"metadata")[0])?g.children:[];h=hh(e,"style");e=hh(e,"region");k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var u=q.value;q=new Kb;var v=u.attributes["xml:id"];if(v){q.id=v;var w=null;n&&(w=DB.exec(n)||EB.exec(n));v=w?Number(w[1]):null;w=w?Number(w[2]):null;var A,z=FB(u,h,"extent");if(z){var B=(A=DB.exec(z))||EB.exec(z);null!=B&&(q.width=Number(B[1]),q.height=Number(B[2]),A||(null!=v&&(q.width=100*q.width/v),null!=w&&(q.height=
|
|
1259
|
+
100*q.height/w)),q.widthUnits=A||null!=v?Lb:0,q.heightUnits=A||null!=w?Lb:0)}if(u=FB(u,h,"origin"))if(B=(A=DB.exec(u))||EB.exec(u),null!=B)q.viewportAnchorX=Number(B[1]),q.viewportAnchorY=Number(B[2]),A?z||(q.width=100-q.viewportAnchorX,q.widthUnits=Lb,q.height=100-q.viewportAnchorY,q.heightUnits=Lb):(null!=w&&(q.viewportAnchorY=100*q.viewportAnchorY/w),null!=v&&(q.viewportAnchorX=100*q.viewportAnchorX/v)),q.viewportAnchorUnits=A||null!=v?Lb:0}else q=null;q&&k.push(q)}if(eh(d,"p").length)throw new T(2,
|
|
1260
|
+
2,2001,"<p> can only be inside <div> in TTML");n=t(eh(d,"div"));for(p=n.next();!p.done;p=n.next())if(eh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=GB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1261
|
+
function GB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(ch(a)){if(!m)return null;var q={tagName:"span",children:[fh(a)],attributes:{},parent:null}}else q=a;for(var u=null,v=t(HB),w=v.next();!w.done&&!(u=IB(q,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=nh(q,HB,"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(ch);h=
|
|
1262
|
+
[];if(!A)for(var z=t(q.children),B=z.next();!B.done;B=z.next())(B=GB(B.value,b,c,d,e,f,g,w,k,q,m,n))&&h.push(B);d=null!=l;n=fh(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=JB(q,c);n=z.start;for(z=z.end;p&&p.tagName&&"tt"!=p.tagName;)z=KB(p,c,n,z),n=z.start,z=z.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;z=null==z?Infinity:z+b.periodStart;n=Math.max(n,b.segmentStart);z=Math.min(z,b.segmentEnd);
|
|
1263
|
+
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 Rb(n,z,""),e.lineBreak=!0,e;b="";A&&(b=Dd(fh(q)||""),w&&(b=b.replace(/\s+/g," ")));b=new Rb(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=IB(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&&
|
|
1264
|
+
!q.attributes.style&&(g=IB(l,"region",f,"")[0]);LB(b,q,g,u,v,e,a,0==h.length);return b}
|
|
1265
|
+
function LB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==MB(b,c,f,"direction",g)&&(a.direction="rtl");h=MB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Ub);(h=MB(b,c,f,"textAlign",!0))?(a.positionAlign=NB[h],a.lineAlign=OB[h],a.textAlign=cc[h.toUpperCase()]):a.textAlign=Tb;if(h=MB(b,c,f,"displayAlign",!0))a.displayAlign=dc[h.toUpperCase()];if(h=MB(b,c,f,"color",g))a.color=h;if(h=MB(b,c,f,"backgroundColor",
|
|
1266
|
+
g))a.backgroundColor=h;if(h=MB(b,c,f,"border",g))a.border=h;if(h=MB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
|
|
1267
|
+
k}).join(",")}(h=MB(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=MB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=MB(b,c,f,"lineHeight",g))&&h.match(PB)&&(a.lineHeight=h);(h=MB(b,c,f,"fontSize",g))&&(h.match(PB)||h.match(QB))&&(a.fontSize=h);if(h=MB(b,c,f,"fontStyle",g))a.fontStyle=hc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=fh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
|
|
1268
|
+
e);if(d=MB(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(PB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(PB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=MB(b,c,f,"letterSpacing",g))&&d.match(PB)&&(a.letterSpacing=d);(d=MB(b,c,f,"linePadding",g))&&d.match(PB)&&(a.linePadding=d);if(d=MB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=FB(c,f,"textDecoration"))&&RB(a,d);(d=SB(b,f,"textDecoration"))&&RB(a,d);if(d=MB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(MB(b,
|
|
1267
1269
|
c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
1268
|
-
function
|
|
1269
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ob(a.textDecoration,"overline")}}function
|
|
1270
|
-
function
|
|
1271
|
-
function
|
|
1272
|
-
function
|
|
1273
|
-
function
|
|
1274
|
-
function
|
|
1275
|
-
var
|
|
1276
|
-
end:"end"},
|
|
1277
|
-
|
|
1278
|
-
re['application/mp4; codecs="stpp.ttml"']=function(){return new
|
|
1279
|
-
|
|
1270
|
+
function RB(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Ob(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Ob(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1271
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ob(a.textDecoration,"overline")}}function MB(a,b,c,d,e){e=void 0===e?!0:e;return(a=SB(a,c,d))?a:e?FB(b,c,d):null}function FB(a,b,c){if(!a)return null;var d=nh(a,BB,c);return d?d:TB(a,b,c)}function SB(a,b,c){var d=nh(a,BB,c);return d?d:TB(a,b,c)}
|
|
1272
|
+
function TB(a,b,c){a=IB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=mh(a[e],"urn:ebu:tt:style",c);f||(f=nh(a[e],BB,c));f||(f=SB(a[e],b,c));f&&(d=f)}return d}function IB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?mh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1273
|
+
function KB(a,b,c,d){a=JB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function JB(a,b){var c=UB(a.attributes.begin,b),d=UB(a.attributes.end,b);a=UB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1274
|
+
function UB(a,b){var c=null;if(VB.test(a)){a=VB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(WB.test(a))c=XB(WB,a);else if(YB.test(a))c=XB(YB,a);else if(ZB.test(a))a=ZB.exec(a),c=Number(a[1])/b.frameRate;else if($B.test(a))a=$B.exec(a),c=Number(a[1])/b.g;else if(aC.test(a))c=XB(aC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1275
|
+
function XB(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}S("shaka.text.TtmlTextParser",zB);zB.prototype.parseMedia=zB.prototype.parseMedia;zB.prototype.setManifestType=zB.prototype.setManifestType;zB.prototype.setSequenceMode=zB.prototype.setSequenceMode;zB.prototype.parseInit=zB.prototype.parseInit;
|
|
1276
|
+
function CB(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
1277
|
+
var DB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,QB=/^(\d{1,4}(?:\.\d+)?|100)%$/,PB=/^(\d+px|\d+em|\d*\.?\d+c)$/,EB=/^(\d+)px (\d+)px$/,VB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,WB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,YB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,ZB=/^(\d*(?:\.\d*)?)f$/,$B=/^(\d*(?:\.\d*)?)t$/,aC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),OB={left:Xb,center:"center",right:"end",start:Xb,
|
|
1278
|
+
end:"end"},NB={left:"line-left",center:"center",right:"line-right"},AB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],BB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],HB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];re["application/ttml+xml"]=function(){return new zB};function bC(){this.g=new zB}bC.prototype.parseInit=function(a){var b=!1;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};bC.prototype.setSequenceMode=function(){};bC.prototype.setManifestType=function(){};
|
|
1279
|
+
bC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Jg).box("mdat",Vg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",bC);bC.prototype.parseMedia=bC.prototype.parseMedia;bC.prototype.setManifestType=bC.prototype.setManifestType;bC.prototype.setSequenceMode=bC.prototype.setSequenceMode;bC.prototype.parseInit=bC.prototype.parseInit;re['application/mp4; codecs="stpp"']=function(){return new bC};
|
|
1280
|
+
re['application/mp4; codecs="stpp.ttml"']=function(){return new bC};re['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new bC};re['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new bC};re['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new bC};re['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new bC};re['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new bC};re['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new bC};function cC(){this.h=!1;this.g="UNKNOWN"}cC.prototype.parseInit=function(){};cC.prototype.setSequenceMode=function(a){this.h=a};cC.prototype.setManifestType=function(a){this.g=a};
|
|
1281
|
+
cC.prototype.parseMedia=function(a,b){a=wd(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=dC(new zp(a[1]));if(null==a)throw new T(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
|
|
1280
1282
|
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new zp(e);var f=new Kb;Cp(e);Ap(e);for(var g=Cp(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
|
|
1281
|
-
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Ap(e);g=Cp(e)}b.push(f)}d=new Map;
|
|
1283
|
+
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Ap(e);g=Cp(e)}b.push(f)}d=new Map;eC(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
|
|
1282
1284
|
l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Rb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var q=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=q;break;case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==q)m=!0,l.fontWeight=
|
|
1283
1285
|
700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=$b;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-combine-upright":m=!0;l.textCombineUpright=q;break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&d.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,
|
|
1284
|
-
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new zp(f[0]),k=
|
|
1285
|
-
function
|
|
1286
|
-
function
|
|
1287
|
-
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=
|
|
1288
|
-
m.next())
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1291
|
-
if(!f)break;if(f=
|
|
1292
|
-
function
|
|
1293
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sb);else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
1294
|
-
function
|
|
1295
|
-
re["text/vtt"]=function(){return new
|
|
1296
|
-
|
|
1297
|
-
p.value;var q=p.Lf||l,u=p.xe?c+p.xe:a;a=u+(q||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),z=null;"vttc"==Pg(A)?8<w&&(z=m.nb(w-8)):m.skip(w-8);q&&z&&(w=
|
|
1298
|
-
function
|
|
1299
|
-
function
|
|
1300
|
-
function
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;a={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;a={Ge:a.Ge},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
1304
|
-
l.Ge}}(a)))&&
|
|
1305
|
-
function
|
|
1286
|
+
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new zp(f[0]),k=dC(g),n=Bp(g,/[ \t]+--\x3e[ \t]+/g),l=dC(g),null==k||null==n||null==l)ab("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Rb(k,l,"");Ap(g);for(k=Cp(g);k;)fC(m,k,b),Ap(g),k=Cp(g);gC(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
|
|
1287
|
+
function eC(a){for(var b=t(Object.entries(fc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Rb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(gc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Rb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1288
|
+
function gC(a,b,c){if(a.includes("<")){0===c.size&&eC(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(hC)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
|
|
1289
|
+
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=iC(a);try{var m=Zg("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
|
|
1290
|
+
m.next())jC(a.value,b,c);else b.payload=Dd(a);else b.payload=Dd(a)}else b.payload=Dd(a)}function iC(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function kC(a,b){return a&&0<a.length?a:b}
|
|
1291
|
+
function jC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Kb;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=kC(g.backgroundColor,d.backgroundColor),d.color=kC(g.color,d.color),d.fontFamily=kC(g.fontFamily,d.fontFamily),d.fontSize=
|
|
1292
|
+
kC(g.fontSize,d.fontSize),d.textShadow=kC(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=ac(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
|
|
1293
|
+
if(!f)break;if(f=dC(new zp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(ch(a)||1==e.length&&ch(e[0]))for(c=fh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ac(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())jC(a.value,d,c)}
|
|
1294
|
+
function fC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Tb:a.textAlign=cc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1295
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sb);else if(d=/^region:(.*)$/.exec(b)){if(b=lC(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=ec[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=ec[c[2].toUpperCase()])}
|
|
1296
|
+
function lC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function dC(a){a=Bp(a,hC);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}S("shaka.text.VttTextParser",cC);cC.prototype.parseMedia=cC.prototype.parseMedia;cC.prototype.setManifestType=cC.prototype.setManifestType;cC.prototype.setSequenceMode=cC.prototype.setSequenceMode;cC.prototype.parseInit=cC.prototype.parseInit;var hC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1297
|
+
re["text/vtt"]=function(){return new cC};re['text/vtt; codecs="vtt"']=function(){return new cC};re['text/vtt; codecs="wvtt"']=function(){return new cC};function mC(){this.g=null}mC.prototype.parseInit=function(a){var b=this,c=!1;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).P("mdhd",function(d){d=Wi(d.reader,d.version);b.g=d.timescale}).box("minf",Qg).box("stbl",Qg).P("stsd",Sg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};mC.prototype.setSequenceMode=function(){};mC.prototype.setManifestType=function(){};
|
|
1298
|
+
mC.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 Jg).box("moof",Qg).box("traf",Qg).P("tfdt",function(B){g=!0;c=Vi(B.reader,B.version).baseMediaDecodeTime}).P("tfhd",function(B){l=Ui(B.reader,B.flags).fd}).P("trun",function(B){h=!0;d=Xi(B.reader,B.version,B.flags).Mg}).box("mdat",Vg(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 Gg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1299
|
+
p.value;var q=p.Lf||l,u=p.xe?c+p.xe:a;a=u+(q||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),z=null;"vttc"==Pg(A)?8<w&&(z=m.nb(w-8)):m.skip(w-8);q&&z&&(w=nC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(ze)};function nC(a,b,c){var d,e,f;(new Jg).box("payl",Vg(function(g){d=wd(g)})).box("iden",Vg(function(g){e=wd(g)})).box("sttg",Vg(function(g){f=wd(g)})).parse(a);return d?oC(d,e,f,b,c):null}
|
|
1300
|
+
function oC(a,b,c,d,e){d=new Rb(d,e,"");gC(a,d,new Map);b&&(d.id=b);if(c)for(a=new zp(c),b=Cp(a);b;)fC(d,b,[]),Ap(a),b=Cp(a);return d}S("shaka.text.Mp4VttParser",mC);mC.prototype.parseMedia=mC.prototype.parseMedia;mC.prototype.setManifestType=mC.prototype.setManifestType;mC.prototype.setSequenceMode=mC.prototype.setSequenceMode;mC.prototype.parseInit=mC.prototype.parseInit;re['application/mp4; codecs="wvtt"']=function(){return new mC};function pC(){}pC.prototype.parseInit=function(){};pC.prototype.setSequenceMode=function(){};pC.prototype.setManifestType=function(){};pC.prototype.parseMedia=function(a){var b=wd(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 zp(c[0]),e=qC(d),f=Bp(d,/,/g);d=qC(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 Rb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1301
|
+
function qC(a){a=Bp(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",pC);pC.prototype.parseMedia=pC.prototype.parseMedia;pC.prototype.setManifestType=pC.prototype.setManifestType;pC.prototype.setSequenceMode=pC.prototype.setSequenceMode;pC.prototype.parseInit=pC.prototype.parseInit;re["text/x-subviewer"]=function(){return new pC};function rC(){this.g=new cC}rC.prototype.parseInit=function(){};rC.prototype.setSequenceMode=function(){};rC.prototype.setManifestType=function(){};rC.prototype.parseMedia=function(a,b,c){a=wd(a);a=sC(a);a=Bb(Ad(a));return this.g.parseMedia(a,b,c)};
|
|
1302
|
+
function sC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",rC);rC.srt2webvtt=sC;rC.prototype.parseMedia=rC.prototype.parseMedia;
|
|
1303
|
+
rC.prototype.setManifestType=rC.prototype.setManifestType;rC.prototype.setSequenceMode=rC.prototype.setSequenceMode;rC.prototype.parseInit=rC.prototype.parseInit;re["text/srt"]=function(){return new rC};function tC(){}tC.prototype.parseInit=function(){};tC.prototype.setSequenceMode=function(){};tC.prototype.setManifestType=function(){};
|
|
1304
|
+
tC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=wd(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=uC.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(f=b.next();!f.done;f=b.next())if(a=f.value,!/^\s*;/.test(a)&&(f=vC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(wC);else if("Style"==a){a=f.split(wC);f={};for(var g=0;g<e.length&&
|
|
1305
|
+
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;a={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;a={Ge:a.Ge},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=vC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(wC);else if("Dialogue"==f){g=g.split(wC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=xC(f.Start);var k=xC(f.End);g=new Rb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Ge=f.Style;(f=d.find(function(l){return function(m){return m.Name==
|
|
1306
|
+
l.Ge}}(a)))&&yC(g,f);e.push(g)}return e};
|
|
1307
|
+
function yC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=zC(c))a.color=c;if(c=b.BackColour)if(c=zC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Yb;a.textAlign="start";break;case 2:a.displayAlign=Yb;a.textAlign=Tb;break;case 3:a.displayAlign=Yb;a.textAlign="end";
|
|
1306
1308
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Tb;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=Tb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1307
|
-
function
|
|
1308
|
-
var
|
|
1309
|
-
function
|
|
1310
|
-
function
|
|
1311
|
-
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
|
|
1312
|
-
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Ti(e),g=f.length;g<e.length&&!
|
|
1313
|
-
k.ce,g+l),size:k.Y,duration:1024
|
|
1314
|
-
S("shaka.transmuxer.AacTransmuxer",
|
|
1309
|
+
function zC(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function xC(a){a=AC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",tC);tC.prototype.parseMedia=tC.prototype.parseMedia;tC.prototype.setManifestType=tC.prototype.setManifestType;tC.prototype.setSequenceMode=tC.prototype.setSequenceMode;tC.prototype.parseInit=tC.prototype.parseInit;
|
|
1310
|
+
var uC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vC=/^\s*([^:]+):\s*(.*)/,wC=/\s*,\s*/,AC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;re["text/x-ssa"]=function(){return new tC};function BC(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{ce:c,Y:a}:null}function CC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,La:"mp4a.40."+e}}
|
|
1311
|
+
function DC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1312
|
+
function EC(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1313
|
+
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function FC(a){this.i=a;this.h=0;this.g=new Map}r=FC.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="'+(ne(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1314
|
+
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Ti(e),g=f.length;g<e.length&&!DC(e,g);g++);a=1E3*c.endTime;f=Si(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=CC(e,g);if(!f)return Promise.reject(new 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=BC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.ce+k.Y;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1315
|
+
k.ce,g+l),size:k.Y,duration:1024,$a:0,flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:2,eb:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.La,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ya:[],ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.h,baseMediaDecodeTime:a,Va:h},stream:b};c=new Sw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Yw(c),this.g.set(b.id,d));b=ox(c);this.h++;b=Md(d,b);return Promise.resolve(b)};
|
|
1316
|
+
S("shaka.transmuxer.AacTransmuxer",FC);FC.prototype.transmux=FC.prototype.transmux;FC.prototype.getOriginalMimeType=FC.prototype.getOriginalMimeType;FC.prototype.convertCodecs=FC.prototype.convertCodecs;FC.prototype.isSupported=FC.prototype.isSupported;FC.prototype.destroy=FC.prototype.destroy;kc("audio/aac",function(){return new FC("audio/aac")},qc);function GC(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1315
1317
|
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,ja:a,Y:e}}
|
|
1316
|
-
function
|
|
1317
|
-
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Ti(a),f=e.length;f<a.length&&!
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Ti(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Si(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=
|
|
1321
|
-
duration:1536
|
|
1322
|
-
|
|
1318
|
+
function HC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function IC(a){this.i=a;this.h=0;this.g=new Map}r=IC.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};
|
|
1319
|
+
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Ti(a),f=e.length;f<a.length&&!HC(a,f);f++);var g=1E3*c.endTime;e=Si(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.ja;k.push({data:a.subarray(f,f+l.Y),size:l.Y,duration:1536,
|
|
1320
|
+
$a:0,flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:2,eb: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,Ya:[],ja:h,ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.h,baseMediaDecodeTime:c,Va:k},stream:b};c=new Sw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Yw(c),this.g.set(b.id,d));b=ox(c);this.h++;b=Md(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",IC);IC.prototype.transmux=IC.prototype.transmux;
|
|
1321
|
+
IC.prototype.getOriginalMimeType=IC.prototype.getOriginalMimeType;IC.prototype.convertCodecs=IC.prototype.convertCodecs;IC.prototype.isSupported=IC.prototype.isSupported;IC.prototype.destroy=IC.prototype.destroy;kc("audio/ac3",function(){return new IC("audio/ac3")},qc);function JC(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,ja:a,Y:d}};function KC(a){this.i=a;this.h=0;this.g=new Map}r=KC.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};
|
|
1322
|
+
r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Ti(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Si(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=JC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ja;k.push({data:a.subarray(f,f+l.Y),size:l.Y,
|
|
1323
|
+
duration:1536,$a:0,flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:2,eb: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,Ya:[],ja:h,ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.h,baseMediaDecodeTime:c,Va:k},stream:b};c=new Sw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Yw(c),this.g.set(b.id,d));b=ox(c);this.h++;b=Md(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",KC);KC.prototype.transmux=KC.prototype.transmux;
|
|
1324
|
+
KC.prototype.getOriginalMimeType=KC.prototype.getOriginalMimeType;KC.prototype.convertCodecs=KC.prototype.convertCodecs;KC.prototype.isSupported=KC.prototype.isSupported;KC.prototype.destroy=KC.prototype.destroy;kc("audio/ec3",function(){return new KC("audio/ec3")},qc);function LC(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new cj(b.data),d=jj(c);jj(c);jj(c);hj(c);if(MC.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)&&
|
|
1323
1325
|
(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,
|
|
1324
|
-
225].concat(k,[1],b));return{height:c,width:f,ua:a,
|
|
1325
|
-
function
|
|
1326
|
-
{data:Md.apply(Ed,x(c)),td:b}:null}var
|
|
1327
|
-
ua:b,
|
|
1328
|
-
function
|
|
1326
|
+
225].concat(k,[1],b));return{height:c,width:f,ua:a,Aa:d,Ba:e}}
|
|
1327
|
+
function NC(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=lj(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?
|
|
1328
|
+
{data:Md.apply(Ed,x(c)),td:b}:null}var MC=[100,110,122,244,44,83,86,118,128,138,139,134];function OC(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=PC(b.fullData);a=QC(c.fullData);var f=RC(d.fullData);b=SC(b.fullData,c.fullData,d.fullData,{Af:e.Af,Xf:e.Xf,ff:a.ff,gf:a.gf,$e:a.$e,ef:a.ef,af:a.af,bf:a.bf,cf:a.cf,df:a.df,Ue:a.Ue,Ve:a.Ve,We:a.We,Xe:a.Xe,Ye:a.Ye,Ze:a.Ze,Re:a.Re,me:a.me,Pe:a.Pe,Oe:a.Oe,Ne:a.Ne,Df:f.Df});return{height:a.height,width:a.width,
|
|
1329
|
+
ua:b,Aa:a.Hi,Ba:a.Gi}}function PC(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{Af:a+1,Xf:b}}
|
|
1330
|
+
function QC(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),F=V(a),J=V(a);if(W(a))for(var I=0;I<=f;I++)V(a),V(a),V(a);else V(a),V(a),
|
|
1329
1331
|
V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(I=0;4>I;I++)for(var G=0;G<(3===I?2:6);G++)if(W(a)){var N=Math.min(64,1<<4+(I<<1));1<I&&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));I=V(a);for(N=G=0;N<I;N++)if(L=!1,0!==N&&(L=W(a)),L){N===I&&V(a);W(a);V(a);for(var M=L=0;M<=G;M++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&L++}G=L}else{M=V(a);L=V(a);G=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(I=V(a),G=0;G<I;G++){for(N=0;N<J+4;N++)fj(a,1);fj(a,
|
|
1330
1332
|
1)}I=J=1;G=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],I=M[N-1]):255===N&&(J=fj(a,16),I=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<=
|
|
1331
1333
|
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),G=V(a),V(a),V(a),V(a),V(a))}return{$e:B,ff:g,gf:h,ef:k,af:l,bf:m,cf:n,df:p,Ue:q,Ve:u,We:v,Xe:w,Ye:A,Ze:z,me:G,Re:0,Pe:y,Oe:K,Ne:F,width:C-(b+c)*(1===y||2===y?2:1),height:D-(d+e)*(1===y?2:1),Hi:J,Gi:I}}
|
|
1332
|
-
function
|
|
1333
|
-
function
|
|
1334
|
-
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
|
|
1335
|
-
function
|
|
1336
|
-
var
|
|
1337
|
-
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Ti(e).length;f<e.length&&!
|
|
1338
|
-
duration:d,
|
|
1339
|
-
|
|
1340
|
-
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new mj;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=
|
|
1341
|
-
|
|
1334
|
+
function RC(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{Df:c}}
|
|
1335
|
+
function SC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ff&3)<<6|(d.gf?1:0)<<5|d.ef&31;e[2]=d.af;e[3]=d.bf;e[4]=d.cf;e[5]=d.df;e[6]=d.Ue;e[7]=d.Ve;e[8]=d.We;e[9]=d.Xe;e[10]=d.Ye;e[11]=d.Ze;e[12]=d.$e;e[13]=240|(d.me&3840)>>8;e[14]=d.me&255;e[15]=252|d.Df&3;e[16]=252|d.Pe&3;e[17]=248|d.Oe&7;e[18]=248|d.Ne&7;e[19]=0;e[20]=0;e[21]=(d.Re&3)<<6|(d.Af&7)<<3|(d.Xf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1336
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function TC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*UC[14*(3===c?3-d:3===d?3:4)+e-1];f=VC[3*(3===c?0:2===c?1:2)+f];c=WC[c][d];var h=XC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,Y:k,Fi:8*c*h}}return null}
|
|
1337
|
+
function YC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function ZC(a,b){if(b+1<a.length&&YC(a,b)){var c=TC(a,b),d=4;c&&c.Y&&(d=c.Y);b+=d;return b===a.length||b+1<a.length&&YC(a,b)}return!1}
|
|
1338
|
+
var UC=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],VC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],WC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],XC=[0,1,1,4];function $C(a){this.i=a;this.h=0;this.g=new Map}r=$C.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};
|
|
1339
|
+
r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Ti(e).length;f<e.length&&!ZC(e,f);f++);var g;for(a=[];f<e.length;){var h=TC(e,f);if(!h)return Promise.reject(new 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,$a:0,flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:2,eb:0}});f+=h.Y}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=9E4*g.Fi/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1340
|
+
duration:d,Ya:[],ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.h,baseMediaDecodeTime:c,Va:a},stream:b};g=new Sw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Yw(g),this.g.set(b.id,d));b=ox(g);this.h++;b=Md(d,b);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",$C);$C.prototype.transmux=$C.prototype.transmux;$C.prototype.getOriginalMimeType=$C.prototype.getOriginalMimeType;$C.prototype.convertCodecs=$C.prototype.convertCodecs;$C.prototype.isSupported=$C.prototype.isSupported;
|
|
1341
|
+
$C.prototype.destroy=$C.prototype.destroy;kc("audio/mpeg",function(){return new $C("audio/mpeg")},qc);function aD(a){this.h=a;this.g=null}r=aD.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=ne(a).split(","),c=Rd("audio",b);b=Rd("video",b);return!c||b||"mp3"!=de(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};
|
|
1342
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new mj;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=TC(a,b))?(b+d.Y<=a.length&&(c=Md(c,a.subarray(b,b+d.Y))),b+=d.Y):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",aD);aD.prototype.transmux=aD.prototype.transmux;
|
|
1343
|
+
aD.prototype.getOriginalMimeType=aD.prototype.getOriginalMimeType;aD.prototype.convertCodecs=aD.prototype.convertCodecs;aD.prototype.isSupported=aD.prototype.isSupported;aD.prototype.destroy=aD.prototype.destroy;kc("video/mp2t",function(){return new aD("video/mp2t")},pc);/*
|
|
1342
1344
|
@license
|
|
1343
1345
|
MSS Transmuxer
|
|
1344
1346
|
Copyright 2015 Dash Industry Forum
|
|
1345
1347
|
SPDX-License-Identifier: BSD-3-Clause
|
|
1346
1348
|
*/
|
|
1347
|
-
function
|
|
1348
|
-
function
|
|
1349
|
+
function bD(a){this.h=a;(this.g=dv.get("ISOBoxer")())&&cD(this)}
|
|
1350
|
+
function cD(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1349
1351
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1350
|
-
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==
|
|
1352
|
+
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==dD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=bD.prototype;r.destroy=function(){};
|
|
1351
1353
|
r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
|
|
1352
1354
|
r.transmux=function(a,b,c){if(!c)return Promise.resolve(Bb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.M()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1353
1355
|
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var q=this.g.createFullBox("saiz",h);q.version=0;q.flags=0;q.sample_count=n.sample_count;q.default_sample_info_size=0;q.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)q.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else q.default_sample_info_size=
|
|
1354
|
-
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=
|
|
1355
|
-
|
|
1356
|
-
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=ne(c).split(",");c=Rd("audio",d);d=Rd("video",d);if(c&&(c=de(c),!
|
|
1356
|
+
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=eD(u,"traf")+eD(h,"senc")+16);var w=Bb(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function eD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",bD);bD.prototype.transmux=bD.prototype.transmux;
|
|
1357
|
+
bD.prototype.getOriginalMimeType=bD.prototype.getOriginalMimeType;bD.prototype.convertCodecs=bD.prototype.convertCodecs;bD.prototype.isSupported=bD.prototype.isSupported;bD.prototype.destroy=bD.prototype.destroy;var dD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);kc("mss/audio/mp4",function(){return new bD("mss/audio/mp4")},qc);kc("mss/video/mp4",function(){return new bD("mss/video/mp4")},qc);function fD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=fD.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1358
|
+
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=ne(c).split(",");c=Rd("audio",d);d=Rd("video",d);if(c&&(c=de(c),!gD.includes(c))||d&&(c=de(d),!hD.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)};
|
|
1357
1359
|
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=ne(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return $e(c,"audio/mp4")}).map(Ze).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
|
|
1358
|
-
r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Aj(f)){for(var g=Ti(f),h=g.length;h<f.length;h++)if(
|
|
1359
|
-
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=
|
|
1360
|
-
b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,
|
|
1361
|
-
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 wa=ja.fullData.byteLength,
|
|
1362
|
-
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ba.data,size:Ba.data.byteLength,duration:Ka
|
|
1363
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Za=[],
|
|
1364
|
-
|
|
1365
|
-
duration:1024
|
|
1366
|
-
(
|
|
1367
|
-
|
|
1368
|
-
rf++}}if(0==
|
|
1369
|
-
le);sf?(
|
|
1370
|
-
|
|
1371
|
-
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
|
|
1372
|
-
2,
|
|
1373
|
-
data:{pb:this.g,baseMediaDecodeTime:
|
|
1374
|
-
|
|
1360
|
+
r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Aj(f)){for(var g=Ti(f),h=g.length;h<f.length;h++)if(ZC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(DC(f,h))return this.h||(this.h=new FC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new mj;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();
|
|
1361
|
+
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=NC(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,$a:Math.round((A.pts||0)-(A.dts||0)),flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:B.td?2:1,eb:B.td?0:1}})}}var C=LC(u);if(!C||null==q)throw new T(2,3,3018,c?c.M()[0]:null);b.height=C.height;
|
|
1362
|
+
b.width=C.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ya:[],ja:new Uint8Array([]),ua:C.ua,Aa:C.Aa,Ba:C.Ba,data:{pb:this.g,baseMediaDecodeTime:q,Va:p},stream:b};break;case "hvc":var D=[],K=null,F=[],J=k.Ac();if(!J.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var I=0;I<J.length;I++){var G=J[I],N=G.nalus;F.push.apply(F,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=
|
|
1363
|
+
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 wa=ja.fullData.byteLength,ya=new Uint8Array(4);ya[0]=wa>>24&255;ya[1]=wa>>16&255;ya[2]=wa>>8&255;ya[3]=wa&255;M.push(ya);M.push(ja.fullData)}}var Ba=M.length?{data:Md.apply(Ed,x(M)),td:L}:null;if(Ba){null==K&&null!=G.dts&&(K=G.dts);var Ka=void 0;Ka=I+1<J.length?(J[I+1].dts||0)-(G.dts||0):1<J.length?(G.dts||0)-(J[I-
|
|
1364
|
+
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ba.data,size:Ba.data.byteLength,duration:Ka,$a:Math.round((G.pts||0)-(G.dts||0)),flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:Ba.td?2:1,eb:Ba.td?0:1}})}}var Ca=OC(F);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,Ya:[],ja:new Uint8Array([]),ua:Ca.ua,Aa:Ca.Aa,Ba:Ca.Ba,data:{pb:this.g,baseMediaDecodeTime:K,Va:D},stream:b}}n&&
|
|
1365
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Za=[],xa,Va=null,pb=t(k.Lb()),Pc=pb.next();!Pc.done;Pc=pb.next()){var ee=Pc.value,rd=ee.data;if(rd){var Hc=0;xa=CC(rd,Hc);if(!xa)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=xa.sampleRate;b.channelsCount=xa.channelCount;null==Va&&null!==ee.pts&&(Va=ee.pts);for(;Hc<rd.length;){var fe=BC(rd,Hc);if(fe){var ge=fe.ce+fe.Y;Hc+ge<=rd.length&&Za.push({data:rd.subarray(Hc+fe.ce,Hc+ge),size:fe.Y,duration:1024,$a:0,flags:{cb:0,
|
|
1366
|
+
Sa:0,Ra:0,Pa:0,Qa:2,eb:0}});Hc+=ge}else Hc++}}}if(!xa||null==Va){if(!k.Ac().length)throw new T(2,3,3018,c?c.M()[0]:null);Va=9E4*c.startTime;var he=Rd("audio",b.codecs.split(","));if(!he||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);xa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,La:he};var sd=EC(he,b.channelsCount);if(!sd)throw new T(2,3,3018,c?c.M()[0]:null);for(var Di=Va+9E4*(c.endTime-c.startTime),xg=Va;xg<Di;)Za.push({data:sd,size:sd.byteLength,
|
|
1367
|
+
duration:1024,$a:0,flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:2,eb:0}}),xg+=1024/xa.sampleRate*9E4}var Ei=xa.sampleRate,Fi=Va/9E4*Ei;n={id:b.id,type:"audio",codecs:xa.La,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ei,duration:d,Ya:[],ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.g,baseMediaDecodeTime:Fi,Va:Za},stream:b};break;case "ac3":for(var yg=[],ie=0,ic=new Uint8Array([]),oj=null,yu=t(k.Lb()),Km=yu.next();!Km.done;Km=yu.next()){var Lm=Km.value,Mm=Lm.data;null==oj&&null!==Lm.pts&&
|
|
1368
|
+
(oj=Lm.pts);for(var qf=0;qf<Mm.length;){var Id=GC(Mm,qf);Id?(b.audioSamplingRate=Id.sampleRate,b.channelsCount=Id.channelCount,ie=Id.sampleRate,ic=Id.ja,yg.push({data:Mm.subarray(qf,qf+Id.Y),size:Id.Y,duration:1536,$a:0,flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:2,eb:0}}),qf+=Id.Y):qf++}}if(0==ie||0==ic.byteLength||null==oj)throw new T(2,3,3018,c?c.M()[0]:null);var xD=oj/9E4*ie;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ie,duration:d,Ya:[],ja:ic,ua:new Uint8Array([]),
|
|
1369
|
+
Aa:0,Ba:0,data:{pb:this.g,baseMediaDecodeTime:xD,Va:yg},stream:b};break;case "ec3":for(var zu=[],pj=0,Nm=new Uint8Array([]),qj=null,Au=t(k.Lb()),Om=Au.next();!Om.done;Om=Au.next()){var Pm=Om.value,Qm=Pm.data;null==qj&&null!==Pm.pts&&(qj=Pm.pts);for(var rf=0;rf<Qm.length;){var Jd=JC(Qm,rf);Jd?(b.audioSamplingRate=Jd.sampleRate,b.channelsCount=Jd.channelCount,pj=Jd.sampleRate,Nm=Jd.ja,zu.push({data:Qm.subarray(rf,rf+Jd.Y),size:Jd.Y,duration:1536,$a:0,flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:2,eb:0}}),rf+=Jd.Y):
|
|
1370
|
+
rf++}}if(0==pj||0==Nm.byteLength||null==qj)throw new T(2,3,3018,c?c.M()[0]:null);var yD=qj/9E4*pj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:pj,duration:d,Ya:[],ja:Nm,ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.g,baseMediaDecodeTime:yD,Va:zu},stream:b};break;case "mp3":for(var Bu=[],rj,sj=null,Cu=t(k.Lb()),Rm=Cu.next();!Rm.done;Rm=Cu.next()){var Sm=Rm.value,Lg=Sm.data;if(Lg){null==sj&&null!==Sm.pts&&(sj=Sm.pts);for(var le=0;le<Lg.length;){var sf=TC(Lg,
|
|
1371
|
+
le);sf?(rj||(rj=sf),le+sf.Y<=Lg.length&&Bu.push({data:Lg.subarray(le,le+sf.Y),size:sf.Y,duration:1152,$a:0,flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:2,eb:0}}),le+=sf.Y):le++}}}if(!rj||null==sj)throw new T(2,3,3018,c?c.M()[0]:null);var Du=rj.sampleRate,zD=sj/9E4*Du;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Du,duration:d,Ya:[],ja:new Uint8Array([]),ua:new Uint8Array([]),Aa:0,Ba:0,data:{pb:this.g,baseMediaDecodeTime:zD,Va:Bu},stream:b};break;case "opus":var Eu=[],
|
|
1372
|
+
tj=null,Rc=k.F;if(!Rc)throw new T(2,3,3018,c?c.M()[0]:null);var yb=[];switch(Rc.rh){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,
|
|
1373
|
+
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 Fu=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 Gu=Rc.sampleRate,Hu=t(k.Lb()),Tm=Hu.next();!Tm.done;Tm=Hu.next()){var Um=Tm.value,tf=Um.data;null==tj&&null!==Um.pts&&(tj=Um.pts);for(var Mg=0;Mg<tf.length;){for(var AD=0!==(tf[Mg+1]&16),BD=0!==(tf[Mg+1]&8),ud=Mg+
|
|
1374
|
+
2,uj=0;255===tf[ud];)uj+=255,ud+=1;uj+=tf[ud];ud+=1;ud+=AD?2:0;ud+=BD?2:0;var Iu=tf.slice(ud,ud+uj);Eu.push({data:Iu,size:Iu.byteLength,duration:960,$a:0,flags:{cb:0,Sa:0,Ra:0,Pa:0,Qa:2,eb:0}});Mg=ud+uj}}if(0==Fu.byteLength||null==tj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Rc.sampleRate;b.channelsCount=Rc.channelCount;var CD=tj/9E4*Gu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Gu,duration:d,Ya:[],ja:Fu,ua:new Uint8Array([]),Aa:0,Ba:0,
|
|
1375
|
+
data:{pb:this.g,baseMediaDecodeTime:CD,Va:Eu},stream:b}}n&&(l.push(n),n=null)}}catch(Vm){return Vm&&3023==Vm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Vm)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Ju=new Sw(l);if(this.i.has(b.id))var Wm=this.i.get(b.id);else Wm=Yw(Ju),this.i.set(b.id,Wm);var DD=ox(Ju);this.g++;var ED=Md(Wm,DD);return Promise.resolve(ED)};S("shaka.transmuxer.TsTransmuxer",fD);fD.prototype.transmux=fD.prototype.transmux;
|
|
1376
|
+
fD.prototype.getOriginalMimeType=fD.prototype.getOriginalMimeType;fD.prototype.convertCodecs=fD.prototype.convertCodecs;fD.prototype.isSupported=fD.prototype.isSupported;fD.prototype.destroy=fD.prototype.destroy;var gD=["aac","ac-3","ec-3","mp3","opus"],hD=["avc","hevc"];kc("video/mp2t",function(){return new fD("video/mp2t")},oc);/*
|
|
1375
1377
|
@license
|
|
1376
1378
|
EME Encryption Scheme Polyfill
|
|
1377
1379
|
Copyright 2019 Google LLC
|
|
1378
1380
|
SPDX-License-Identifier: Apache-2.0
|
|
1379
1381
|
*/
|
|
1380
|
-
function
|
|
1381
|
-
function
|
|
1382
|
-
function
|
|
1382
|
+
function iD(){}var jD;
|
|
1383
|
+
function kD(){jD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(jD=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=lD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1384
|
+
function lD(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),E(e,jD.call(c,a,b),2);d=e.h;if(mD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=jD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=nD;return e.return(nD.call(c,
|
|
1383
1385
|
a,b))})}
|
|
1384
|
-
function
|
|
1385
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,
|
|
1386
|
-
function
|
|
1387
|
-
function
|
|
1388
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
1389
|
-
function
|
|
1390
|
-
new
|
|
1391
|
-
function
|
|
1392
|
-
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",
|
|
1393
|
-
|
|
1394
|
-
function
|
|
1395
|
-
function
|
|
1386
|
+
function nD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=oD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=pD(h.videoCapabilities,d),l=pD(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1387
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,jD.call(c,a,e),2)}p=v.h;u=q=null;e[0]&&(e[0].videoCapabilities&&(q=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new qD(p,q,u))})}function pD(a,b){return a?a.filter(function(c){return rD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",iD);iD.install=kD;function sD(){}var tD;
|
|
1388
|
+
function uD(){tD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(tD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=vD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1389
|
+
function vD(a){var b=this,c,d,e;return O(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(f,tD.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&mD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=tD,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1390
|
+
navigator.mediaCapabilities.decodingInfo=wD;if(d){f.u(3);break}e=c;return E(f,FD(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(wD.call(b,a))}})}
|
|
1391
|
+
function wD(a){var b=this,c,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=oD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},rD(d,g)&&rD(c,g))?E(m,tD.call(b,a),2):m.return(h);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1392
|
+
new qD(k.keySystemAccess,c,d);m.u(3);break}if(!a.keySystemConfiguration){m.u(3);break}l=k;return E(m,FD(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1393
|
+
function FD(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
1394
|
+
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",sD);sD.install=uD;function qD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
|
|
1395
|
+
qD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};qD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
|
|
1396
|
+
function oD(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function mD(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
1397
|
+
function rD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(GD||HD)return!0;return!1}function ID(){}function Nz(){kD();uD()}S("EncryptionSchemePolyfills",ID);ID.install=Nz;var HD=navigator.userAgent.includes("CrKey"),GD=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=ID);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1396
1398
|
|
|
1397
1399
|
//# sourceMappingURL=shaka-player.compiled.map
|