shaka-player 4.8.1 → 4.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deps.js +1 -1
- package/dist/locales.js +35 -35
- package/dist/shaka-player.compiled.debug.js +110 -106
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +223 -223
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +31 -27
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +301 -301
- package/dist/shaka-player.ui.map +2 -2
- package/lib/dash/mpd_utils.js +0 -6
- package/lib/dash/segment_template.js +5 -0
- package/lib/media/playhead.js +3 -3
- package/lib/media/segment_prefetch.js +20 -4
- package/lib/media/streaming_engine.js +5 -0
- package/lib/player.js +1 -1
- package/lib/text/ui_text_displayer.js +12 -1
- package/lib/util/platform.js +21 -0
- package/lib/util/tXml.js +1 -1
- package/package.json +1 -1
- package/ui/resolution_selection.js +1 -0
|
@@ -53,15 +53,15 @@ ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ia(
|
|
|
53
53
|
Copyright 2016 Google LLC
|
|
54
54
|
SPDX-License-Identifier: Apache-2.0
|
|
55
55
|
*/
|
|
56
|
-
function Oa(){}function Pa(){};function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function Wa(){}function Xa(a){var b=Ha.apply(1,arguments);Ya.has(a)||(Ya.add(a),Wa.apply(Ta,y(b)))}function $a(){}function ab(){}function bb(){}var Ya=new Set;window.console&&(Wa=function(){return console.warn.apply(console,y(Ha.apply(0,arguments)))},Ua=function(){console.error.apply(console,y(Ha.apply(0,arguments)))});function cb(){this.g={}}r=cb.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function
|
|
57
|
-
r.ib=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,y(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Kb();this.g.g={}}};P("shaka.util.EventManager",
|
|
56
|
+
function Oa(){}function Pa(){};function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function Wa(){}function Xa(a){var b=Ha.apply(1,arguments);Ya.has(a)||(Ya.add(a),Wa.apply(Ta,y(b)))}function $a(){}function ab(){}function bb(){}var Ya=new Set;window.console&&(Wa=function(){return console.warn.apply(console,y(Ha.apply(0,arguments)))},Ua=function(){console.error.apply(console,y(Ha.apply(0,arguments)))});function cb(){this.g={}}r=cb.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function db(){this.g=new cb}r=db.prototype;r.release=function(){this.ib();this.g=null};r.D=function(a,b,c,d){this.g&&(a=new fb(a,b,c,d),this.g.push(b,a))};r.na=function(a,b,c,d){function e(g){f.Kb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};r.Kb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Kb(),this.g.remove(b,e))}};
|
|
57
|
+
r.ib=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,y(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Kb();this.g.g={}}};P("shaka.util.EventManager",db);db.prototype.removeAll=db.prototype.ib;db.prototype.unlisten=db.prototype.Kb;db.prototype.listenOnce=db.prototype.na;db.prototype.listen=db.prototype.D;db.prototype.release=db.prototype.release;function fb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gb(a,d);this.target.addEventListener(b,c,this.g)}
|
|
58
58
|
fb.prototype.Kb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gb(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return ib(a)?b:b.capture||!1}
|
|
59
59
|
function ib(a){var b=jb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}jb=b}return b||!1}var jb=void 0;function lb(a){if(mb.has(a))return mb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);mb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),mb.set(a,b),b):!1}function nb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var mb=new Map;function ob(a,b){this.g=a;this.h=b}ob.prototype.toString=function(){return"v"+this.g+"."+this.h};function pb(a,b){var c=new ob(5,0),d=qb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function rb(a,b,c,d){Wa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function sb(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var qb=null;function tb(){}tb.prototype.extract=function(){};tb.prototype.decode=function(){return[]};tb.prototype.clear=function(){};tb.prototype.getStreams=function(){return[]};function vb(){}vb.prototype.init=function(){};vb.prototype.parse=function(){return[]};function wb(){}function xb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(zb(a)==zb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Ab(a);b=Ab(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function zb(a){return a instanceof ArrayBuffer?a:a.buffer}function Bb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
60
60
|
function Ab(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint8Array)}function Db(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint16Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,DataView)}function Cb(a,b,c,d){var e=zb(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
|
|
61
61
|
P("shaka.util.BufferUtils",wb);wb.toDataView=Eb;wb.toUint16=Db;wb.toUint8=Ab;wb.toArrayBuffer=Bb;wb.equal=xb;function Fb(){}Fb.prototype.init=function(){};Fb.prototype.i=function(){};Fb.prototype.h=function(){};Fb.prototype.j=function(){};P("shaka.media.IClosedCaptionParser",Fb);function Gb(a){this.l=new vb;if(a=Hb[a.toLowerCase()])this.l=a();this.g=new tb;if(a=Ib)this.g=a()}Gb.prototype.init=function(a){this.l.init(a)};Gb.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=Ab(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};
|
|
62
62
|
Gb.prototype.h=function(){this.g.clear()};Gb.prototype.j=function(){return this.g.getStreams()};P("shaka.media.ClosedCaptionParser",Gb);Gb.findDecoder=function(){return Ib};Gb.unregisterDecoder=function(){Ib=null};Gb.registerDecoder=function(a){Ib=a};Gb.findParser=function(a){return Hb[a]};Gb.unregisterParser=function(a){delete Hb[a]};Gb.registerParser=function(a,b){Hb[a]=b};var Hb={},Ib=null;function Jb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Kb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Lb(a,b,c){c||(c=Jb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={ne:d.ne},e=a.next()){d.ne=e.value;e=b.findIndex(function(f){return function(g){return c(f.ne,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
63
63
|
function Mb(a,b,c){c||(c=Jb);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 Nb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Ob;this.position=null;this.positionAlign=Pb;this.size=0;this.textAlign=Qb;this.direction=Rb;this.writingMode=Tb;this.lineInterpretation=Ub;this.line=null;this.lineHeight="";this.lineAlign=Vb;this.displayAlign=Wb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Xb;this.fontStyle=Yb;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
64
|
-
"";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={
|
|
64
|
+
"";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={Sb:32,rows:15}}function Zb(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}Nb.prototype.clone=function(){var a=new Nb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
65
65
|
function $b(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Mb(a.nestedCues,b.nestedCues,$b))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Mb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}P("shaka.text.Cue",Nb);Nb.equal=$b;Nb.prototype.clone=Nb.prototype.clone;var Pb="auto";
|
|
66
66
|
Nb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Pb};var Qb="center",ac={LEFT:"left",RIGHT:"right",CENTER:Qb,START:"start",END:"end"};Nb.textAlign=ac;var Wb="after",bc={BEFORE:"before",CENTER:"center",AFTER:Wb};Nb.displayAlign=bc;var Rb="ltr";Nb.direction={HORIZONTAL_LEFT_TO_RIGHT:Rb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Tb="horizontal-tb";Nb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Tb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ub=0;
|
|
67
67
|
Nb.lineInterpretation={LINE_NUMBER:Ub,PERCENTAGE:1};var Vb="start",cc={CENTER:"center",START:Vb,END:"end"};Nb.lineAlign=cc;var dc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Nb.defaultTextColor=dc;var ec={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Nb.defaultTextBackgroundColor=ec;var Xb=400;Nb.fontWeight={NORMAL:Xb,BOLD:700};
|
|
@@ -76,10 +76,10 @@ var qc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
76
76
|
Copyright 2006 The Closure Library Authors
|
|
77
77
|
SPDX-License-Identifier: Apache-2.0
|
|
78
78
|
*/
|
|
79
|
-
function rc(a){var b;a instanceof rc?(sc(this,a.kb),this.
|
|
80
|
-
r.toString=function(){var a=[],b=this.kb;b&&a.push(yc(b,zc,!0),":");if(b=this.wb){a.push("//");var c=this.
|
|
81
|
-
r.resolve=function(a){var b=this.clone();"data"===b.kb&&(b=new rc);var c=!!a.kb;c?sc(b,a.kb):c=!!a.
|
|
82
|
-
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Pa=d:c=""!==a.g.toString();c?vc(b,a.g.clone()):c=!!a.
|
|
79
|
+
function rc(a){var b;a instanceof rc?(sc(this,a.kb),this.mc=a.mc,tc(this,a.wb),uc(this,a.Bc),this.Pa=a.Pa,vc(this,a.g.clone()),this.Wb=a.Wb):a&&(b=String(a).match(qc))?(sc(this,b[1]||"",!0),this.mc=wc(b[2]||""),tc(this,b[3]||"",!0),uc(this,b[4]),this.Pa=wc(b[5]||"",!0),vc(this,b[6]||"",!0),this.Wb=wc(b[7]||"")):this.g=new xc(null)}r=rc.prototype;r.kb="";r.mc="";r.wb="";r.Bc=null;r.Pa="";r.Wb="";
|
|
80
|
+
r.toString=function(){var a=[],b=this.kb;b&&a.push(yc(b,zc,!0),":");if(b=this.wb){a.push("//");var c=this.mc;c&&a.push(yc(c,zc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Bc;null!=b&&a.push(":",String(b))}if(b=this.Pa)this.wb&&"/"!=b.charAt(0)&&a.push("/"),a.push(yc(b,"/"==b.charAt(0)?Ac:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Wb)&&a.push("#",yc(b,Dc));return a.join("")};
|
|
81
|
+
r.resolve=function(a){var b=this.clone();"data"===b.kb&&(b=new rc);var c=!!a.kb;c?sc(b,a.kb):c=!!a.mc;c?b.mc=a.mc:c=!!a.wb;c?tc(b,a.wb):c=null!=a.Bc;var d=a.Pa;if(c)uc(b,a.Bc);else if(c=!!a.Pa){if("/"!=d.charAt(0))if(this.wb&&!this.Pa)d="/"+d;else{var e=b.Pa.lastIndexOf("/");-1!=e&&(d=b.Pa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
82
|
+
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.Pa=d:c=""!==a.g.toString();c?vc(b,a.g.clone()):c=!!a.Wb;c&&(b.Wb=a.Wb);return b};r.clone=function(){return new rc(this)};function sc(a,b,c){a.kb=c?wc(b,!0):b;a.kb&&(a.kb=a.kb.replace(/:$/,""))}function tc(a,b,c){a.wb=c?wc(b,!0):b}function uc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Bc=b}else a.Bc=null}
|
|
83
83
|
function vc(a,b,c){b instanceof xc?a.g=b:(c||(b=yc(b,Ec)),a.g=new xc(b))}function wc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function yc(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 zc=/[#\/\?@]/g,Cc=/[#\?:]/g,Ac=/[#\?]/g,Ec=/[#\?@]/g,Dc=/#/g;function xc(a){this.g=a||null}
|
|
84
84
|
function Gc(a){if(!a.Ca&&(a.Ca={},a.Zc=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=xc.prototype;r.Ca=null;r.Zc=null;function Hc(a){Gc(a);return a.Zc}r.add=function(a,b){Gc(this);this.g=null;var c=this.Ca.hasOwnProperty(a)?this.Ca[a]:null;c||(this.Ca[a]=c=[]);c.push(b);this.Zc++;return this};
|
|
85
85
|
r.set=function(a,b){Gc(this);this.g=null;this.Ca.hasOwnProperty(a)?this.Ca[a]=[b]:this.add(a,b);return this};r.get=function(a){Gc(this);return this.Ca[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ca)return"";var a=[],b;for(b in this.Ca)for(var c=encodeURIComponent(b),d=this.Ca[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
@@ -92,10 +92,10 @@ HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORT
|
|
|
92
92
|
MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,
|
|
93
93
|
NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,
|
|
94
94
|
CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,
|
|
95
|
-
CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Jc(a){this.h=a;this.g=void 0}Jc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a){this.h=a;this.g=null}Lc.prototype.
|
|
96
|
-
Mc.prototype.tickAfter=Mc.prototype.
|
|
95
|
+
CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Jc(a){this.h=a;this.g=void 0}Jc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Lc(a){this.h=a;this.g=null}Lc.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};Lc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Mc(a){this.h=a;this.g=null}Mc.prototype.kc=function(){this.stop();this.h();return this};Mc.prototype.X=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.h()})).X(a);return this};Mc.prototype.$a=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.g.X(a);b.h()})).X(a);return this};Mc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};P("shaka.util.Timer",Mc);Mc.prototype.stop=Mc.prototype.stop;Mc.prototype.tickEvery=Mc.prototype.$a;
|
|
96
|
+
Mc.prototype.tickAfter=Mc.prototype.X;Mc.prototype.tickNow=Mc.prototype.kc;function Nc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Oc(a){return""!=Pc().canPlayType(a)}function Qc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Rc(){return Sc("Xbox One")}function Tc(){return Sc("Tizen")}function Uc(){return Sc("Tizen 3")}function Vc(){return Sc("Tizen 2")}function Wc(){return Sc("Web0S")}function Xc(){return Sc("CrKey")}
|
|
97
97
|
function Yc(){if(!Sc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function Zc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Tc()&&!Sc("PC=EOS")&&!Sc("PC=APL")&&!Sc("VirginMedia")&&!Sc("SOPOpenBrowser")&&!$c()&&!Sc("AFT")&&!Sc("WPE")}function ad(){return Sc("PlayStation 5")}function $c(){return Sc("PlayStation 4")}function bd(){return Sc("Hisense")||Sc("VIDAA")}
|
|
98
|
-
function cd(){if(!Zc())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 Sc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(dd)return dd;ed||(ed=new Mc(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.
|
|
98
|
+
function cd(){if(!Zc())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 Sc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(dd)return dd;ed||(ed=new Mc(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.X(1);return dd}
|
|
99
99
|
function fd(){var a,b,c,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:a={width:Infinity,height:Infinity};if(Xc()){window.cast&&cast.__platform__&&cast.__platform__.canDisplayType&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);m.u(2);break}if(Tc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),a.width=
|
|
100
100
|
b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(n){Wa("Tizen: Error detecting screen size, default screen size 1920x1080.")}m.u(2);break}if(Rc()){c=new Windows.Media.Protection.ProtectionCapabilities;d=Windows.Media.Protection.ProtectionCapabilityResult;e=null;try{do e=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',
|
|
101
101
|
"com.microsoft.playready.recommendation");while(e===d.maybe)}catch(n){e=d.notSupported}e===d.probably?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);m.u(2);break}if(Wc()){try{f=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,f.Hj),a.height=Math.max(1080,f.Gj)}catch(n){Wa("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}m.u(2);break}if(bd()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=
|
|
@@ -103,14 +103,14 @@ b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.produ
|
|
|
103
103
|
var ed=null,dd=null;function gd(){}
|
|
104
104
|
function hd(a){if(!a)return"";a=Ab(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!$c())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
105
105
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
106
|
-
function
|
|
107
|
-
function md(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ab(a);if(239==c[0]&&187==c[1]&&191==c[2])return hd(c);if(254==c[0]&&255==c[1])return
|
|
106
|
+
function id(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new Q(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Eb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return ld(d)}
|
|
107
|
+
function md(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ab(a);if(239==c[0]&&187==c[1]&&191==c[2])return hd(c);if(254==c[0]&&255==c[1])return id(c.subarray(2),!1);if(255==c[0]&&254==c[1])return id(c.subarray(2),!0);if(0==c[0]&&0==c[2])return id(a,!1);if(0==c[1]&&0==c[3])return id(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return hd(a);throw new Q(2,2,2003);}
|
|
108
108
|
function nd(a){if(window.TextEncoder&&!$c()){var b=new TextEncoder;return Bb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Bb(b)}function od(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function ld(a){return pd.value()(a)}
|
|
109
|
-
function qd(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}P("shaka.util.StringUtils",gd);gd.resetFromCharCode=function(){pd.g=void 0};gd.toUTF16=od;gd.toUTF8=nd;gd.fromBytesAutoDetect=md;gd.fromUTF16=
|
|
109
|
+
function qd(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}P("shaka.util.StringUtils",gd);gd.resetFromCharCode=function(){pd.g=void 0};gd.toUTF16=od;gd.toUTF8=nd;gd.fromBytesAutoDetect=md;gd.fromUTF16=id;gd.fromUTF8=hd;
|
|
110
110
|
var pd=new Jc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Db:65536};0<b.Db;b={Db:b.Db},b.Db/=2)if(a(b.Db))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Db)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Db));return e}}(b);return null});function rd(){}function sd(a){a=ld(Ab(a));return btoa(a)}function td(a,b){b=void 0==b?!0:b;a=sd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function ud(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function vd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
111
|
-
function
|
|
111
|
+
function wd(a){var b=Ab(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function zd(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(Ab(e),c);c+=e.byteLength}return b}P("shaka.util.Uint8ArrayUtils",rd);rd.concat=zd;rd.toHex=wd;rd.fromHex=vd;rd.fromBase64=ud;rd.toBase64=td;rd.toStandardBase64=sd;function Ad(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new rc(a[0]);b=new rc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new rc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new rc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
|
|
112
112
|
function Bd(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
|
|
113
|
-
function
|
|
113
|
+
function Cd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=td(vd(h),!1));var l=g;22!=l.length&&(l=td(vd(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Ab(nd(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
114
114
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Fd(a,b){if(1==b.length)return b[0];a=Gd(a,b);if(null!=a)return a;throw new Q(2,4,4025,b);}function Gd(a,b){for(var c=t(Hd[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Id?"":null}
|
|
115
115
|
function Jd(a,b){var c=[];a=t(Hd[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Id="text",Kd={fa:"video",S:"audio",ma:Id,ue:"image",Gi:"application"},Hd={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ld(){}function Md(a,b){var c=a;b&&!Nd.includes(a)&&(c+='; codecs="'+b+'"');return c}function Od(a,b){b&&(a+='; codecs="'+b+'"');return a}function Pd(a,b,c){var d=Md(a,b);b=Od(a,b);lc(b)?(a=lc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
116
116
|
function Qd(a,b,c){var d=[b];Rd.forEach(function(e,f){var g=a[f];"codecs"==f?Nd.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Sd(a){return a.split(";")[0].split("/")[1]}
|
|
@@ -170,13 +170,13 @@ function gf(a){var b=a.language;return{id:df(a),active:!1,type:"",bandwidth:0,la
|
|
|
170
170
|
originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function jf(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function kf(a){return a.filter(function(b){return jf(b)})}
|
|
171
171
|
function lf(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=xe(qe(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return qe(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=qf(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(le,[]);return a.length?
|
|
172
172
|
qf(e,a[0]):e}function qf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Me(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}P("shaka.util.StreamUtils",Ae);Ae.meetsRestrictions=Ee;
|
|
173
|
-
var Re={},ef=0,Ue=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Ve=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function rf(){var a=this;this.s=null;this.o=!1;this.i=new Sa;this.F=new
|
|
173
|
+
var Re={},ef=0,Ue=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Ve=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function rf(){var a=this;this.s=null;this.o=!1;this.i=new Sa;this.F=new db;navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",function(){if(a.o&&a.g.useNetworkInformation){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=[];this.B=1;this.G=!1;this.h=this.l=this.g=this.A=null;this.C=new Mc(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
174
174
|
b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}r=rf.prototype;r.stop=function(){this.s=null;this.o=!1;this.m=[];this.B=1;this.l=this.A=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.j=null};r.release=function(){this.F.release();this.C=null};r.init=function(a){this.s=a};
|
|
175
175
|
r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.l.clientHeight*d);c=Math.min(c,this.l.clientWidth*d)}var e=this.m.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
|
|
176
176
|
this.m);d=e;a&&e.length!=this.m.length&&(d=this.m.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=sf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=tf(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=sf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=sf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
177
177
|
a[d];for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.A=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};r.segmentDownloaded=function(a,b,c){this.i.sample(a,b);c&&null!=this.A&&this.o&&uf(this)};
|
|
178
178
|
r.trySuggestStreams=function(){null!=this.A&&this.o&&uf(this)};r.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.j?this.j.getBandwidthEstimate(a):a};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.B=a};
|
|
179
|
-
r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.
|
|
179
|
+
r.setMediaElement=function(a){var b=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.X(vf)}),this.h.observe(this.l))};r.setCmsdManager=function(a){this.j=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
180
180
|
function uf(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0}else if(Date.now()-a.A<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function sf(a,b,c,d,e){if(a.j){var f=a.j.dg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ee(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
181
181
|
function tf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}P("shaka.abr.SimpleAbrManager",rf);rf.prototype.configure=rf.prototype.configure;rf.prototype.setCmsdManager=rf.prototype.setCmsdManager;rf.prototype.setMediaElement=rf.prototype.setMediaElement;rf.prototype.playbackRateChanged=rf.prototype.playbackRateChanged;rf.prototype.setVariants=rf.prototype.setVariants;
|
|
182
182
|
rf.prototype.getBandwidthEstimate=rf.prototype.getBandwidthEstimate;rf.prototype.trySuggestStreams=rf.prototype.trySuggestStreams;rf.prototype.segmentDownloaded=rf.prototype.segmentDownloaded;rf.prototype.disable=rf.prototype.disable;rf.prototype.enable=rf.prototype.enable;rf.prototype.chooseVariant=rf.prototype.chooseVariant;rf.prototype.init=rf.prototype.init;rf.prototype.release=rf.prototype.release;rf.prototype.stop=rf.prototype.stop;var vf=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{hj:"reload",Og:"smooth"});function wf(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}wf.prototype.add=function(a,b,c){return xf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
@@ -186,7 +186,7 @@ function Bf(a,b,c,d,e,f,g,h,k,l){this.s=a;this.A=b;this.h=c;this.i=d;this.B=e;th
|
|
|
186
186
|
Bf.prototype.create=function(a){var b=[];b=Cf(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Df(b,this.A);a.length&&(b=a);this.l&&(a=Ef(b,this.l),a.length&&(b=a));this.i&&(a=Ff(b,this.i),a.length&&(b=a));this.h&&(a=Gf(b,this.h),a.length&&(b=a));this.g&&(a=Hf(b,this.g),a.length&&(b=a));this.j&&(a=If(b,this.j),a.length&&(b=a));a=Jf(b,this.B);a.length&&(b=a);return new wf(b[0],b,!("smooth"==this.m&&nb()),this.o)};
|
|
187
187
|
function Cf(a,b){b=qe(b);var c=xe(b,a.map(function(d){return we(d)}));return c?a.filter(function(d){return c==we(d)}):[]}function Df(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Hf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function If(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
188
188
|
function Gf(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Ff(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 Ef(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Jf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Kf(){this.g=Lf;this.i=(new Map).set(Lf,2).set(Mf,1);this.h=0}function Nf(a,b,c){a.i.set(Lf,c).set(Mf,b)}var Mf=0,Lf=1;function Of(a,b){var c=Pf();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}
|
|
189
|
-
function Qf(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new Q(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 C(d,new Promise(function(e){(new Mc(e)).
|
|
189
|
+
function Qf(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new Q(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 C(d,new Promise(function(e){(new Mc(e)).X(c/1E3)}),2)}a.h*=a.m;G(d)})}function Pf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Rf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Rf.prototype.resolve=function(){};Rf.prototype.reject=function(){};function Sf(a,b){this.promise=a;this.i=b;this.g=!1}function Tf(a){return new Sf(Promise.reject(a),function(){return Promise.resolve()})}function Uf(){var a=Promise.reject(new Q(2,7,7001));a.catch(function(){});return new Sf(a,function(){return Promise.resolve()})}function Vf(a){return new Sf(Promise.resolve(a),function(){return Promise.resolve()})}function Wf(a){return new Sf(a,function(){return a.catch(function(){})})}Sf.prototype.abort=function(){this.g=!0;return this.i()};
|
|
190
190
|
function Xf(a){return new Sf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Sf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
191
191
|
Sf.prototype.va=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Yf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Rf,g=new Q(2,7,7001);this.promise.then(c(!0),c(!1));return new Sf(f,function(){return d()})};
|
|
192
192
|
function Yf(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}P("shaka.util.AbortableOperation",Sf);Sf.prototype.chain=Sf.prototype.va;Sf.prototype["finally"]=Sf.prototype.finally;Sf.all=Xf;Sf.prototype.abort=Sf.prototype.abort;Sf.notAbortable=Wf;Sf.completed=Vf;Sf.aborted=Uf;Sf.failed=Tf;function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
@@ -199,18 +199,18 @@ r.request=function(a,b,c){var d=this,e=new ig;if(this.i){var f=Promise.reject(ne
|
|
|
199
199
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.va(function(q){var p=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=p;q.Ih||!d.l||u.fromCache||"HEAD"==b.method||a!=ng||d.l(u.timeMs,u.data.byteLength,og(c));d.B&&d.B(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new jg(n.promise,function(){return n.abort()},e);cg(this.m,f);return f};
|
|
200
200
|
function kg(a,b,c,d){function e(h){f=f.va(function(){c.body&&(c.body=Bb(c.body));return h(b,c,d)})}var f=Vf(void 0);a.A&&e(a.A);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.va(void 0,function(h){if(h instanceof Q&&7001==h.code)throw h;throw new Q(2,1,1006,h);})}
|
|
201
201
|
function lg(a,b,c,d,e,f,g,h){a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.C&&a.C(b,d,c.uris[f],c.uris[f-1]);var k=new rc(c.uris[f]),l=k.kb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),sc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=gg[l])?l.ge:null;if(!n)return Tf(new Q(2,1,1E3,k));var q=l.bi,p=null,u=null,x=!1,w=!1,z;return Wf(Qf(e)).va(function(){if(a.i)return Uf();z=Date.now();var v=0;c.requestStartTime=Date.now();var B=n(c.uris[f],c,b,function(F,J,I){p&&p.stop();
|
|
202
|
-
u&&u.
|
|
202
|
+
u&&u.X(D/1E3);a.l&&b==ng&&(v++,c.packetNumber=v,a.l(F,J,og(d),c),m=!0,h.g=I)},function(F){a.j&&a.j(F,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!q)return B;var A=c.retryParameters.connectionTimeout;A&&(p=new Mc(function(){x=!0;B.abort()}),p.X(A/1E3));var D=c.retryParameters.stallTimeout;D&&(u=new Mc(function(){x=!0;B.abort()}));return B}).va(function(v){p&&p.stop();u&&u.stop();void 0==v.timeMs&&(v.timeMs=Date.now()-z);var B={response:v,Ih:m};!w&&a.j&&a.j(v.headers,c,b);return B},
|
|
203
203
|
function(v){p&&p.stop();u&&u.stop();if(a.s){var B=null,A=0;v instanceof Q&&(B=v,1001==v.code&&(A=v.data[1]));a.s(c,B,A,x)}if(a.i)return Uf();x&&(v=new Q(1,1,1003,c.uris[f],b));if(v instanceof Q){if(7001==v.code)throw v;if(1010==v.code)throw g;if(1==v.severity)return B=(new Map).set("error",v),B=new S("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,lg(a,b,c,d,e,f,v,h)}throw v;})}
|
|
204
204
|
function mg(a,b,c,d){var e=Vf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={qe:f.qe},g=a.next())f.qe=g.value,e=e.va(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return h.qe(b,k,d)}}(f));return e.va(function(){return c},function(h){var k=2;if(h instanceof Q){if(7001==h.code)throw h;k=h.severity}throw new Q(k,1,1007,h);})}function og(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.md)return!1}return!0}P("shaka.net.NetworkingEngine",dg);
|
|
205
205
|
dg.prototype.request=dg.prototype.request;dg.prototype.destroy=dg.prototype.destroy;dg.makeRequest=hg;dg.defaultRetryParameters=function(){return Pf()};dg.prototype.clearAllResponseFilters=dg.prototype.ah;dg.prototype.unregisterResponseFilter=dg.prototype.Ci;dg.prototype.registerResponseFilter=dg.prototype.fi;dg.prototype.clearAllRequestFilters=dg.prototype.$g;dg.prototype.unregisterRequestFilter=dg.prototype.Bi;dg.prototype.registerRequestFilter=dg.prototype.ei;dg.unregisterScheme=function(a){delete gg[a]};
|
|
206
206
|
dg.registerScheme=eg;dg.prototype.setForceHTTPS=dg.prototype.Cf;function ig(){this.g=0}dg.NumBytesRemainingClass=ig;function jg(a,b,c){Sf.call(this,a,b);this.h=c}na(jg,Sf);dg.PendingRequest=jg;var ng=1;dg.RequestType={MANIFEST:0,SEGMENT:ng,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};dg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var fg=3;dg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:fg};var gg={};function pg(a){this.g=!1;this.h=new Rf;this.i=a}pg.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 qg(a,b){if(a.g){if(b instanceof Q&&7003==b.code)throw b;throw new Q(2,7,7003,b);}};function rg(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 tg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function ug(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 vg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function wg(a,b){this.h=Eb(a);this.i=b==xg;this.g=0}r=wg.prototype;r.ka=function(){return this.g<this.h.byteLength};r.wa=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.P=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw yg();}};r.ra=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw yg();}};r.M=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw yg();}};
|
|
207
207
|
r.sg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw yg();}};r.Cc=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 yg();}if(2097151<b)throw new Q(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.sb=function(a){if(this.g+a>this.h.byteLength)throw yg();var b=Ab(this.h,this.g,a);this.g+=a;return b};
|
|
208
|
-
r.skip=function(a){if(this.g+a>this.h.byteLength)throw yg();this.g+=a};r.mi=function(a){if(this.g<a)throw yg();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw yg();this.g=a};r.
|
|
208
|
+
r.skip=function(a){if(this.g+a>this.h.byteLength)throw yg();this.g+=a};r.mi=function(a){if(this.g<a)throw yg();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw yg();this.g=a};r.hc=function(){for(var a=this.g;this.ka()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Ab(this.h,a,this.g-a);this.g+=1;return hd(a)};function yg(){return new Q(2,3,3E3)}P("shaka.util.DataViewReader",wg);wg.prototype.readTerminatedString=wg.prototype.hc;wg.prototype.seek=wg.prototype.seek;wg.prototype.rewind=wg.prototype.mi;
|
|
209
209
|
wg.prototype.skip=wg.prototype.skip;wg.prototype.readBytes=wg.prototype.sb;wg.prototype.readUint64=wg.prototype.Cc;wg.prototype.readInt32=wg.prototype.sg;wg.prototype.readUint32=wg.prototype.M;wg.prototype.readUint16=wg.prototype.ra;wg.prototype.readUint8=wg.prototype.P;wg.prototype.getLength=wg.prototype.getLength;wg.prototype.getPosition=wg.prototype.wa;wg.prototype.hasMoreData=wg.prototype.ka;var xg=1;wg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:xg};function zg(){this.i=[];this.h=[];this.g=!1}r=zg.prototype;r.box=function(a,b){a=Ag(a);this.i[a]=Bg;this.h[a]=b;return this};r.O=function(a,b){a=Ag(a);this.i[a]=Cg;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new wg(a,0);for(this.g=!1;a.ka()&&!this.g;)this.Ac(0,a,b,c)};
|
|
210
210
|
r.Ac=function(a,b,c,d){var e=b.wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.M(),g=b.M(),h=Dg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.wa()+8>b.getLength()){this.g=!0;return}f=b.Cc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Cg){if(d&&b.wa()+4>b.getLength()){this.g=!0;return}n=b.M();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.wa(),b=0<d?b.sb(d):new Uint8Array(0),b=new wg(b,0),l({name:h,parser:this,
|
|
211
211
|
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function Eg(a){for(var b=Fg(a);a.reader.ka()&&!a.parser.g;)a.parser.Ac(a.start+b,a.reader,a.partialOkay)}function Ig(a){for(var b=Fg(a),c=a.reader.M(),d=0;d<c&&(a.parser.Ac(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Jg(a){var b=Fg(a);for(a.reader.skip(78);a.reader.ka()&&!a.parser.g;)a.parser.Ac(a.start+b,a.reader,a.partialOkay)}
|
|
212
212
|
function Kg(a){var b=Fg(a);a.reader.skip(8);var c=a.reader.ra();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.ka()&&!a.parser.g;)a.parser.Ac(a.start+b,a.reader,a.partialOkay)}function Lg(a){return function(b){a(b.reader.sb(b.reader.getLength()-b.reader.wa()))}}function Ag(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Dg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
213
|
-
function Fg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",zg);zg.headerSize=Fg;zg.typeToString=Dg;zg.allData=Lg;zg.audioSampleEntry=Kg;zg.visualSampleEntry=Jg;zg.sampleDescription=Ig;zg.children=Eg;zg.prototype.parseNext=zg.prototype.Ac;zg.prototype.parse=zg.prototype.parse;zg.prototype.stop=zg.prototype.stop;zg.prototype.fullBox=zg.prototype.O;zg.prototype.box=zg.prototype.box;var Bg=0,Cg=1;function Mg(a){var b=this;this.g=[];this.h=[];this.data=[];(new zg).box("moov",Eg).box("moof",Eg).O("pssh",function(c){if(!(1<c.version)){var d=Ab(c.reader.h,-12,c.size);b.data.push(d);b.g.push(
|
|
213
|
+
function Fg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",zg);zg.headerSize=Fg;zg.typeToString=Dg;zg.allData=Lg;zg.audioSampleEntry=Kg;zg.visualSampleEntry=Jg;zg.sampleDescription=Ig;zg.children=Eg;zg.prototype.parseNext=zg.prototype.Ac;zg.prototype.parse=zg.prototype.parse;zg.prototype.stop=zg.prototype.stop;zg.prototype.fullBox=zg.prototype.O;zg.prototype.box=zg.prototype.box;var Bg=0,Cg=1;function Mg(a){var b=this;this.g=[];this.h=[];this.data=[];(new zg).box("moov",Eg).box("moof",Eg).O("pssh",function(c){if(!(1<c.version)){var d=Ab(c.reader.h,-12,c.size);b.data.push(d);b.g.push(wd(c.reader.sb(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=wd(c.reader.sb(16));b.h.push(f)}}}}).parse(a)}
|
|
214
214
|
function Ng(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Eb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=vd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
215
215
|
@license
|
|
216
216
|
tXml
|
|
@@ -227,14 +227,14 @@ function Xg(a){if(!Array.from(a.children).every(function(b){return"string"===typ
|
|
|
227
227
|
function bh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function ch(a,b,c){b=Rg(b);return a.attributes[b+":"+c]||null}function ah(a,b,c){b=Rg(b);var d=[];if(a.children){a=t(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function dh(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=ch(a,d.value,c))return d;return null}
|
|
228
228
|
function eh(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function fh(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
229
229
|
function gh(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function hh(a){a=Number(a);return 0===a%1?a:null}function ih(a){a=Number(a);return 0===a%1&&0<a?a:null}function jh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function kh(a){a=Number(a);return isNaN(a)?null:a}function lh(a){return a?"true"===a.toLowerCase():!1}
|
|
230
|
-
function mh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function nh(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&&nh(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=nh(b,!1,!0),d.appendChild(c);return d}var Sg=new Map([]);function oh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ia=this.da=!1;this.I=0;this.g=null;this.B=new
|
|
230
|
+
function mh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function nh(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&&nh(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=nh(b,!1,!0),d.appendChild(c);return d}var Sg=new Map([]);function oh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ia=this.da=!1;this.I=0;this.g=null;this.B=new db;this.i=new Map;this.A=new Map;this.l=new Rf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.ea=new Map;this.L=new Mc(function(){return ph(b)});this.T=!1;this.N=[];this.Y=!1;this.K=new Mc(function(){qh(b)});this.l.catch(function(){});this.j=new pg(function(){return rh(b)});this.ba=!1;this.F=this.G=null}r=oh.prototype;r.destroy=function(){return this.j.destroy()};
|
|
231
231
|
function rh(a){return L(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,C(b,sh(a),2);case 2:if(!a.m){b.u(3);break}ra(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:va(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.ba=!1,a.G=null,G(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.$a(this.h.updateExpirationTime)};
|
|
232
232
|
function th(a,b,c){a.ia=!0;a.A=new Map;a.T=c;return uh(a,b)}function vh(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 uh(a,b)}
|
|
233
233
|
function wh(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 xh(a,g,[])}
|
|
234
234
|
function uh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v;return L(function(B){if(1==B.g){if(c=yh(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(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});g||(h=ug(a.h.servers),zh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Ah(m),q=t(n),p=q.next();!p.done;p=q.next())u=p.value,k.add(u);x=t(k);for(p=x.next();!p.done;p=
|
|
235
235
|
x.next())w=p.value,Bh(w,ug(a.h.servers),ug(a.h.advanced||{}),a.h.keySystemsMapping);return C(B,Ke(b,a.T,a.ba,a.h.preferredKeySystems),2)}z=g||Object.keys(a.h.servers).length;if(!z)return a.da=!0,B.return(Promise.resolve());v=xh(a,void 0,b);return B.return(g?v:v.catch(function(){}))})}
|
|
236
236
|
function Ch(a){var b;return L(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return C(c,a.G,3);case 3:return qg(a.j),c.return();case 2:return ra(c,4),a.G=a.m.setMediaKeys(a.s),C(c,a.G,6);case 6:ta(c,5);break;case 4:b=va(c),a.o(new Q(2,6,6003,b.message));case 5:qg(a.j),G(c)}})}function Dh(a,b){return L(function(c){if(1==c.g)return C(c,Ch(a),2);Eh(a,b.initDataType,Ab(b.initData));G(c)})}
|
|
237
|
-
r.Vc=function(a){var b=this;return L(function(c){if(1==c.g){if(!b.s)return b.B.na(a,"encrypted",function(){b.o(new Q(2,6,6010))}),c.return();b.m=a;b.B.na(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Fh(b,e.value);b.
|
|
237
|
+
r.Vc=function(a){var b=this;return L(function(c){if(1==c.g){if(!b.s)return b.B.na(a,"encrypted",function(){b.o(new Q(2,6,6010))}),c.return();b.m=a;b.B.na(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Fh(b,e.value);b.Y=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return sh(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||
|
|
238
238
|
b.A.size?C(c,Ch(b),2):c.u(2)}Gh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Dh(b,d)});G(c)})};
|
|
239
239
|
function Hh(a){var b,c,d,e,f;return L(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=hg([a.g.serverCertificateUri],a.h.retryParameters);ra(g,3);c=a.C.zb.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ab(d.data);ta(g,4);break;case 3:throw e=va(g),new Q(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();
|
|
240
240
|
ra(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=va(g),new Q(2,6,6004,f.message);}})}function Ih(a,b){var c,d,e;return L(function(f){if(1==f.g)return C(f,Jh(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.ab=new Rf,d.push(e.ab);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);G(f)})}
|
|
@@ -250,19 +250,19 @@ function Ph(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ah(e.va
|
|
|
250
250
|
l.pe}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
251
251
|
function Qh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,x,w;return L(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new Q(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){z.u(4);break}k=h.value;if(!b.has(k)){z.u(3);break}l=b.get(k);ra(z,6);return C(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
252
252
|
z.h,z.return(c);case 6:va(z);case 7:qg(a.j);case 3:h=g.next();z.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.u(11);break}q=n.value;p=t(b.keys());h=p.next();case 12:if(h.done){n=m.next();z.u(9);break}u=h.value;x=b.get(u);w=x.drmInfos.some(function(v){return!!v.licenseServerUri});if(w!=q){z.u(13);break}ra(z,15);return C(z,navigator.requestMediaKeySystemAccess(u,[x]),17);case 17:return c=z.h,z.return(c);case 15:va(z);case 16:qg(a.j);case 13:h=p.next();z.u(12);break;case 11:return z.return(c)}})}
|
|
253
|
-
function yh(a){a=ug(a.h.clearKeys);return 0==a.size?null:
|
|
254
|
-
function Jh(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new Q(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.
|
|
253
|
+
function yh(a){a=ug(a.h.clearKeys);return 0==a.size?null:Cd(a)}function Sh(a){Lh(a)&&a.l.resolve()}function Th(a,b){(new Mc(function(){b.loaded=!0;Sh(a)})).X(Uh)}
|
|
254
|
+
function Jh(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new Q(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.Y?a.N.push(n):Fh(a,n)});a.B.D(d,"keystatuseschange",function(n){return Vh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,lf:Infinity,ab:null,type:"persistent-license"};a.i.set(d,f);ra(m,2);return C(m,
|
|
255
255
|
d.load(b),4);case 4:return g=m.h,qg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new Q(h,6,6013)),f.loaded=!0),Th(a,f),Sh(a),m.return(d);case 2:k=va(m),qg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new Q(l,6,6005,k.message)),f.loaded=!0,Sh(a);case 3:return m.return(Promise.resolve())}})}
|
|
256
|
-
function Mh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new Q(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.
|
|
256
|
+
function Mh(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new Q(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.Y?a.N.push(f):Fh(a,f)});a.B.D(e,"keystatuseschange",function(f){return Vh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,lf:Infinity,ab:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof Q||(b=new Q(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&td(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
257
257
|
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 Q(2,6,6006,f.message,f,h))}})}
|
|
258
258
|
function Fh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u;L(function(x){switch(x.g){case 1:c=b.target;a.h.logLicenseExchange&&td(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=hg([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(Nh(a.g.keySystem)){var w=
|
|
259
|
-
|
|
260
|
-
d&&d.ab&&d.ab.reject(n)):(d&&d.ab&&d.ab.reject(n),a.i.delete(c),Lh(a)&&(a.l.resolve(),a.L.
|
|
261
|
-
function Vh(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(Nh(a.g.keySystem)&&16==g.byteLength&&(Qc()||$c())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=
|
|
262
|
-
Lh(a)&&(a.l.resolve(),a.L.
|
|
259
|
+
id(g.body,!0,!0);if(w.includes("PlayReadyKeyMessage")){w=Pg(w,"PlayReadyKeyMessage");var z=Yg(w,"HttpHeader");z=t(z);for(var v=z.next();!v.done;v=z.next()){var B=v.value;v=Yg(B,"name")[0];B=Yg(B,"value")[0];g.headers[Wg(v)]=Wg(B)}w=Yg(w,"Challenge")[0];g.body=ud(Wg(w))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ra(x,2);l=a.C.zb.request(2,g);return C(x,l.promise,4);case 4:k=x.h;ta(x,3);break;case 2:m=va(x);if(a.j.g)return x.return();n=new Q(2,6,6007,m);1==a.i.size?(a.o(n),
|
|
260
|
+
d&&d.ab&&d.ab.reject(n)):(d&&d.ab&&d.ab.reject(n),a.i.delete(c),Lh(a)&&(a.l.resolve(),a.L.X(.1)));return x.return();case 3:if(a.j.g)return x.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&td(k.data);ra(x,5);return C(x,c.update(k.data),7);case 7:ta(x,6);break;case 5:return q=va(x),p=new Q(2,6,6008,q.message),a.o(p),d&&d.ab&&d.ab.reject(p),x.return();case 6:if(a.j.g)return x.return();u=new S("drmsessionupdate");a.C.onEvent(u);d&&(d.ab&&d.ab.resolve(),Th(a,d));G(x)}})}
|
|
261
|
+
function Vh(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(Nh(a.g.keySystem)&&16==g.byteLength&&(Qc()||$c())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=wd(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ab&&(a.i.delete(b),b.close().catch(function(){}));
|
|
262
|
+
Lh(a)&&(a.l.resolve(),a.L.X(Wh))}function ph(a){var b=a.aa,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new Q(2,6,6014));a.C.ee(vg(c))}
|
|
263
263
|
function Xh(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,q;return L(function(p){switch(p.g){case 1:ra(p,
|
|
264
264
|
2);if("org.w3.clearkey"===l&&cd())throw Error("Unsupported keySystem");return C(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,q=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Uc()&&(q=!1),f.set(l,{persistentState:q}),C(p,m.createMediaKeys(),5);case 5:ta(p,0);break;case 2:va(p),f.set(l,null),G(p)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(vg(f))})}
|
|
265
|
-
function Yh(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Mc(e)).
|
|
265
|
+
function Yh(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Mc(e)).X(Zh)}),ra(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);va(c);G(c)})}
|
|
266
266
|
function sh(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return C(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return ra(g,2),a.ia||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,Yh(e),5):C(g,e.remove(),5);if(2!=g.g)return ta(g,0);va(g);G(g)})})),0)})}function $h(a,b){return a.length&&b.length&&a!==b?0<ai(a,b).length:!0}
|
|
267
267
|
function ai(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(y(d.keyIds),y(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
268
268
|
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}
|
|
@@ -282,17 +282,17 @@ function ci(a,b,c){this.h=a;this.i=b;this.g=c}function di(a,b){return L(function
|
|
|
282
282
|
function fi(a,b){var c=Fe(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,gi(a,d.keySystem,f.video),gi(a,d.keySystem,f.audio);hi(a,b)}return c}function gi(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,Eh(a.g,e.initDataType,e.initData)}}}
|
|
283
283
|
function hi(a,b){a=a.g?a.g.Kd():{};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?ii.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
284
284
|
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new Q(2,4,4012,a);}var ii=["output-restricted","internal-error"];function ji(){}function ki(a,b){if(b){var c=li[b.toLowerCase()];if(c)return c}throw new Q(2,4,4E3,a,b);}P("shaka.media.ManifestParser",ji);ji.unregisterParserByMime=function(a){delete li[a]};ji.registerParserByMime=function(a,b){li[a]=b};ji.registerParserByExtension=function(){pb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ji.AccessibilityPurpose={zj:"visually impaired",Ui:"hard of hearing"};var li={};function mi(a){function b(){d=!0}function c(l){f.push(l);Eg(l)}a=Ab(a);var d=!1,e,f=[],g=[];(new zg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);Ig(l)}).O("encv",b).O("enca",b).O("dvav",function(l){g.push({box:l,Xa:1701733238})}).O("dva1",function(l){g.push({box:l,Xa:1701733238})}).O("dvh1",function(l){g.push({box:l,Xa:1701733238})}).O("dvhe",function(l){g.push({box:l,Xa:1701733238})}).O("hev1",function(l){g.push({box:l,Xa:1701733238})}).O("hvc1",
|
|
285
|
-
function(l){g.push({box:l,Xa:1701733238})}).O("avc1",function(l){g.push({box:l,Xa:1701733238})}).O("avc3",function(l){g.push({box:l,Xa:1701733238})}).O("ac-3",function(l){g.push({box:l,Xa:1701733217})}).O("ec-3",function(l){g.push({box:l,Xa:1701733217})}).O("ac-4",function(l){g.push({box:l,Xa:1701733217})}).O("mp4a",function(l){g.push({box:l,Xa:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(
|
|
285
|
+
function(l){g.push({box:l,Xa:1701733238})}).O("avc1",function(l){g.push({box:l,Xa:1701733238})}).O("avc3",function(l){g.push({box:l,Xa:1701733238})}).O("ac-3",function(l){g.push({box:l,Xa:1701733217})}).O("ec-3",function(l){g.push({box:l,Xa:1701733217})}).O("ac-4",function(l){g.push({box:l,Xa:1701733217})}).O("mp4a",function(l){g.push({box:l,Xa:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(wd(a)),new Q(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
|
|
286
286
|
a=ni(a,e,k.box,f,k.Xa);return a}
|
|
287
287
|
function ni(a,b,c,d,e){var f=oi.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);pi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Rc()?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,pi(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Fg(b);a=k.getUint32(b);
|
|
288
|
-
k.setUint32(b,a+1);return e}function pi(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var oi=new Jc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function qi(a,b,c,d,e,f,g){this.$=a;this.Aa=b;this.ja=c;this.ff=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}qi.prototype
|
|
289
|
-
qi.prototype.getEndByte=qi.prototype.
|
|
288
|
+
k.setUint32(b,a+1);return e}function pi(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var oi=new Jc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function qi(a,b,c,d,e,f,g){this.$=a;this.Aa=b;this.ja=c;this.ff=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}qi.prototype.ac=function(){return this.Aa};qi.prototype.Yb=function(){return this.ja};qi.prototype.ed=function(){return this.g};function ui(a,b){return a===b?!0:a&&b?a.ac()==b.ac()&&a.Yb()==b.Yb()&&Mb(a.$().sort(),b.$().sort())&&xb(a.ed(),b.ed()):a==b}P("shaka.media.InitSegmentReference",qi);
|
|
289
|
+
qi.prototype.getEndByte=qi.prototype.Yb;qi.prototype.getStartByte=qi.prototype.ac;
|
|
290
290
|
function vi(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,x){l=void 0===l?[]:l;p=void 0===p?wi:p;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Aa=d;this.ja=e;this.ca=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===q?null:q;this.status=p;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===x?!1:x;this.Wd=this.md=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
291
|
-
a.next())b.value.ng();this.o&&this.g.length&&this.g[this.g.length-1].mg();this.B=this.mimeType=this.codecs=null}r=vi.prototype;r.$=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.mh=function(){return this.endTime};r
|
|
291
|
+
a.next())b.value.ng();this.o&&this.g.length&&this.g[this.g.length-1].mg();this.B=this.mimeType=this.codecs=null}r=vi.prototype;r.$=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.mh=function(){return this.endTime};r.ac=function(){return this.Aa};r.Yb=function(){return this.ja};r.Dh=function(){return this.tilesLayout};r.Ch=function(){return this.A};r.bc=function(){return this.status};r.Vh=function(){this.status=xi};r.ef=function(){this.preload=!0};r.Ph=function(){return this.preload};
|
|
292
292
|
r.Zd=function(){this.l=!1};r.Mh=function(){return this.l};r.ng=function(){this.md=!0};r.Oh=function(){return this.md};r.mg=function(){this.Wd=!0};r.Nh=function(){return this.Wd};r.lg=function(){this.m=!0};r.Jh=function(){return this.m};r.Eg=function(a){this.s=a};r.Bh=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};
|
|
293
293
|
r.Ff=function(a){null==this.h?Ua("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.yi=function(a){this.B=a};r.ed=function(){return this.B};function yi(a,b){a.ca=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())yi(c.value,b)}P("shaka.media.SegmentReference",vi);vi.prototype.getSegmentData=vi.prototype.ed;vi.prototype.setSegmentData=vi.prototype.yi;vi.prototype.syncAgainst=vi.prototype.Ff;vi.prototype.offset=vi.prototype.offset;
|
|
294
294
|
vi.prototype.getThumbnailSprite=vi.prototype.Bh;vi.prototype.setThumbnailSprite=vi.prototype.Eg;vi.prototype.hasByterangeOptimization=vi.prototype.Jh;vi.prototype.markAsByterangeOptimization=vi.prototype.lg;vi.prototype.isLastPartial=vi.prototype.Nh;vi.prototype.markAsLastPartial=vi.prototype.mg;vi.prototype.isPartial=vi.prototype.Oh;vi.prototype.markAsPartial=vi.prototype.ng;vi.prototype.isIndependent=vi.prototype.Mh;vi.prototype.markAsNonIndependent=vi.prototype.Zd;vi.prototype.isPreload=vi.prototype.Ph;
|
|
295
|
-
vi.prototype.markAsPreload=vi.prototype.ef;vi.prototype.markAsUnavailable=vi.prototype.Vh;vi.prototype.getStatus=vi.prototype.
|
|
295
|
+
vi.prototype.markAsPreload=vi.prototype.ef;vi.prototype.markAsUnavailable=vi.prototype.Vh;vi.prototype.getStatus=vi.prototype.bc;vi.prototype.getTileDuration=vi.prototype.Ch;vi.prototype.getTilesLayout=vi.prototype.Dh;vi.prototype.getEndByte=vi.prototype.Yb;vi.prototype.getStartByte=vi.prototype.ac;vi.prototype.getEndTime=vi.prototype.mh;vi.prototype.getStartTime=vi.prototype.getStartTime;vi.prototype.getUris=vi.prototype.$;var wi=0,xi=1;vi.Status={Hi:wi,xj:xi,$i:2};function zi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ai(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Bi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Ci(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}
|
|
296
296
|
function Di(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ci(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ci(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};/*
|
|
297
297
|
@license
|
|
298
298
|
Shaka Player
|
|
@@ -345,7 +345,7 @@ function mj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)retu
|
|
|
345
345
|
a.toString(16).toUpperCase());b.Ea=e;return b}function lj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function pj(a){return 0>jj(a)?!1:!0}function jj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}P("shaka.util.TsParser",ij);ij.syncOffset=jj;ij.probe=pj;ij.prototype.getVideoInfo=ij.prototype.We;ij.prototype.getVideoResolution=ij.prototype.Gh;ij.prototype.getVideoNalus=ij.prototype.Od;
|
|
346
346
|
ij.prototype.getCodecs=ij.prototype.bd;ij.prototype.getStartTime=ij.prototype.getStartTime;ij.prototype.getVideoData=ij.prototype.xc;ij.prototype.getAudioData=ij.prototype.Fb;ij.prototype.getMetadata=ij.prototype.getMetadata;ij.prototype.parseNalus=ij.prototype.qf;ij.prototype.parseAvcNalus=ij.prototype.ai;ij.prototype.parse=ij.prototype.parse;ij.prototype.clearData=ij.prototype.clearData;ij.Timescale=9E4;var oj=[100,110,122,244,44,83,86,118,128,138,139,134];function qj(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&&Wa("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,pb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Wa("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Wa("Could not find LCEVC Library on this page"),
|
|
347
347
|
a=!1):(this.h.SupportObject.SupportStatus||Wa(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 rj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
348
|
-
qj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function sj(a,b,c){var d=tj,e=uj;switch(b.mimeType){case "video/webm":d=vj;break;case "video/mp4":d=wj}switch(c){case "DASH":e=xj;break;case "HLS":e=yj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",qj);qj.prototype.release=qj.prototype.release;var tj=0,vj=1,wj=2,yj=0,xj=1,uj=-1;function zj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.qa={};this.g=null;this.ba=!1;this.ta=c||function(){};this.T=d||null;this.j={};this.o=new
|
|
348
|
+
qj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function sj(a,b,c){var d=tj,e=uj;switch(b.mimeType){case "video/webm":d=vj;break;case "video/mp4":d=wj}switch(c){case "DASH":e=xj;break;case "HLS":e=yj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",qj);qj.prototype.release=qj.prototype.release;var tj=0,vj=1,wj=2,yj=0,xj=1,uj=-1;function zj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.qa={};this.g=null;this.ba=!1;this.ta=c||function(){};this.T=d||null;this.j={};this.o=new db;this.m={};this.H=null;this.L=new Rf;this.N="";this.da=!1;this.l=Aj(this,this.L);this.C=!1;this.I=new pg(function(){return Bj(e)});this.B=!1;this.aa="UNKNOWN";this.pa=this.sa=!1;this.ia=new Rf;this.s=!1;this.ea=!0;this.K=this.Y=null}
|
|
349
349
|
function Aj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.ea=!0});a.o.D(c,"endstreaming",function(){a.ea=!1});a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Cj(c);a.i.src=a.N;return c}c=new MediaSource;a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Cj(c);a.i.src=a.N;return c}
|
|
350
350
|
function Dj(a,b){var c,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return a.createSegmentIndex?C(p,a.createSegmentIndex(),2):p.u(2);if(!a.segmentIndex)return p.return(!1);if(0==a.segmentIndex.getNumReferences())return p.return(!0);c=Kd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ma){if(m=Md(h,k),!de(m))return p.return(!1)}else if(b==c.fa?k=Ne(k):b==c.S&&(k=Oe(k)),n=Qd(a,
|
|
351
351
|
h,k),q=Od(h,k),!lb(n)&&!lc(q))return p.return(!1);return p.return(!0)})}r=zj.prototype;r.destroy=function(){return this.I.destroy()};
|
|
@@ -366,33 +366,33 @@ r.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Kd,a
|
|
|
366
366
|
r.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Kd,a==c.ma?d.return():C(d,Pj(b,a,function(){b.i.currentTime-=.001;Hj(b,a)}),2)):b.s?C(d,Pj(b,c.S,function(){var e=c.S;b.i.currentTime-=.001;Hj(b,e)}),0):d.u(0)})};
|
|
367
367
|
function Xj(a,b,c,d,e,f,g,h,k){var l,m,n;return L(function(q){if(1==q.g){l=Kd;if(b==l.ma)return f||(a.g.s=c),he(a.g,d,e),q.return();m=[];return C(q,Yj(a,b,g,h,k),2)}n=q.h;n||(m.push(Pj(a,b,function(){return Qj(a,b)})),a.s&&m.push(Pj(a,l.S,function(){return Qj(a,l.S)})));f||(m.push(Pj(a,b,function(){return Rj(a,b,c)})),a.s&&m.push(Pj(a,l.S,function(){return Rj(a,l.S,c)})));m.push(Pj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Hj(a,b)}));a.s&&m.push(Pj(a,
|
|
368
368
|
l.S,function(){var p=l.S;a.h[p].appendWindowStart=0;a.h[p].appendWindowEnd=e;a.h[p].appendWindowStart=d;Hj(a,p)}));return C(q,Promise.all(m),0)})}function Zj(a,b,c){var d;return L(function(e){if(1==e.g){d=Kd;if(b==d.ma)return e.return();b==d.fa&&(a.ia=new Rf);Pj(a,b,function(){return Qj(a,b)});a.s&&Pj(a,d.S,function(){return Qj(a,d.S)});return C(e,Pj(a,b,function(){return Rj(a,b,c)}),2)}return a.s?C(e,Pj(a,d.S,function(){return Rj(a,d.S,c)}),0):e.u(0)})}
|
|
369
|
-
r.endOfStream=function(a){var b=this;return L(function(c){return C(c,ak(b,function(){Ij(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Za=function(a){var b=this;return L(function(c){return C(c,ak(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Rf};b.j[d].unshift(e)}b.l.duration=a;b.
|
|
369
|
+
r.endOfStream=function(a){var b=this;return L(function(c){return C(c,ak(b,function(){Ij(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Za=function(a){var b=this;return L(function(c){return C(c,ak(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Rf};b.j[d].unshift(e)}b.l.duration=a;b.Y=a}),0)})};r.getDuration=function(){return this.l.duration};function Vj(a,b,c,d){d<=c?Hj(a,b):a.h[b].remove(c,d)}
|
|
370
370
|
function Qj(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;Hj(a,b)}function Rj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Hj(a,b)}function Hj(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),bk(a,b))}}function Pj(a,b,c){qg(a.I);c={start:c,p:new Rf};a.j[b].push(c);1==a.j[b].length&&ck(a,b);return c.p}
|
|
371
371
|
function ak(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:qg(a.I);c=[];d={};for(e in a.h)d.Mc=new Rf,f={start:function(m){return function(){return m.Mc.resolve()}}(d),p:d.Mc},a.j[e].push(f),c.push(d.Mc),1==a.j[e].length&&f.start(),d={Mc:d.Mc};ra(l,2);return C(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=va(l),g;case 3:return ra(l,5,6),C(l,b(),6);case 6:wa(l);for(h in a.h)bk(a,h);ya(l,0);break;case 5:throw k=va(l),new Q(2,3,3015,k,a.i.error||"No error in the media element");
|
|
372
372
|
}})}function bk(a,b){a.j[b].shift();ck(a,b)}function ck(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new Q(2,3,3017,b)):c.p.reject(new Q(2,3,3015,d,a.i.error||"No error in the media element")),bk(a,b)}}function Sj(a,b,c,d){var e=a.qa[d];a.A.insertFakeEncryptionInInit&&null==c&&e&&(Tc()||Rc()||Sc("SOPOpenBrowser"))&&"mp4"==Sd(a.G[d])&&(b=mi(b));return b}
|
|
373
373
|
function dk(a,b,c,d){return Pj(a,b,function(){b!==Id&&(nb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Hj(a,b))})}
|
|
374
374
|
function ek(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E;return L(function(H){switch(H.g){case 1:c=Kd;a.C=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);sa(H,2);a.o.ib();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(me)),n=t(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new Q(2,7,7003,void 0));for(u in a.h){x=a.h[u];try{a.l.removeSourceBuffer(x)}catch(K){}}return C(H,
|
|
375
|
-
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.L=new Rf,a.l=Aj(a,a.L),C(H,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.
|
|
375
|
+
Promise.all(g),4);case 4:return a.m={},a.h={},w=a.l.duration,a.L=new Rf,a.l=Aj(a,a.L),C(H,a.L,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.Y)&&a.Y&&(a.l.duration=a.Y),z=new Rf,v=a.l.sourceBuffers,B=b.size,A=0,D=function(){A++;A===B&&(z.resolve(),a.o.Kb(v,"addsourcebuffer",D))},a.o.D(v,"addsourcebuffer",D),F=t(b.keys()),J=F.next();case 6:if(J.done)return a.i.currentTime=d,C(H,z,2);I=J.value;E=b.get(I);return C(H,Ej(a,I,E,E.codecs),9);case 9:a.s?(a.j[c.S]=[],a.j[c.fa]=[]):a.j[I]=[];J=F.next();H.u(6);
|
|
376
376
|
break;case 2:wa(H),a.C=!1,qg(a.I),a.o.na(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),ya(H,0)}})}function fk(a,b){return ak(a,function(){return ek(a,b)})}
|
|
377
377
|
function Yj(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){if(1==A.g){f=Kd;if(b==f.ma)return A.return(!1);g=Vd(Xd(a.G[b]));h=Wd(a.G[b]);l=!1;m=Md(c,d);n=a.A.forceTransmux;if(!lb(m)||!a.B&&Nd.includes(m))n=!0;n&&(q=Od(c,d),p=lc(q))&&(k=p(),u=Gd(f.S,(d||"").split(",")),x=Gd(f.fa,(d||"").split(",")),u&&x?(l=!0,w=x,b==f.S&&(w=u),m=k.convertCodecs(b,Od(c,w))):m=k.convertCodecs(b,q));z=Vd(Xd(m));v=Wd(m);if(g===z&&h===v)return A.return(!1);B=!0;if(a.s||l&&k&&!a.m[b])B=!1;if(B&&"smooth"===
|
|
378
378
|
a.A.codecSwitchingStrategy&&nb())return C(A,dk(a,b,m,k),3);k&&k.destroy();return C(A,fk(a,e),3)}return A.return(!0)})}function gk(a,b,c,d){if(b==Id)var e=!1;else{e=Vd(Xd(a.G[b]));var f=Wd(a.G[b]),g=Md(c,d),h=a.A.forceTransmux;if(!lb(g)||!a.B&&Nd.includes(g))h=!0;c=Od(c,d);h&&(h=lc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Vd(Xd(g));g=Wd(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!nb()||a.s:!1}var Cj=window.URL.createObjectURL,Gj="sequence";function hk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=null}r=hk.prototype;r.getDuration=function(){return this.j};r.sh=function(){return this.g};r.Cg=function(a){this.i=a};r.Za=function(a){this.j=a};r.wh=function(){return this.i};r.Ag=function(a){this.A=a};r.Ec=function(a){this.F=a};r.je=function(a){this.m=a};r.Nd=function(){return this.m};r.Bf=function(a){this.s=a};r.lh=function(){return this.s};
|
|
379
379
|
r.qg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.ce(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)}};
|
|
380
380
|
r.ld=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.ce(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.Xd=function(){this.o=!0};r.Qh=function(){return this.o};r.Bg=function(a){this.B=a};r.ph=function(){return this.B};
|
|
381
|
-
r.ce=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.hf=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.R=function(){return Infinity==this.j&&!this.F};r.
|
|
382
|
-
r.Gb=function(){return this.R()||this.
|
|
383
|
-
r.zg=function(a){this.H=a};P("shaka.media.PresentationTimeline",hk);hk.prototype.setAvailabilityTimeOffset=hk.prototype.zg;hk.prototype.usingPresentationStartTime=hk.prototype.Kg;hk.prototype.getSeekRangeEnd=hk.prototype.pb;hk.prototype.getSeekRangeStart=hk.prototype
|
|
384
|
-
hk.prototype.isInProgress=hk.prototype.
|
|
381
|
+
r.ce=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.hf=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.R=function(){return Infinity==this.j&&!this.F};r.dc=function(){return Infinity!=this.j&&!this.F};r.qb=function(){return Math.max(this.G,this.Gb()-this.m)};r.Gg=function(a){this.G=a};
|
|
382
|
+
r.Gb=function(){return this.R()||this.dc()?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.dd=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.Gb()-this.m+a,this.pb()))};r.$b=function(){return this.dd(0)};r.pb=function(){return Math.max(0,this.Gb()-(this.R()||this.dc()?this.s:0))};r.Kg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
|
|
383
|
+
r.zg=function(a){this.H=a};P("shaka.media.PresentationTimeline",hk);hk.prototype.setAvailabilityTimeOffset=hk.prototype.zg;hk.prototype.usingPresentationStartTime=hk.prototype.Kg;hk.prototype.getSeekRangeEnd=hk.prototype.pb;hk.prototype.getSeekRangeStart=hk.prototype.$b;hk.prototype.getSafeSeekRangeStart=hk.prototype.dd;hk.prototype.getSegmentAvailabilityEnd=hk.prototype.Gb;hk.prototype.setUserSeekStart=hk.prototype.Gg;hk.prototype.getSegmentAvailabilityStart=hk.prototype.qb;
|
|
384
|
+
hk.prototype.isInProgress=hk.prototype.dc;hk.prototype.isLive=hk.prototype.R;hk.prototype.offset=hk.prototype.offset;hk.prototype.notifyMaxSegmentDuration=hk.prototype.hf;hk.prototype.notifyMinSegmentStartTime=hk.prototype.ce;hk.prototype.getInitialProgramDateTime=hk.prototype.ph;hk.prototype.setInitialProgramDateTime=hk.prototype.Bg;hk.prototype.isStartTimeLocked=hk.prototype.Qh;hk.prototype.lockStartTime=hk.prototype.Xd;hk.prototype.notifySegments=hk.prototype.ld;hk.prototype.notifyTimeRange=hk.prototype.qg;
|
|
385
385
|
hk.prototype.getDelay=hk.prototype.lh;hk.prototype.setDelay=hk.prototype.Bf;hk.prototype.getSegmentAvailabilityDuration=hk.prototype.Nd;hk.prototype.setSegmentAvailabilityDuration=hk.prototype.je;hk.prototype.setStatic=hk.prototype.Ec;hk.prototype.setClockOffset=hk.prototype.Ag;hk.prototype.getPresentationStartTime=hk.prototype.wh;hk.prototype.setDuration=hk.prototype.Za;hk.prototype.setPresentationStartTime=hk.prototype.Cg;hk.prototype.getMaxSegmentDuration=hk.prototype.sh;
|
|
386
|
-
hk.prototype.getDuration=hk.prototype.getDuration;function ik(a,b,c){this.j=c;this.l=a;this.s=jk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}ik.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function kk(a,b){a.i=b}function lk(a){this.g=a}function jk(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Ci(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 mk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new
|
|
386
|
+
hk.prototype.getDuration=hk.prototype.getDuration;function ik(a,b,c){this.j=c;this.l=a;this.s=jk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}ik.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function kk(a,b){a.i=b}function lk(a){this.g=a}function jk(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Ci(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 mk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new db;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 nk(f)});this.m=(new Mc(function(){nk(f)})).$a(this.s.gapJumpTimerTime)}mk.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};mk.prototype.mf=function(){this.o=!0;nk(this)};
|
|
387
387
|
function nk(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=jk(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 S("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Di(c,b,a.s.gapDetectionThreshold),null==
|
|
388
|
-
d||0==d&&!a.o||(e=c.start(d),e>=a.B.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new S("gapjumped")))))}}};function ok(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=pk.value().get(b),c.na(a,b,d))}var pk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function qk(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
|
|
388
|
+
d||0==d&&!a.o||(e=c.start(d),e>=a.B.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new S("gapjumped")))))}}};function ok(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=pk.value().get(b),c.na(a,b,d))}var pk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function qk(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 db;this.i=new rk(a);ok(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){sk(e,e.j())})}qk.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 tk(a){return a.o?a.g.currentTime:a.j()}
|
|
389
389
|
function uk(a,b){0<a.g.readyState?vk(a.i,b):ok(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){sk(a,a.j())})}function sk(a,b){.001>Math.abs(a.g.currentTime-b)?wk(a):(a.h.na(a.g,"seeking",function(){wk(a)}),vk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function wk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
390
|
-
function rk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}rk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function vk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.$a(.1)};function xk(a){this.g=a;this.j=!1;this.h=null;this.i=new
|
|
390
|
+
function rk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}rk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function vk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.$a(.1)};function xk(a){this.g=a;this.j=!1;this.h=null;this.i=new db}r=xk.prototype;r.ve=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;ok(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.we=function(a){this.h=this.j?this.h:a};r.Dd=function(){return(this.j?this.g.currentTime:this.h)||0};r.Nf=function(){return 0};
|
|
391
391
|
r.Mf=function(){return 0};r.pg=function(){};
|
|
392
392
|
function yk(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=zk(a,c,f);this.j=new mk(a,b.presentationTimeline,c,this.o,f);this.h=new qk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=tk(g.h);h=Ak(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;uk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
393
|
-
g.g
|
|
393
|
+
g.g.$b():g.g.pb():0>h&&(h=g.g.pb()+h);return Bk(g,Ck(g,h))});this.m=new Mc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=tk(g.h),k=g.g.$b(),l=g.g.pb();3>l-k&&(k=l-3);h<k&&(h=Ak(g,h),g.i.currentTime=h)}})}r=yk.prototype;r.ve=function(){this.m.$a(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.we=function(a){uk(this.h,a)};
|
|
394
394
|
r.Dd=function(){var a=tk(this.h);return 0<this.i.readyState&&!this.i.paused?Ck(this,a):a};r.Nf=function(){return this.o?this.o.o:0};r.Mf=function(){return this.j.C};r.pg=function(){this.j.mf()};function Bk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
395
|
-
function Ak(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g
|
|
395
|
+
function Ak(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.$b(),f=a.g.pb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.dd(c),k=a.g.dd(d);c=a.g.dd(c+d);return b>=g?Bk(a,b):b>f?f:b<e?Ai(a.i.buffered,k)?k:c:b>=h||Ai(a.i.buffered,b)?b:c}function Ck(a,b){var c=a.g.$b();if(b<c)return c;a=a.g.pb();return b>a?a:b}
|
|
396
396
|
function zk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new ik(new lk(a),b.stallThreshold,c);kk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Dk(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Dk.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.Wh=function(){this.o=!0};r.tc=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
397
397
|
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)};
|
|
398
398
|
r.ae=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,y(a))}};r.kd=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.ae(a);this.La(b)};r.La=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}};
|
|
@@ -404,56 +404,56 @@ Dk.prototype.getNumReferences=Dk.prototype.getNumReferences;function Ek(a,b,c,d)
|
|
|
404
404
|
Ek.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}};P("shaka.media.SegmentIterator",Ek);Ek.prototype.next=Ek.prototype.next;Ek.prototype.current=Ek.prototype.current;Ek.prototype.currentPosition=Ek.prototype.dh;
|
|
405
405
|
Ek.prototype.setReverse=Ek.prototype.ie;function Gk(){Dk.call(this,[]);this.h=[]}na(Gk,Dk);r=Gk.prototype;r.clone=function(){var a=new Gk;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.tc=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.tc(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};
|
|
406
406
|
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.ae=function(){};r.La=function(){};r.kd=function(){};r.sc=function(){};r.ke=function(){};P("shaka.media.MetaSegmentIndex",Gk);Gk.prototype.updateEvery=Gk.prototype.ke;Gk.prototype.fit=Gk.prototype.sc;Gk.prototype.mergeAndEvict=Gk.prototype.kd;Gk.prototype.evict=Gk.prototype.La;Gk.prototype.merge=Gk.prototype.ae;
|
|
407
|
-
Gk.prototype.offset=Gk.prototype.offset;Gk.prototype.get=Gk.prototype.get;Gk.prototype.find=Gk.prototype.find;Gk.prototype.forEachTopLevelReference=Gk.prototype.tc;Gk.prototype.release=Gk.prototype.release;function Hk(a){var b=this;this.g=a;this.h=this.g.Md();this.i=new Mc(function(){b.g.og(.25*b.h)})}Hk.prototype.release=function(){this.set(this.
|
|
408
|
-
function Sk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.xb(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.ja&&(c=!1);2==d.
|
|
409
|
-
function Xk(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Yk(a,c)}function Zk(a){Xk(a,a.g);Xk(a,a.i);a.l=0}Qk.prototype.La=function(a,b){b=void 0===b?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Yk(this,d);b&&Wk(this)};
|
|
410
|
-
function $k(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Yk(a,d)}Wk(a)}function al(a,b){b&&b!==a.h&&(Zk(a),a.h=b)}function Yk(a,b){var c=a.g;b instanceof qi&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function Uk(a){this.g=a;this.fe=this.Ef=null}
|
|
411
|
-
Uk.prototype.abort=function(){this.fe&&this.fe.abort()};function bl(a){ag.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Mc(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 S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).$a(2)}na(bl,ag);bl.prototype.release=function(){this.g.clear();this.h.stop();ag.prototype.release.call(this)};function cl(a){ag.call(this);this.g=new Map;this.h=a}na(cl,ag);cl.prototype.release=function(){this.g.clear();ag.prototype.release.call(this)};function dl(a,b){var c=a.g.get(b);c||(c={nd:[],Uf:null,contentType:b},a.g.set(b,c));return c}function el(a,b,c){var d=dl(a,b.contentType);fl(a,d);a={ff:b,position:c};d=d.nd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
407
|
+
Gk.prototype.offset=Gk.prototype.offset;Gk.prototype.get=Gk.prototype.get;Gk.prototype.find=Gk.prototype.find;Gk.prototype.forEachTopLevelReference=Gk.prototype.tc;Gk.prototype.release=Gk.prototype.release;function Hk(a){var b=this;this.g=a;this.h=this.g.Md();this.i=new Mc(function(){b.g.og(.25*b.h)})}Hk.prototype.release=function(){this.set(this.Xb());this.i&&(this.i.stop(),this.i=null);this.g=null};Hk.prototype.set=function(a){if(this.h!=a)a:{this.h=a,this.i.stop();if(0<=this.h)try{var b=this.h;this.g.Md()!=b&&this.g.Df(b);break a}catch(c){}this.i.$a(.25);0!=this.g.Md()&&this.g.Df(0)}};Hk.prototype.Xb=function(){return this.g.Xb()};function Ik(a){var b=this;this.h=a;this.g=new Set;this.i=(new Mc(function(){Jk(b,!1)})).$a(.25)}Ik.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 Jk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Kk(){this.g=null;this.h=[]}function Lk(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 Mk(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 Nk(){this.i=this.h=null;this.g=[]}function Ok(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 Pk(){this.Ed=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.I=this.K=this.l=this.o=NaN;this.g=new Kk;this.h=new Nk};function Qk(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function Rk(a,b){a.j=b;a=t(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
408
|
+
function Sk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.xb(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.ja&&(c=!1);2==d.bc()&&(c=!1);c&&d.ca&&Tk(a,d.ca);c&&!a.g.has(d)&&(c=new Uk(a.j),Vk(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.md&&d.Wd)break;d=b.next().value}Wk(a)}}}
|
|
409
|
+
function Tk(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return ui(d,b)})){var c=new Uk(a.j);Vk(c,b,a.h);a.i.set(b,c)}}function Xk(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Yk(a,c)}function Zk(a){Xk(a,a.g);Xk(a,a.i);a.l=0}Qk.prototype.La=function(a,b){b=void 0===b?!1:b;for(var c=t(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Yk(this,d);b&&Wk(this)};
|
|
410
|
+
function Wk(a){for(var b=Array.from(a.g.keys()),c={},d=t(a.i.keys()),e=d.next();!e.done;c={wd:c.wd},e=d.next())c.wd=e.value,b.some(function(f){return function(g){return ui(g.ca,f.wd)}}(c))||Yk(a,c.wd)}function $k(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&Yk(a,d)}Wk(a)}function al(a,b){b&&b!==a.h&&(Zk(a),a.h=b)}function Yk(a,b){var c=a.g;b instanceof qi&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function Uk(a){this.g=a;this.fe=this.Ef=null}
|
|
411
|
+
function Vk(a,b,c){var d=new Uint8Array(0);a.fe=a.g(b,c,function(e){return L(function(f){if(1==f.g)return 0<d.byteLength?d=zd(d,e):d=e,a.Ef?C(f,a.Ef(d),3):f.u(0);d=new Uint8Array(0);G(f)})})}Uk.prototype.abort=function(){this.fe&&this.fe.abort()};function bl(a){ag.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Mc(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 S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).$a(2)}na(bl,ag);bl.prototype.release=function(){this.g.clear();this.h.stop();ag.prototype.release.call(this)};function cl(a){ag.call(this);this.g=new Map;this.h=a}na(cl,ag);cl.prototype.release=function(){this.g.clear();ag.prototype.release.call(this)};function dl(a,b){var c=a.g.get(b);c||(c={nd:[],Uf:null,contentType:b},a.g.set(b,c));return c}function el(a,b,c){var d=dl(a,b.contentType);fl(a,d);a={ff:b,position:c};d=d.nd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
412
412
|
cl.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.nd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.ff;break a}}d=null}if(e=d)e=c.Uf,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);
|
|
413
413
|
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.Uf=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function fl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.nd;b.nd=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.nd=[]};function gl(a,b,c,d,e){a=hg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function hl(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.I=null;this.A=!1;this.l=new pg(function(){return il(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null}}r=hl.prototype;r.destroy=function(){return this.l.destroy()};
|
|
414
414
|
function il(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,jl(e),b.push(kl(e));f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,Zk(h);return C(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;G(k)})}
|
|
415
|
-
r.configure=function(a){this.h=a;this.I=new Of({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.
|
|
416
|
-
b.
|
|
415
|
+
r.configure=function(a){this.h=a;this.I=new Of({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.W&&(Zk(b.W),b.W=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Zk(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Id))&&
|
|
416
|
+
b.W&&(Zk(b.W),b.W=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.W&&(Zk(b.W),b.W=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.W?($k(c.W,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.W=null)):0<a.segmentPrefetchLimit&&(c.W=ll(this,c.stream));a.disableAudioPrefetch||ml(this)};r.start=function(a){var b=this;return L(function(c){if(1==c.g)return C(c,nl(b,a||new Map),2);qg(b.l);b.C=!0;G(c)})};
|
|
417
417
|
function ol(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Kd,a.H++,d=a.H,ra(l,2),C(l,Wj(a.g.V,c.ma),4);case 4:ta(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Md(b.mimeType,b.codecs),Fj(a.g.V,f,a.m.sequenceMode,b.external),g=a.g.V.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=pl(a,b),a.i.set(c.ma,k),ql(a,k,0)),G(l)}})}function rl(a){var b=a.i.get(Id);b&&(jl(b),kl(b).catch(function(){}),a.i.delete(Id));a.s=null}
|
|
418
|
-
function sl(a,b){var c=0>a.g.eb(),d=a.i.get("video");d&&d.
|
|
418
|
+
function sl(a,b){var c=0>a.g.eb(),d=a.i.get("video");d&&d.Z&&d.Z.ie(c);(d=a.i.get("audio"))&&d.Z&&d.Z.ie(c);(d=a.i.get(Id))&&d.Z&&d.Z.ie(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.jc&&(tl(a,b,!1,0,!1),c.jc=d);else if(b=c.jc)c.jc=null,tl(a,b,!0,0,!1)}function ul(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&&tl(a,b.video,c,d,e,f),b.audio&&tl(a,b.audio,c,d,e,f))}
|
|
419
419
|
function vl(a,b){L(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):C(c,b.createSegmentIndex(),2):c.return();tl(a,b,!0,0,!1);G(c)})}
|
|
420
|
-
function tl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Id?g&&(g.
|
|
420
|
+
function tl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Id?g&&(g.jc&&(b.trickModeVideo?(g.jc=b,b=b.trickModeVideo):g.jc=null),g.stream!=b||e)&&(a.o.has(b)?g.W=a.o.get(b):g.W&&al(g.W,b),b.type==Id&&(e=Md(b.mimeType,b.codecs),Fj(a.g.V,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Z=null,g.Of=!!f,c&&(g.Xc?g.le=!0:g.Qa?(g.Lb=!0,g.Id=d,g.le=!0):(jl(g),wl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),xl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
421
421
|
ol(a,b)}
|
|
422
422
|
function xl(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.Ya)return e.return();c=b.stream;d=b.Ya;return c.segmentIndex?e.u(2):C(e,c.createSegmentIndex(),2)}if(b.Ya!=d||b.stream!=c)return e.return();var f=a.g.Ld();var g=Lj(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Oa?b.Oa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.ja?k.ja-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),f=
|
|
423
423
|
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ya.h.g>h?!0:!1):f=!1;f&&b.Ya.abort();G(e)})}
|
|
424
|
-
r.od=function(){if(this.g)for(var a=this.g.Ld(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.
|
|
424
|
+
r.od=function(){if(this.g)for(var a=this.g.Ld(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Z&&(e=c.Z.current());if(!e||e.startTime>a||e.endTime<a)c.Z=null;e=this.g.V;e.C?e=!1:d==Id?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Kj(e,d),e=Ai(e,a));e||((null!=Lj(this.g.V,d)||c.Qa)&&yl(this,c),c.Ya&&(c.Ya.abort(),c.Ya=null),d===Id&&(d=this.g.V,d.H&&d.H.h()),c.od=!0)}};
|
|
425
425
|
function yl(a,b){b.Xc||b.Lb||(b.Qa?(b.Lb=!0,b.Id=0):null==Jj(a.g.V,b.type)?null==b.ub&&ql(a,b,0):(jl(b),wl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
426
426
|
function nl(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Kd;if(!a.j)throw new Q(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.S,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.V;return C(q,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}qg(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=pl(a,l),b.has(l.id)&&(n=
|
|
427
|
-
b.get(l.id),Rk(n,function(p,u,x){return zl(p,u,x||null,a.h.retryParameters,a.g.zb)}),m.
|
|
428
|
-
function ll(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Id&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Id&&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.
|
|
429
|
-
function ml(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Fa:d.Fa},f=e.next())if(d.Fa=f.value,d.Fa.audio)if(a.o.has(d.Fa.audio)){if(f=a.o.get(d.Fa.audio),$k(f,b),!(0<b&&c.some(function(h){return function(k){return pe(h.Fa.audio.language,k)}}(d)))){var g=a.i.get(d.Fa.audio.type);f!==(g&&g.
|
|
427
|
+
b.get(l.id),Rk(n,function(p,u,x){return zl(p,u,x||null,a.h.retryParameters,a.g.zb)}),m.W=n),a.i.set(k,m),ql(a,m,0));G(q)})}function pl(a,b){return{stream:b,type:b.type,Z:null,W:ll(a,b),Oa:null,ec:null,cf:null,af:null,$e:null,jc:null,endOfStream:!1,Qa:!1,ub:null,Lb:!1,Id:0,le:!1,Xc:!1,od:!0,uf:!1,gd:!1,Ya:null}}
|
|
428
|
+
function ll(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Id&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Id&&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.W)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Qk(a.h.segmentPrefetchLimit,b,function(d,e,f){return zl(d,e,f||null,a.h.retryParameters,a.g.zb)}):null}
|
|
429
|
+
function ml(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.m.variants),f=e.next();!f.done;d={Fa:d.Fa},f=e.next())if(d.Fa=f.value,d.Fa.audio)if(a.o.has(d.Fa.audio)){if(f=a.o.get(d.Fa.audio),$k(f,b),!(0<b&&c.some(function(h){return function(k){return pe(h.Fa.audio.language,k)}}(d)))){var g=a.i.get(d.Fa.audio.type);f!==(g&&g.W)&&Zk(f);a.o.delete(d.Fa.audio)}}else 0>=b||!c.some(function(h){return function(k){return pe(h.Fa.audio.language,k)}}(d))||!(f=ll(a,d.Fa.audio))||
|
|
430
430
|
(d.Fa.audio.segmentIndex||d.Fa.audio.createSegmentIndex(),a.o.set(d.Fa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.V.Za(a):this.g.V.Za(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
431
431
|
function Al(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:qg(a.l);if(b.Qa||null==b.ub||b.Xc)return h.return();b.ub=null;if(!b.Lb){h.u(2);break}return C(h,wl(a,b,b.le,b.Id),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Qa||b.ub||ql(a,b,0),h.return();case 4:ra(h,6);d=Bl(a,b);null!=d&&(ql(a,b,d),b.gd=!1);ta(h,7);break;case 6:return e=
|
|
432
432
|
va(h),C(h,Cl(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 C(h,a.g.V.endOfStream(),10);case 10:qg(a.l),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Za(g),G(h)}})}
|
|
433
433
|
function Bl(a,b){if(Dl(b))return Tj(a.g.V,b.stream.originalId||""),null;b.type==Id&&Uj(a.g.V);if(!a.g.V.ea&&b.type!=Id)return a.h.updateIntervalSeconds/2;var c=a.g.Ld();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.La(c,!0),Sk(e,c);d=b.Oa?b.Oa.endTime:c;e=Mj(a.g.V,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=Lj(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
434
|
-
!0,"video"==b.type&&(a=a.i.get(Id))&&Dl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=El(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,Dl(h)||h.
|
|
435
|
-
function El(a,b,c,d){if(b.
|
|
436
|
-
function Fl(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:e=Kd;f=b.stream;g=b.
|
|
437
|
-
ra(H,2);n=Hl(n,D);F=!1;J=0;(new zg).box("mdat",function(K){J=K.size+K.start;F=!0}).parse(n,!1,!0);if(!F){H.u(4);break}I=n.subarray(0,J);n=n.subarray(J);return C(H,Il(a,b,c,f,d,I,!0),5);case 5:b.
|
|
438
|
-
A.return():b.Lb?(b.Qa=!1,ql(a,b,0),A.return()):C(A,Il(a,b,c,f,d,w),10);case 10:b.
|
|
439
|
-
!0,B.severity=2,C(A,Cl(a,b,B),0)}})}function Ll(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):C(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
|
|
434
|
+
!0,"video"==b.type&&(a=a.i.get(Id))&&Dl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=El(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,Dl(h)||h.Z&&!h.Z.current()||(f=Math.min(f,h.Oa?h.Oa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.W&&b.Z&&!a.o.has(b.stream)&&(b.W.La(c),Sk(b.W,e.startTime));Fl(a,b,c,e).catch(function(){});return null}
|
|
435
|
+
function El(a,b,c,d){if(b.Z)return b.Z.current();if(b.Oa||d)return b.Z=b.stream.segmentIndex.xb(b.Oa?b.Oa.endTime:d,!1,0>a.g.eb()),b.Z&&b.Z.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.eb();var f=null;d&&(b.Z=b.stream.segmentIndex.xb(e,!1,a),f=b.Z&&b.Z.next().value);f||(b.Z=b.stream.segmentIndex.xb(c,!1,a),f=b.Z&&b.Z.next().value);return f}
|
|
436
|
+
function Fl(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:e=Kd;f=b.stream;g=b.Z;b.Qa=!0;ra(A,2);if(2==d.bc())throw new Q(1,1,1011);return C(A,Gl(a,b,d),4);case 4:qg(a.l);if(a.A)return A.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),p=q=!1,x=function(D){var F,J,I,E;return L(function(H){switch(H.g){case 1:if(q)return H.return();p=!0;qg(a.l);if(a.A)return H.return();
|
|
437
|
+
ra(H,2);n=Hl(n,D);F=!1;J=0;(new zg).box("mdat",function(K){J=K.size+K.start;F=!0}).parse(n,!1,!0);if(!F){H.u(4);break}I=n.subarray(0,J);n=n.subarray(J);return C(H,Il(a,b,c,f,d,I,!0),5);case 5:b.W&&b.Z&&Sk(b.W,d.startTime,!0);case 4:ta(H,0);break;case 2:u=E=va(H),G(H)}})},C(A,Jl(a,b,d,x),9);l=Jl(a,b,d);return C(A,l,7);case 7:m=A.h;qg(a.l);if(a.A)return A.return();qg(a.l);return b.Lb?(b.Qa=!1,ql(a,b,0),A.return()):C(A,Il(a,b,c,f,d,m),6);case 9:w=A.h;if(u)throw u;if(p){A.u(10);break}q=!0;qg(a.l);return a.A?
|
|
438
|
+
A.return():b.Lb?(b.Qa=!1,ql(a,b,0),A.return()):C(A,Il(a,b,c,f,d,w),10);case 10:b.W&&b.Z&&Sk(b.W,d.startTime,!0);case 6:qg(a.l);if(a.A)return A.return();b.Oa=d;g.next();b.Qa=!1;b.uf=!1;z=a.g.V.ob();v=z[b.type];ab(JSON.stringify(v));b.Lb||a.g.mf(d,b.stream);ql(a,b,0);ta(A,0);break;case 2:B=va(A);qg(a.l,B);if(a.A)return A.return();b.Qa=!1;if(7001==B.code)b.Qa=!1,jl(b),ql(a,b,0),A.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),A.u(0);else if(3017==B.code)Kl(a,b,B),A.u(0);else return b.gd=
|
|
439
|
+
!0,1==B.category&&b.W&&Yk(b.W,d),B.severity=2,C(A,Cl(a,b,B),0)}})}function Ll(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):C(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
|
|
440
440
|
function Hl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Kl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.uf})){if(0<a.h.maxDisabledTime&&a.g.Jd(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.gd=!0;a.A=!0;a.g.onError(c);return}b.uf=!0}ql(a,b,4)}
|
|
441
|
-
function Gl(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x;return L(function(w){switch(w.g){case 1:d=Kd;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Vd(b.stream.codecs);k=Wd(b.stream.mimeType);l=c.timestampOffset;if(l==b.cf&&f==b.af&&g==b.$e&&h==b.bf&&k==b.kg){w.u(2);break}m=b.bf&&b.kg&&gk(a.g.V,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.fa?n=a.i.get(d.S):b.type===d.S&&(n=a.i.get(d.fa));if(!n){w.u(3);break}return C(w,kl(n).catch(function(){}),5);case 5:n.
|
|
442
|
-
function(){var z,v,B;return L(function(A){if(1==A.g)return z=new Map,a.j.audio&&z.set(d.S,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ra(A,2),b.af=f,b.$e=g,b.bf=h,b.kg=k,b.cf=l,v=a.m.sequenceMode||"HLS"==a.m.type,C(A,Xj(a.g.V,b.type,l,f,g,v,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=A.g)return ta(A,0);B=va(A);b.af=null;b.$e=null;b.bf=null;b.cf=null;throw B;})},C(w,q(),2);case 2:return ui(c.ca,b.
|
|
443
|
-
2),C(I,p,4);case 4:return z=I.h,qg(a.l),v=null,B=new Map,A={projection:null,hfov:null},D=new zg,D.box("moov",Eg).box("trak",Eg).box("mdia",Eg).O("mdhd",function(E){v=Ni(E.reader,E.version).timescale}).box("hdlr",function(E){E=E.reader;E.skip(8);switch(E.
|
|
444
|
-
Eg).box("proj",Eg).O("prji",function(E){E=E.reader.
|
|
441
|
+
function Gl(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x;return L(function(w){switch(w.g){case 1:d=Kd;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Vd(b.stream.codecs);k=Wd(b.stream.mimeType);l=c.timestampOffset;if(l==b.cf&&f==b.af&&g==b.$e&&h==b.bf&&k==b.kg){w.u(2);break}m=b.bf&&b.kg&&gk(a.g.V,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.fa?n=a.i.get(d.S):b.type===d.S&&(n=a.i.get(d.fa));if(!n){w.u(3);break}return C(w,kl(n).catch(function(){}),5);case 5:n.ec=null,yl(a,n);case 3:return q=
|
|
442
|
+
function(){var z,v,B;return L(function(A){if(1==A.g)return z=new Map,a.j.audio&&z.set(d.S,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ra(A,2),b.af=f,b.$e=g,b.bf=h,b.kg=k,b.cf=l,v=a.m.sequenceMode||"HLS"==a.m.type,C(A,Xj(a.g.V,b.type,l,f,g,v,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=A.g)return ta(A,0);B=va(A);b.af=null;b.$e=null;b.bf=null;b.cf=null;throw B;})},C(w,q(),2);case 2:return ui(c.ca,b.ec)||(b.ec=c.ca,c.l&&c.ca&&(p=Jl(a,b,c.ca),u=function(){var z,v,B,A,D,F,J;return L(function(I){switch(I.g){case 1:return ra(I,
|
|
443
|
+
2),C(I,p,4);case 4:return z=I.h,qg(a.l),v=null,B=new Map,A={projection:null,hfov:null},D=new zg,D.box("moov",Eg).box("trak",Eg).box("mdia",Eg).O("mdhd",function(E){v=Ni(E.reader,E.version).timescale}).box("hdlr",function(E){E=E.reader;E.skip(8);switch(E.hc()){case "soun":B.set(d.S,v);break;case "vide":B.set(d.fa,v)}v=null}).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("encv",Jg).box("avc1",Jg).box("avc3",Jg).box("hev1",Jg).box("hvc1",Jg).box("dvav",Jg).box("dva1",Jg).box("dvh1",Jg).box("dvhe",Jg).box("vexu",
|
|
444
|
+
Eg).box("proj",Eg).O("prji",function(E){E=E.reader.hc();A.projection=E}).box("hfov",function(E){E=E.reader.M()/1E3;A.hfov=E}).parse(z),Ml(a,A),B.has(b.type)?c.ca.timescale=B.get(b.type):null!=v&&(c.ca.timescale=v),F=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(I,a.g.Qf(b.type,z),5);case 5:return C(I,Oj(a.g.V,b.type,z,null,b.stream,F),6);case 6:ta(I,0);break;case 2:throw J=va(I),b.ec=null,J;}})},a.g.Yh(c.startTime,c.ca),e.push(u()))),a.m.sequenceMode&&(x=b.Oa?b.Oa.j:null,c.j!=x&&e.push(Zj(a.g.V,
|
|
445
445
|
b.type,c.startTime))),C(w,Promise.all(e),0)}})}
|
|
446
|
-
function Il(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return L(function(p){switch(p.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 zg;l&&k.O("emsg",function(u){var x=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.
|
|
447
|
-
v+e.timestampOffset,B=F-e.startTime,A=u.reader.M(),D=u.reader.M(),w=u.reader.
|
|
446
|
+
function Il(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return L(function(p){switch(p.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 zg;l&&k.O("emsg",function(u){var x=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.hc();var z=u.reader.hc();var v=u.reader.M();var B=u.reader.M();var A=u.reader.M();var D=u.reader.M();var F=e.startTime+B/v}else v=u.reader.M(),F=u.reader.Cc()/
|
|
447
|
+
v+e.timestampOffset,B=F-e.startTime,A=u.reader.M(),D=u.reader.M(),w=u.reader.hc(),z=u.reader.hc();u=u.reader.sb(u.reader.getLength()-u.reader.wa());if(x&&x.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Zh():(x=(new Map).set("detail",{startTime:F,endTime:F+A/v,schemeIdUri:w,value:z,timescale:v,presentationTimeDelta:B,eventDuration:A,id:D,messageData:u}),x=new S("emsg",x),x.cancelable=!0,a.g.onEvent(x),x.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
448
448
|
w||(w=Ji(u),w.length&&e&&a.g.$h([{cueTime:e.startTime,data:u,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.O("prft",function(u){if(!a.F&&e.ca.timescale){var x=u.reader,w=u.version;x.M();u=x.M();var z=x.M();u=1E3*u+z/Math.pow(2,32)*1E3;0===w?x=x.M():(w=x.M(),x=x.M(),x=w*Math.pow(2,32)+x);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();x=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-x/e.ca.timescale*1E3)});x=new S("prft",x);a.g.onEvent(x);
|
|
449
449
|
a.F=!0}});(l||m)&&k.parse(f);return C(p,Nl(a,b,c),2);case 2:return qg(a.l),n=b.od,b.od=!1,q=b.Of,b.Of=!1,C(p,a.g.Qf(b.type,f),3);case 3:return C(p,Oj(a.g.V,b.type,f,e,d,h,n,q,g),4);case 4:qg(a.l),G(p)}})}function Nl(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Jj(a.g.V,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():C(h,a.g.V.remove(b.type,e,e+g),2)}qg(a.l);G(h)})}
|
|
450
450
|
function Dl(a){return a&&a.type==Id&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
451
|
-
function Jl(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.ed())return l.return(e);f=null;if(b.
|
|
451
|
+
function Jl(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.ed())return l.return(e);f=null;if(b.W){var m=b.W,n=m.g;c instanceof qi&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Ef=d),f=m.fe):f=null}f||(f=zl(c,b.stream,d||null,a.h.retryParameters,a.g.zb));g=0;b.Z&&(g=b.Z.h);b.Ya=f;return C(l,f.promise,2);case 2:h=l.h;b.Ya=null;k=h.data;if(!c.aesKey){l.u(3);break}return C(l,Ll(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
452
452
|
function zl(a,b,c,d,e){var f=a instanceof vi?a:void 0,g=f?1:0;a=gl(a.$(),a.Aa,a.ja,d,c);a.contentType=b.type;return e.request(ng,a,{type:g,stream:b,segment:f})}
|
|
453
|
-
function wl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Lb=!1,b.le=!1,b.Id=0,b.Xc=!0,b.Oa=null,b.
|
|
454
|
-
function ql(a,b,c){var d=b.type;if(d!=Id||a.i.has(d))b.ub=(new Lc(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),C(f,Al(a,b),4);if(2!=f.g)return ta(f,0);e=va(f);if(a.g)a.g.onError(e);G(f)})})).
|
|
453
|
+
function wl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Lb=!1,b.le=!1,b.Id=0,b.Xc=!0,b.Oa=null,b.ec=null,b.Z=null,b.W&&!a.o.has(b.stream)&&Zk(b.W),d?(e=a.g.Ld(),f=a.g.V.getDuration(),C(g,a.g.V.remove(b.type,e+d,f),3)):C(g,Wj(a.g.V,b.type),4);if(3!=g.g)return qg(a.l),c?C(g,a.g.V.flush(b.type),3):g.u(3);qg(a.l);b.Xc=!1;b.endOfStream=!1;b.Qa||b.ub||ql(a,b,0);G(g)})}
|
|
454
|
+
function ql(a,b,c){var d=b.type;if(d!=Id||a.i.has(d))b.ub=(new Lc(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),C(f,Al(a,b),4);if(2!=f.g)return ta(f,0);e=va(f);if(a.g)a.g.onError(e);G(f)})})).X(c)}function jl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function kl(a){return L(function(b){return a.Ya?C(b,a.Ya.abort(),0):b.u(0)})}
|
|
455
455
|
function Cl(a,b,c){var d;return L(function(e){if(1==e.g)return C(e,Qf(a.I),2);qg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Jd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);G(e)})}
|
|
456
|
-
function Ol(a){var b,c,d,e,f,g;return L(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=Kd;if(e=a.i.get(d.S))e.
|
|
456
|
+
function Ol(a){var b,c,d,e,f,g;return L(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=Kd;if(e=a.i.get(d.S))e.ec=null,yl(a,e),kl(e).catch(function(){});if(f=a.i.get(d.fa))f.ec=null,yl(a,f),kl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.S,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return C(h,fk(a.g.V,g),2)}return h.return(!0)})}
|
|
457
457
|
function Ml(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 S("spatialvideoinfo",c)}else c=new S("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function Pl(){}
|
|
458
458
|
function Ql(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=ye(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ye(l)),k=Ql(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Wa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
|
|
459
459
|
k),g=!1)}return g}function Rl(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 Sl(a,b){return a&&b}P("shaka.util.ConfigUtils",Pl);Pl.convertToConfigObject=Rl;Pl.mergeConfigObjects=Ql;function Tl(){}function Ul(a){a=md(a);return(new rc(a)).wb}function Vl(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new Q(2,6,6015);var e;"string"==typeof b?e=od(b,!0):e=b;a=md(a);a=od(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Wl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=md(a).split("skd://").pop();return Vl(a,c,b)}
|
|
@@ -462,51 +462,51 @@ Tl.conaxFairPlayRequest=function(a,b){Xl(a,b)};Tl.ezdrmFairPlayRequest=function(
|
|
|
462
462
|
Tl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=md(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Vl(a,d,b)};Tl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=md(a).split(";").pop();return Vl(a,c,b)};Tl.verimatrixInitDataTransform=function(a,b,c){return Wl(a,b,c)};Tl.initDataTransform=Vl;
|
|
463
463
|
Tl.defaultGetContentId=Ul;Tl.isFairPlaySupported=function(){var a;return L(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ra(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);va(b);return b.return(!1)})};function Yl(){}
|
|
464
464
|
function Zl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Pf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(k,l,m){window.shakaMediaKeysPolyfill&&"skd"==l&&(l=m.serverCertificate,m=Ul(k),k=Vl(k,m,l));return k},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Rc(),minHdcpVersion:"",
|
|
465
|
-
ignoreDuplicateInitData:!Vc()};(Rc()||$c())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Vc()||Uc()||Sc("Tizen 4")||Wc()&&38===Yc()||Wc()&&53===Yc()||Wc()&&68===Yc()||(navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform.toLowerCase().includes("windows"))&&Qc()||(c="smooth",d=!0);d={retryParameters:Pf(),availabilityWindowOverride:NaN,disableAudio:!1,
|
|
466
|
-
defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
|
|
467
|
-
"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:$l,manifestPreprocessorTXml:am,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",
|
|
468
|
-
mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Uc()||Vc()||Wc()&&38===Yc()||$c()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:$l,manifestPreprocessorTXml:am,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
469
|
-
var e={retryParameters:Pf(),failureCallback:function(k){return Sl([k])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
|
|
470
|
-
dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,
|
|
471
|
-
infiniteLiveStreamDuration:!1};if(Wc()||Tc()||Xc()||bd())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?C(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return Sl([k,l])},
|
|
472
|
-
defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,
|
|
473
|
-
"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(k,l){return Sl([k,l])}};var g=!1;if(Wc()||Tc()||Xc()||bd()||ad()||$c()||Rc())g=!0;var h={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new rf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",
|
|
474
|
-
preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},
|
|
475
|
-
cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(bm(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
|
|
465
|
+
ignoreDuplicateInitData:!Vc()};(Rc()||$c())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Vc()||Uc()||Sc("Tizen 4")||Wc()&&38===Yc()||Wc()&&53===Yc()||Wc()&&68===Yc()||Xc()&&(!Xc()||!Sc("Android"))||(navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform&&navigator.platform.toLowerCase().includes("windows"))&&Qc()||(c="smooth",d=!0);d={retryParameters:Pf(),availabilityWindowOverride:NaN,disableAudio:!1,
|
|
466
|
+
disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
|
|
467
|
+
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:$l,manifestPreprocessorTXml:am,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",
|
|
468
|
+
ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Uc()||Vc()||Wc()&&38===Yc()||$c()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:$l,manifestPreprocessorTXml:am,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
469
|
+
"79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Pf(),failureCallback:function(k){return Sl([k])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
|
|
470
|
+
autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,
|
|
471
|
+
vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1};if(Wc()||Tc()||Xc()||bd())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?C(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return Sl([k,l])},
|
|
472
|
+
usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,
|
|
473
|
+
clearBufferSwitch:!1,safeMarginSwitch:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(k){return Sl([k],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(k,l){return Sl([k,l])}};var g=!1;if(Wc()||Tc()||Xc()||bd()||ad()||$c()||Rc())g=!0;var h={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new rf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",
|
|
474
|
+
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},
|
|
475
|
+
textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(bm(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
|
|
476
476
|
function cm(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:""}};return Ql(a,b,c||Zl(),d,"")}
|
|
477
477
|
function bm(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=xe(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return qe(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-
|
|
478
|
-
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!=Id&&"image"!=c.type||b.push(c);return b}function $l(a){return Sl([a],a)}function am(a){return Sl([a],a)}P("shaka.util.PlayerConfiguration",Yl);Yl.mergeConfigObjects=cm;Yl.createDefault=Zl;function dm(a,b,c,d,e){ag.call(this);this.K=a;this.
|
|
478
|
+
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!=Id&&"image"!=c.type||b.push(c);return b}function $l(a){return Sl([a],a)}function am(a){return Sl([a],a)}P("shaka.util.PlayerConfiguration",Yl);Yl.mergeConfigObjects=cm;Yl.createDefault=Zl;function dm(a,b,c,d,e){ag.call(this);this.K=a;this.Y=b;this.bb=e.networkingEngine;this.aa=d;this.m=null;this.Vb=c;this.Ia=0;this.Tb=e.rc;this.A=e.Th;this.Ub=e.Uh;this.g=e.config;this.j=this.B=this.h=null;this.sa=!1;this.C=e.di;this.Ga=!1;this.l=null;this.ea=!1;this.i=this.s=null;this.da=!1;this.I=new Map;this.Ha=!1;this.lb=e.ci;this.ba=new Pk;this.qa=new Rf;this.pa=new Rf;this.L=new Rf;this.F=new Rf;this.F.catch(function(){});this.N=null;this.o=!1;this.Rb=e.Vg;this.ta=null;this.mb=e.Ug;this.T=!1;
|
|
479
479
|
this.H=[];this.G=[]}na(dm,ag);function em(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function fm(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 gm(a,b){a.N=b;a.T=!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=dm.prototype;r.getStartTime=function(){return this.aa};r.ad=function(){return this.K};r.Te=function(){return this.h};function hm(a){a.da=!0;return a.i}function im(a){a.sa=!0;return a.j}function jm(a){a.Ga=!0;return a.C}
|
|
480
480
|
r.getStats=function(){return this.ba};function km(a){a.ea=!0;return a.l}function lm(a){a.Ha=!0;return a.I}
|
|
481
481
|
r.start=function(){var a=this,b;return L(function(c){switch(c.g){case 1:return C(c,Promise.resolve(),2);case 2:return ra(c,3),C(c,mm(a),5);case 5:if(a.o)return c.return();a.qa.resolve();return C(c,nm(a),6);case 6:if(a.o)return c.return();a.pa.resolve();a.m||(a.m=new Bf(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,
|
|
482
|
-
a.g.manifest.dash.enableAudioGroups),Be(a.h,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes));if(a.mb){var d=a.g.abrFactory;a.s=d;a.i=d();a.i.configure(a.g.abr)}if(a.
|
|
482
|
+
a.g.manifest.dash.enableAudioGroups),Be(a.h,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes));if(a.mb){var d=a.g.abrFactory;a.s=d;a.i=d();a.i.configure(a.g.abr)}if(a.Rb){d=a.h.presentationTimeline.R();var e=kf(a.h.variants);e=a.m.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ta=e,e.video&&om(a,e.video,d),e.audio&&om(a,e.audio,d)}return C(c,void 0,7);case 7:if(a.o)return c.return();a.L.resolve();ta(c,0);break;
|
|
483
483
|
case 3:throw b=va(c),a.F.reject(b),b;}})};r.dispatchEvent=function(a){return this.N?this.N.dispatchEvent(a):ag.prototype.dispatchEvent.call(this,a)};r.onError=function(a){2===a.severity&&(this.F.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new S("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function pm(a,b){a.dispatchEvent(new S("onstatechange",(new Map).set("state",b)))}
|
|
484
|
-
function mm(a){var b,c,d,e,f;return L(function(g){if(1==g.g){pm(a,"manifest-parser");a.j||(a.B=ki(a.K,a.
|
|
485
|
-
function nm(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:pm(a,"drm-engine");a.Ia=Date.now()/1E3;a.l=a.
|
|
484
|
+
function mm(a){var b,c,d,e,f;return L(function(g){if(1==g.g){pm(a,"manifest-parser");a.j||(a.B=ki(a.K,a.Y),a.j=a.B(),a.j.configure(a.g.manifest));b=Date.now()/1E3;pm(a,"manifest");if(a.h)return g.u(2);c=a;return C(g,a.j.start(a.K,a.Ub),3)}2!=g.g&&(c.h=g.h);d=new S("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new Q(2,4,4036);qm(a.h);e=Date.now()/1E3;f=e-b;a.ba.F=f;G(g)})}
|
|
485
|
+
function nm(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:pm(a,"drm-engine");a.Ia=Date.now()/1E3;a.l=a.Tb();a.A.g=a.l;a.l.configure(a.g.drm);var h=a.A;b=Fe(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new S("trackschanged",void 0);return C(g,Promise.resolve(),3);case 3:a.dispatchEvent(c);case 2:return d=kf(a.h.variants),C(g,vh(a.l,d,a.h.offlineSessionIds),4);case 4:return C(g,di(a.A,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new S("trackschanged",void 0);return C(g,Promise.resolve(),
|
|
486
486
|
7);case 7:a.dispatchEvent(f),G(g)}})}r.configure=function(a,b){a=Rl(a,b);cm(this.g,a)};r.getConfiguration=function(){return ye(this.g)};
|
|
487
487
|
function om(a,b,c){var d,e,f,g,h;L(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Qk(d,b,function(l,m,n){return zl(l,m,n||null,a.g.streaming.retryParameters,a.bb)}),a.I.set(b.id,e),C(k,b.createSegmentIndex(),2);f=a.aa||0;(h=(g=b.segmentIndex.xb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&Tk(e,h.ca):Sk(e,h.startTime));G(k)})}r.Fi=function(){return Promise.race([this.L,this.F])};
|
|
488
488
|
r.destroy=function(){var a=this,b,c,d;return L(function(e){switch(e.g){case 1:a.o=!0;if(!a.j||a.sa){e.u(2);break}return C(e,a.j.stop(),2);case 2:if(!a.i||a.da){e.u(4);break}return C(e,a.i.stop(),4);case 4:a.C&&!a.Ga&&a.C.release();if(!a.l||a.ea){e.u(6);break}return C(e,a.l.destroy(),6);case 6:if(0<a.I.size&&!a.Ha)for(b=t(a.I.values()),c=b.next();!c.done;c=b.next())d=c.value,Zk(d);G(e)}})};
|
|
489
|
-
function qm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}P("shaka.media.PreloadManager",dm);dm.prototype.destroy=dm.prototype.destroy;dm.prototype.waitForFinish=dm.prototype.Fi;function rm(a,b){ag.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{
|
|
490
|
-
"regionremove",function(d){c.g.delete(d.region)})}na(rm,ag);rm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ag.prototype.release.call(this)};rm.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?Hm:a>d.endTime?Im:sm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.
|
|
491
|
-
function
|
|
489
|
+
function qm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}P("shaka.media.PreloadManager",dm);dm.prototype.destroy=dm.prototype.destroy;dm.prototype.waitForFinish=dm.prototype.Fi;function rm(a,b){ag.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{oc:null,nc:sm,cc:function(d,e){return tm(c,"enter",d,e)}},{oc:Hm,nc:sm,cc:function(d,e){return tm(c,"enter",d,e)}},{oc:Im,nc:sm,cc:function(d,e){return tm(c,"enter",d,e)}},{oc:sm,nc:Hm,cc:function(d,e){return tm(c,"exit",d,e)}},{oc:sm,nc:Im,cc:function(d,e){return tm(c,"exit",d,e)}},{oc:Hm,nc:Im,cc:function(d,e){return tm(c,"skip",d,e)}},{oc:Im,nc:Hm,cc:function(d,e){return tm(c,"skip",d,e)}}];this.h=new db;this.h.D(this.i,
|
|
490
|
+
"regionremove",function(d){c.g.delete(d.region)})}na(rm,ag);rm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ag.prototype.release.call(this)};rm.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?Hm:a>d.endTime?Im:sm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.oc==e&&h.nc==f&&h.cc(d,b)}}};
|
|
491
|
+
function tm(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hm=1,sm=2,Im=3;function Jm(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:var n=(new rc(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Km[d])return m.return(e);f=0;g=hg([a],c);ra(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=va(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
492
492
|
e.toLowerCase().split(";").shift():"")}})}
|
|
493
493
|
var Km={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 Lm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Lm(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=Mm(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Mm(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;
|
|
494
494
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
495
495
|
function Mm(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";
|
|
496
496
|
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 Nm(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Nm(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Lm(d,b);c.push(e)}return c};function Om(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=Om.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;Pm(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
497
|
-
r.append=function(a){var b=Nm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={
|
|
497
|
+
r.append=function(a){var b=Nm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={qc:d.qc},e=b.next())d.qc=e.value,a.some(function(f){return function(g){return g.startTime==f.qc.startTime&&g.endTime==f.qc.endTime&&g.text==f.qc.payload?!0:!1}}(d))||(e=Qm(d.qc))&&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)-
|
|
498
498
|
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&&(Pm(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"};
|
|
499
499
|
function Qm(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
500
|
-
function Pm(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}P("shaka.text.SimpleTextDisplayer",Om);Om.prototype.setTextVisibility=Om.prototype.setTextVisibility;Om.prototype.isTextVisible=Om.prototype.isTextVisible;Om.prototype.destroy=Om.prototype.destroy;Om.prototype.append=Om.prototype.append;Om.prototype.remove=Om.prototype.remove;Om.prototype.configure=Om.prototype.configure;function Rm(){}r=Rm.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",Rm);Rm.prototype.setTextVisibility=Rm.prototype.setTextVisibility;Rm.prototype.isTextVisible=Rm.prototype.isTextVisible;Rm.prototype.destroy=Rm.prototype.destroy;Rm.prototype.append=Rm.prototype.append;Rm.prototype.remove=Rm.prototype.remove;Rm.prototype.configure=Rm.prototype.configure;function Sm(){}function Tm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Sm);Sm.removeAllChildren=Tm;function Um(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);this.C=(new Mc(function(){d.A.paused||
|
|
501
|
-
|
|
500
|
+
function Pm(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}P("shaka.text.SimpleTextDisplayer",Om);Om.prototype.setTextVisibility=Om.prototype.setTextVisibility;Om.prototype.isTextVisible=Om.prototype.isTextVisible;Om.prototype.destroy=Om.prototype.destroy;Om.prototype.append=Om.prototype.append;Om.prototype.remove=Om.prototype.remove;Om.prototype.configure=Om.prototype.configure;function Rm(){}r=Rm.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",Rm);Rm.prototype.setTextVisibility=Rm.prototype.setTextVisibility;Rm.prototype.isTextVisible=Rm.prototype.isTextVisible;Rm.prototype.destroy=Rm.prototype.destroy;Rm.prototype.append=Rm.prototype.append;Rm.prototype.remove=Rm.prototype.remove;Rm.prototype.configure=Rm.prototype.configure;function Sm(){}function Tm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Sm);Sm.removeAllChildren=Tm;function Um(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||pb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Mc(function(){d.A.paused||
|
|
501
|
+
Vm(d)})).$a(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new db;this.j.D(document,"fullscreenchange",function(){Vm(d,!0)});this.j.D(this.A,"seeking",function(){Vm(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(){Vm(d,!0)}),this.o.observe(this.g));this.B=new Map}r=Um.prototype;r.configure=function(a){this.C&&this.C.$a(a.captionsUpdatePeriod)};
|
|
502
502
|
r.append=function(a){var b=[].concat(y(this.h)),c={};a=t(a);for(var d=a.next();!d.done;c={ud:c.ud},d=a.next())c.ud=d.value,b.some(function(e){return function(f){return $b(f,e.ud)}}(c))||this.h.push(c.ud);Vm(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()};
|
|
503
503
|
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});Vm(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function Wm(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
504
|
-
function Xm(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.Mg:null;l&&(g.push(l.Ce),l.
|
|
505
|
-
p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.
|
|
504
|
+
function Xm(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.Mg:null;l&&(g.push(l.Ce),l.ic&&g.push(l.ic),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Wm(a,n)||(f=!0):(Ym(a,k,e),l=a.i.get(k),n=l.Mg,f=!0));0<k.nestedCues.length&&n&&Xm(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(q,p){return q.startTime!=
|
|
505
|
+
p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.ic?(d.ic.contains(c)&&d.ic.removeChild(c),c.appendChild(d.ic),d.ic.appendChild(d.Ce)):c.appendChild(d.Ce)}}function Vm(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())Tm(d.value);Tm(a.g);a.i.clear();a.B.clear()}a.m&&Xm(a,a.h,a.g,c,[])}}
|
|
506
506
|
function Ym(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&&Zm(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.l===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==gc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==gc?"%":"px");if(a.B.has(g))c=a.B.get(g);else{var h=document.createElement("span"),k=c.heightUnits==gc?"%":"px",l=c.widthUnits==
|
|
507
507
|
gc?"%":"px",m=c.viewportAnchorUnits==gc?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.l===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):
|
|
508
508
|
(h.style.top=c.viewportAnchorY-c.regionAnchorY*c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(g,h);c=h}}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,
|
|
509
|
-
{Ce:f,Mg:e,
|
|
509
|
+
{Ce:f,Mg:e,ic:c})}function $m(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Pb?c:"left"===a||"start"===a&&b===Rb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Rb?"line-right":"center"}
|
|
510
510
|
function Zm(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=an(c.linePadding,c,a.s);f.paddingRight=an(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
511
511
|
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",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=bn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=bn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-
|
|
512
512
|
1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=an(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Ub&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",
|
|
@@ -524,26 +524,26 @@ function kn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round
|
|
|
524
524
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function pn(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=kn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
525
525
|
function ln(a,b){if(!b||a.includes("offline:"))return a;a=new rc(a);a.g.set("CMCD",b);return a.toString()}var jn="m",gn="a",nn="v",hn="av",rn="i",tn="c",sn="tt";P("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Og:"s",OTHER:"o"});function xn(a){this.h=a;this.g=null}r=xn.prototype;r.configure=function(a){this.h=a};r.dg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(yn)?1E3*this.g.get(yn):null};r.cg=function(){return this.h.enabled&&this.g&&this.g.has(zn)?1E3*this.g.get(zn):null};r.xh=function(){return this.h.enabled&&this.g&&this.g.has(An)?this.g.get(An):null};r.yh=function(){return this.h.enabled&&this.g&&this.g.has(Bn)?this.g.get(Bn):null};
|
|
526
526
|
r.getBandwidthEstimate=function(a){var b=this.cg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Cn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",xn);xn.prototype.getBandwidthEstimate=xn.prototype.getBandwidthEstimate;xn.prototype.getRoundTripTime=xn.prototype.yh;xn.prototype.getResponseDelay=xn.prototype.xh;xn.prototype.getEstimatedThroughput=xn.prototype.cg;
|
|
527
|
-
xn.prototype.getMaxBitrate=xn.prototype.dg;var zn="etp",yn="mb",An="rd",Bn="rtt";function Dn(){this.g=null;this.h=[]}function En(a,b){return L(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;G(c)})}Dn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ag.call(this);var c=this;this.l=Fn;this.Rd=this.g=null;this.da=!1;this.Vd=new
|
|
528
|
-
new Bf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ha=this.h.preferredTextLanguage;this.
|
|
527
|
+
xn.prototype.getMaxBitrate=xn.prototype.dg;var zn="etp",yn="mb",An="rd",Bn="rtt";function Dn(){this.g=null;this.h=[]}function En(a,b){return L(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;G(c)})}Dn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ag.call(this);var c=this;this.l=Fn;this.Rd=this.g=null;this.da=!1;this.Vd=new db;this.Rb=new db;this.m=new db;this.ta=new db;this.C=this.F=this.B=this.G=null;this.Yd=0;this.Y=new Dn;this.ea=this.gf=this.qa=this.i=this.Ga=this.I=this.j=this.lb=this.K=this.rg=this.aa=this.T=this.mb=this.L=this.H=this.bb=null;this.Ia=!1;this.pa=this.o=null;this.nf=1E9;this.$c=[];this.N=NaN;this.h=Gn(this);this.ba={width:Infinity,height:Infinity};this.Pd=new ci(this.h,this.ba,null);this.s=null;this.sa=
|
|
528
|
+
new Bf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Ha=this.h.preferredTextLanguage;this.Vb=this.h.preferredTextRole;this.Ub=this.h.preferForcedSubs;this.Tb=[];b&&b(this);this.T=Hn(this);this.aa=new xn(this.h.cmsd);this.G=In(this);
|
|
529
529
|
this.G.Cf(this.h.streaming.forceHTTPS);this.A=null;Jn&&(this.A=Jn(),this.A.configure(this.h.ads));this.Vd.D(window,"online",function(){Kn(c);c.vf()});this.Td=new Mc(function(){return Ln(c)});a&&(pb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Vc(a,!0))}na(X,ag);function Mn(a){null!=a.K&&(rj(a.K),a.K.release(),a.K=null)}
|
|
530
530
|
function Nn(a,b){if(b.lcevc.enabled){var c=a.Hb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Qc()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Wa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Mn(a);null==a.K&&(a.K=new qj(a.g,a.rg,b.lcevc),a.F&&(a.F.T=a.K))}else Mn(a)}function On(a,b){return new S(a,b)}r=X.prototype;
|
|
531
|
-
r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Pn)return c.return();Mn(a);b=a.detach();a.l=Pn;return C(c,b,2);case 2:a.Vd&&(a.Vd.release(),a.Vd=null);a.
|
|
531
|
+
r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Pn)return c.return();Mn(a);b=a.detach();a.l=Pn;return C(c,b,2);case 2:a.Vd&&(a.Vd.release(),a.Vd=null);a.Rb&&(a.Rb.release(),a.Rb=null);a.m&&(a.m.release(),a.m=null);a.ta&&(a.ta.release(),a.ta=null);a.pa=null;a.h=null;a.s=null;a.Rd=null;a.T=null;a.aa=null;if(!a.G){c.u(3);break}return C(c,a.G.destroy(),4);case 4:a.G=null;case 3:a.o&&(a.o.release(),a.o=null),ag.prototype.release.call(a),G(c)}})};
|
|
532
532
|
function Qn(a,b){a.dispatchEvent(On("onstatechange",(new Map).set("state",b)))}
|
|
533
|
-
r.Vc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==Pn)throw new Q(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.u(2);break}return C(g,c.detach(),2);case 2:return C(g,Rn(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(Qn(c,"attach"),e=function(){var h=Sn(c);h&&Tn(c,h)},c.
|
|
534
|
-
}})};r.Wg=function(a){this.rg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Pn)throw new Q(2,7,7E3);return C(c,b.
|
|
535
|
-
r.
|
|
536
|
-
c.I.stop(),7);case 7:c.I=null,c.Ga=null;case 6:if(!c.o){q.u(8);break}return C(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!c.F){q.u(12);break}return C(q,c.F.destroy(),13);case 13:c.F=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.aa&&(c.aa.g=null);c.g&&Tm(c.g);if(!c.g||!c.g.src){q.u(14);break}return C(q,new Promise(function(p){return(new Mc(p)).
|
|
537
|
-
c.g.load();case 14:if(!c.B){q.u(16);break}return C(q,c.B.destroy(),17);case 17:c.B=null;case 16:c.qa=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=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.i=null;c.s=new Pk;c.kf=null;c.$c=[];c.N=NaN;Vn(c);case 3:wa(q);c.
|
|
533
|
+
r.Vc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==Pn)throw new Q(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.u(2);break}return C(g,c.detach(),2);case 2:return C(g,Rn(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(Qn(c,"attach"),e=function(){var h=Sn(c);h&&Tn(c,h)},c.Rb.D(a,"error",e),c.g=a);if(!b||!Nc()||c.F){g.u(6);break}return C(g,Un(c),6);case 6:wa(g);c.Y.release();ya(g,0);break;case 5:return f=va(g),C(g,c.detach(),10);case 10:throw f;
|
|
534
|
+
}})};r.Wg=function(a){this.rg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Pn)throw new Q(2,7,7E3);return C(c,b.lc(!1,a),2)}if(3!=c.g)return C(c,Rn(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Rb.ib(),b.g=null),Qn(b,"detach"),b.A&&!a&&b.A.release()}finally{b.Y.release()}G(c)})};function Rn(a,b){var c;return L(function(d){return 1==d.g?(c=++a.Yd,C(d,En(a.Y,b),2)):c!=a.Yd?(a.Y.release(),d.return(!0)):d.return(!1)})}
|
|
535
|
+
r.lc=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 L(function(q){switch(q.g){case 1:return c.l!=Pn&&(c.l=Fn),C(q,Rn(c,"unload"),2);case 2:if(q.h)return q.return();sa(q,3);c.Ia=!1;Qn(c,"unload");a&&!Nc()&&(a=!1);Mn(c);d=c.Tb.map(function(p){return p()});c.Tb=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(On("unloading"));c.mb&&(c.mb.release(),c.mb=null);c.g&&(c.m.ib(),c.ta.ib());c.Td.stop();c.bb&&(c.bb.release(),c.bb=null);if(!c.I){q.u(6);break}return C(q,
|
|
536
|
+
c.I.stop(),7);case 7:c.I=null,c.Ga=null;case 6:if(!c.o){q.u(8);break}return C(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!c.F){q.u(12);break}return C(q,c.F.destroy(),13);case 13:c.F=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.aa&&(c.aa.g=null);c.g&&Tm(c.g);if(!c.g||!c.g.src){q.u(14);break}return C(q,new Promise(function(p){return(new Mc(p)).X(.1)}),15);case 15:c.g.removeAttribute("src"),
|
|
537
|
+
c.g.load();case 14:if(!c.B){q.u(16);break}return C(q,c.B.destroy(),17);case 17:c.B=null;case 16:c.qa=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=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.i=null;c.s=new Pk;c.kf=null;c.$c=[];c.N=NaN;Vn(c);case 3:wa(q);c.Y.release();ya(q,4);break;
|
|
538
538
|
case 4:if(a&&Nc()&&!c.F)return C(q,Un(c),0);q.u(0)}})};r.Ei=function(a){this.ea=a};
|
|
539
|
-
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,u,x,w;return L(function(z){switch(z.g){case 1:if(d.l==Pn)throw new Q(2,7,7E3);e=null;f="";a instanceof dm?(e=a,f=e.ad()||""):f=a||"";return C(z,En(d.
|
|
540
|
-
2),C(A,En(d.
|
|
541
|
-
z.h;if(!e){d.s=new Pk;z.u(11);break}gm(e,d);d.s=e.getStats();return C(z,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.
|
|
539
|
+
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,u,x,w;return L(function(z){switch(z.g){case 1:if(d.l==Pn)throw new Q(2,7,7E3);e=null;f="";a instanceof dm?(e=a,f=e.ad()||""):f=a||"";return C(z,En(d.Y,"load"),2);case 2:d.Y.release();if(!d.g)throw new Q(2,7,7002);if(!d.qa){z.u(3);break}return C(z,d.lc(!1),3);case 3:g=++d.Yd;h=function(){return L(function(v){if(1==v.g)return d.Yd==g?v.u(0):e?C(v,e.destroy(),3):v.u(3);throw new Q(2,7,7E3);})};k=function(v,B){return L(function(A){switch(A.g){case 1:return sa(A,
|
|
540
|
+
2),C(A,En(d.Y,B),4);case 4:return C(A,h(),5);case 5:return C(A,v(),6);case 6:return C(A,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:wa(A),d.Y.release(),ya(A,0)}})};ra(z,5,6);null==b&&e&&(b=e.getStartTime());d.ea=b;d.Ia=!1;d.dispatchEvent(On("loading"));if(e){c=e.Y;z.u(8);break}if(c){z.u(8);break}return C(z,k(function(){return L(function(v){if(1==v.g)return C(v,Wn(d,f),2);c=v.h;G(v)})},"guessMimeType_"),8);case 8:l=!!e;if(e){gm(e,d);d.s=e.getStats();z.u(11);break}return C(z,Xn(d,f,b,c,!0),12);case 12:e=
|
|
541
|
+
z.h;if(!e){d.s=new Pk;z.u(11);break}gm(e,d);d.s=e.getStats();return C(z,k(function(){return e.start()},"preload"),11);case 11:m=!e;n=e?e.Vb:Date.now()/1E3;d.s=e?e.getStats():new Pk;d.qa=f;d.gf=c||null;if(m)return C(z,k(function(){return L(function(v){return C(v,Yn(d,c),0)})},"initializeSrcEqualsDrmInner_"),24);if(d.F){z.u(17);break}return C(z,k(function(){return L(function(v){return C(v,Un(d),0)})},"initializeMediaSourceEngineInner_"),17);case 17:return C(z,k(function(){return e.qa},"waitForManifest"),
|
|
542
542
|
19);case 19:d.h=e.getConfiguration();d.Pd=e.A;d.Ga=e.B;d.I=im(e);d.mb=jm(e);d.lb=e.lb;d.i=e.Te();if(q=e.m)d.sa=q;l&&d.g&&"AUDIO"===d.g.nodeName&&(Zn(d),d.configure("manifest.disableVideo",!0));return C(z,k(function(){return e.pa},"waitForDrm"),20);case 20:return d.B=km(e),C(z,k(function(){return L(function(v){return C(v,d.B.Vc(d.g),0)})},"drmEngine_.attach"),21);case 21:return C(z,k(function(){return e.L},"waitForChooseInitialVariant"),22);case 22:return!(p=e.s)||d.pa&&d.pa==p||(d.o=hm(e),d.pa=e.s,
|
|
543
543
|
"function"!=typeof d.o.setMediaElement&&(pb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(pb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(pb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),
|
|
544
|
-
u=lm(e),x=e.ta,C(z,k(function(){return L(function(v){return C(v,$n(d,n,x,u),0)})},"loadInner_"),23);case 23:fm(e);z.u(16);break;case 24:return C(z,k(function(){return L(function(v){return C(v,ao(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(On("loaded"));case 6:wa(z);if(!e){z.u(26);break}return C(z,e.destroy(),26);case 26:ya(z,0);break;case 5:w=va(z);if(7E3==w.code){z.u(28);break}return C(z,d.
|
|
544
|
+
u=lm(e),x=e.ta,C(z,k(function(){return L(function(v){return C(v,$n(d,n,x,u),0)})},"loadInner_"),23);case 23:fm(e);z.u(16);break;case 24:return C(z,k(function(){return L(function(v){return C(v,ao(d,n,c),0)})},"srcEqualsInner_"),16);case 16:d.dispatchEvent(On("loaded"));case 6:wa(z);if(!e){z.u(26);break}return C(z,e.destroy(),26);case 26:ya(z,0);break;case 5:w=va(z);if(7E3==w.code){z.u(28);break}return C(z,d.lc(!1),28);case 28:throw w;}})};
|
|
545
545
|
function Zn(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})}
|
|
546
|
-
r.Ai=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.I&&c.Ga&&c.qa)){g.u(2);break}e=c.g.currentTime;c.R()&&(e=null);f=Date.now()/1E3;return C(g,bo(c,c.qa,e,c.gf,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.I,l=c.Ga;h.h=c.i;h.j=k;h.B=l;h=d;k=c.pa;h.i=c.o;h.s=k;d.m=c.sa;d.start();c.i=null;c.I=null;c.Ga=null;c.o=null;c.pa=null;case 2:return C(g,c.
|
|
546
|
+
r.Ai=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.I&&c.Ga&&c.qa)){g.u(2);break}e=c.g.currentTime;c.R()&&(e=null);f=Date.now()/1E3;return C(g,bo(c,c.qa,e,c.gf,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.I,l=c.Ga;h.h=c.i;h.j=k;h.B=l;h=d;k=c.pa;h.i=c.o;h.s=k;d.m=c.sa;d.start();c.i=null;c.I=null;c.Ga=null;c.o=null;c.pa=null;case 2:return C(g,c.lc(a,b),4);case 4:return g.return(d)}})};
|
|
547
547
|
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return L(function(f){if(1==f.g)return C(f,Xn(d,a,b,c),2);(e=f.h)?e.start().catch(function(){}):Tn(d,new Q(2,7,7005));return f.return(e)})};
|
|
548
548
|
function Xn(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return L(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):C(l,Wn(a,b),3);2!=l.g&&(d=l.h);if(g=co(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.pa==a.h.abrFactory&&(k=!1),a.g&&"AUDIO"===a.g.nodeName&&(h=!0));return l.return(bo(a,b,c,d||null,f,!e,h,k))})}
|
|
549
549
|
function bo(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,q,p,u,x,w,z,v,B,A,D,F;return L(function(J){if(1==J.g)return k=null,l=ye(a.h),g&&(l.manifest.disableVideo=!0),m=function(){return k.T&&k.o?null:k},n=function(){return m()?m().getConfiguration():a.h},q=function(I,E){m()?k.configure(I,E):a.configure(I,E)},Infinity!=a.ba.width||Infinity!=a.ba.height?J.u(2):C(J,fd(),3);2!=J.g&&(p=J.h,a.ba.width=p.width,a.ba.height=p.height);u=new ci(l,a.ba,null);x={networkingEngine:a.G,
|
|
@@ -556,22 +556,22 @@ var H=Object.keys(I);E=1==H.length&&"00"==H[0];var K=!1;if(H.length){H=t(a.i.var
|
|
|
556
556
|
function Wn(a,b){var c,d;return L(function(e){if(1==e.g)return c=a.h.manifest.retryParameters,C(e,Jm(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&Zc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
557
557
|
function co(a,b){if(!Nc())return!0;if(b){if(""==(a.g||Pc()).canPlayType(b))return!1;if(!(Nc()&&b in li))return!0;if(be(b)){if(a.h.streaming.preferNativeHls)return!0;if(Zc()&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"]))return a.h.streaming.useNativeHlsForFairPlay;if(Zc())return a.h.streaming.useNativeHlsOnSafari}}return!1}
|
|
558
558
|
function Un(a){var b,c,d,e,f;return L(function(g){if(1==g.g)return Qn(a,"media-source"),b=a.h.textDisplayFactory,c=b(),c.configure?c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.kf=b,d=jo(a.g,c,function(h,k,l){ko(a,h,k,l)},a.K),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.ba=f,C(g,d.L,2);a.F=d;G(g)})}
|
|
559
|
-
function $n(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I;return L(function(E){switch(E.g){case 1:Qn(a,"load");e=a.g;a.H=new Hk({Md:function(){return e.playbackRate},
|
|
559
|
+
function $n(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I;return L(function(E){switch(E.g){case 1:Qn(a,"load");e=a.g;a.H=new Hk({Md:function(){return e.playbackRate},Xb:function(){return e.defaultPlaybackRate},Df:function(H){e.playbackRate=H},og:function(H){e.currentTime+=H}});f=function(){return lo(a)};g=function(){return mo(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);Nn(a,a.h);a.Ha=a.h.preferredTextLanguage;a.Vb=a.h.preferredTextRole;a.Ub=a.h.preferForcedSubs;
|
|
560
560
|
no(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.o.init(function(H,K,M){a.j&&H!=a.j.j&&oo(a,H,!0,void 0===K?!1:K,void 0===M?0:M)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=po(a);a.j.configure(a.h.streaming);a.l=qo;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(H){if(H.track)switch(H=H.track,H.kind){case "chapters":ro(a,H)}});a.dispatchEvent(On("streaming"));h=c;(k=a.j.j)||h||(h=so(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(q=n.next();!q.done;q=n.next())(p=q.value)&&
|
|
561
561
|
!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){E.u(2);break}return C(E,Promise.all(l),2);case 2:if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(m);no(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);u=function(H){a.C=to(a,H);a.bb=uo(a,b);vo(a,e,Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal))};a.h.streaming.startAtSegmentBoundary||u(a.ea);if(k){E.u(4);break}if(!a.h.streaming.startAtSegmentBoundary){E.u(5);break}x=a.i.presentationTimeline;w=a.ea||
|
|
562
|
-
a.g.currentTime;z=x
|
|
562
|
+
a.g.currentTime;z=x.$b();v=x.pb();w<z?w=z:w>v&&(w=v);return C(E,wo(h,w),6);case 6:B=E.h,u(B);case 5:oo(a,h,!0,!1,0);case 4:return a.C.ve(),A=a.wc().find(function(H){return H.active}),A||((D=lf(a.i.textStreams,a.Ha,a.Vb,a.Ub)[0]||null)&&Ok(a.s.h,D,!0),h&&(D?(h.audio&&xo(a,h.audio,D)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),yo(a)):a.da=!1),D&&(a.h.streaming.alwaysStreamText||a.Ze())&&vl(a.j,D)),C(E,a.j.start(d),7);case 7:a.h.abr.enabled&&(a.o.enable(),zo(a));go(a);ho(a);a.i.variants.some(function(H){return H.primary});
|
|
563
563
|
(F=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate?(J=function(){return Ao(a)},a.m.D(e,"timeupdate",J)):F||(I=function(){return Bo(a)},a.m.D(e,"timeupdate",I),Bo(a));if(a.A)a.A.onManifestUpdated(F);a.Ia=!0;a.m.na(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});G(E)}})}
|
|
564
564
|
function Yn(a,b){var c,d,e,f;return L(function(g){return 1==g.g?(c=Kd,d=Date.now()/1E3,e=!0,a.B=a.rc({zb:a.G,onError:function(h){Tn(a,h)},ee:function(){},onExpirationUpdated:function(){var h=On("expirationupdated");a.dispatchEvent(h)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
565
565
|
segmentIndex:null,mimeType:b?Wd(b):"",codecs:b?Xd(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.fa,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},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},f.video.fullMimeTypes.add(Md(f.video.mimeType,
|
|
566
566
|
f.video.codecs)),a.B.ba=!0,C(g,vh(a.B,[f],[]),2)):C(g,a.B.Vc(a.g),0)})}
|
|
567
|
-
function ao(a,b,c){var d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return Qn(a,"src-equals"),d=a.g,a.C=new xk(d),e=!1,a.
|
|
567
|
+
function ao(a,b,c){var d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return Qn(a,"src-equals"),d=a.g,a.C=new xk(d),e=!1,a.Tb.push(function(){e=!0}),null!=a.ea&&a.C.we(a.ea),a.H=new Hk({Md:function(){return d.playbackRate},Xb:function(){return d.defaultPlaybackRate},Df:function(u){d.playbackRate=u},og:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,vo(a,d,f),g=function(){return lo(a)},h=function(){return mo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
568
568
|
"ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return go(a)}),a.m.D(d.audioTracks,"removetrack",function(){return go(a)}),a.m.D(d.audioTracks,"change",function(){return go(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Co(a,u);break;case "chapters":ro(a,u);break;default:go(a)}}),a.m.D(d.textTracks,"removetrack",function(){return go(a)}),
|
|
569
569
|
a.m.D(d.textTracks,"change",function(){return go(a)})),d.src=en(a.T,a.qa,c),(Tc()||Wc())&&d.load(),"none"!=d.preload&&!d.autoplay&&be(c)&&cd()&&d.load(),a.l=Do,a.dispatchEvent(On("streaming")),k=new Rf,ok(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.ve();k.resolve()}),ok(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var u;return L(function(x){if(1==x.g)return Eo(a),u=Fo(a),u.find(function(w){return"disabled"!=w.mode})?(0<u.length&&(a.da=!0),x.u(2)):C(x,new Promise(function(w){a.m.na(d.textTracks,
|
|
570
|
-
"change",w);(new Mc(w)).
|
|
570
|
+
"change",w);(new Mc(w)).X(1)}),2);if(e)return x.return();Go(a);G(x)})}),d.error?k.reject(Sn(a)):"none"==d.preload&&(Wa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.na(d,"error",function(){k.reject(Sn(a))}),C(p,k,2);(l=a.R())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate?
|
|
571
571
|
(m=function(){return Ao(a)},a.m.D(d,"timeupdate",m)):l||(n=function(){return Bo(a)},a.m.D(d,"timeupdate",n),Bo(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.Ib().end,a.m.D(d,"progress",function(){var u=a.Ib().end;q!=u&&(a.A.onManifestUpdated(a.R()),q=u)})));a.Ia=!0;G(p)})}function Eo(a){var b=a.h.preferredAudioLanguage;""!=b&&a.wg(b,a.h.preferredVariantRole)}function Go(a){var b=a.h.preferredTextLanguage;""!=b&&a.yf(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
|
|
572
|
-
function Co(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,Ho(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Io(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).
|
|
572
|
+
function Co(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,Ho(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Io(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).kc().X(.5);a.Tb.push(function(){c.stop()})}}
|
|
573
573
|
function ko(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())Ho(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Ho(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(On("metadata",b))}
|
|
574
|
-
function ro(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).
|
|
574
|
+
function ro(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).kc().X(.5);a.Tb.push(function(){c.stop()})}}r.hi=function(){for(var a=this.Y;a.g;)a.release()};r.rc=function(a){return new oh(a)};
|
|
575
575
|
function In(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?em(b(),!0,e):e()}b||(b=function(){return null});return new dg(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(On("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],
|
|
576
576
|
Cn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var u=p[l].split("=");q.set(u[0],Cn(u[1]))}var x=q}catch(w){x=null}x&&(h.g=x)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(On("downloadfailed",e))},function(e,f,g){d(function(){var h=a.T,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)mn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
577
577
|
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}mn(h,f,{ot:jn,su:!h.i})}}catch(N){Xa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case ng: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.R()?"l":"v"};n.ot=qn(k);var q=n.ot===nn||n.ot===gn||n.ot===hn||n.ot===sn,p=k.stream;if(p){var u=h.h.eb();if(q&&(n.bl=un(h,p.type),n.ot!==sn)){var x=vn(h,p.type);n.dl=u?x/Math.abs(u):x}p.bandwidth&&(n.br=p.bandwidth/1E3);
|
|
@@ -581,7 +581,7 @@ function to(a,b){return new yk(a.g,a.i,a.h.streaming,b,function(){a.bb&&Jk(a.bb,
|
|
|
581
581
|
function uo(a,b){b=new rm(a.mb,a.R()||0<b);b.addEventListener("enter",function(d){fo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){fo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(fo(a,"timelineregionenter",e),fo(a,"timelineregionexit",e))});var c=new Ik(a.g);c.g.add(b);a.lb&&c.g.add(a.lb);return c}
|
|
582
582
|
function vo(a,b,c){a.L=new Kf;a.L.g=Mf;Nf(a.L,c,Math.min(.5,c/2));Vn(a);a.m.D(b,"waiting",function(){return Jo(a)});a.m.D(b,"stalled",function(){return Jo(a)});a.m.D(b,"canplaythrough",function(){return Jo(a)});a.m.D(b,"progress",function(){return Jo(a)})}
|
|
583
583
|
function Jo(a){switch(a.l){case Do:if(a.g.ended)var b=!0;else{var c=zi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case qo:a:if(a.g.ended||Ij(a.F))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Gb();var d=zi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Bi(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Lf:Mf;c.g=d;(b=b!=d)&&d===Lf&&(c.h=Date.now());b&&Vn(a)}function jo(a,b,c,d){return new zj(a,b,c,d)}
|
|
584
|
-
function Hn(a){return new dn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ob:function(){return a.ob()},getCurrentTime:function(){return a.g?a.g.currentTime:0},eb:function(){return a.eb()},
|
|
584
|
+
function Hn(a){return new dn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ob:function(){return a.ob()},getCurrentTime:function(){return a.g?a.g.currentTime:0},eb:function(){return a.eb()},Zb:function(){return a.Zb()},Hb:function(){return a.Hb()},R:function(){return a.R()}},a.h.cmcd)}
|
|
585
585
|
function po(a){return new hl(a.i,{Ld:function(){return a.C?a.C.Dd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},eb:function(){return a.eb()},V:a.F,zb:a.G,onError:function(b){return Tn(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Zh:function(){a.I&&a.I.update&&a.I.update()},mf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.pg();var g=Jj(a.F,f);!a.R()&&a.g.paused&&null!=g&&0<g&&a.C.Dd()<g&&a.C.we(g)}Jo(a);d=(new Map).set("start",d).set("end",e).set("contentType",
|
|
586
586
|
f);a.dispatchEvent(On("segmentappended",d));a.o&&c.fastSwitching&&b.md&&b.Wd&&a.o.trySuggestStreams()},Yh:function(b,c){(c=c.ff)&&a.lb&&el(a.lb,c,b)},Qf:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Mg(Ab(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Eh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
|
|
587
587
|
return d},$h:function(b,c,d){ko(a,b,c,d)},Jd:function(b,c){return a.Jd(b,c)}})}
|
|
@@ -593,27 +593,27 @@ function Ko(a){a.Pd=new ci(a.h,a.ba,a.B);if(a.I){var b=ye(a.h.manifest);a.g&&"AU
|
|
|
593
593
|
c.configure(a.h.textDisplayer):pb("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.kf=b;a.j&&(b=a.j,(c=b.i.get(Id))&&tl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.h.textDisplayer);a.o&&(a.o.configure(a.h.abr),a.h.abr.enabled?a.o.enable():a.o.disable(),zo(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Nf(a.L,b,Math.min(.5,
|
|
594
594
|
b/2)));a.i&&no(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.T&&a.T.configure(a.h.cmcd);a.aa&&a.aa.configure(a.h.cmsd)}r.getConfiguration=function(){var a=Gn(this);cm(a,this.h,Gn(this));return a};
|
|
595
595
|
r.ag=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ib().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.li=function(){for(var a in this.h)delete this.h[a];cm(this.h,Gn(this),Gn(this));Ko(this)};r.qh=function(){return this.l};r.Ue=function(){return this.i?this.i.type:null};r.th=function(){return this.g};
|
|
596
|
-
r.
|
|
597
|
-
r.Ib=function(){if(this.i){if(!this.Ia&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a
|
|
596
|
+
r.Zb=function(){return this.G};r.ad=function(){return this.qa};r.$f=function(){return this.A?this.A:null};r.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};r.dc=function(){return this.i?this.i.presentationTimeline.dc():!1};r.Kh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
597
|
+
r.Ib=function(){if(this.i){if(!this.Ia&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.$b(),end:a.pb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Hh=function(){this.R()&&(this.g.currentTime=this.Ib().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.B?this.B.g:null};r.cd=function(){return this.B?this.B.cd():Infinity};
|
|
598
598
|
r.Se=function(){return this.B?this.B.Se():[]};r.Kd=function(){return this.B?this.B.Kd():{}};r.Xe=function(){return this.L?this.L.g==Mf:!1};r.eb=function(){return this.g?this.H?this.H.h:1:0};
|
|
599
599
|
r.sd=function(a){var b=this;0==a?Wa("A trick play rate of 0 is unsupported!"):(this.ta.ib(),this.g.paused&&this.g.play(),this.H.set(a),this.l==qo&&(this.o.playbackRateChanged(a),sl(this.j,1<Math.abs(a))),this.R()&&this.ta.D(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Ib(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Wc():Math.floor(c)<=Math.floor(d.start+e)&&b.Wc()}))};
|
|
600
|
-
r.Wc=function(){var a=this.H.
|
|
600
|
+
r.Wc=function(){var a=this.H.Xb();this.l==Do&&this.H.set(a);this.l==qo&&(this.H.set(a),this.o.playbackRateChanged(a),sl(this.j,!1));this.ta.ib()};
|
|
601
601
|
r.Hb=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,jf(e)){var f=Xe(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.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return hf(g)}):[]};
|
|
602
602
|
r.wc=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=Ye(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Fo(this).map(function(f){return ff(f)}):[]};r.oh=function(){var a=this.$c;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Ze(b)})};
|
|
603
|
-
r.gh=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=qo&&b.l!=Do)return g.return(null);c=b.$c;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.tc(function(h){var k=Lo(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.
|
|
604
|
-
function Lo(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{
|
|
605
|
-
r.fg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){if(1==D.g){if(c.l!=qo&&c.l!=Do)return D.return(null);d=c.$c;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.u(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=Lo(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.
|
|
606
|
-
u=g.A||p/q;x=g.startTime;z=w=0;1<q&&(v=Math.floor((b-g.startTime)/u),x=g.startTime+v*u,w=v%h.
|
|
603
|
+
r.gh=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=qo&&b.l!=Do)return g.return(null);c=b.$c;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.tc(function(h){var k=Lo(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Sb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.fg(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
604
|
+
function Lo(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Sb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
605
|
+
r.fg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){if(1==D.g){if(c.l!=qo&&c.l!=Do)return D.return(null);d=c.$c;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.u(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=Lo(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Sb;n=l/h.rows;q=h.Sb*h.rows;p=g.i-g.startTime;
|
|
606
|
+
u=g.A||p/q;x=g.startTime;z=w=0;1<q&&(v=Math.floor((b-g.startTime)/u),x=g.startTime+v*u,w=v%h.Sb*m,z=Math.floor(v/h.Sb)*n);B=!1;if(A=g.s)B=!0,n=A.height,w=A.positionX,z=A.positionY,m=A.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:z,startTime:x,duration:u,uris:g.$(),width:m,sprite:B})})};
|
|
607
607
|
r.xg=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&&(Ok(this.s.h,b,!1),vl(this.j,b),Mo(this),this.Ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Fo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,df(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";Mo(this)}};
|
|
608
608
|
r.zf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&jf(d)&&(oo(this,d,!1,b,c),this.sa=new Af(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),ho(this))}else if(this.g&&this.g.audioTracks)for(b=
|
|
609
609
|
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,df(c)==a.id){No(this,c);break}};r.ih=function(){return Oo(this.Hb())};r.Ah=function(){return Oo(this.wc())};r.hh=function(){return Array.from(Po(this.Hb()))};r.zh=function(){return Array.from(Po(this.wc()))};
|
|
610
610
|
r.wg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.sa=new Bf(a,b||"",c,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.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.sa.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,
|
|
611
|
-
b))c=f;c?(a=Xe(c),this.zf(a,!0,d)):io(this)}else this.g&&this.g.audioTracks&&(d=lf(this.Hb(),a,b||"",!1)[0])&&this.zf(d)};r.yf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ha=a,this.
|
|
611
|
+
b))c=f;c?(a=Xe(c),this.zf(a,!0,d)):io(this)}else this.g&&this.g.audioTracks&&(d=lf(this.Hb(),a,b||"",!1)[0])&&this.zf(d)};r.yf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ha=a,this.Vb=b||"",this.Ub=c,(a=lf(this.i.textStreams,this.Ha,this.Vb,this.Ub)[0]||null)&&a!=this.j.s&&(Ok(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Ze()))vl(this.j,a),Mo(this)}else(a=lf(this.wc(),a,b||"",c)[0])&&this.xg(a)};
|
|
612
612
|
r.si=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.sa=new Bf(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),io(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&No(this,b)}};
|
|
613
613
|
r.Ze=function(){var a=this.da;return this.F&&this.l==qo?this.F.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Fo(this).some(function(b){return"showing"==b.mode}):a};r.bg=function(){return this.g&&this.g.src&&this.g.textTracks?Qo(this).map(function(a){return ff(a)}):[]};
|
|
614
614
|
r.jh=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=qe(a),c=Qo(this).filter(function(h){return qe(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};
|
|
615
615
|
function Fo(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Io(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Qo(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
616
|
-
r.Dg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==qo)this.F.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=lf(this.i.textStreams,this.Ha,this.
|
|
616
|
+
r.Dg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==qo)this.F.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=lf(this.i.textStreams,this.Ha,this.Vb,this.Ub),0<a.length&&(vl(this.j,a[0]),Mo(this))):rl(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Fo(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")}yo(this)}};
|
|
617
617
|
r.vh=function(){if(this.C)var a=this.C.Dd();else{if(null==this.ea)return new Date;a=this.ea}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.g&&this.g.getStartDate?(b=this.g.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.eg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
618
618
|
r.Nd=function(){return this.R()?this.i?this.i.presentationTimeline.Nd():null:null};r.ob=function(){if(this.l==qo)return this.F.ob();var a={total:[],audio:[],video:[],text:[]};this.l==Do&&(a.total=Ci(this.g.buffered));return a};
|
|
619
619
|
r.getStats=function(){if(this.l!=qo&&this.l!=Do)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:[]};lo(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
|
|
@@ -640,9 +640,9 @@ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:
|
|
|
640
640
|
function wo(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return L(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.xb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(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)})}
|
|
641
641
|
function Vn(a){var b=a.Xe();if(a.s&&a.L&&a.C){if(a.T){var c=a.T;b||c.i||(c.i=!0);c.i&&b&&(c.j=!0);c.l=b}lo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(On("buffering",b))}function mo(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=On("ratechange"),a.dispatchEvent(b))}
|
|
642
642
|
function lo(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Mf?c="buffering":a.g.paused?c="paused":a.g.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(On("statechanged",c)))}}
|
|
643
|
-
function Ao(a){var b=a.g.playbackRate,c=a.R();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ag();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sd(d):1==e&&b!==a.H.
|
|
643
|
+
function Ao(a){var b=a.g.playbackRate,c=a.R();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ag();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sd(d):1==e&&b!==a.H.Xb()&&a.Wc()}if(c&&(e=a.Ib(),Number.isFinite(e.end)&&!(a.g.currentTime<e.start))){if(a.h.streaming.liveSync){var f=a.h.streaming.liveSyncMaxLatency;var g=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,
|
|
644
644
|
g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==Do){var l=a.g.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.h.streaming.liveSyncPanicMode;
|
|
645
|
-
l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.sd(k):f&&g&&c-d>f?b!=g&&a.sd(g):h&&k&&c-d<h?b!=k&&a.sd(k):b!==a.H.
|
|
645
|
+
l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.sd(k):f&&g&&c-d>f?b!=g&&a.sd(g):h&&k&&c-d<h?b!=k&&a.sd(k):b!==a.H.Xb()&&a.Wc()}}
|
|
646
646
|
function Bo(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=On("started"):25==a.N?d=On("firstquartile"):50==a.N?d=On("midpoint"):75==a.N?d=On("thirdquartile"):100==a.N&&(d=On("complete"));d&&a.dispatchEvent(d)}}}function ho(a){try{hi(a.Pd,a.i)}catch(c){return Tn(a,c),!1}var b=kf(a.i.variants);b=a.sa.create(b);a.o.setVariants(Array.from(b.values()));return!0}
|
|
647
647
|
function so(a,b){b=void 0===b?!1:b;return ho(a)?a.o.chooseVariant(b):null}
|
|
648
648
|
function Ln(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,bb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Td.stop();d&&io(a,!0,void 0,!1,!1)}
|
|
@@ -658,19 +658,19 @@ h.push({language:l,role:m,label:n})}});return h}P("shaka.Player",X);X.prototype.
|
|
|
658
658
|
X.prototype.getBufferedInfo=X.prototype.ob;X.prototype.getSegmentAvailabilityDuration=X.prototype.Nd;X.prototype.getPresentationStartTimeAsDate=X.prototype.eg;X.prototype.getPlayheadTimeAsDate=X.prototype.vh;X.prototype.setTextTrackVisibility=X.prototype.Dg;X.prototype.getChapters=X.prototype.jh;X.prototype.getChaptersTracks=X.prototype.bg;X.prototype.isTextTrackVisible=X.prototype.Ze;X.prototype.selectVariantsByLabel=X.prototype.si;X.prototype.selectTextLanguage=X.prototype.yf;
|
|
659
659
|
X.prototype.selectAudioLanguage=X.prototype.wg;X.prototype.getTextLanguages=X.prototype.zh;X.prototype.getAudioLanguages=X.prototype.hh;X.prototype.getTextLanguagesAndRoles=X.prototype.Ah;X.prototype.getAudioLanguagesAndRoles=X.prototype.ih;X.prototype.selectVariantTrack=X.prototype.zf;X.prototype.selectTextTrack=X.prototype.xg;X.prototype.getThumbnails=X.prototype.fg;X.prototype.getAllThumbnails=X.prototype.gh;X.prototype.getImageTracks=X.prototype.oh;X.prototype.getTextTracks=X.prototype.wc;
|
|
660
660
|
X.prototype.getVariantTracks=X.prototype.Hb;X.prototype.cancelTrickPlay=X.prototype.Wc;X.prototype.trickPlay=X.prototype.sd;X.prototype.getPlaybackRate=X.prototype.eb;X.prototype.isBuffering=X.prototype.Xe;X.prototype.getKeyStatuses=X.prototype.Kd;X.prototype.getActiveSessionsMetadata=X.prototype.Se;X.prototype.getExpiration=X.prototype.cd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Hh;X.prototype.seekRange=X.prototype.Ib;
|
|
661
|
-
X.prototype.isAudioOnly=X.prototype.Kh;X.prototype.isInProgress=X.prototype.
|
|
662
|
-
X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.hi;X.prototype.preload=X.prototype.preload;X.prototype.unloadAndSavePreload=X.prototype.Ai;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Ei;X.prototype.unload=X.prototype.
|
|
661
|
+
X.prototype.isAudioOnly=X.prototype.Kh;X.prototype.isInProgress=X.prototype.dc;X.prototype.isLive=X.prototype.R;X.prototype.getAdManager=X.prototype.$f;X.prototype.getAssetUri=X.prototype.ad;X.prototype.getNetworkingEngine=X.prototype.Zb;X.prototype.getMediaElement=X.prototype.th;X.prototype.getManifestType=X.prototype.Ue;X.prototype.getLoadMode=X.prototype.qh;X.prototype.resetConfiguration=X.prototype.li;X.prototype.getBufferFullness=X.prototype.ag;X.prototype.getConfiguration=X.prototype.getConfiguration;
|
|
662
|
+
X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.hi;X.prototype.preload=X.prototype.preload;X.prototype.unloadAndSavePreload=X.prototype.Ai;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Ei;X.prototype.unload=X.prototype.lc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Wg;X.prototype.attach=X.prototype.Vc;
|
|
663
663
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?C(h,Xh(),3):h.u(2);2!=h.g&&(b=h.h);var k={};if(Nc())for(var l in li)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Nc()?!!li[m]:Oc(m);c=k;l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(y(Nd));
|
|
664
664
|
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Nc()?de(m)?!0:lb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=Xo;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
665
665
|
X.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Sc("Trident/"))return!1;var a=cd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Oc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Jn=a};
|
|
666
|
-
X.registerSupportPlugin=function(a,b){Xo[a]=b};X.prototype.destroy=X.prototype.destroy;var Pn=0,Fn=1,qo=2,Do=3;X.LoadMode={DESTROYED:Pn,NOT_LOADED:Fn,MEDIA_SOURCE:qo,SRC_EQUALS:Do};X.version="v4.8.
|
|
666
|
+
X.registerSupportPlugin=function(a,b){Xo[a]=b};X.prototype.destroy=X.prototype.destroy;var Pn=0,Fn=1,qo=2,Do=3;X.LoadMode={DESTROYED:Pn,NOT_LOADED:Fn,MEDIA_SOURCE:qo,SRC_EQUALS:Do};X.version="v4.8.2";var Yo=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(Yo[0]),Number(Yo[1])));var Xo={},Jn=null;function Zo(){this.h=[];this.j=this.i=this.g=0};function $o(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 db;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=$o.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};
|
|
667
667
|
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)};
|
|
668
668
|
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)};
|
|
669
669
|
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()};
|
|
670
670
|
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};P("shaka.ads.ClientSideAd",$o);$o.prototype.release=$o.prototype.release;
|
|
671
671
|
$o.prototype.getPodIndex=$o.prototype.getPodIndex;$o.prototype.getTimeOffset=$o.prototype.getTimeOffset;$o.prototype.getMediaUrl=$o.prototype.getMediaUrl;$o.prototype.getAdvertiserName=$o.prototype.getAdvertiserName;$o.prototype.getCreativeAdId=$o.prototype.getCreativeAdId;$o.prototype.getAdId=$o.prototype.getAdId;$o.prototype.getVastMediaWidth=$o.prototype.getVastMediaWidth;$o.prototype.getVastMediaHeight=$o.prototype.getVastMediaHeight;$o.prototype.getVastMediaBitrate=$o.prototype.getVastMediaBitrate;
|
|
672
672
|
$o.prototype.getDescription=$o.prototype.getDescription;$o.prototype.getTitle=$o.prototype.getTitle;$o.prototype.getPositionInSequence=$o.prototype.getPositionInSequence;$o.prototype.getSequenceLength=$o.prototype.getSequenceLength;$o.prototype.setMuted=$o.prototype.setMuted;$o.prototype.resize=$o.prototype.resize;$o.prototype.isLinear=$o.prototype.isLinear;$o.prototype.isMuted=$o.prototype.isMuted;$o.prototype.setVolume=$o.prototype.setVolume;$o.prototype.getVolume=$o.prototype.getVolume;
|
|
673
|
-
$o.prototype.play=$o.prototype.play;$o.prototype.pause=$o.prototype.pause;$o.prototype.skip=$o.prototype.skip;$o.prototype.canSkipNow=$o.prototype.canSkipNow;$o.prototype.getTimeUntilSkippable=$o.prototype.getTimeUntilSkippable;$o.prototype.isSkippable=$o.prototype.isSkippable;$o.prototype.isPaused=$o.prototype.isPaused;$o.prototype.getRemainingTime=$o.prototype.getRemainingTime;$o.prototype.getMinSuggestedDuration=$o.prototype.getMinSuggestedDuration;$o.prototype.getDuration=$o.prototype.getDuration;function ap(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.C=!1;this.A=this.s=null;this.F=NaN;this.m=e;this.j=null;this.h=new
|
|
673
|
+
$o.prototype.play=$o.prototype.play;$o.prototype.pause=$o.prototype.pause;$o.prototype.skip=$o.prototype.skip;$o.prototype.canSkipNow=$o.prototype.canSkipNow;$o.prototype.getTimeUntilSkippable=$o.prototype.getTimeUntilSkippable;$o.prototype.isSkippable=$o.prototype.isSkippable;$o.prototype.isPaused=$o.prototype.isPaused;$o.prototype.getRemainingTime=$o.prototype.getRemainingTime;$o.prototype.getMinSuggestedDuration=$o.prototype.getMinSuggestedDuration;$o.prototype.getDuration=$o.prototype.getDuration;function ap(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.C=!1;this.A=this.s=null;this.F=NaN;this.m=e;this.j=null;this.h=new db;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.2");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
674
674
|
function(g){bp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){cp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.C=!0})}ap.prototype.configure=function(a){this.s=a};ap.prototype.stop=function(){this.g&&this.g.stop();this.o&&Tm(this.o)};ap.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
675
675
|
function cp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new S("ad-error",b));dp(a,null);a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
676
676
|
function bp(a,b){a.m(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));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 S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -689,9 +689,9 @@ r.isLinear=function(){return this.l};r.resize=function(){};r.setMuted=function(a
|
|
|
689
689
|
r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",hp);hp.prototype.release=hp.prototype.release;hp.prototype.getPodIndex=hp.prototype.getPodIndex;hp.prototype.getTimeOffset=hp.prototype.getTimeOffset;hp.prototype.getMediaUrl=hp.prototype.getMediaUrl;hp.prototype.getAdvertiserName=hp.prototype.getAdvertiserName;
|
|
690
690
|
hp.prototype.getCreativeAdId=hp.prototype.getCreativeAdId;hp.prototype.getAdId=hp.prototype.getAdId;hp.prototype.getVastMediaWidth=hp.prototype.getVastMediaWidth;hp.prototype.getVastMediaHeight=hp.prototype.getVastMediaHeight;hp.prototype.getVastMediaBitrate=hp.prototype.getVastMediaBitrate;hp.prototype.getDescription=hp.prototype.getDescription;hp.prototype.getTitle=hp.prototype.getTitle;hp.prototype.getPositionInSequence=hp.prototype.getPositionInSequence;hp.prototype.getSequenceLength=hp.prototype.getSequenceLength;
|
|
691
691
|
hp.prototype.setMuted=hp.prototype.setMuted;hp.prototype.resize=hp.prototype.resize;hp.prototype.isLinear=hp.prototype.isLinear;hp.prototype.isMuted=hp.prototype.isMuted;hp.prototype.setVolume=hp.prototype.setVolume;hp.prototype.getVolume=hp.prototype.getVolume;hp.prototype.play=hp.prototype.play;hp.prototype.pause=hp.prototype.pause;hp.prototype.skip=hp.prototype.skip;hp.prototype.canSkipNow=hp.prototype.canSkipNow;hp.prototype.getTimeUntilSkippable=hp.prototype.getTimeUntilSkippable;
|
|
692
|
-
hp.prototype.isSkippable=hp.prototype.isSkippable;hp.prototype.isPaused=hp.prototype.isPaused;hp.prototype.getRemainingTime=hp.prototype.getRemainingTime;hp.prototype.getMinSuggestedDuration=hp.prototype.getMinSuggestedDuration;hp.prototype.getDuration=hp.prototype.getDuration;function ip(a,b,c,d){this.B=a;this.K=b;this.g=c;this.l=null;this.
|
|
692
|
+
hp.prototype.isSkippable=hp.prototype.isSkippable;hp.prototype.isPaused=hp.prototype.isPaused;hp.prototype.getRemainingTime=hp.prototype.getRemainingTime;hp.prototype.getMinSuggestedDuration=hp.prototype.getMinSuggestedDuration;hp.prototype.getDuration=hp.prototype.getDuration;function ip(a,b,c,d){this.B=a;this.K=b;this.g=c;this.l=null;this.Y=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new db}ip.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Kb(b.target,b.type,b.listener);jp(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
693
693
|
ip.prototype.release=function(){this.stop();this.o&&this.o.release()};ip.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(kp(this,this.G,this.T),this.T=!1)};ip.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
694
|
-
function lp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;L(function(u){if(1==u.g)return d=hg([b],Pf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=nd(e)),f=a.K.request(7,d),ra(u,2),C(u,f.promise,4);if(2!=u.g){g=u.h;h=hd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.
|
|
694
|
+
function lp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;L(function(u){if(1==u.g)return d=hg([b],Pf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=nd(e)),f=a.K.request(7,d),ra(u,2),C(u,f.promise,4);if(2!=u.g){g=u.h;h=hd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.Y,a.i(new S("ads-loaded",(new Map).set("loadTime",q))),p=new rc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
695
695
|
return ta(u,0)}va(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;G(u)})}
|
|
696
696
|
function kp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z;L(function(v){if(1==v.g)return d=hg([b],Pf()),e=a.K.request(7,d),ra(v,2),C(v,e.promise,4);if(2!=v.g){f=v.h;g=[];h=hd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=t(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(u=p.value,x=t(u.nonLinearAdList),w=x.next();!w.done;w=x.next())z=w.value,mp(a,z);g=a.getCuePoints();a.i(new S("ad-cue-points-changed",
|
|
697
697
|
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",g))),jp(a),a.j=[];c&&(a.I||0<g.length)&&np(a);return ta(v,0)}va(v);G(v)})}
|
|
@@ -712,17 +712,17 @@ r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.ge
|
|
|
712
712
|
r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};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.i=this.g=null};P("shaka.ads.ServerSideAd",tp);tp.prototype.release=tp.prototype.release;tp.prototype.getPodIndex=tp.prototype.getPodIndex;
|
|
713
713
|
tp.prototype.getTimeOffset=tp.prototype.getTimeOffset;tp.prototype.getMediaUrl=tp.prototype.getMediaUrl;tp.prototype.getAdvertiserName=tp.prototype.getAdvertiserName;tp.prototype.getCreativeAdId=tp.prototype.getCreativeAdId;tp.prototype.getAdId=tp.prototype.getAdId;tp.prototype.getVastMediaWidth=tp.prototype.getVastMediaWidth;tp.prototype.getVastMediaHeight=tp.prototype.getVastMediaHeight;tp.prototype.getVastMediaBitrate=tp.prototype.getVastMediaBitrate;tp.prototype.getDescription=tp.prototype.getDescription;
|
|
714
714
|
tp.prototype.getTitle=tp.prototype.getTitle;tp.prototype.getPositionInSequence=tp.prototype.getPositionInSequence;tp.prototype.getSequenceLength=tp.prototype.getSequenceLength;tp.prototype.setMuted=tp.prototype.setMuted;tp.prototype.resize=tp.prototype.resize;tp.prototype.isLinear=tp.prototype.isLinear;tp.prototype.isMuted=tp.prototype.isMuted;tp.prototype.setVolume=tp.prototype.setVolume;tp.prototype.getVolume=tp.prototype.getVolume;tp.prototype.play=tp.prototype.play;tp.prototype.pause=tp.prototype.pause;
|
|
715
|
-
tp.prototype.skip=tp.prototype.skip;tp.prototype.canSkipNow=tp.prototype.canSkipNow;tp.prototype.getTimeUntilSkippable=tp.prototype.getTimeUntilSkippable;tp.prototype.isSkippable=tp.prototype.isSkippable;tp.prototype.isPaused=tp.prototype.isPaused;tp.prototype.getRemainingTime=tp.prototype.getRemainingTime;tp.prototype.getMinSuggestedDuration=tp.prototype.getMinSuggestedDuration;tp.prototype.getDuration=tp.prototype.getDuration;function up(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new
|
|
715
|
+
tp.prototype.skip=tp.prototype.skip;tp.prototype.canSkipNow=tp.prototype.canSkipNow;tp.prototype.getTimeUntilSkippable=tp.prototype.getTimeUntilSkippable;tp.prototype.isSkippable=tp.prototype.isSkippable;tp.prototype.isPaused=tp.prototype.isPaused;tp.prototype.getRemainingTime=tp.prototype.getRemainingTime;tp.prototype.getMinSuggestedDuration=tp.prototype.getMinSuggestedDuration;tp.prototype.getDuration=tp.prototype.getDuration;function up(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new db;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){vp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
716
716
|
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new tp(f,e.l);e.A&&(e.m.i=e.A);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
717
717
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))});
|
|
718
718
|
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
|
|
719
719
|
f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=up.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
|
|
720
720
|
function vp(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){ag.call(this);this.g=this.h=this.i=null;this.j=new Zo;this.m=navigator.language;this.l=null}na(Y,ag);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new Q(2,10,1E4);this.i&&this.i.release();this.i=new ap(a,b,this.m,c,function(e){return wp(d,e)});this.i.configure(this.l)};
|
|
721
721
|
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);ag.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 S("ad-stopped"));this.j=new Zo};r.requestClientSideAds=function(a){if(!this.i)throw new Q(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};
|
|
722
|
-
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new Q(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 ip(a,b,c,function(e){return wp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new Q(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new Q(1,10,10004)):(d.l=new Rf,lp(d,a,b),d.H=c||"",d.
|
|
722
|
+
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new Q(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 ip(a,b,c,function(e){return wp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new Q(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new Q(1,10,10004)):(d.l=new Rf,lp(d,a,b),d.H=c||"",d.Y=Date.now()/1E3,a=d.l);return a};
|
|
723
723
|
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new Q(1,10,10005);var b=this.h;b.G=a;b.i(new S("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 Q(2,10,10002);this.g&&this.g.release();this.g=new up(a,b,this.m,function(d){return wp(c,d)});this.g.configure(this.l)};
|
|
724
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new Q(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('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.8.
|
|
725
|
-
(c.G=!0),c.j=new Rf,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 Q(1,10,10003);(a.mpt||a.mpv)&&Wa('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.8.
|
|
724
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new Q(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Wa('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.8.2";c=this.g;c.j?a=Promise.reject(new Q(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
725
|
+
(c.G=!0),c.j=new Rf,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 Q(1,10,10003);(a.mpt||a.mpv)&&Wa('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.8.2";this.g.g.replaceAdTagParameters(a)};
|
|
726
726
|
r.getServerSideCuePoints=function(){pb("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)};
|
|
727
727
|
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)};
|
|
728
728
|
function wp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}P("shaka.ads.AdManager",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;
|
|
@@ -737,18 +737,18 @@ var Ap="ended play playing pause pausing ratechange seeked seeking timeupdate vo
|
|
|
737
737
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Fp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Gp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Hp=[["getConfiguration","configure"]],Ip=[["isTextTrackVisible","setTextTrackVisibility"]],Jp="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
738
738
|
Kp=["attach","attachCanvas","detach","load","unload"];function Lp(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Mc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Mp(h)};this.C=function(k,l){k=yp(l);switch(k.type){case "event":var m=k.targetName,n=Zf(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new Q(q.severity,q.category,
|
|
739
739
|
q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Np.add(this)}r=Lp.prototype;r.destroy=function(){Np.delete(this);Op(this);Pp&&Qp(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.Ua=function(){return this.h};r.tf=function(){return this.I};
|
|
740
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.
|
|
740
|
+
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.kc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Np),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Rf;d.s=!0;Rp(d,e)}},function(b){for(var c=t(Np),d=c.next();!d.done;d=c.next())d=d.value,Sp="available"==b,d.l.kc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Sp&&this.l.X(Tp);(a=Pp)&&
|
|
741
741
|
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Rf,this.s=!0,Rp(this,a)):Pp=null}else window.__onGCastApiAvailable!==Up&&(Vp=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Up)};r.Af=function(a){this.o=a;this.h&&Wp(this,{type:"appData",appData:this.o})};
|
|
742
742
|
r.cast=function(){var a=this;return L(function(b){if(!a.m)throw new Q(1,8,8E3);if(!Sp)throw new Q(1,8,8001);if(a.h)throw new Q(1,8,8002);a.j=new Rf;chrome.cast.requestSession(function(c){return Rp(a,c)},function(c){return Xp(a,c)});return C(b,a.j,0)})};function Yp(a){a.h&&chrome.cast.requestSession(function(b){return Rp(a,b)},function(b){return Xp(a,b)})}r.uc=function(){if(this.h){Op(this);if(Pp){Qp(this);try{Pp.stop(function(){},function(){})}catch(a){}Pp=null}Mp(this)}};
|
|
743
743
|
r.get=function(a,b){var c=this;if("video"==a){if(Dp.includes(b))return function(){return c.ug.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))}}else if("player"==a){if(Gp[b]&&!this.get("player","isLive")())return function(){};if(Jp.includes(b))return function(){return c.ug.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Kp.includes(b))return function(){return c.ii.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Ep[b]||Fp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
744
744
|
r.set=function(a,b,c){this.g[a][b]=c;Wp(this,{type:"set",targetName:a,property:b,value:c})};function Rp(a,b){var c=a.N();Pp=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Mp(a);Wp(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Xp(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 Q(2,8,c,b))}
|
|
745
745
|
r.ug=function(a,b){Wp(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.ii=function(a,b){var c=Ha.apply(2,arguments),d=new Rf,e=this.H.toString();this.H++;this.i[e]=d;try{Wp(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Qp(a){var b=Pp;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
746
|
-
function Mp(a){var b=Pp?"connected"==Pp.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Op(a)}a.h=b;a.I=b?Pp.receiver.friendlyName:"";a.l.
|
|
746
|
+
function Mp(a){var b=Pp?"connected"==Pp.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Op(a)}a.h=b;a.I=b?Pp.receiver.friendlyName:"";a.l.kc()}function Op(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new Q(1,7,7E3))}}function Wp(a,b){b=xp(b);var c=Pp;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},$a)}catch(d){throw b=new Q(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.A("player",c),a.uc(),b;}}var Tp=.02,Sp=!1,Pp=null,Vp=null,Np=new Set;
|
|
747
747
|
function Up(a){Vp?window.__onGCastApiAvailable=Vp:delete window.__onGCastApiAvailable;Vp=null;if(a)for(var b=t(Np),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Zp(a,b,c,d){d=void 0===d?!1:d;ag.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 Lp(c,function(){return $p(e)},function(){return aq(e)},function(f,g){return bq(e,f,g)},function(){return cq(e)},function(){return dq(e)},d);eq(this)}na(Zp,ag);r=Zp.prototype;
|
|
748
748
|
r.destroy=function(a){a&&this.g.uc();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;ag.prototype.release.call(this);return Promise.all(a)};r.Fh=function(){return this.l};r.uh=function(){return this.s};r.Xg=function(){return this.g.m&&Sp};r.Ua=function(){return this.g.Ua()};r.tf=function(){return this.g.tf()};
|
|
749
|
-
r.cast=function(){var a=this;return L(function(b){return 1==b.g?C(b,a.g.cast(),2):a.h?C(b,a.h.
|
|
749
|
+
r.cast=function(){var a=this;return L(function(b){return 1==b.g?C(b,a.g.cast(),2):a.h?C(b,a.h.lc(),0):b.return()})};r.Af=function(a){this.g.Af(a)};r.zi=function(){Yp(this.g)};r.uc=function(){this.g.uc()};
|
|
750
750
|
r.Yg=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.uc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new Lp(a,function(){return $p(c)},function(){return aq(c)},function(e,f){return bq(c,e,f)},function(){return cq(c)},function(){return dq(c)},b);c.g.init();G(d)})};
|
|
751
|
-
function eq(a){a.g.init();a.m=new
|
|
751
|
+
function eq(a){a.g.init();a.m=new db;for(var b=t(Ap),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Ua()||(f=Zf(f),a.j.dispatchEvent(f))});for(var d in $f)a.m.D(a.h,$f[d],function(f){a.g.Ua()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Kc=e,Object.defineProperty(a.l,b.Kc,{configurable:!1,enumerable:!0,get:function(f){return function(){return fq(a,f.Kc)}}(b),set:function(f){return function(g){var h=f.Kc;a.g.Ua()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Kc:b.Kc};a.s={};gq(a,
|
|
752
752
|
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return hq(a,f)}})});iq(a);a.j=new ag;a.j.Ud=a.l;a.o=new ag;a.o.Ud=a.s}function iq(a){var b=new Map;gq(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)})}
|
|
753
753
|
function gq(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)}}
|
|
754
754
|
function dq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ad(),startTime:null};a.i.pause();for(var c=t(Cp),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(Hp);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(Ip);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 $p(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
|
|
@@ -756,22 +756,22 @@ function aq(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
|
756
756
|
function cq(a){for(var b=t(Hp),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(Cp);for(d=c.next();!d.done;d=c.next())d=
|
|
757
757
|
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Cp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Ip);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.Dg(h);g&&a.h.yf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new S("error",l);a.h.dispatchEvent(l)})}
|
|
758
758
|
function fq(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.Ua()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ua()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
759
|
-
function hq(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.
|
|
759
|
+
function hq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Zb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.$f()};
|
|
760
760
|
if("setVideoContainer"==b)return function(c){return a.h.Hg(c)};if(a.g.Ua()){if("getManifest"==b||"drmInfo"==b)return function(){Wa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Wa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ua()&&0==Object.keys(a.g.g.video).length&&(Ep[b]||Fp[b])||!a.g.Ua()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
761
761
|
function bq(a,b,c){a.g.Ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}P("shaka.cast.CastProxy",Zp);Zp.prototype.changeReceiverId=Zp.prototype.Yg;Zp.prototype.forceDisconnect=Zp.prototype.uc;Zp.prototype.suggestDisconnect=Zp.prototype.zi;Zp.prototype.setAppData=Zp.prototype.Af;Zp.prototype.cast=Zp.prototype.cast;Zp.prototype.receiverName=Zp.prototype.tf;Zp.prototype.isCasting=Zp.prototype.Ua;Zp.prototype.canCast=Zp.prototype.Xg;Zp.prototype.getPlayer=Zp.prototype.uh;
|
|
762
|
-
Zp.prototype.getVideo=Zp.prototype.Fh;Zp.prototype.destroy=Zp.prototype.destroy;function jq(a,b,c,d){ag.call(this);var e=this;this.g=a;this.h=b;this.j=new
|
|
762
|
+
Zp.prototype.getVideo=Zp.prototype.Fh;Zp.prototype.destroy=Zp.prototype.destroy;function jq(a,b,c,d){ag.call(this);var e=this;this.g=a;this.h=b;this.j=new db;this.H={video:a,player:b};this.C=c||function(){};this.I=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 Mc(function(){kq(e)});lq(this)}na(jq,ag);r=jq.prototype;r.isConnected=function(){return this.F};r.Lh=function(){return this.o};r.vi=function(a){this.i=a};r.bh=function(){this.i=null};
|
|
763
763
|
r.wi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.ui=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.ti=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
764
764
|
r.destroy=function(){var a=this,b,c;return L(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,ag.prototype.release.call(a),C(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();G(d)})};
|
|
765
765
|
function lq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return mq(a)};b.onSenderDisconnected=function(){return mq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&nq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);nq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return oq(a,
|
|
766
766
|
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return pq(a,e)};b.start();b=t(Ap);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return qq(a,"video",e)});for(var d in $f)a.j.D(a.h,$f[d],function(e){return qq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;rq(a)});a.j.D(a.g,"playing",function(){a.o=!1;rq(a)});a.j.D(a.g,"pause",function(){rq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;rq(a)});
|
|
767
|
-
a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,rq(a))})).
|
|
767
|
+
a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,rq(a))})).X(sq)})}function mq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;rq(a)}function rq(a){var b;L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new S("caststatuschanged");a.dispatchEvent(b);tq(a)||uq(a);G(c)})}
|
|
768
768
|
function vq(a,b,c){var d,e,f,g,h,k,l,m,n,q;L(function(p){switch(p.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,ra(p,5),C(p,a.h.load(b.manifest,b.startTime),7)):C(p,Promise.resolve(),3);case 7:ta(p,3);break;case 5:return g=va(p),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
|
|
769
769
|
a.g.autoplay=f;b.manifest&&(a.g.play(),uq(a));G(p)}})}function qq(a,b,c){a.h&&(kq(a),nq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
770
|
-
function kq(a){a.G.
|
|
770
|
+
function kq(a){a.G.X(wq);for(var b={video:{},player:{}},c=t(Bp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in Gp)0==a.m%Gp[e]&&(b.player[e]=a.h[e]());for(var f in Ep)0==a.m%Ep[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;nq(a,{type:"update",update:b},a.l);for(var g in Fp)0==a.m%Fp[g]&&(b={player:{}},b.player[g]=a.h[g](),nq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
771
771
|
1);tq(a)}function tq(a){return a.A&&(a.g.duration||a.h.R())?(xq(a),a.A=!1,!0):!1}function xq(a,b){var c={contentId:a.h.ad(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);uq(a,void 0===b?0:b,c)}
|
|
772
772
|
function pq(a,b){var c=yp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;vq(a,c.initState,c.appData);kq(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;
|
|
773
773
|
"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 yq(a,g,f,null)},function(h){return yq(a,g,f,h)})}}
|
|
774
|
-
function oq(a,b){var c=yp(b.data);switch(c.type){case "PLAY":a.g.play();uq(a);break;case "PAUSE":a.g.pause();uq(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(),uq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),uq(a));break;case "STOP":a.h.
|
|
774
|
+
function oq(a,b){var c=yp(b.data);switch(c.type){case "PLAY":a.g.play();uq(a);break;case "PAUSE":a.g.pause();uq(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(),uq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),uq(a));break;case "STOP":a.h.lc().then(function(){a.h&&uq(a)});break;case "GET_STATUS":xq(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));
|
|
775
775
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||uq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&xq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");nq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:nq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
776
776
|
function yq(a,b,c,d){a.h&&nq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function nq(a,b,c,d){a.F&&(a=xp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function uq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?zq:a.h.Xe()?Aq:a.g.paused?Bq:Cq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);nq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
777
777
|
P("shaka.cast.CastReceiver",jq);jq.prototype.destroy=jq.prototype.destroy;jq.prototype.setContentArtist=jq.prototype.ti;jq.prototype.setContentImage=jq.prototype.ui;jq.prototype.setContentTitle=jq.prototype.wi;jq.prototype.clearContentMetadata=jq.prototype.bh;jq.prototype.setContentMetadata=jq.prototype.vi;jq.prototype.isIdle=jq.prototype.Lh;jq.prototype.isConnected=jq.prototype.isConnected;var wq=.5,sq=5,zq="IDLE",Cq="PLAYING",Aq="BUFFERING",Bq="PAUSED";function Dq(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(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Eq(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,u=-1,x=0;x<q.length;x++)if(null!=q[x]&&""!==q[x].g.trim()){p=x;break}for(x=q.length-1;0<=x;x--)if(null!=q[x]&&""!==q[x].g.trim()){u=x;break}if(-1===
|
|
@@ -810,7 +810,7 @@ P("shaka.cea.TsCeaParser",Vr);Hb["video/mp2t"]=function(){return new Vr};functio
|
|
|
810
810
|
l.Dc});f.length&&(a=Zr(e,k,f,c,h),0==a.length&&(a=[Bd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Bd(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Vf:h,Cj:e,drmInfos:a,xe:g,Zf:!0}}
|
|
811
811
|
function $r(a,b,c,d){var e=Wr(a,c,d);if(b.Zf){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Zf=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new Q(2,4,4008);return e.Vf||b.Vf}
|
|
812
812
|
function as(a){var b=0,c=Eb(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=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function bs(a){a=t(Yg(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return Wg(c)}return""}
|
|
813
|
-
function cs(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Wg(b)))return b;a=$g(a.node,"urn:microsoft:playready","pro");if(!a||!Wg(a))return"";a=Wg(a);a=ud(a);a=as(a).filter(function(c){return c.type===ds})[0];if(!a)return"";a=
|
|
813
|
+
function cs(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Wg(b)))return b;a=$g(a.node,"urn:microsoft:playready","pro");if(!a||!Wg(a))return"";a=Wg(a);a=ud(a);a=as(a).filter(function(c){return c.type===ds})[0];if(!a)return"";a=id(a.value,!0);return(a=Pg(a,"WRMHEADER"))?bs(a):""}
|
|
814
814
|
function Zr(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Dc];if(h){var k;if((k=$g(g.node,"urn:microsoft:playready","pro"))&&Wg(k)){k=Wg(k);k=ud(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Ng(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Dc)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
|
|
815
815
|
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Ng(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Bd(h,b,g.init||a||k||l);if(h=es.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Xr(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=fs(c.value))&&b.push(c);return b}
|
|
816
816
|
function fs(a){var b=a.attributes.schemeIdUri,c=ch(a,"urn:mpeg:cenc:2013","default_KID"),d=ah(a,"urn:mpeg:cenc:2013","pssh").map(Xg),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new Q(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:ud(g),keyId:null}})}catch(g){throw new Q(2,4,4007);}return{node:a,Dc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
@@ -819,12 +819,12 @@ if(!a||!b)throw new Q(2,4,4051);a=vd(a.substr(2));if(16!=a.byteLength)throw new
|
|
|
819
819
|
var ds=1,es=(new Map).set("com.widevine.alpha",function(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Wg(b))?b:(a=$g(a.node,"urn:microsoft","laurl"))?qd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",cs).set("com.microsoft.playready.recommendation",cs).set("com.microsoft.playready.software",cs).set("com.microsoft.playready.hardware",cs).set("org.w3.clearkey",function(a){var b=$g(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Wg(b))?b:(a=$g(a.node,"http://dashif.org/guidelines/clearKey",
|
|
820
820
|
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Wg(a))?a:""});function gs(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))&&Wa("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();
|
|
821
821
|
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})}
|
|
822
|
-
function hs(a,b){var c=is(a,b,"timescale"),d=1;c&&(d=ih(c)||1);
|
|
823
|
-
|
|
824
|
-
function
|
|
822
|
+
function hs(a,b){var c=is(a,b,"timescale"),d=1;c&&(d=ih(c)||1);c=is(a,b,"duration");(c=ih(c||""))&&(c/=d);var e=is(a,b,"startNumber"),f=Number(is(a,b,"presentationTimeOffset"))||0,g=jh(e||"");if(null==e||null==g)g=1;var h=js(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ha.duration||Infinity;e=g;h=Vg(h,"S");for(var k=[],l=-f,m=0;m<h.length;++m){var n=h[m],q=h[m+1],p=bh(n,"t",jh),u=bh(n,"d",jh),x=bh(n,"r",hh);n=bh(n,"k",hh)||0;null!=p&&(p-=f);if(!u)break;p=null!=p?p:l;x=x||0;if(0>x)if(q){q=bh(q,"t",
|
|
823
|
+
jh);if(null==q)break;else if(p>=q)break;x=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/b>=a)break;x=Math.ceil((a*b-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=x;++q)l=p+u,k.push({start:p/b,end:l/b,Kf:p,rb:n,ri:k.length+e}),p=l}b=k}return{timescale:d,Da:c,rd:g,Bb:f/d||0,Jf:f,timeline:b}}function ks(a,b){return[b(a.J),b(a.ua),b(a.za)].filter(ne)}function is(a,b,c){b=ks(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
824
|
+
function js(a,b,c){b=ks(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=Zg(d.value,c));d=b.next());return a}
|
|
825
825
|
function ls(a,b,c,d,e,f){for(var g=ch(a,"http://www.w3.org/1999/xlink","href"),h=ch(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=Rg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Tf(new Q(2,4,4028));if("onLoad"!=h)return Tf(new Q(2,4,4027));var q=Ad([d],[g]);return e.request(0,hg(q,b)).va(function(p){p=Og(p.data,a.tagName);if(!p)return Tf(new Q(2,4,4001,g));for(a.children=
|
|
826
826
|
[];p.children.length;){var u=p.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(p.attributes));for(var x=u.next();!x.done;x=u.next())x=x.value,a.attributes[x]=p.attributes[x];return ms(a,b,c,q[0],e,f+1)})}
|
|
827
|
-
function ms(a,b,c,d,e,f){f=void 0===f?0:f;if(ch(a,"http://www.w3.org/1999/xlink","href")){var g=ls(a,b,c,d,e,f);c&&(g=g.va(void 0,function(){return ms(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(Ug(a)),l=k.next();!l.done;h={
|
|
827
|
+
function ms(a,b,c,d,e,f){f=void 0===f?0:f;if(ch(a,"http://www.w3.org/1999/xlink","href")){var g=ls(a,b,c,d,e,f);c&&(g=g.va(void 0,function(){return ms(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(Ug(a)),l=k.next();!l.done;h={pc:h.pc},l=k.next())h.pc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==ch(h.pc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.pc}}(h)):"SegmentTimeline"!=h.pc.tagName&&g.push(ms(h.pc,b,c,d,e,f));return Xf(g).va(function(){return a})}
|
|
828
828
|
;function ns(a,b,c,d,e,f,g){var h,k=(new zg).O("sidx",function(l){h=os(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new Q(2,3,3004);}
|
|
829
829
|
function os(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new Q(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Cc(),m=g.reader.Cc();g.reader.skip(2);var n=g.reader.ra();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.M(),p=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.M();g.reader.skip(4);if(1==p)throw new Q(2,3,3006);h.push(new vi(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function ps(a){this.h=Eb(a);this.g=new wg(this.h,0)}ps.prototype.ka=function(){return this.g.ka()};
|
|
830
830
|
function qs(a){var b=rs(a);if(7<b.length)throw new Q(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=rs(a);a:{d=t(ss);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();else{if(8==b.length&&b[1]&224)throw new Q(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new ts(c,
|
|
@@ -841,7 +841,7 @@ function Is(a,b,c,d,e,f,g,h){var k=d.yc.length;d.timeline&&d.timeline.length!=d.
|
|
|
841
841
|
function Js(a){return[a.J.Jb,a.ua.Jb,a.za.Jb].filter(ne).map(function(b){return Vg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.ig&&(a.ig=!0);var c=qd(b.attributes.media);b=bh(b,"mediaRange",gh,{start:0,end:null});return{Xh:c,start:b.start,end:b.end}})};function Ks(a,b,c,d,e,f,g,h){var k=Ls(a,g),l=Ms(a);Ns(l);var m=ze(a);if(l.hd)return Es(a,k),{vc:function(){var x=gs(l.hd,m.J.id,null,null,m.bandwidth||null,null);x=Ad(m.J.nb(),[x]);return Ds(m,b,k,x,0,null,l.Bb)}};if(l.Da)return d||"image"===a.ua.contentType||(a.presentationTimeline.hf(l.Da),a.presentationTimeline.ce(a.ha.start)),{vc:function(){return Os(m,l,e,k,f,g,h)}};var n=null;d=d=null;a.za.id&&a.J.id&&(d=a.za.id+","+a.J.id,d=c[d])&&(n=d.segmentIndex);var q=a.ha.start,p=a.ha.duration?q+a.ha.duration:
|
|
842
842
|
Infinity,u=!(a.Eb&&a.ha.Ye);n?(c=n,Ps(c,l,q,p,u,k),c.La(a.presentationTimeline.qb())):n=new Qs(l,a.J.id,a.bandwidth,a.J.nb,q,p,k,u,g,a.J.xf);l.timeline&&"image"!==a.ua.contentType&&a.presentationTimeline.qg(l.timeline,q);d&&a.Eb&&(d.segmentIndex=n);return{vc:function(){n instanceof Qs&&0==n.getNumReferences()&&Ps(n,l,q,p,u,k);return Promise.resolve(n)}}}function Rs(a){return a.qd}
|
|
843
843
|
function Ms(a){var b=hs(a,Rs),c=is(a,Rs,"media"),d=is(a,Rs,"index");return{Da:b.Da,timescale:b.timescale,rd:b.rd,Bb:b.Bb,Jf:b.Jf,timeline:b.timeline,zc:c&&qd(c),hd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function Ns(a){var b=a.hd?1:0;b+=a.timeline?1:0;b+=a.Da?1:0;if(0==b)throw new Q(2,4,4002);1!=b&&(a.hd&&(a.timeline=null),a.Da=null);if(!a.hd&&!a.zc)throw new Q(2,4,4002);}
|
|
844
|
-
function Os(a,b,c,d,e,f,g){function h(K){var M=(K-x)*u,O=M+b.Bb,N=M+n;M=N+u;var U=Math.min(M,l());N=new vi(N,U,function(){var R=O*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(w));R=gs(z,B,K,null,v,R);return Ad(A(),[R])},0,null,d,D,n,l(),[],"",null,null,wi,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.i=M;return N}function k(){var K=[Math.max(m.qb(),n),Math.min(m.Gb(),l())].map(function(M){return M-n});
|
|
844
|
+
function Os(a,b,c,d,e,f,g){function h(K){var M=(K-x)*u,O=M+b.Bb,N=M+n;M=N+u;var U=Math.min(M,l());N=new vi(N,U,function(){var R=O*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(w));R=gs(z,B,K,null,v,R);return Ad(A(),[R])},0,null,d,D,n,l(),[],"",null,null,wi,f);N.codecs=a.J.codecs;N.mimeType=a.J.mimeType;N.i=M;return N}function k(){var K=[Math.max(m.qb(),n),Math.min(m.Gb(),l())].map(function(M){return M-n});K=[Math.ceil(K[0]/u),Math.ceil(K[1]/u)-1];a.J.Qb&&K[1]++;return K.map(function(M){return M+
|
|
845
845
|
x})}function l(){var K=null!=q&&e[q]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.ha.start,q=a.za.id,p=a.ha.duration,u=b.Da,x=b.rd,w=b.timescale,z=b.zc,v=a.bandwidth||null,B=a.J.id,A=a.J.nb,D=n-b.Bb,F=k();c=a.Eb?Math.max(F[0],F[1]-c+1):F[0];g=g||F[1];F=[];for(var J=c;J<=g;++J){var I=h(J);F.push(I)}var E=new Dk(F);F=m.Gb()<l();J=m.R();if(F||J){var H=Math.max(c,g+1);E.ke(u,function(){var K=m.qb();E.La(K);var M=t(k());M.next();M=M.next().value;for(var O=[];H<=M;){var N=h(H);O.push(N);H++}return K>
|
|
846
846
|
l()&&!O.length?null:O})}return Promise.resolve(E)}function Ls(a,b){var c=is(a,Rs,"initialization");if(!c)return null;c=qd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.nb;b=new qi(function(){var g=gs(c,d,null,null,e,null);return Ad(f(),[g])},0,null,ys(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}function Qs(a,b,c,d,e,f,g,h,k,l){Dk.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&&Ss(this)}na(Qs,Dk);r=Qs.prototype;
|
|
847
847
|
r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Dk.prototype.release.call(this);this.h=null};r.La=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())}};
|
|
@@ -850,8 +850,8 @@ r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.
|
|
|
850
850
|
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.zc,e=this.h.timeline[a],f=e.ri,g=this.h.Jf+e.Kf;c=this.i-this.h.Bb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],q=(e.end-e.start)/e.rb,p={},u=0;u<e.rb;p={Tc:p.Tc,se:p.se},u++){var x=e.start+q*u,w=x+q;p.se=u+1;p.Tc=null;x=new vi(this.i+x,this.i+w,function(z){return function(){if(!b.h)return[];
|
|
851
851
|
null==z.Tc&&(z.Tc=Us(b.h.zc,b.F,f,b.B,g,z.se,b.C));return z.Tc}}(p),0,null,this.s,c,this.i,this.l,[],"",null,null,wi,this.A);x.codecs=l;x.mimeType=m;0==this.G?0<u&&x.Zd():0!=u%this.G&&x.Zd();n.push(x)}c=new vi(this.i+e.start,k,function(){return 0<e.rb?[]:Us(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,wi,this.A,0<e.rb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
|
|
852
852
|
function Us(a,b,c,d,e,f,g){a=gs(a,b,c,f,d||null,e);return Ad(g(),[a]).map(function(h){return h.toString()})};function Vs(a){this.o=null;this.A=a;this.G=new bg;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"}Vs.prototype.configure=function(a){this.o=a};Vs.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()};Vs.prototype.setManifestType=function(a){this.s=a};
|
|
853
|
-
function Ws(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Ad(a.i,[Xs(a,b)]),d=hg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),cg(a.G,e),ra(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=hd(f.data),h=JSON.parse(g),1==h.VERSION&&Ys(a,h,f.uri),ta(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){Ws(a,b)});a.g.
|
|
854
|
-
function Xs(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function Ys(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){Ws(a,d)});if(c=b.TTL)a.C=c;a.g.
|
|
853
|
+
function Ws(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Ad(a.i,[Xs(a,b)]),d=hg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),cg(a.G,e),ra(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=hd(f.data),h=JSON.parse(g),1==h.VERSION&&Ys(a,h,f.uri),ta(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){Ws(a,b)});a.g.X(a.C);G(l)})}
|
|
854
|
+
function Xs(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function Ys(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){Ws(a,d)});if(c=b.TTL)a.C=c;a.g.X(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
855
855
|
function Zs(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Vs.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
856
856
|
function $s(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={Pb:e.Pb},g=f.next())if(e.Pb=g.value,g=b.get(e.Pb))d.push({rf:e.Pb,location:g});else if(g=a.F.find(function(k){return function(l){return l.Vi==k.Pb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Ng?(h=new rc(h),tc(h,g["URI-REPLACEMENT"].Ng),d.push({rf:e.Pb,location:h.toString()})):d.push({rf:e.Pb,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
857
857
|
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new rc(k.location)).wb))return!1;return!0});d.length&&(a.B=d[0].rf);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:Ad(a.i,d)};function at(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.o=this.m=!1;this.s=new Set}r=at.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.Eh=function(){return this.j};r.Ve=function(){return this.l.slice()};r.nh=function(){return this.i};
|
|
@@ -886,23 +886,23 @@ function Et(a,b,c){if(b==a&&a!=c)return Gt;if(c==a&&a!=b)return Ft;if(b>a){if(c<
|
|
|
886
886
|
function dt(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 ct(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 et(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
887
887
|
function ft(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}P("shaka.util.PeriodCombiner",at);at.prototype.setUseStreamOnce=at.prototype.Fg;at.prototype.setAllowMultiTypeVariants=at.prototype.yg;at.prototype.combinePeriods=at.prototype.Sf;at.prototype.getImageStreams=at.prototype.nh;at.prototype.getTextStreams=at.prototype.Ve;at.prototype.getVariants=at.prototype.Eh;var Ft=1,It=0,Gt=-1,Dt=new Map;function Jt(a,b){var c=new DOMParser,d=Kt.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 Lt(a,b){try{var c=md(a);return Jt(c,b)}catch(d){return null}}
|
|
888
888
|
var Kt=new Jc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Mt(){var a=this;this.i=this.g=null;this.o=[];this.j=null;this.I=1;this.m={};this.L={};this.l=new at;this.G=0;this.H=new Qa(5);this.A=new Mc(function(){Nt(a)});this.F=new bg;this.B=null;this.K=[];this.C=Infinity;this.s=!1;this.h=null}r=Mt.prototype;
|
|
889
|
-
r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.R()&&this.A.
|
|
889
|
+
r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.R()&&this.A.kc();this.h&&this.h.configure(this.g);this.l&&(this.l.yg(this.g.dash.multiTypeVariantsAllowed&&nb()),this.l.Fg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,Ot(c),2);d=e.h;c.i&&Pt(c,d);if(!c.i)throw new Q(2,7,7001);return e.return(c.j)})};
|
|
890
890
|
r.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.A&&(this.A.stop(),this.A=null);this.h&&this.h.destroy();return this.F.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Ot(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);G(c)})};
|
|
891
891
|
r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Gb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.G=b.endTime-a,Pt(this,0))}}};r.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
892
892
|
function Ot(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.h&&(c=$s(a.h,"Location",!0),c.length&&(b=c)),d=hg(b,a.g.retryParameters),e=Date.now(),C(k,Qt(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return C(k,Rt(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
|
|
893
893
|
function Rt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(u){if(1==u.g){d=b;e=a.g.dash.manifestPreprocessor;f=$l;if(e!=f){pb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=Lt(d,"MPD");if(!g)throw new Q(2,4,4001,c);e(g);d=nd(g.outerHTML)}h=Og(d,"MPD");if(!h)throw new Q(2,4,4001,c);k=a.g.dash.manifestPreprocessorTXml;l=am;k!=l&&k(h);if(m=a.g.dash.disableXlinkProcessing)return u.return(St(a,h,c));n=a.g.dash.xlinkFailGracefully;
|
|
894
894
|
q=ms(h,a.g.retryParameters,n,c,a.i.networkingEngine);cg(a.F,q);return C(u,q.promise,2)}p=u.h;return u.return(St(a,p,c))})}
|
|
895
|
-
function St(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,
|
|
895
|
+
function St(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb,Fa,Va,ua,kb,yb,hb,Za,$e,xd,Yd,jd,Bc,Zd,af,$d,yd,ri,sg,si,ti,bf,ae,cf;return L(function(Sb){switch(Sb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Vg(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Xg(l))q=Ad(d,[n])[0],m&&(a.h?Zs(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=$s(a.h,"Location",!0),0<p.length&&(d=a.o=p)):e.length&&(d=a.o=e);u=Promise.resolve();
|
|
896
896
|
if((x=Zg(b,"ContentSteering"))&&a.i){w=x.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Vs(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,z=Xg(x))(v=bh(x,"queryBeforeStart",lh,!1))?u=Ws(a.h,z):Ws(a.h,z);B=t(f.keys());for(A=B.next();!A.done;A=B.next())D=A.value,F=f.get(D),Zs(a.h,"Location",D,F)}J=Vg(b,"BaseURL");E=!1;if(a.h)for(H=t(J),K=H.next();!K.done;K=H.next())M=K.value,O=M.attributes.serviceLocation,N=Xg(M),O&&N&&(Zs(a.h,"BaseURL",O,N),E=!0);E&&a.h||
|
|
897
|
-
(U=J.map(Xg),I=Ad(d,U));R=function(){return a.h&&E?$s(a.h,"BaseURL"):I?I:[]};V=0;J&&J.length&&(V=bh(J[0],"availabilityTimeOffset",kh)||0);xa=a.g.dash.ignoreMinBufferTime;Ca=0;xa||(Ca=bh(b,"minBufferTime",fh)||0);a.G=bh(b,"minimumUpdatePeriod",fh,-1);
|
|
898
|
-
hb=b.attributes.type||"static";if(a.j)for(Za=a.j.presentationTimeline,$e=t(Object.values(a.m)),
|
|
899
|
-
za:null,ha:null,ua:null,J:null,bandwidth:0,ig:!1,
|
|
897
|
+
(U=J.map(Xg),I=Ad(d,U));R=function(){return a.h&&E?$s(a.h,"BaseURL"):I?I:[]};V=0;J&&J.length&&(V=bh(J[0],"availabilityTimeOffset",kh)||0);xa=a.g.dash.ignoreMinBufferTime;Ca=0;xa||(Ca=bh(b,"minBufferTime",fh)||0);a.G=bh(b,"minimumUpdatePeriod",fh,-1);eb=bh(b,"availabilityStartTime",eh);Fa=bh(b,"timeShiftBufferDepth",fh);Va=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Va||(ua=bh(b,"suggestedPresentationDelay",fh));kb=a.g.dash.ignoreMaxSegmentDuration;yb=null;kb||(yb=bh(b,"maxSegmentDuration",fh));
|
|
898
|
+
hb=b.attributes.type||"static";if(a.j)for(Za=a.j.presentationTimeline,$e=t(Object.values(a.m)),xd=$e.next();!xd.done;xd=$e.next())Yd=xd.value,Yd.segmentIndex&&Yd.segmentIndex.La(Za.qb());else jd=a.g.defaultPresentationDelay||1.5*Ca,Bc=null!=ua?ua:jd,Za=new hk(eb,Bc,a.g.dash.autoCorrectDrift);Za.Ec("static"==hb);(Zd=Za.R())&&!isNaN(a.g.availabilityWindowOverride)&&(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);Za.je(Fa);af=b.attributes.profiles||"";$d={Eb:"static"!=hb,presentationTimeline:Za,
|
|
899
|
+
za:null,ha:null,ua:null,J:null,bandwidth:0,ig:!1,Qb:V,profiles:af.split(",")};yd=Tt(a,$d,R,b);ri=yd.duration;sg=yd.periods;"static"!=hb&&yd.Xf||Za.Za(ri||Infinity);a.C&&!a.s&&(si=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?Za.zg(a.C):a.C&&Wa("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.");Za.hf(yb||1);
|
|
900
900
|
return C(Sb,a.l.Sf(sg,$d.Eb),2);case 2:return C(Sb,u,3);case 3:a.s&&(Ca=0,ti=null!=ua?ua:a.g.defaultPresentationDelay,Za.Bf(ti));if(a.j){a.j.variants=a.l.j;bf=a.l.Ve();0<bf.length&&(a.j.textStreams=bf);a.j.imageStreams=a.l.i;a.i.filter(a.j);Sb.u(4);break}a.j={presentationTimeline:Za,variants:a.l.j,textStreams:a.l.Ve(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Ut(b)};if(!Za.Kg()){Sb.u(5);
|
|
901
|
-
break}ae=Vg(b,"UTCTiming");return C(Sb,
|
|
901
|
+
break}ae=Vg(b,"UTCTiming");return C(Sb,Vt(a,R,ae),6);case 6:cf=Sb.h;if(!a.i)return Sb.return();Za.Ag(cf);case 5:Za.Xd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),G(Sb)}})}
|
|
902
902
|
function Ut(a){var b=Zg(a,"ServiceDescription");if(!b)return null;a=Zg(b,"Latency");b=Zg(b,"PlaybackRate");return a&&a.attributes.max||b?{maxLatency:a&&a.attributes.max?parseInt(a.attributes.max,10)/1E3:null,maxPlaybackRate:b?parseFloat(b.attributes.max):null,minLatency:a&&a.attributes.min?parseInt(a.attributes.min,10)/1E3:null,minPlaybackRate:b?parseFloat(b.attributes.min):null}:null}
|
|
903
903
|
function Tt(a,b,c,d){var e=bh(d,"mediaPresentationDuration",fh),f=[],g=0;d=Vg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=bh(k,"start",fh,g),n=k.attributes.id,q=bh(k,"duration",fh),p=null;if(l){var u=bh(l,"start",fh);null!=u&&(p=u-m)}else null!=e&&(p=e-m);null==p&&(p=q);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=hu(a,b,c,{start:m,duration:p,node:k,Ye:null==p||!l});f.push(g);b.za.id&&p&&(a.L[b.za.id]=p);if(null==
|
|
904
904
|
p){g=null;break}g=m+p}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,Xf:!1}:{periods:f,duration:g,Xf:!0}}
|
|
905
|
-
function hu(a,b,c,d){b.za=iu(a,d.node,null,c);b.ha=d;b.za.
|
|
905
|
+
function hu(a,b,c,d){b.za=iu(a,d.node,null,c);b.ha=d;b.za.Qb=b.Qb;b.za.id||(b.za.id="__shaka_period_"+d.start);var e=Vg(d.node,"EventStream");c=b.presentationTimeline.qb();e=t(e);for(var f=e.next();!f.done;f=e.next())ju(a,d.start,d.duration,f.value,c);c=Vg(d.node,"AdaptationSet").map(function(m){return ku(a,b,m)}).filter(ne);if(b.Eb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.ki);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new Q(2,4,4018);
|
|
906
906
|
}d=c.filter(function(m){return!m.If});c=c.filter(function(m){return m.If});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.If.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={Cd:h.Cd},l=k.next())h.Cd=l.value,h.Cd.trickModeVideo=e.streams.find(function(m){return function(n){return Td(m.Cd.codecs)==Td(n.codecs)}}(h))}}}c=lu(a.g.disableAudio,d,"audio");e=lu(a.g.disableVideo,d,"video");f=lu(a.g.disableText,
|
|
907
907
|
d,Id);d=lu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new Q(2,4,4004);return{id:b.za.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function lu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,y(e.streams));return d},[])}
|
|
908
908
|
function ku(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=iu(a,c,b.za,null);var e=!1,f=Vg(c,"Role"),g=f.map(function(E){return E.attributes.value}).filter(ne),h=void 0,k=b.ua.contentType==Id;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.attributes.schemeIdUri;if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.attributes.value,l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
@@ -912,21 +912,21 @@ p.value,u=p.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-nu
|
|
|
912
912
|
"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==u?z="visually impaired":"2"==u&&(z="hard of hearing"));if(l)return null;l=Vg(c,"ContentProtection");var F=Wr(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=qe(b.ua.language||"und"),I=c.attributes.label;(l=Vg(c,"Label"))&&l.length&&(l=Wg(l[0]))&&(I=l);l=Vg(c,"Representation");c=l.map(function(E){if(E=mu(a,b,F,h,J,I,e,g,w,E,z,x))E.hdr=E.hdr||n,E.fastSwitching=q;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ua.contentType;
|
|
913
913
|
if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new Q(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=nu(c[0].mimeType,c[0].codecs),k=t(c),p=k.next();!p.done;p=k.next())p.value.type=b.ua.contentType;k=b.ua.id||"__fake__"+a.I++;m=t(c);for(p=m.next();!p.done;p=m.next()){p=p.value;u=t(F.drmInfos);for(v=u.next();!v.done;v=u.next())v=v.value,v.keyIds=v.keyIds&&p.keyIds?new Set([].concat(y(v.keyIds),y(p.keyIds))):v.keyIds||p.keyIds;a.g.dash.enableAudioGroups&&
|
|
914
914
|
(p.groupId=k)}l=l.map(function(E){return E.attributes.id}).filter(ne);return{id:k,contentType:b.ua.contentType,language:J,Dj:e,streams:c,drmInfos:F.drmInfos,If:f,ki:l}}
|
|
915
|
-
function mu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=iu(a,l,b.ua,null);a.C=Math.min(a.C,b.J.
|
|
915
|
+
function mu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=iu(a,l,b.ua,null);a.C=Math.min(a.C,b.J.Qb);if(!ou(b.J))return null;var q=b.ha.start;b.bandwidth=bh(l,"bandwidth",ih)||0;var p=b.J.contentType,u=p==Id||"application"==p;p="image"==p;try{var x=void 0;if(c.xe){var w=b.J.nb,z=Ad(w(),[c.xe.Rh]),v=hg(z,a.g.retryParameters);x={bitsKey:128,blockCipherMode:"CBC",iv:c.xe.iv,firstMediaSequenceNumber:0,fetchKey:function(){var E,H,K;return L(function(M){if(1==M.g)return C(M,Qt(a,v,6),2);if(3!=M.g){E=M.h;if(!E.data||16!=
|
|
916
916
|
E.data.byteLength)throw new Q(2,4,4049);H={name:"AES-CBC"};K=x;return C(M,window.crypto.subtle.importKey("raw",E.data,H,!0,["decrypt"]),3)}K.cryptoKey=M.h;x.fetchKey=void 0;G(M)})}}}w=function(E,H,K,M){return pu(a,E,H,K,M)};if(b.J.pd)var B=zs(b,w,x);else if(b.J.Jb)B=Fs(b,a.m,x);else if(b.J.qd)B=Ks(b,w,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.L,x,n);else{var A=b.ha.duration||0,D=b.J.nb;B={vc:function(){var E=Fk(q,A,D());E.tc(function(H){H.mimeType=b.J.mimeType;H.codecs=b.J.codecs});return Promise.resolve(E)}}}}catch(E){if((u||
|
|
917
917
|
p)&&4002==E.code)return null;throw E;}n=Vg(l,"ContentProtection");n=$r(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;Vg(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.attributes.schemeIdUri&&"JOC"==E.attributes.value})&&(w=!0);z=!1;u&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var F;if(p&&((l=Vg(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.attributes.schemeIdUri)}))&&
|
|
918
918
|
(F=l.attributes.value),!F))return null;var J;l=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");u=b.J.id?b.za.id+","+b.J.id:"";var I=u&&a.m[u]?a.m[u]:{id:a.I++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){I.segmentIndex&&(I.segmentIndex.release(),I.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:l,
|
|
919
919
|
frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ua.language,label:f,type:b.ua.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.J.de,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:F,accessibilityPurpose:m,external:!1,
|
|
920
920
|
fastSwitching:!1,fullMimeTypes:new Set([Md(b.J.mimeType,b.J.codecs)])};I.createSegmentIndex=function(){var E;return L(function(H){if(1==H.g){if(I.segmentIndex)return H.u(0);E=I;return C(H,B.vc(),3)}E.segmentIndex=H.h;G(H)})};u&&b.Eb&&!a.m[u]&&(a.m[u]=I);return I}
|
|
921
|
-
function Nt(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),C(d,Ot(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Pt(a,b);G(d)}})}function Pt(a,b){if(!(0>a.G)){var c=a.G;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.
|
|
922
|
-
function iu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,de:null,audioSamplingRate:null,
|
|
923
|
-
mh)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,p=qu(Vg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=Vg(b,"AudioChannelConfiguration");u=ru(u)||c.de;var x=bh(b,"audioSamplingRate",jh)||c.audioSamplingRate;k||(k=nu(l,m));var w=Zg(b,"SegmentBase"),z=Zg(b,"SegmentTemplate"),v=w?bh(w,"availabilityTimeOffset",kh)||0:0,B=z?bh(z,"availabilityTimeOffset",kh)||0:0,A=f&&f.length?bh(f[0],"availabilityTimeOffset",kh)||0:0;v=c.
|
|
924
|
-
bh(A,"cadence",hh));return{nb:function(){return Ad(d(),f.length?a.h&&h?$s(a.h,e):g?g:[]:[])},pd:w||c.pd,Jb:Zg(b,"SegmentList")||c.Jb,qd:z||c.qd,width:bh(b,"width",jh)||c.width,height:bh(b,"height",jh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,de:u,audioSamplingRate:x,
|
|
921
|
+
function Nt(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),C(d,Ot(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Pt(a,b);G(d)}})}function Pt(a,b){if(!(0>a.G)){var c=a.G;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.X(Math.max(c-b,Ra(a.H)))}}
|
|
922
|
+
function iu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,de:null,audioSamplingRate:null,Qb:0,xf:0};d=d||c.nb;var e=b.attributes.id,f=Vg(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=Xg(m);l&&m&&(Zs(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(Xg));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=b.attributes.codecs||c.codecs;var n=bh(b,"frameRate",
|
|
923
|
+
mh)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,p=qu(Vg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=Vg(b,"AudioChannelConfiguration");u=ru(u)||c.de;var x=bh(b,"audioSamplingRate",jh)||c.audioSamplingRate;k||(k=nu(l,m));var w=Zg(b,"SegmentBase"),z=Zg(b,"SegmentTemplate"),v=w?bh(w,"availabilityTimeOffset",kh)||0:0,B=z?bh(z,"availabilityTimeOffset",kh)||0:0,A=f&&f.length?bh(f[0],"availabilityTimeOffset",kh)||0:0;v=c.Qb+A+v+B;B=null;(A=Zg(b,"SegmentSequenceProperties"))&&(A=Zg(A,"SAP"))&&(B=
|
|
924
|
+
bh(A,"cadence",hh));return{nb:function(){return Ad(d(),f.length?a.h&&h?$s(a.h,e):g?g:[]:[])},pd:w||c.pd,Jb:Zg(b,"SegmentList")||c.Jb,qd:z||c.qd,width:bh(b,"width",jh)||c.width,height:bh(b,"height",jh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,de:u,audioSamplingRate:x,Qb:v,xf:B||c.xf}}
|
|
925
925
|
function qu(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}
|
|
926
926
|
function ru(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=
|
|
927
927
|
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 ou(a){var b=a.pd?1:0;b+=a.Jb?1:0;b+=a.qd?1:0;if(0==b)return a.contentType==Id||"application"==a.contentType?!0:!1;1!=b&&(a.pd&&(a.Jb=null),a.qd=null);return!0}
|
|
928
928
|
function su(a,b,c,d){var e,f,g,h,k,l,m;return L(function(n){if(1==n.g)return e=[qd(c)],f=Ad(b(),e),g=hg(f,a.g.retryParameters),g.method=d,h=a.i.networkingEngine.request(4,g),cg(a.F,h),C(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=hd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
929
|
-
function
|
|
929
|
+
function Vt(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.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;ra(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);
|
|
930
930
|
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":Wa("NTP UTCTiming scheme is not supported");break;default:Wa("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return C(n,su(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,su(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
|
|
931
931
|
3);break;case 5:va(n);case 3:g=f.next();n.u(2);break;case 4:return Wa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
932
932
|
function ju(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=bh(d,"timescale",jh)||1;d=t(Vg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=bh(k,"presentationTime",jh)||0,m=bh(k,"duration",jh)||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:nh(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
|
|
@@ -946,28 +946,28 @@ A.skip(1);v=A.P();var D=["","A","B","C"][v>>6],F=v&31,J=A.M(),I=(v&32)>>5?"H":"L
|
|
|
946
946
|
v=A.P();A=A.P();f.push(B+"."+Si(v>>1&127)+"."+Si(v<<5&32|A>>3&31));h=!0}).O("vpcC",function(v){var B=u||"",A=v.reader;v=A.P();var D=A.P();A=A.P()>>4&15;f.push(B+"."+Si(v)+"."+Si(D)+"."+Si(A));h=!0}).box("av1C",function(v){var B=u||"",A=v.reader;A.skip(1);v=A.P();A=A.P();var D=v>>>5,F=(A&64)>>6;f.push(B+"."+D+"."+Si(v&31)+(A>>>7?"H":"M")+"."+Si(2===D&&F?(A&32)>>5?12:10:F?10:8)+"."+((A&16)>>4)+"."+((A&8)>>3)+((A&4)>>2)+(A&3)+"."+Si(1)+"."+Si(1)+"."+Si(1)+".0");h=!0}).box("enca",Kg).box("encv",Jg).box("sinf",
|
|
947
947
|
Eg).box("frma",function(v){v=Qi(v.reader).Ea;d(v)}).box("colr",function(v){v=v.reader;var B=null,A=v.sb(4);var D=String.fromCharCode(A[0]);D+=String.fromCharCode(A[1]);D+=String.fromCharCode(A[2]);D+=String.fromCharCode(A[3]);if("nclx"===D)switch(v.ra(),A=v.ra(),v.ra(),A){case 1:case 6:case 13:case 14:case 15:B="SDR";break;case 16:B="PQ";break;case 18:B="HLG"}p=B}).parse(a||b,!0);if(!e.length&&!f.length)return null;var x=g&&!h,w=new Map;if(h){var z=new Gb("video/mp4");a&&z.init(a);z.i(b);a=t(z.j());
|
|
948
948
|
for(b=a.next();!b.done;b=a.next())b=b.value,w.set(b,b);z.h()}return{type:x?"audio":"video",mimeType:x?"audio/mp4":"video/mp4",codecs:Yu(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:q,closedCaptions:w,Lf:p}}function Yu(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Vd(d);b.has(e)||(c.push(d),b.add(e))}b=Jd("audio",c);d=Jd("video",c);a=Jd(Id,c);d=Zu(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
949
|
-
function Zu(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?lb('video/mp4; codecs="'+b+"\"'")?[b]:a.filter(function(c){return c!=b}):a}function $u(a){var b=null;(new zg).box("moov",Eg).box("trak",Eg).box("mdia",Eg).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("encv",Jg).box("enca",Kg).box("sinf",Eg).box("schi",Eg).O("tenc",function(c){c=c.reader;c.P();c.P();c.P();c.P();b=
|
|
949
|
+
function Zu(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?lb('video/mp4; codecs="'+b+"\"'")?[b]:a.filter(function(c){return c!=b}):a}function $u(a){var b=null;(new zg).box("moov",Eg).box("trak",Eg).box("mdia",Eg).box("minf",Eg).box("stbl",Eg).O("stsd",Ig).box("encv",Jg).box("enca",Kg).box("sinf",Eg).box("schi",Eg).O("tenc",function(c){c=c.reader;c.P();c.P();c.P();c.P();b=wd(c.sb(16))}).parse(a,!0);return b};function av(){var a=this;this.g=this.i=null;this.A=1;this.o=new Map;this.H=new Map;this.K=new Map;this.K.set("video",new Map);this.K.set("audio",new Map);this.K.set(Id,new Map);this.K.set("image",new Map);this.Ia=new Set;this.h=new Map;this.l=null;this.aa="";this.Ga=new Ou;this.I=-1;this.T=Infinity;this.ea=this.mb=!1;this.s=new Mc(function(){bv(a)});this.qa=cv;this.C=null;this.Ha=0;this.m=Infinity;this.ta=this.sa=this.L=0;this.N=new bg;this.F=new Map;this.G=new Map;this.Y=new Map;this.ba=new Map;
|
|
950
950
|
this.da=new Map;this.ia=new Map;this.pa=new Map;this.lb=this.B=!1;this.bb=new Qa(5);this.j=null}r=av.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 L(function(e){return 1==e.g?(c.i=b,c.B=b.isLowLatencyMode(),C(e,dv(c,[a]),2)):3!=e.g?(d=e.h,c.aa=d.uri,C(e,ev(c,d.data,a),3)):e.return(c.C)})};
|
|
951
|
-
r.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.Ia.clear();this.C=null;this.h.clear();this.H.clear();this.G.clear();this.o.clear();this.
|
|
951
|
+
r.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.Ia.clear();this.C=null;this.h.clear();this.H.clear();this.G.clear();this.o.clear();this.Y.clear();this.ba.clear();this.da.clear();this.ia.clear();this.pa.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
952
952
|
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!fv(a))return m.return();b=[];c=Array.from(a.h.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(gv(a,g));return C(m,Promise.all(b),2)}hv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.fd});d.length&&!h&&(k=iv,jv(a,k.Pg),l=d.map(function(n){return n.yb}),a.l.Za(Math.min.apply(Math,y(l))),a.i.updateDuration());
|
|
953
953
|
h&&kv(a);G(m)})};function lv(a,b){return fv(a)?a.K.get(b.type):b.$d}
|
|
954
954
|
function gv(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U;return L(function(R){if(1==R.g){c=[];d=t(b.$());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Gd&&(0<=b.gb&&h.add("_HLS_msn",String(b.gb)),0<=b.hb&&h.add("_HLS_part",String(b.hb))),b.Hd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return C(R,dv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=Pu(a.Ga,k.data);if(1!=l.type)throw new Q(2,4,4017);m=k.uri;m==k.originalUri||
|
|
955
955
|
b.$().includes(m)||b.tg.push(m);n=Eu(l.g,"EXT-X-DEFINE");q=mv(a,n,m);p=b.stream;u=lv(a,b);return C(R,nv(a,l,p.mimeType,b.$,q),3)}x=R.h;w=x.keyIds;z=x.drmInfos;v=function(V,xa){return V.size===xa.size&&[].concat(y(V)).every(function(Ca){return xa.has(Ca)})};v(p.keyIds,w)||(p.keyIds=w,p.drmInfos=z,a.i.newDrmInfo(p));B=ov(a,l,p,u,q,b.$,b.type);A=B.segments;if(D=B.bandwidth)p.bandwidth=D;p.segmentIndex.kd(A,a.l.qb());A.length&&(F=Hu(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(J=Gu(l.g,"EXT-X-SKIP"))?Number(Z(J,
|
|
956
|
-
"SKIPPED-SEGMENTS")):0,E=pv(F,A),H=E.gb,K=E.hb,b.gb=H+I,b.hb=K,M=u.get(F),p.segmentIndex.La(M));O=A[0];b.
|
|
956
|
+
"SKIPPED-SEGMENTS")):0,E=pv(F,A),H=E.gb,K=E.hb,b.gb=H+I,b.hb=K,M=u.get(F),p.segmentIndex.La(M));O=A[0];b.fc=O.startTime;N=A[A.length-1];b.yb=N.endTime;if(U=Gu(l.g,"EXT-X-ENDLIST"))b.fd=!0;qv(a,l);G(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
957
957
|
function rv(a,b){for(var c=-1==a.I,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=lv(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.I=Math.max(a.I,k));e.De=k;break}}}}if(!(0>a.I))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,sv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.I-c.De,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),tv(a,
|
|
958
958
|
c,d)}
|
|
959
959
|
function uv(a,b){if(Infinity==a.T){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.T=Math.min(a.T,d.h))}}b=a.T;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!sv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$(),"Expect AV sync issues!");else for(tv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Ff(b)}}}
|
|
960
|
-
function tv(a,b,c){b.
|
|
961
|
-
function ev(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,
|
|
960
|
+
function tv(a,b,c){b.fc+=c;b.yb+=c;a=lv(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.$()}
|
|
961
|
+
function ev(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb,Fa,Va;return L(function(ua){switch(ua.g){case 1:d=Pu(a.Ga,b);e=Eu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];k=function(){return[c]};if(1==d.type)return C(ua,vv(a,d,k),7);wv(a,e);l=Eu(d.g,"EXT-X-MEDIA");m=Eu(d.g,"EXT-X-STREAM-INF");n=Eu(d.g,"EXT-X-IMAGE-STREAM-INF");q=Eu(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Eu(d.g,"EXT-X-SESSION-KEY");u=Eu(d.g,"EXT-X-SESSION-DATA");x=Eu(d.g,"EXT-X-CONTENT-STEERING");xv(a,u);return C(ua,
|
|
962
962
|
yv(a,x),4);case 4:return zv(a,m),Av(a,l),C(ua,Bv(a,m,p,l,k,a.o),5);case 5:return f=ua.h,g=Cv(a,l),C(ua,Dv(a,n,q),6);case 6:h=ua.h;ua.u(3);break;case 7:return w=ua.h,z=w.type,v=w.mimeType,B=w.codecs,A=w.language,D=w.height,F=w.width,J=w.channelCount,I=w.sampleRate,E=w.closedCaptions,H=w.Lf,C(ua,Ev(a,a.A++,d,k,c,B,z,A,!0,"Media Playlist",J,E,null,!1,I,!1,v),8);case 8:K=ua.h,a.h.set(c,K),"video"==z&&Fv(K.stream,F,D,null,H,null),f.push({id:0,language:qe(A||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
|
|
963
|
-
z?K.stream:null,video:"video"==z?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new Q(2,7,7001);a.l=new hk(null,0);a.l.Ec(!0);1==d.type&&(fv(a)&&(Gv(a,d),M=a.m,a.s.
|
|
964
|
-
type:"HLS",serviceDescription:null};if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(9);break}N=[];U=t(a.C.variants);for(R=U.next();!R.done;R=U.next())V=R.value,V.audio&&""===V.audio.codecs&&N.push(V.audio.createSegmentIndex()),V.video&&""===V.video.codecs&&N.push(V.video.createSegmentIndex());return C(ua,Promise.all(N),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.C);if(1==f.length){xa=[];Ca=f[0];
|
|
963
|
+
z?K.stream:null,video:"video"==z?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new Q(2,7,7001);a.l=new hk(null,0);a.l.Ec(!0);1==d.type&&(fv(a)&&(Gv(a,d),M=a.m,a.s.X(M)),O=Array.from(a.h.values()),Hv(a,O),kv(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
964
|
+
type:"HLS",serviceDescription:null};if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(9);break}N=[];U=t(a.C.variants);for(R=U.next();!R.done;R=U.next())V=R.value,V.audio&&""===V.audio.codecs&&N.push(V.audio.createSegmentIndex()),V.video&&""===V.video.codecs&&N.push(V.video.createSegmentIndex());return C(ua,Promise.all(N),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.C);if(1==f.length){xa=[];Ca=f[0];eb=t([Ca.video,Ca.audio]);for(Fa=eb.next();!Fa.done;Fa=eb.next())(Va=Fa.value)&&!Va.segmentIndex&&xa.push(Va.createSegmentIndex());
|
|
965
965
|
if(0<xa.length)return C(ua,Promise.all(xa),0)}ua.u(0)}})}
|
|
966
|
-
function vv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:d=Wu(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Iu(c(),b.segments[0].h);h=g[0];k=new rc(h);l=k.Pa.split(".").pop();if(m=Iv[l])return D.return(Wu(m));n=ng;q=null;p=Jv(a,b,f.g,c);a.
|
|
966
|
+
function vv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:d=Wu(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Iu(c(),b.segments[0].h);h=g[0];k=new rc(h);l=k.Pa.split(".").pop();if(m=Iv[l])return D.return(Wu(m));n=ng;q=null;p=Jv(a,b,f.g,c);a.Y.clear();if(!p){D.u(2);break}u=gl(p.$(),p.ac(),p.Yb(),a.g.retryParameters);return C(D,Kv(a,u,n,{type:0}),3);case 3:x=D.h,q=x.data;case 2:return w=
|
|
967
967
|
hg(g,a.g.retryParameters),C(D,Kv(a,w,n,{type:1}),4);case 4:z=D.h;(v=z.headers["content-type"])&&(v=v.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==v){var F=z.data;var J=Ab(F);J=(new ij).parse(J);var I=J.bd();J=J.We();var E=[],H=!1,K=!1;switch(I.audio){case "aac":case "aac-loas":E.push("mp4a.40.2");H=!0;break;case "mp3":E.push("mp4a.40.34");H=!0;break;case "ac3":E.push("ac-3");H=!0;break;case "ec3":E.push("ec-3");H=!0;break;case "opus":E.push("opus"),H=!0}switch(I.video){case "avc":J.Ea?E.push(J.Ea):
|
|
968
968
|
E.push("avc1.42E01E");K=!0;break;case "hvc":J.Ea?E.push(J.Ea):E.push("hvc1.1.6.L93.90");K=!0;break;case "av1":E.push("av01.0.01M.08"),K=!0}if(E.length){I=H&&!K;H=new Map;if(K){K=new Gb("video/mp2t");K.i(F);F=t(K.j());for(var M=F.next();!M.done;M=F.next())M=M.value,H.set(M,M);K.h()}J={type:I?"audio":"video",mimeType:"video/mp2t",codecs:E.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:H,Lf:null}}else J=null;if(B=J)return D.return(B)}else if("mp4"==
|
|
969
969
|
l||"cmfv"==l||"m4s"==l||"video/mp4"==v||"audio/mp4"==v||"video/iso.segment"==v)if(A=Xu(q,z.data))return D.return(A);return D.return(d)}})}
|
|
970
|
-
function kv(a){if(fv(a)){if(a.qa==Lv){for(var b,c=b=Infinity,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.yb),c=Math.min(c,e.
|
|
970
|
+
function kv(a){if(fv(a)){if(a.qa==Lv){for(var b,c=b=Infinity,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.yb),c=Math.min(c,e.fc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.je(b)}}else a.l.Za(Mv(a));if(!a.l.o)for(b=t(a.h.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))&&
|
|
971
971
|
c.h&&a.l.Bg(c.h);a.l.Xd()}function wv(a,b){var c=(new rc(a.aa)).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.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
|
|
972
972
|
function mv(a,b,c){c=(new rc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d}
|
|
973
973
|
function zv(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=Nv(a,d);if(f){var g=Gd(Id,d);a.G.set(f,g);Kb(d,g)}e&&(f=Gd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Gd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
@@ -978,9 +978,9 @@ function Rv(a){a.fullMimeTypes=new Set([Md(a.mimeType,a.codecs)])}
|
|
|
978
978
|
function Dv(a,b,c){var d,e;return L(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return L(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ra(m,2);return C(m,Sv(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=va(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=Bu(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
|
|
979
979
|
q=Z(g,"CHARACTERISTICS"),p=Tv(a,a.A++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Z(g,"RESOLUTION"),x=t(u?u.split("x"):[null,null]),w=x.next().value,z=x.next().value;p.stream.width=Number(w)||void 0;p.stream.height=Number(z)||void 0;var v=Z(g,"BANDWIDTH");v&&(p.stream.bandwidth=Number(v));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
980
980
|
function Uv(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=zu(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Ov(a,d[g],c)}
|
|
981
|
-
function Bv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,
|
|
981
|
+
function Bv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb;return L(function(Fa){switch(Fa.g){case 1:g=[];h=new Set;if(!(0<c.length)){Fa.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Fa.u(2);break}m=l.value;n=Bu(m,"METHOD");q=Z(m,"KEYFORMAT")||"identity";p=null;if("NONE"==n||Vv(n)){Fa.u(4);break}if("identity"!=q){p=(u=Wv[q])?u(m,""):null;Fa.u(6);break}return C(Fa,Xv(a,m,"",e,null,f),8);case 8:p=Fa.h;case 6:if(p){if(p.keyIds)for(x=t(p.keyIds),w=x.next();!w.done;w=
|
|
982
982
|
x.next())z=w.value,h.add(z);g.push(p)}case 4:l=k.next();Fa.u(3);break;case 2:v={};B=t(b);for(A=B.next();!A.done;A=B.next())D=A.value,F=zu(D),v[F]?v[F].push(D):v[F]=[D];J=[];for(I in v)E=v[I],H=E[0],K=Z(H,"FRAME-RATE"),M=Number(Z(H,"AVERAGE-BANDWIDTH"))||Number(Bu(H,"BANDWIDTH")),O=Z(H,"RESOLUTION"),N=t(O?O.split("x"):[null,null]),U=N.next().value,R=N.next().value,V=Z(H,"VIDEO-RANGE"),(xa=Z(H,"REQ-VIDEO-LAYOUT"))&&xa.includes(",")&&(Ca=xa.split(",").filter(function(Va){return"CH-STEREO"==Va||"CH-MONO"==
|
|
983
|
-
Va}),xa=Ca[0]),xa=xa||"CH-MONO",
|
|
983
|
+
Va}),xa=Ca[0]),xa=xa||"CH-MONO",eb=Yv(a,E,d,M),J.push.apply(J,y(Zv(a,eb.audio,eb.video,M,U,R,K,V,xa,g,h)));return Fa.return(J.filter(function(Va){return null!=Va}))}})}
|
|
984
984
|
function Yv(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=t(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Z(n,"AUDIO");var q=Z(n,"VIDEO"),p=m||q;p&&(g.includes(p)||g.push(p),(n=Z(n,"PATHWAY-ID"))&&f.set(p,n),m?h=!0:q&&(k=!0))}g.length&&c.length&&(l=c.filter(function(w){return g.includes(Bu(w,"GROUP-ID"))}),Uv(a,l,f));l=(f=g.sort().join(","))&&a.H.has(f)?a.H.get(f):[];h?e.audio.push.apply(e.audio,y(l)):k&&e.video.push.apply(e.video,y(l));m=!1;var u=b.map(function(w){return Bu(w,
|
|
985
985
|
"URI")});k=e.audio.find(function(w){return w&&w.$().find(function(z){return u.includes(z)})});h=Nv(a,b[0]);q=Gd("video",h);(p=Gd("audio",h))&&!q?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&p&&q?(k="video",h=[[q,p].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var x=n=p=q=m=null;!l.length&&(c=c.find(function(w){var z=Z(w,"URI")||"",v=Z(w,"TYPE");w=Bu(w,"GROUP-ID");return"SUBTITLES"!=v&&""==z&&g.includes(w)}))&&(m=Z(c,"LANGUAGE"),
|
|
986
986
|
q=Z(c,"NAME"),p=$v(c),aw(c),n=Z(c,"CHARACTERISTICS"),x=bw(c));a=cw(a,b,h,k,m,q,p,n,x);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
|
|
@@ -994,15 +994,15 @@ m=n.next().value;n=n.next().value;(m=c.get(m))&&Zs(a.j,l,m,n)}}c=Z(h,"LANGUAGE")
|
|
|
994
994
|
function Sv(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Bu(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return q.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Tv(a,a.A++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(q,h.stream.createSegmentIndex(),3):q.u(2)}2!=q.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])*
|
|
995
995
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return q.return(h)})}
|
|
996
996
|
function cw(a,b,c,d,e,f,g,h,k){for(var l=a.A++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Bu(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&Zs(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}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=Fd(d,c);d=Tv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
|
|
997
|
-
function Tv(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(D){var F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,
|
|
998
|
-
if(D.aborted)return ua.return();N=O.stream;fv(a)&&!M&&Gv(a,E);v.
|
|
999
|
-
Rv(xa.stream));e==U.ma&&(Ca=N.segmentIndex.get(0))&&Ca.ca&&(w.mimeType="application/mp4",Rv(w));dw(a)&&(a.mb?Hv(a,[v]):(a.mb=!0,
|
|
997
|
+
function Tv(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(D){var F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb,Fa,Va;return L(function(ua){switch(ua.g){case 1:return F=v.$(),C(ua,dv(a,v.$(),!0),2);case 2:J=ua.h;if(D.aborted)return ua.return();I=J.uri;I==J.originalUri||F.includes(I)||z.push(I);E=Pu(a.Ga,J.data);H=void 0;if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(3);break}return C(ua,vv(a,E,x),4);case 4:K=ua.h,H=K.mimeType,d=K.codecs;case 3:return M=fv(a),C(ua,Ev(a,0,E,x,I,d,e,f,g,h,k,l,m,n,q,p,H),5);case 5:O=ua.h;
|
|
998
|
+
if(D.aborted)return ua.return();N=O.stream;fv(a)&&!M&&Gv(a,E);v.fc=O.fc;v.yb=O.yb;v.Hd=O.Hd;v.Gd=O.Gd;v.fd=O.fd;v.$d=O.$d;v.gb=O.gb;v.hb=O.hb;v.df=!0;w.segmentIndex=N.segmentIndex;w.encrypted=N.encrypted;w.drmInfos=N.drmInfos;w.keyIds=N.keyIds;w.mimeType=N.mimeType;w.bandwidth=w.bandwidth||N.bandwidth;w.codecs=w.codecs||N.codecs;Rv(w);w.drmInfos.length&&a.i.newDrmInfo(w);U=Kd;if(e==U.fa||e==U.S)for(R=t(a.h.values()),V=R.next();!V.done;V=R.next())xa=V.value,xa.df||xa.type!=e||(xa.stream.mimeType=N.mimeType,
|
|
999
|
+
Rv(xa.stream));e==U.ma&&(Ca=N.segmentIndex.get(0))&&Ca.ca&&(w.mimeType="application/mp4",Rv(w));dw(a)&&(a.mb?Hv(a,[v]):(a.mb=!0,eb=Array.from(a.h.values()),Fa=eb.filter(function(kb){return kb.stream.segmentIndex}),Hv(a,Fa),kv(a),Va=a.m,0<Va&&a.s.X(Va)));G(ua)}})}function x(){return a.j&&1<c.length?$s(a.j,b):z.concat(Ju([a.aa],c,a.o))}var w=ew(a,d,e,f,g,h,k,l,m,n,q,p),z=[],v={stream:w,type:e,tg:z,$:x,fc:0,yb:0,$d:new Map,Hd:!1,Gd:!1,fd:!1,De:-1,gb:-1,hb:-1,df:!1},B=null,A=new AbortController;w.createSegmentIndex=
|
|
1000
1000
|
function(){if(B)return B;A=new AbortController;return B=new Promise(function(D){D(u(A.signal))})};w.closeSegmentIndex=function(){B&&!w.segmentIndex&&A.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);B=null};return v}function Mv(a){var b=Infinity;a=t(a.h.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.yb));return b}
|
|
1001
1001
|
function hv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.tc(function(e){c.push(e)});a.l.ld(c)}function Hv(a,b){if(!fv(a))for(var c=Mv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.sc(0,c);hv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?rv(a,b):(uv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&rv(a,b))}
|
|
1002
1002
|
function sv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function dw(a){if(!a.C)return!1;var b=[],c=[];a=t(a.C.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}
|
|
1003
|
-
function Ev(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,x,w){var z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,
|
|
1004
|
-
kb.h;A=B.drmInfos;D=B.keyIds;F=B.encrypted;J=B.Tg;if(F&&!A.length&&!J)throw new Q(2,4,4026);I=ew(a,f,g,h,k,l,m,n,q,p,u,x);I.encrypted=F;I.drmInfos=A;I.keyIds=D;I.mimeType=w;Rv(I);E=fv(a)?a.K.get(g):new Map;H=ov(a,c,I,E,v,d,g);K=H.segments;if(M=H.bandwidth)I.bandwidth=M;fv(a)&&qv(a,c);O=K[0].startTime;N=K[K.length-1];U=N.endTime;R=new Dk(K);I.segmentIndex=R;xa=(V=Gu(c.g,"EXT-X-SERVER-CONTROL"))?null!=Au(V,"CAN-SKIP-UNTIL"):!1;Ca=V?null!=Au(V,"CAN-BLOCK-RELOAD"):!1;
|
|
1005
|
-
0);Fa=pv(
|
|
1003
|
+
function Ev(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,x,w){var z,v,B,A,D,F,J,I,E,H,K,M,O,N,U,R,V,xa,Ca,eb,Fa,Va,ua;return L(function(kb){switch(kb.g){case 1:if(1!=c.type)throw new Q(2,4,4017);z=Eu(c.g,"EXT-X-DEFINE");v=mv(a,z,e);var yb=Gu(c.g,"EXT-X-PLAYLIST-TYPE"),hb=Gu(c.g,"EXT-X-ENDLIST");hb=yb&&"VOD"==yb.value||hb;yb=yb&&"EVENT"==yb.value&&!hb;yb=!hb&&!yb;hb?jv(a,cv):yb?jv(a,Lv):jv(a,fw);fv(a)&&qv(a,c);if(w){kb.u(2);break}return C(kb,gw(a,g,f,c,v,d),3);case 3:w=kb.h;case 2:return C(kb,nv(a,c,w,d,v),4);case 4:B=
|
|
1004
|
+
kb.h;A=B.drmInfos;D=B.keyIds;F=B.encrypted;J=B.Tg;if(F&&!A.length&&!J)throw new Q(2,4,4026);I=ew(a,f,g,h,k,l,m,n,q,p,u,x);I.encrypted=F;I.drmInfos=A;I.keyIds=D;I.mimeType=w;Rv(I);E=fv(a)?a.K.get(g):new Map;H=ov(a,c,I,E,v,d,g);K=H.segments;if(M=H.bandwidth)I.bandwidth=M;fv(a)&&qv(a,c);O=K[0].startTime;N=K[K.length-1];U=N.endTime;R=new Dk(K);I.segmentIndex=R;xa=(V=Gu(c.g,"EXT-X-SERVER-CONTROL"))?null!=Au(V,"CAN-SKIP-UNTIL"):!1;Ca=V?null!=Au(V,"CAN-BLOCK-RELOAD"):!1;eb=Hu(c.g,"EXT-X-MEDIA-SEQUENCE",
|
|
1005
|
+
0);Fa=pv(eb,K);Va=Fa.gb;ua=Fa.hb;return kb.return({stream:I,type:g,tg:[],$:d,fc:O,yb:U,Hd:xa,Gd:Ca,fd:!1,De:-1,gb:Va,hb:ua,$d:E,df:!1})}})}function pv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{gb:a,hb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{gb:a,hb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{gb:a,hb:c}}
|
|
1006
1006
|
function ew(a,b,c,d,e,f,g,h,k,l,m,n){var q=Pv(c,b)||Qv(c),p=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())p.push(u.value)}k=void 0;u=null;c==Id?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");a={id:a.A++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1007
1007
|
segmentIndex:null,mimeType:q,codecs:b,kind:c==Id?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:qe(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:p,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,fullMimeTypes:new Set};
|
|
1008
1008
|
Rv(a);return a}
|
|
@@ -1013,7 +1013,7 @@ function hw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Cr
|
|
|
1013
1013
|
G(w)})};a.ba.set(c,k)}return a.ba.get(c)}
|
|
1014
1014
|
function qv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Gu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Gu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new Q(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Gu(b.g,"EXT-X-PART-INF"))a.L=Number(Bu(e,"PART-TARGET"));b=Gu(b.g,"EXT-X-SERVER-CONTROL");a.B&&a.L?(a.m=a.lb?5*a.L<=c?Math.min(a.L,a.m):Math.min(c,a.m):Math.min(a.L,a.m),a.ta=b?Number(Bu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1015
1015
|
Au(b,"HOLD-BACK"):null,a.sa=c?Number(c.value):0);a.Ha=Math.max(d,a.Ha)}function Gv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ta)b=a.ta;else if(a.sa)b=a.sa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Ha*c}a.l.Cg(0);a.l.Bf(b);a.l.Ec(!1)}
|
|
1016
|
-
function Jv(a,b,c,d,e){var f=Gu(c,"EXT-X-MAP");if(!f)return null;var g=Bu(f,"URI"),h=Iu(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.
|
|
1016
|
+
function Jv(a,b,c,d,e){var f=Gu(c,"EXT-X-MAP");if(!f)return null;var g=Bu(f,"URI"),h=Iu(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.Y.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?Vv(Bu(m,"METHOD"))&&m.id<f.id&&(k=hw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=iw(h,f,l,k);a.Y.set(g,b)}return a.Y.get(g)}
|
|
1017
1017
|
function iw(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 qi(function(){return a},e,f,null,null,null,d)}
|
|
1018
1018
|
function jw(a,b,c,d,e,f,g,h,k){var l=d.g,m=Gu(l,"EXTINF"),n=0,q=0,p=null;d.rb.length&&!a.B&&Wa("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 x=Gu(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(u=eh(x.value))}var w=wi;Gu(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.rb.length)throw new Q(2,4,4024,"EXTINF");
|
|
1019
1019
|
if(!a.B)return null}var z=[];x=!1;var v=null,B=!1,A=!1;if(a.B&&d.rb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,F={},J=0;J<d.rb.length;F={Qc:F.Qc,yd:F.yd},J++){var I=d.rb[J],E=0==J?c:z[z.length-1],H=0==J?e:E.endTime,K=Number(Z(I,"DURATION"))||a.L;if(K){var M=H+K,O=0,N=null;"EXT-X-PRELOAD-HINT"==I.name?(O=(O=Z(I,"BYTERANGE-START"))?Number(O):0,(E=Z(I,"BYTERANGE-LENGTH"))?N=O+Number(E)-1:O&&(N=Number.MAX_SAFE_INTEGER)):
|
|
@@ -1027,15 +1027,15 @@ e());if(n)for(c=t(x),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),
|
|
|
1027
1027
|
function Qv(a){return a==Id?"text/vtt":lw[a].mp4}
|
|
1028
1028
|
function gw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v;return L(function(B){switch(B.g){case 1:g=ng;h=Math.trunc((d.segments.length-1)/2);k=Iu(f(),d.segments[h].h,e);l=new rc(k[0]);m=l.Pa.split(".").pop();n=lw[b];if((q=n[m])||(q=Iv[m])||(q=Pv(b,c)))return B.return(q);u=1;x=hg(k,a.g.retryParameters);ra(B,2);x.method="HEAD";return C(B,Kv(a,x,g,{type:u}),4);case 4:w=B.h;p=w.headers["content-type"];ta(B,3);break;case 2:z=va(B);if(!z||1002!=z.code&&1001!=z.code){B.u(3);break}x.method="GET";return C(B,
|
|
1029
1029
|
Kv(a,x,g,{type:u}),6);case 6:v=B.h,p=v.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(Qv(b))}})}function Fv(a,b,c,d,e,f){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)}function dv(a,b,c){return Kv(a,hg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1030
|
-
function bv(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();fv(a)&&(d=(c-b)/1E3,a.bb.sample(1,d),e=a.m,f=Math.max(0,e-Ra(a.bb)),a.s.
|
|
1030
|
+
function bv(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();fv(a)&&(d=(c-b)/1E3,a.bb.sample(1,d),e=a.m,f=Math.max(0,e-Ra(a.bb)),a.s.X(f));ta(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.X(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();G(h)}})}
|
|
1031
1031
|
function fv(a){return a.qa!=cv}function jv(a,b){a.qa=b;a.l&&a.l.Ec(!fv(a));fv(a)||a.s.stop()}function Kv(a,b,c,d){if(!a.N)throw new Q(2,7,7001);b=a.i.networkingEngine.request(c,b,d);cg(a.N,b);return b.promise}function Vv(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1032
|
-
function Xv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:if("video/mp2t"==c)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);g=Bu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return D.return(null);k=Iu(d(),Bu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=
|
|
1033
|
-
q));return C(D,a.ia.get(m),3);case 3:p=D.h,l=
|
|
1032
|
+
function Xv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B,A;return L(function(D){switch(D.g){case 1:if("video/mp2t"==c)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);g=Bu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return D.return(null);k=Iu(d(),Bu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=wd(ud(k[0].split("data:text/plain;base64,").pop()));D.u(2);break}m=k.sort().join("");a.ia.has(m)||(n=hg(k,a.g.retryParameters),q=Kv(a,n,6),a.ia.set(m,
|
|
1033
|
+
q));return C(D,a.ia.get(m),3);case 3:p=D.h,l=wd(p.data);case 2:u="00000000000000000000000000000000";if(!e){D.u(4);break}if(a.pa.has(e)){x=a.pa.get(e);D.u(5);break}w=gl(e.$(),e.ac(),e.Yb(),a.g.retryParameters);z=ng;return C(D,Kv(a,w,z,{type:0}),6);case 6:v=D.h,x=$u(v.data),a.pa.set(e,x);case 5:x&&(u=x);case 4:return B=new Map,B.set(u,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),D.return(Cd(B,A))}})}P("shaka.hls.HlsParser",av);
|
|
1034
1034
|
var Iv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},lw={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",
|
|
1035
1035
|
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"}},Wv={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new Q(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new Q(2,4,4041);a=Bu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Bd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},
|
|
1036
1036
|
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Bu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Bu(a,"URI");b=Vu(b);b=Ab(b.data);c=Bd("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=Bu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==
|
|
1037
1037
|
b&&(c="cbcs");a=Bu(a,"URI");a=Vu(a);a=Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ng(a,b,new Set,0);return Bd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},cv="VOD",fw="EVENT",Lv="LIVE",iv={Pg:cv,Pi:fw,Xi:Lv};li["application/x-mpegurl"]=function(){return new av};li["application/vnd.apple.mpegurl"]=function(){return new av};function mw(a){var b=0,c=Eb(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=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function nw(a){if(a=ow(a))a:{a=t(Yg(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=Zg(b.value,"LA_URL")){a=Wg(b);break a}a=""}else a="";return a}
|
|
1038
|
-
function ow(a){a=ud(Wg(a));a=mw(a).filter(function(b){return b.type===pw})[0];if(!a)return null;a=
|
|
1038
|
+
function ow(a){a=ud(Wg(a));a=mw(a).filter(function(b){return b.type===pw})[0];if(!a)return null;a=id(a.value,!0);return(a=Pg(a,"WRMHEADER"))?a:null}var pw=1,qw=(new Map).set("com.microsoft.playready",nw).set("com.microsoft.playready.recommendation",nw).set("com.microsoft.playready.software",nw).set("com.microsoft.playready.hardware",nw);function rw(a){if(!sw){sw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);tw=uw("ftyp",b,d,b,c);b=uw("dref",vw);ww=uw("dinf",b)}this.g=a}
|
|
1039
1039
|
function xw(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=uw;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/(yw+1));m=Math.floor(m%(yw+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(y(zw(h,4)),[0,0,0,0],y(zw(n,4)),y(zw(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],y(zw(k,2)),[0,0],y(zw(l,
|
|
1040
1040
|
2)),[0,0]));h=uw("tkhd",h);k=uw;n=g.duration*g.timescale;l=Math.floor(n/(yw+1));n=Math.floor(n%(yw+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(y(zw(g.timescale,4)),y(zw(l,4)),y(zw(n,4)),y(zw(m,2)),[0,0]));l=uw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Aw;break;case "audio":m=Bw}n=uw("hdlr",m);a:{switch(g.type){case "video":g=uw("minf",uw("vmhd",Cw),ww,Dw(g));break a;
|
|
1041
1041
|
case "audio":g=uw("minf",uw("smhd",Ew),ww,Dw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=zd.apply(rd,y(b));f=a.g[0];c=uw;d=f.duration*f.timescale;e=Math.floor(d/(yw+1));d=Math.floor(d%(yw+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(y(zw(f.timescale,4)),y(zw(e,4)),y(zw(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,
|
|
@@ -1060,7 +1060,7 @@ r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C
|
|
|
1060
1060
|
function Tw(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=hg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),cg(a.A,e),C(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!=$l){pb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Lt(m,"SmoothStreamingMedia");if(!m)throw new Q(2,4,4046,
|
|
1061
1061
|
l);n(m);m=nd(m.outerHTML)}var q=Og(m,"SmoothStreamingMedia");if(!q)throw new Q(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=am&&l(q);a.i||(a.i=new hk(null,0));if(l=bh(q,"IsLive",lh,!1))throw new Q(2,4,4047);a.i.Ec(!l);n=bh(q,"TimeScale",jh,1E7);m=bh(q,"DVRWindowLength",jh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=bh(q,"CanSeek",lh,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.je(p);m=bh(q,
|
|
1062
1062
|
"Duration",jh,Infinity);l||a.i.Za(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=Vg(q,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];p=t(p);for(u=p.next();!u.done;u=p.next())m=m.concat(Vg(u.value,"ProtectionHeader"));if(m.length){p=[];for(u=0;u<m.length;u++){var x=m[u],w=x.attributes.SystemID.toLowerCase(),z=n[w];if(z){var v=ow(x);if(v)a:{v=t(Yg(v,"DATA"));for(var B=v.next();!B.done;B=v.next())if(B=Zg(B.value,"KID")){v=ud(Wg(B));v=new Uint8Array([v[3],v[2],v[1],v[0],v[5],
|
|
1063
|
-
v[4],v[7],v[6]].concat(y(v.slice(8))));v=
|
|
1063
|
+
v[4],v[7],v[6]].concat(y(v.slice(8))));v=wd(v);break a}v=null}else v=null;B=ud(Wg(x));w=vd(w.replace(/-/g,""));w=[{initData:Ng(B,w,new Set,0),initDataType:"cenc",keyId:v}];w=Bd(z,"cenc",w);v&&w.keyIds.add(v);if(z=qw.get(z))w.licenseServerUri=z(x);p.push(w)}}n=p}else n=[];u=n;p=[];n=[];m=[];q=Vg(q,"StreamIndex");q=t(q);for(x=q.next();!x.done;x=q.next()){x=x.value;z=Vg(x,"QualityLevel");w=l.timescale;v=l.duration;B=Vg(x,"c");for(var A=[],D=0,F=0;F<B.length;++F){var J=B[F],I=B[F+1],E=bh(J,"t",jh),H=
|
|
1064
1064
|
bh(J,"d",jh);J=bh(J,"r",hh);if(!H)break;E=null!=E?E:D;J=J||0;if(0>J)if(I){I=bh(I,"t",jh);if(null==I)break;else if(E>=I)break;J=Math.ceil((I-E)/H)-1}else{if(Infinity==v)break;else if(E/w>=v)break;J=Math.ceil((v*w-E)/H)-1}for(I=0;I<=J;++I)D=E+H,A.push({start:E/w,end:D/w,Kf:E}),E=D}w=A;z=t(z);for(v=z.next();!v.done;v=z.next())(v=Uw(a,x,v.value,w,u,l))&&("audio"!=v.type||a.g.disableAudio?"video"!=v.type||a.g.disableVideo?v.type!=Id||a.g.disableText||m.push(v):n.push(v):p.push(v))}q=[];p=t(0<p.length?
|
|
1065
1065
|
p:[null]);for(u=p.next();!u.done;u=p.next())for(u=u.value,x=t(0<n.length?n:[null]),v=x.next();!v.done;v=x.next())z=q,w=z.push,v=v.value,B=0,u&&u.bandwidth&&0<u.bandwidth&&(B+=u.bandwidth),v&&v.bandwidth&&0<v.bandwidth&&(B+=v.bandwidth),v={id:a.s++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!v&&v.primary,audio:u,video:v,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(z,v);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
|
|
1066
1066
|
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},a.i.Xd());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);G(k)})}
|
|
@@ -1073,7 +1073,7 @@ z),w,b,d);w.segmentIndex=new Dk(z);return Promise.resolve()};w.closeSegmentIndex
|
|
|
1073
1073
|
function Xw(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;
|
|
1074
1074
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Yw(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 Zw(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1075
1075
|
function $w(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={Pc:g.Pc},h=e.next())g.Pc=h.value,d.push(new vi(g.Pc.start,g.Pc.end,function(k){return function(){return Ad(a.l,[f.replace("{start time}",String(k.Pc.Kf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Rw);var Ww="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Vw={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1076
|
-
li["application/vnd.ms-sstr+xml"]=function(){return new Rw};function ax(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"]};e=null;try{e=md(b)}catch(g){}throw new Q(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function bx(){}function cx(a,b,c,d,e){var f=new dx;ug(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ex,h={Rf:!1,Jg:!1};a=fx(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 Sf(a,function(){h.Rf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Jg=!0;g.abort()});k.
|
|
1076
|
+
li["application/vnd.ms-sstr+xml"]=function(){return new Rw};function ax(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"]};e=null;try{e=md(b)}catch(g){}throw new Q(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function bx(){}function cx(a,b,c,d,e){var f=new dx;ug(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ex,h={Rf:!1,Jg:!1};a=fx(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 Sf(a,function(){h.Rf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Jg=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1077
1077
|
function fx(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:return h=gx,k=hx,q=n=0,p=Date.now(),ra(A,2),C(A,h(a,c),4);case 4:l=A.h;f(ix(l.headers));if("HEAD"==c.method){A.u(5);break}u=l.clone().body.getReader();w=(x=l.headers.get("Content-Length"))?parseInt(x,10):0;z=function(D){function F(){var J,I;return L(function(E){switch(E.g){case 1:return ra(E,2),C(E,u.read(),4);case 4:J=E.h;ta(E,3);break;case 2:return va(E),E.return();case 3:if(J.done){E.u(5);break}n+=
|
|
1078
1078
|
J.value.byteLength;if(!g){E.u(5);break}return C(E,g(J.value),5);case 5:I=Date.now();if(100<I-p||J.done)e(I-p,n-q,w-n),q=n,p=I;J.done?D.close():(D.enqueue(J.value),F());G(E)}})}F()};new k({start:z});return C(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ta(A,3);break;case 2:v=va(A);if(d.Rf)throw new Q(1,1,7001,a,b);if(d.Jg)throw new Q(1,1,1003,a,b);throw new Q(1,1,1002,a,v,b);case 3:return B=ix(l.headers),A.return(ax(B,m,l.status,a,l.url,b))}})}
|
|
1079
1079
|
function ix(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function jx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",bx);bx.isSupported=jx;bx.parse=cx;var gx=window.fetch,ex=window.AbortController,hx=window.ReadableStream,dx=window.Headers;
|
|
@@ -1104,7 +1104,7 @@ Yx.prototype.Yc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[]
|
|
|
1104
1104
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1105
1105
|
function Zx(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,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,
|
|
1106
1106
|
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 $x(){Ex.apply(this,arguments)}na($x,Ex);r=$x.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 Ix(this,a,b)};r.Yc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ay(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ay.prototype;
|
|
1107
|
-
r.init=function(){var a=this,b=new Rf,c=!1,d=new Mc(function(){c=!0;b.reject(new Q(2,9,9017))});d.
|
|
1107
|
+
r.init=function(){var a=this,b=new Rf,c=!1,d=new Mc(function(){c=!0;b.reject(new Q(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 Tx(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Yx(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1108
1108
|
new Yx(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new $x(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Jx(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 Q(2,
|
|
1109
1109
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),G(b)}})};
|
|
1110
1110
|
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};
|
|
@@ -1125,10 +1125,10 @@ r.onInitialVariantChosen=function(){};r.banLocation=function(){};li["application
|
|
|
1125
1125
|
function ny(a,b){var c=new Kx;return Vf(void 0).va(function(){return c.init()}).va(function(){return Ox(c,b.fb(),b.Ba())}).va(function(d){return d.getSegments([b.key()])}).va(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",ly);ly.plugin=my;eg("offline",my);function oy(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),x=u.next();!x.done;x=u.next())if(x=x.value,py(x.info,q)){x.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=qy(a,b,g);return C(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)}})}
|
|
1126
1126
|
function qy(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new oh({zb:b,onError:function(){},ee:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),C(f,wh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==
|
|
1127
1127
|
h.g)return ra(h,2),C(h,Ih(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);va(h);G(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function py(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Lb(a.audioCapabilities,b.audioCapabilities,c)&&Lb(a.videoCapabilities,b.videoCapabilities,c)};function ry(a,b,c){var d=b.presentationTimeline.getDuration();b=sy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ty(a,b){var c=fy(new ey(a.fb(),a.Ba()),b),d=b.appMetadata||{};c=sy(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}}
|
|
1128
|
-
function sy(a){var b=[],c=kf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Xe(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Ye(c.value));return b};function uy(){this.g={}}function vy(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 wy(a,b){a.g[b.id]=b.bandwidth||2048}function xy(a,b){a=a.g[b];null==a&&(a=0);return a};function yy(a){var b=this;if(a&&a.constructor!=X)throw new Q(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.
|
|
1129
|
-
case 4:b.h=null,b.g=null,G(k)}})})}function zy(){if(Nc())a:{var a=t(Lx.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=yy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Rl(a,b));return cm(this.h,a)};r.getConfiguration=function(){var a=Zl();cm(a,this.h,Zl());return a};r.
|
|
1128
|
+
function sy(a){var b=[],c=kf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Xe(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Ye(c.value));return b};function uy(){this.g={}}function vy(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 wy(a,b){a.g[b.id]=b.bandwidth||2048}function xy(a,b){a=a.g[b];null==a&&(a=0);return a};function yy(a){var b=this;if(a&&a.constructor!=X)throw new Q(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Zb()):(this.h=Zl(),this.g=new dg);this.i=[];this.j=[];var c=!a;this.l=new pg(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return ux(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 C(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return C(k,b.g.destroy(),4);
|
|
1129
|
+
case 4:b.h=null,b.g=null,G(k)}})})}function zy(){if(Nc())a:{var a=t(Lx.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=yy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Rl(a,b));return cm(this.h,a)};r.getConfiguration=function(){var a=Zl();cm(a,this.h,Zl());return a};r.Zb=function(){return this.g};
|
|
1130
1130
|
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new tx(this.g);this.j.push(f);b=Ay(this,a,b||{},function(){var g;return L(function(h){if(1==h.g)return c?h.u(2):C(h,Jm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=ki(a,c||null);return h.return(g())})},e,f);b=new Sf(b,function(){return ux(f)});b.finally(function(){Kb(d.j,f)});return By(this,b)};
|
|
1131
|
-
function Ay(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:return Cy(),h=g=null,k=new Kx,n=m=l=null,ra(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Dy(a,b,g,e),6);case 6:q=A.h;Ey(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.
|
|
1131
|
+
function Ay(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,x,w,z,v,B;return L(function(A){switch(A.g){case 1:return Cy(),h=g=null,k=new Kx,n=m=l=null,ra(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Dy(a,b,g,e),6);case 6:q=A.h;Ey(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.dc();if(!p)throw new Q(2,9,9005,b);return C(A,a.rc(q,function(D){n=n||D},e),7);case 7:h=A.h;Ey(a);if(n)throw n;return C(A,Fy(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Ey(a),C(A,Mx(k),10);case 10:return l=A.h,Ey(a),u=Gy(h,
|
|
1132
1132
|
q,b,c,e,f),x=u.Sh,w=u.Hf,C(A,l.Ba.addManifests([x]),11);case 11:z=A.h;Ey(a);m=z[0];Ey(a);if(n)throw n;return C(A,Hy(a,w,m,x,f,e,l.Ba,q,h),12);case 12:return Ey(a),Iy(q,x,h,e),C(A,l.Ba.updateManifest(m,x),13);case 13:return Ey(a),v=new cy("manifest",l.path.fb,l.path.Ba,m),A.return(ty(v,x));case 3:return wa(A),C(A,k.destroy(),14);case 14:if(!g){A.u(15);break}return C(A,g.stop(),15);case 15:if(!h){A.u(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.u(19);break}return C(A,
|
|
1133
1133
|
Jy(m),19);case 19:throw n||B;}})}
|
|
1134
1134
|
function Hy(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,x,w,z,v;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var F,J,I,E,H,K,M;return L(function(O){if(1==O.g){F={};J=t(A);for(I=J.next();!I.done;F={Ob:F.Ob},I=J.next())F.Ob=I.value,E=qx(F.Ob,f),H=F.Ob.i,K=F.Ob.h,M=function(N){return function(U){var R,V,xa;return L(function(Ca){if(1==Ca.g)return C(Ca,g.addSegments([{data:U}]),2);R=Ca.h;Ey(a);V=N.Ob.g;xa=px(V);l[xa]=R[0];m+=U.byteLength;G(Ca)})}}(F),wx(e,F.Ob.groupId,E,H,K,M);return C(O,yx(e),
|
|
@@ -1157,7 +1157,7 @@ function Qy(a,b){return L(function(c){if(1==c.g)return a.i.push(b),sa(c,2),C(c,b
|
|
|
1157
1157
|
function Vy(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Qx(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Uy(d,!1),videoCapabilities:Uy(d,!0)}});return C(h,oy(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1158
1158
|
function Zy(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}
|
|
1159
1159
|
function Ny(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());}P("shaka.offline.Storage",yy);yy.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new Kx,sa(b,2),C(b,Rx(a),2)):5!=b.g?(wa(b),C(b,a.destroy(),5)):ya(b,0)})};
|
|
1160
|
-
yy.prototype.list=yy.prototype.list;yy.prototype.removeEmeSessions=yy.prototype.ji;yy.prototype.remove=yy.prototype.remove;yy.prototype.store=yy.prototype.store;yy.prototype.getNetworkingEngine=yy.prototype.
|
|
1160
|
+
yy.prototype.list=yy.prototype.list;yy.prototype.removeEmeSessions=yy.prototype.ji;yy.prototype.remove=yy.prototype.remove;yy.prototype.store=yy.prototype.store;yy.prototype.getNetworkingEngine=yy.prototype.Zb;yy.prototype.getConfiguration=yy.prototype.getConfiguration;yy.prototype.configure=yy.prototype.configure;yy.prototype.destroy=yy.prototype.destroy;yy.support=zy;
|
|
1161
1161
|
var Oy=(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");Xo.offline=zy;function bz(){}function cz(a,b){a={priority:b||0,callback:a};for(b=0;b<dz.length;b++)if(dz[b].priority<a.priority){dz.splice(b,0,a);return}dz.push(a)}P("shaka.polyfill",bz);bz.register=cz;bz.installAll=function(){for(var a=t(dz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Wa("Error installing polyfill!",c)}}};var dz=[];function ez(){this.g=new fz}function gz(){window.AbortController||(window.AbortController=ez,window.AbortSignal=fz)}ez.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new S("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(ez.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});bz.AbortController=ez;ez.install=gz;
|
|
1162
1162
|
function fz(){ag.call(this);this.h=!1;this.g=void 0;this.onabort=null}na(fz,ag);da.Object.defineProperties(fz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});cz(gz);function hz(){}function iz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())jz(b.value)}function jz(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)}})}bz.Aria=hz;hz.install=iz;cz(iz);function kz(){}function lz(){mz()}bz.EncryptionScheme=kz;kz.install=lz;cz(lz,-2);function nz(){}
|
|
1163
1163
|
function oz(){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}}),
|
|
@@ -1175,40 +1175,40 @@ function Cz(){var a=MediaSource.isTypeSupported;Wc()||(MediaSource.isTypeSupport
|
|
|
1175
1175
|
function Gz(){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 Hz;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}bz.Orientation=Dz;Dz.install=Ez;function Hz(){ag.call(this);this.type="";this.angle=0}na(Hz,ag);
|
|
1176
1176
|
Hz.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)};
|
|
1177
1177
|
Hz.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};cz(Ez);function Iz(){}var Jz,Kz,Lz,Mz,Nz,Oz;function Pz(a,b){try{var c=new Qz(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Rz(a){var b=this.mediaKeys;b&&b!=a&&Sz(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Sz(a,this):Promise.resolve()}
|
|
1178
|
-
function Tz(a){a=Ab(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=
|
|
1178
|
+
function Tz(a){a=Ab(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=id(a.subarray(4),!0);a=nd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Bb(a);this.dispatchEvent(b)}bz.PatchedMediaKeysApple=Iz;
|
|
1179
1179
|
Iz.uninstall=function(){Jz&&(Jz=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Kz),HTMLMediaElement.prototype.setMediaKeys=Lz,window.MediaKeys=Mz,window.MediaKeySystemAccess=Nz,navigator.requestMediaKeySystemAccess=Oz,Kz=Oz=Lz=Nz=Mz=null,window.shakaMediaKeysPolyfill=!1)};
|
|
1180
1180
|
Iz.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Jz=!0,Kz=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Lz=HTMLMediaElement.prototype.setMediaKeys,Mz=window.MediaKeys,Nz=window.MediaKeySystemAccess,Oz=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Rz;window.MediaKeys=Uz;window.MediaKeySystemAccess=Qz;navigator.requestMediaKeySystemAccess=
|
|
1181
1181
|
Pz;window.shakaMediaKeysPolyfill=!0}};
|
|
1182
1182
|
function Qz(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,
|
|
1183
1183
|
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;}
|
|
1184
|
-
Qz.prototype.createMediaKeys=function(){var a=new Uz(this.keySystem);return Promise.resolve(a)};Qz.prototype.getConfiguration=function(){return this.g};function Uz(a){this.h=new WebKitMediaKeys(a);this.g=new
|
|
1185
|
-
function Sz(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",Tz);try{return ok(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Uz.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Vz(a){ag.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new
|
|
1186
|
-
r.generateRequest=function(a,b){var c=this;this.h=new Rf;try{var d=this.l.createSession("video/mp4",Ab(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.
|
|
1184
|
+
Qz.prototype.createMediaKeys=function(){var a=new Uz(this.keySystem);return Promise.resolve(a)};Qz.prototype.getConfiguration=function(){return this.g};function Uz(a){this.h=new WebKitMediaKeys(a);this.g=new db}Uz.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Vz(this.h,a)};Uz.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1185
|
+
function Sz(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",Tz);try{return ok(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Uz.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Vz(a){ag.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new db;this.sessionId="";this.expiration=NaN;this.closed=new Rf;this.keyStatuses=new Wz}na(Vz,ag);r=Vz.prototype;
|
|
1186
|
+
r.generateRequest=function(a,b){var c=this;this.h=new Rf;try{var d=this.l.createSession("video/mp4",Ab(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.bc()?"license-request":"license-renewal").set("message",Bb(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Xz(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1187
1187
|
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:Xz(c,"output-not-allowed");break;default:Xz(c,"internal-error")}});Xz(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1188
1188
|
r.update=function(a){this.g=new Rf;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}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 Xz(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}
|
|
1189
|
-
function Wz(){this.size=0;this.g=void 0}r=Wz.prototype;r.
|
|
1189
|
+
function Wz(){this.size=0;this.g=void 0}r=Wz.prototype;r.bc=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,bi.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bi.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Yz(){}function Zz(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=$z,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=aA,window.MediaKeys=bA,window.MediaKeySystemAccess=cA,window.shakaMediaKeysPolyfill=!0)}function $z(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1190
1190
|
function aA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}bz.PatchedMediaKeysNop=Yz;Yz.install=Zz;function bA(){throw new TypeError("Illegal constructor.");}bA.prototype.createSession=function(){};bA.prototype.setServerCertificate=function(){};bA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function cA(){this.keySystem="";throw new TypeError("Illegal constructor.");}cA.prototype.getConfiguration=function(){};
|
|
1191
1191
|
cA.prototype.createMediaKeys=function(){};cz(Zz,-10);function dA(){}
|
|
1192
1192
|
function eA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)fA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=gA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=hA;window.MediaKeys=iA;window.MediaKeySystemAccess=jA;window.shakaMediaKeysPolyfill=!0}}
|
|
1193
1193
|
function kA(a){var b=fA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function gA(a,b){try{var c=new jA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function hA(a){var b=this.mediaKeys;b&&b!=a&&lA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&lA(a,this);return Promise.resolve()}bz.PatchedMediaKeysWebkit=dA;dA.install=eA;
|
|
1194
1194
|
function jA(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),
|
|
1195
1195
|
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"]):
|
|
1196
|
-
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;}jA.prototype.createMediaKeys=function(){var a=new iA(this.g);return Promise.resolve(a)};jA.prototype.getConfiguration=function(){return this.h};function iA(a){this.l=a;this.h=null;this.g=new
|
|
1197
|
-
function lA(a,b){a.h=b;a.g.ib();var c=fA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=mA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.
|
|
1196
|
+
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;}jA.prototype.createMediaKeys=function(){var a=new iA(this.g);return Promise.resolve(a)};jA.prototype.getConfiguration=function(){return this.h};function iA(a){this.l=a;this.h=null;this.g=new db;this.i=[];this.j=new Map}
|
|
1197
|
+
function lA(a,b){a.h=b;a.g.ib();var c=fA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=mA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.bc()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=mA(a,d.sessionId))nA(d,"usable"),
|
|
1198
1198
|
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=mA(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?nA(e,"output-restricted"):1==f?nA(e,"expired"):nA(e,"internal-error"))}}))}
|
|
1199
1199
|
iA.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 oA(b,this.l,a);this.i.push(a);return a};iA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};iA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1200
1200
|
function mA(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 oA(a,b,c){ag.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 Rf;this.keyStatuses=new pA}na(oA,ag);
|
|
1201
|
-
function qA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(nd("LOAD_SESSION|"+c));else{var e=nd("PERSISTENT|");d=zd(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Rf;var f=kA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).
|
|
1201
|
+
function qA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(nd("LOAD_SESSION|"+c));else{var e=nd("PERSISTENT|");d=zd(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Rf;var f=kA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
|
|
1202
1202
|
function rA(a,b,c){if(a.g)a.g.then(function(){return rA(a,b,c)}).catch(function(){return rA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=hd(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=ud(e.keys[0].k);e=ud(e.keys[0].kid)}else d=Ab(c),e=null;var f=kA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1203
1203
|
function nA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}r=oA.prototype;r.generateRequest=function(a,b){return qA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?qA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Rf;rA(this,b,a);return b};
|
|
1204
|
-
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=kA("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 pA(){this.size=0;this.g=void 0}r=pA.prototype;r.
|
|
1204
|
+
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=kA("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 pA(){this.size=0;this.g=void 0}r=pA.prototype;r.bc=function(){return this.g};
|
|
1205
1205
|
r.forEach=function(a){this.g&&a(this.g,bi.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=bi.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var fA="";cz(eA);function sA(){}function tA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=uA,Object.defineProperty(a,"disablePictureInPicture",{get:vA,set:wA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=xA,document.addEventListener("webkitpresentationmodechanged",yA,!0))}}
|
|
1206
1206
|
function yA(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)}
|
|
1207
1207
|
function uA(){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 xA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1208
1208
|
function vA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function wA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}bz.PiPWebkit=sA;sA.install=tA;cz(tA);function zA(){}function AA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=BA))}function BA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}bz.RandomUUID=zA;zA.install=AA;cz(AA);function CA(){}function DA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:EA})}function EA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}bz.Symbol=CA;CA.install=DA;cz(DA);function FA(){}function GA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}bz.VideoPlayPromise=FA;FA.install=GA;cz(GA);function HA(){}function IA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Wc()&&38===Yc())&&(a.getVideoPlaybackQuality=JA)}}function JA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}bz.VideoPlaybackQuality=HA;HA.install=IA;cz(IA);function KA(){}function LA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=MA;else if(6==b)a=NA;else{try{var c=!!MA(1,2,"")}catch(d){c=!1}c&&(a=MA)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function MA(a,b,c){return new window.TextTrackCue(a,b,c)}function NA(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}bz.VTTCue=KA;KA.install=LA;cz(LA);function OA(){}OA.prototype.parseInit=function(){};OA.prototype.setSequenceMode=function(){};OA.prototype.setManifestType=function(){};OA.prototype.parseMedia=function(a,b){var c=null,d=[];a=hd(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=PA.exec(e))){var f=QA.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Nb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1209
1209
|
P("shaka.text.LrcTextParser",OA);OA.prototype.parseMedia=OA.prototype.parseMedia;OA.prototype.setManifestType=OA.prototype.setManifestType;OA.prototype.setSequenceMode=OA.prototype.setSequenceMode;OA.prototype.parseInit=OA.prototype.parseInit;var PA=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,QA=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ee["application/x-subtitle-lrc"]=function(){return new OA};function RA(){}RA.prototype.parseInit=function(){};RA.prototype.setSequenceMode=function(){};RA.prototype.setManifestType=function(){};
|
|
1210
1210
|
RA.prototype.parseMedia=function(a,b,c){var d=hd(a);a=[];if(""==d)return a;var e=Pg(d,"tt");if(!e)throw new Q(2,2,2005,"Failed to parse TTML.");d=Yg(e,"body")[0];if(!d)return[];var f=dh(e,SA,"frameRate"),g=dh(e,SA,"subFrameRate"),h=dh(e,SA,"frameRateMultiplier"),k=dh(e,SA,"tickRate"),l=dh(e,SA,"cellResolution"),m=e.attributes["xml:space"]||"default",n=dh(e,TA,"extent");if("default"!=m&&"preserve"!=m)throw new Q(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new UA(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
|
|
1211
|
-
{
|
|
1211
|
+
{Sb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=Yg(e,"metadata")[0])?g.children:[];h=Yg(e,"style");e=Yg(e,"region");k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new Ob;var x=u.attributes["xml:id"];if(x){p.id=x;var w=null;n&&(w=VA.exec(n)||WA.exec(n));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var z,v=XA(u,h,"extent");if(v){var B=(z=VA.exec(v))||WA.exec(v);null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=x&&(p.width=100*p.width/x),null!=w&&(p.height=
|
|
1212
1212
|
100*p.height/w)),p.widthUnits=z||null!=x?gc:0,p.heightUnits=z||null!=w?gc:0)}if(u=XA(u,h,"origin"))if(B=(z=VA.exec(u))||WA.exec(u),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?v||(p.width=100-p.viewportAnchorX,p.widthUnits=gc,p.height=100-p.viewportAnchorY,p.heightUnits=gc):(null!=w&&(p.viewportAnchorY=100*p.viewportAnchorY/w),null!=x&&(p.viewportAnchorX=100*p.viewportAnchorX/x)),p.viewportAnchorUnits=z||null!=x?gc:0}else p=null;p&&k.push(p)}if(Vg(d,"p").length)throw new Q(2,
|
|
1213
1213
|
2,2001,"<p> can only be inside <div> in TTML");n=t(Vg(d,"div"));for(q=n.next();!q.done;q=n.next())if(Vg(q.value,"span").length)throw new Q(2,2,2001,"<span> can only be inside <p> in TTML");if(b=YA(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1214
1214
|
function YA(a,b,c,d,e,f,g,h,k,l,m,n){var q=l;if(Tg(a)){if(!m)return null;var p={tagName:"span",children:[Wg(a)],attributes:{},parent:null}}else p=a;for(var u=null,x=t(ZA),w=x.next();!w.done&&!(u=$A(p,"backgroundImage",d,"#",w.value)[0]);w=x.next());x=null;var z=dh(p,ZA,"backgroundImage");n&&z&&!z.startsWith("#")&&(w=new rc(n),z=new rc(z),(w=w.resolve(z).toString())&&(x=w));if("p"==a.tagName||u||x)m=!0;a=m;w="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));z=p.children.every(Tg);h=
|
|
@@ -1312,19 +1312,19 @@ r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?
|
|
|
1312
1312
|
r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!pj(f)){for(var g=Ki(f),h=g.length;h<f.length;h++)if(qC(f,h))return Promise.reject(new Q(2,3,3018));for(h=g.length;h<f.length;h++)if(VB(f,h))return this.h||(this.h=new XB("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new Q(2,3,3018))}this.j?this.j.clearData():this.j=new ij;var k=this.j.parse(f),l=[],m=k.bd();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],p=null,u=[],x=k.xc();if(!x.length)throw new Q(2,3,
|
|
1313
1313
|
3023);for(var w=0;w<x.length;w++){var z=x[w],v=z.nalus;u.push.apply(u,y(v));var B=eC(v);if(B){null==p&&(p=z.dts);var A=void 0;A=w+1<x.length?(x[w+1].dts||0)-(z.dts||0):1<x.length?(z.dts||0)-(x[w-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:B.data,size:B.data.byteLength,duration:A,Ta:Math.round((z.pts||0)-(z.dts||0)),flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:B.jd?2:1,Wa:B.jd?0:1}})}}var D=cC(u);if(!D||null==p)throw new Q(2,3,3018);b.height=D.height;b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",
|
|
1314
1314
|
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Sa:[],ga:new Uint8Array([]),oa:D.oa,xa:D.xa,ya:D.ya,data:{jb:this.g,baseMediaDecodeTime:p,Ra:q},stream:b};break;case "hvc":var F=[],J=null,I=[],E=k.xc();if(!E.length)throw new Q(2,3,3023);for(var H=0;H<E.length;H++){var K=E[H],M=K.nalus;I.push.apply(I,y(M));for(var O=!1,N=[],U=!1,R=t(M),V=R.next();!V.done;V=R.next()){var xa=V.value;switch(xa.type){case 1:case 0:var Ca=U=!0;break;case 19:case 20:case 21:O=Ca=U=!0;break;case 32:Ca=
|
|
1315
|
-
!0;break;case 33:Ca=!0;break;case 34:Ca=!0;break;case 35:U=Ca=!0;break;case 39:case 40:Ca=!0;break;default:Ca=!1}if(U&&Ca){var
|
|
1315
|
+
!0;break;case 33:Ca=!0;break;case 34:Ca=!0;break;case 35:U=Ca=!0;break;case 39:case 40:Ca=!0;break;default:Ca=!1}if(U&&Ca){var eb=xa.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=eb>>24&255;Fa[1]=eb>>16&255;Fa[2]=eb>>8&255;Fa[3]=eb&255;N.push(Fa);N.push(xa.fullData)}}var Va=N.length?{data:zd.apply(rd,y(N)),jd:O}:null;if(Va){null==J&&null!=K.dts&&(J=K.dts);var ua=void 0;ua=H+1<E.length?(E[H+1].dts||0)-(K.dts||0):1<E.length?(K.dts||0)-(E[H-1].dts||0):9E4*(c.endTime-c.startTime);F.push({data:Va.data,
|
|
1316
1316
|
size:Va.data.byteLength,duration:ua,Ta:Math.round((K.pts||0)-(K.dts||0)),flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:Va.jd?2:1,Wa:Va.jd?0:1}})}}var kb=fC(I);if(!kb||null==J)throw new Q(2,3,3018);b.height=kb.height;b.width=kb.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Sa:[],ga:new Uint8Array([]),oa:kb.oa,xa:kb.xa,ya:kb.ya,data:{jb:this.g,baseMediaDecodeTime:J,Ra:F},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var yb=
|
|
1317
|
-
[],hb,Za=null,$e=t(k.Fb()),
|
|
1318
|
-
3,3018);Za=9E4*c.startTime;var $d=Gd("audio",b.codecs.split(","));if(!$d||!b.channelsCount||!b.audioSamplingRate)throw new Q(2,3,3018);hb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ea:$d};var
|
|
1319
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:si,duration:d,Sa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:ti,Ra:yb},stream:b};break;case "ac3":for(var bf=[],ae=0,cf=new Uint8Array([]),Sb=null,
|
|
1320
|
-
bf.push({data:
|
|
1321
|
-
|
|
1322
|
-
duration:d,Sa:[],ga:
|
|
1323
|
-
3,3018);var
|
|
1324
|
-
break;case 5:ub=[1,3,2,0,4,1,2,3];break;case 6:ub=[1,4,2,0,4,1,2,3,5];break;case 7:ub=[1,4,2,0,4,1,2,3,5,6];break;case 8:ub=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:ub=[1,1,2,0,1];break;case 131:ub=[1,1,3,0,1,2];break;case 132:ub=[1,1,4,0,1,2,3];break;case 133:ub=[1,1,5,0,1,2,3,4];break;case 134:ub=[1,1,6,0,1,2,3,4,5];break;case 135:ub=[1,1,7,0,1,2,3,4,5,6];break;case 136:ub=[1,1,8,0,1,2,3,4,5,6,7]}var
|
|
1325
|
-
8&255,Kc.sampleRate>>>0&255,0,0].concat(y(ub)));for(var
|
|
1326
|
-
3,3018);b.audioSamplingRate=Kc.sampleRate;b.channelsCount=Kc.channelCount;var TC=fj/9E4*
|
|
1327
|
-
this.i.get(b.id);else
|
|
1317
|
+
[],hb,Za=null,$e=t(k.Fb()),xd=$e.next();!xd.done;xd=$e.next()){var Yd=xd.value,jd=Yd.data;if(jd){var Bc=0;hb=UB(jd,Bc);if(!hb)throw new Q(2,3,3018);b.audioSamplingRate=hb.sampleRate;b.channelsCount=hb.channelCount;null==Za&&null!==Yd.pts&&(Za=Yd.pts);for(;Bc<jd.length;){var Zd=TB(jd,Bc);if(Zd){var af=Zd.Qd+Zd.U;Bc+af<=jd.length&&yb.push({data:jd.subarray(Bc+Zd.Qd,Bc+af),size:Zd.U,duration:1024,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}});Bc+=af}else Bc++}}}if(!hb||null==Za){if(!k.xc().length)throw new Q(2,
|
|
1318
|
+
3,3018);Za=9E4*c.startTime;var $d=Gd("audio",b.codecs.split(","));if(!$d||!b.channelsCount||!b.audioSamplingRate)throw new Q(2,3,3018);hb={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ea:$d};var yd=WB($d,b.channelsCount);if(!yd)throw new Q(2,3,3018);for(var ri=Za+9E4*(c.endTime-c.startTime),sg=Za;sg<ri;)yb.push({data:yd,size:yd.byteLength,duration:1024,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}}),sg+=1024/hb.sampleRate*9E4}var si=hb.sampleRate,ti=Za/9E4*si;n={id:b.id,type:"audio",codecs:hb.Ea,
|
|
1319
|
+
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:si,duration:d,Sa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:ti,Ra:yb},stream:b};break;case "ac3":for(var bf=[],ae=0,cf=new Uint8Array([]),Sb=null,Wt=t(k.Fb()),um=Wt.next();!um.done;um=Wt.next()){var vm=um.value,wm=vm.data;null==Sb&&null!==vm.pts&&(Sb=vm.pts);for(var mf=0;mf<wm.length;){var Dd=YB(wm,mf);Dd?(b.audioSamplingRate=Dd.sampleRate,b.channelsCount=Dd.channelCount,ae=Dd.sampleRate,cf=Dd.ga,
|
|
1320
|
+
bf.push({data:wm.subarray(mf,mf+Dd.U),size:Dd.U,duration:1536,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}}),mf+=Dd.U):mf++}}if(0==ae||0==cf.byteLength||null==Sb)throw new Q(2,3,3018);var OC=Sb/9E4*ae;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ae,duration:d,Sa:[],ga:cf,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:OC,Ra:bf},stream:b};break;case "ec3":for(var Xt=[],bj=0,xm=new Uint8Array([]),cj=null,Yt=t(k.Fb()),ym=Yt.next();!ym.done;ym=
|
|
1321
|
+
Yt.next()){var zm=ym.value,Am=zm.data;null==cj&&null!==zm.pts&&(cj=zm.pts);for(var nf=0;nf<Am.length;){var Ed=aC(Am,nf);Ed?(b.audioSamplingRate=Ed.sampleRate,b.channelsCount=Ed.channelCount,bj=Ed.sampleRate,xm=Ed.ga,Xt.push({data:Am.subarray(nf,nf+Ed.U),size:Ed.U,duration:1536,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}}),nf+=Ed.U):nf++}}if(0==bj||0==xm.byteLength||null==cj)throw new Q(2,3,3018);var PC=cj/9E4*bj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:bj,
|
|
1322
|
+
duration:d,Sa:[],ga:xm,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:PC,Ra:Xt},stream:b};break;case "mp3":for(var Zt=[],dj,ej=null,$t=t(k.Fb()),Bm=$t.next();!Bm.done;Bm=$t.next()){var Cm=Bm.value,Gg=Cm.data;if(Gg){null==ej&&null!==Cm.pts&&(ej=Cm.pts);for(var fe=0;fe<Gg.length;){var of=kC(Gg,fe);of?(dj||(dj=of),fe+of.U<=Gg.length&&Zt.push({data:Gg.subarray(fe,fe+of.U),size:of.U,duration:1152,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}}),fe+=of.U):fe++}}}if(!dj||null==ej)throw new Q(2,
|
|
1323
|
+
3,3018);var au=dj.sampleRate,QC=ej/9E4*au;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:au,duration:d,Sa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:QC,Ra:Zt},stream:b};break;case "opus":var bu=[],fj=null,Kc=k.F;if(!Kc)throw new Q(2,3,3018);var ub=[];switch(Kc.Zg){case 1:case 2:ub=[0];break;case 0:ub=[255,1,1,0,1];break;case 128:ub=[255,2,0,0,1];break;case 3:ub=[1,2,1,0,2,1];break;case 4:ub=[1,2,2,0,1,2,3];
|
|
1324
|
+
break;case 5:ub=[1,3,2,0,4,1,2,3];break;case 6:ub=[1,4,2,0,4,1,2,3,5];break;case 7:ub=[1,4,2,0,4,1,2,3,5,6];break;case 8:ub=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:ub=[1,1,2,0,1];break;case 131:ub=[1,1,3,0,1,2];break;case 132:ub=[1,1,4,0,1,2,3];break;case 133:ub=[1,1,5,0,1,2,3,4];break;case 134:ub=[1,1,6,0,1,2,3,4,5];break;case 135:ub=[1,1,7,0,1,2,3,4,5,6];break;case 136:ub=[1,1,8,0,1,2,3,4,5,6,7]}var cu=new Uint8Array([0,Kc.channelCount,0,0,Kc.sampleRate>>>24&255,Kc.sampleRate>>>17&255,Kc.sampleRate>>>
|
|
1325
|
+
8&255,Kc.sampleRate>>>0&255,0,0].concat(y(ub)));for(var du=Kc.sampleRate,eu=t(k.Fb()),Dm=eu.next();!Dm.done;Dm=eu.next()){var Em=Dm.value,pf=Em.data;null==fj&&null!==Em.pts&&(fj=Em.pts);for(var Hg=0;Hg<pf.length;){for(var RC=0!==(pf[Hg+1]&16),SC=0!==(pf[Hg+1]&8),kd=Hg+2,gj=0;255===pf[kd];)gj+=255,kd+=1;gj+=pf[kd];kd+=1;kd+=RC?2:0;kd+=SC?2:0;var fu=pf.slice(kd,kd+gj);bu.push({data:fu,size:fu.byteLength,duration:960,Ta:0,flags:{Va:0,Na:0,Ma:0,Ja:0,Ka:2,Wa:0}});Hg=kd+gj}}if(0==cu.byteLength||null==fj)throw new Q(2,
|
|
1326
|
+
3,3018);b.audioSamplingRate=Kc.sampleRate;b.channelsCount=Kc.channelCount;var TC=fj/9E4*du;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:du,duration:d,Sa:[],ga:cu,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:TC,Ra:bu},stream:b}}n&&(l.push(n),n=null)}}catch(Fm){return Fm&&3023==Fm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Fm)}if(!l.length)return Promise.reject(new Q(2,3,3018));var gu=new rw(l);if(this.i.has(b.id))var Gm=
|
|
1327
|
+
this.i.get(b.id);else Gm=xw(gu),this.i.set(b.id,Gm);var UC=Ow(gu);this.g++;var VC=zd(Gm,UC);return Promise.resolve(VC)};P("shaka.transmuxer.TsTransmuxer",xC);xC.prototype.transmux=xC.prototype.transmux;xC.prototype.getOriginalMimeType=xC.prototype.getOriginalMimeType;xC.prototype.convertCodecs=xC.prototype.convertCodecs;xC.prototype.isSupported=xC.prototype.isSupported;xC.prototype.destroy=xC.prototype.destroy;var yC=["aac","ac-3","ec-3","mp3","opus"],zC=["avc","hevc"];
|
|
1328
1328
|
jc("video/mp2t",function(){return new xC("video/mp2t")},nc);/*
|
|
1329
1329
|
@license
|
|
1330
1330
|
EME Encryption Scheme Polyfill
|