shaka-player 3.3.5 → 3.3.6
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/.github/workflows/release-please.yaml +3 -2
- package/CHANGELOG.md +11 -0
- package/README.md +4 -4
- package/build/checkversion.py +1 -1
- package/demo/demo.less +0 -1
- package/dist/controls.css +3 -3
- package/dist/controls.css.map +1 -1
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +1 -1
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +237 -237
- package/dist/shaka-player.compiled.debug.d.ts +237 -237
- package/dist/shaka-player.compiled.debug.js +7 -7
- package/dist/shaka-player.compiled.debug.map +1 -1
- package/dist/shaka-player.compiled.js +85 -85
- package/dist/shaka-player.compiled.map +1 -1
- package/dist/shaka-player.ui.d.ts +281 -281
- package/dist/shaka-player.ui.debug.d.ts +281 -281
- package/dist/shaka-player.ui.debug.js +9 -9
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +97 -97
- package/dist/shaka-player.ui.map +2 -2
- package/lib/abr/simple_abr_manager.js +2 -1
- package/lib/hls/hls_parser.js +14 -3
- package/lib/media/drm_engine.js +3 -0
- package/lib/player.js +1 -1
- package/lib/util/mime_utils.js +14 -5
- package/package.json +2 -2
- package/test/hls/hls_live_unit.js +60 -7
- package/ui/less/containers.less +1 -1
- package/ui/less/general.less +1 -1
- package/ui/less/range_elements.less +1 -0
- package/.github/pull_request_template.md +0 -10
|
@@ -77,10 +77,10 @@ var Wb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
77
77
|
Copyright 2006 The Closure Library Authors
|
|
78
78
|
SPDX-License-Identifier: Apache-2.0
|
|
79
79
|
*/
|
|
80
|
-
function Xb(a){var b;a instanceof Xb?(Yb(this,a.
|
|
81
|
-
r.toString=function(){var a=[],b=this.
|
|
82
|
-
r.resolve=function(a){var b=this.clone();"data"===b.
|
|
83
|
-
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.va=d:c=""!==a.g.toString();c?$b(b,a.g.clone()):c=!!a.eb;c&&(b.eb=a.eb);return b};r.clone=function(){return new Xb(this)};function Yb(a,b,c){a.
|
|
80
|
+
function Xb(a){var b;a instanceof Xb?(Yb(this,a.Ea),this.pb=a.pb,this.Fa=a.Fa,Zb(this,a.Hb),this.va=a.va,$b(this,a.g.clone()),this.eb=a.eb):a&&(b=String(a).match(Wb))?(Yb(this,b[1]||"",!0),this.pb=ac(b[2]||""),this.Fa=ac(b[3]||"",!0),Zb(this,b[4]),this.va=ac(b[5]||"",!0),$b(this,b[6]||"",!0),this.eb=ac(b[7]||"")):this.g=new bc(null)}r=Xb.prototype;r.Ea="";r.pb="";r.Fa="";r.Hb=null;r.va="";r.eb="";
|
|
81
|
+
r.toString=function(){var a=[],b=this.Ea;b&&a.push(cc(b,dc,!0),":");if(b=this.Fa){a.push("//");var c=this.pb;c&&a.push(cc(c,dc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Hb;null!=b&&a.push(":",String(b))}if(b=this.va)this.Fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(cc(b,"/"==b.charAt(0)?ec:fc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.eb)&&a.push("#",cc(b,gc));return a.join("")};
|
|
82
|
+
r.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Xb);var c=!!a.Ea;c?Yb(b,a.Ea):c=!!a.pb;c?b.pb=a.pb:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Hb;var d=a.va;if(c)Zb(b,a.Hb);else if(c=!!a.va){if("/"!=d.charAt(0))if(this.Fa&&!this.va)d="/"+d;else{var e=b.va.lastIndexOf("/");-1!=e&&(d=b.va.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(""):".."==
|
|
83
|
+
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.va=d:c=""!==a.g.toString();c?$b(b,a.g.clone()):c=!!a.eb;c&&(b.eb=a.eb);return b};r.clone=function(){return new Xb(this)};function Yb(a,b,c){a.Ea=c?ac(b,!0):b;a.Ea&&(a.Ea=a.Ea.replace(/:$/,""))}function Zb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Hb=b}else a.Hb=null}function $b(a,b,c){b instanceof bc?a.g=b:(c||(b=cc(b,hc)),a.g=new bc(b))}
|
|
84
84
|
function ac(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function cc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,ic),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ic(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var dc=/[#\/\?@]/g,fc=/[#\?:]/g,ec=/[#\?]/g,hc=/[#\?@]/g,gc=/#/g;function bc(a){this.g=a||null}
|
|
85
85
|
function jc(a){if(!a.na&&(a.na={},a.yc=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=bc.prototype;r.na=null;r.yc=null;r.add=function(a,b){jc(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.yc++;return this};
|
|
86
86
|
r.set=function(a,b){jc(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new bc;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.yc=this.yc}return a};function kc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Xb(d)});return a.map(function(d){return new Xb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ob,[]).map(function(d){return d.toString()})}function lc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
@@ -91,7 +91,7 @@ var wc=new sc(function(){function a(c){try{var d=new Uint8Array(c);return 0<Stri
|
|
|
91
91
|
function Gc(a){var b=Fb(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 Hc(){for(var a=Ha.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Ac);Ac.concat=Hc;Ac.toHex=Gc;Ac.fromHex=Ec;Ac.fromBase64=Dc;Ac.toBase64=Cc;Ac.toStandardBase64=Bc;
|
|
92
92
|
Ac.equal=function(a,b){Kb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Db(a,b)};function Ic(){var a=this;this.o=Ub.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Hc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Hc.apply(Ac,ja(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Ic.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
93
93
|
function Jc(a,b){if(!Ub.get("muxjs")()||!Kc(a))return!1;if(b)return MediaSource.isTypeSupported(Lc(b,a));var c=Lc("audio",a),d=Lc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Kc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
94
|
-
function Lc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Mc(a,b){a.l=!0;a.h=new rc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Nc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Oc(a,b,c){a=Nc(a,b);
|
|
94
|
+
function Lc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Mc(a,b){a.l=!0;a.h=new rc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Nc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Oc(a,b,c){a=Nc(a,b);if(Kc(a)){if(Ub.get("muxjs")())return Lc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
|
|
95
95
|
function Pc(a){var b=Qc(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
|
|
96
96
|
case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Rc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Qc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
|
|
97
97
|
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Sc(a){this.l=null;this.i=a;this.j=this.u=0;this.m=Infinity;this.h=this.g=null;this.s="";this.o=new Map}function Tc(a){return Uc[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Sc.prototype.destroy=function(){this.i=this.l=null;this.o.clear();return Promise.resolve()};
|
|
@@ -108,7 +108,7 @@ var fd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
|
|
|
108
108
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
109
109
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
110
110
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
111
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function kd(){this.g={}}r=kd.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])};function md(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function nd(a){this.h=a;this.g=null}nd.prototype.S=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};nd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Lb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new nd(function(){b.h()})).S(a);return this};O.prototype.
|
|
111
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function kd(){this.g={}}r=kd.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])};function md(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function nd(a){this.h=a;this.g=null}nd.prototype.S=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};nd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Lb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new nd(function(){b.h()})).S(a);return this};O.prototype.Ca=function(a){var b=this;this.stop();this.g=(new nd(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ca;O.prototype.tickAfter=O.prototype.S;
|
|
112
112
|
O.prototype.tickNow=O.prototype.Lb;function od(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pd(a){return""!=qd().canPlayType(a)}function rd(){return sd("Xbox One")}function td(){return sd("Tizen")}function ud(){return sd("CrKey")}function vd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!td()}function wd(){if(!vd())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}
|
|
113
113
|
function sd(a){return(navigator.userAgent||"").includes(a)}function qd(){if(xd)return xd;yd||(yd=new O(function(){xd=null}));(xd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(xd=document.createElement("video"));yd.S(1);return xd}var yd=null,xd=null;function zd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Ad(f,b,c);f=Bd(f,d);b=Cd(f);b=Dd(b);var g=Ed(b,e);a.variants=a.variants.filter(function(h){return Fd(h)==g?!0:!1})}function Cd(a){var b=new kd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Fd(c);b.push(d,c)}return b}
|
|
114
114
|
function Dd(a){var b=0,c=new Map,d=a.size();md(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new kd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
|
|
@@ -142,9 +142,9 @@ function he(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&
|
|
|
142
142
|
je(e,a[0]):e}function je(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Vd(a){var b=[];a.audio&&b.push(ke(a.audio));a.video&&b.push(ke(a.video));return b.join(", ")}
|
|
143
143
|
function ke(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"}var be=0,Gd="smooth",Hd="powerEfficient",Jd="bandwidth";function le(){var a=this;this.l=null;this.j=!1;this.h=new Ra;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Ra;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=le.prototype;r.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};r.init=function(a){this.l=a};
|
|
144
144
|
r.chooseVariant=function(){var a=me(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(ne(this));this.i.length&&!a.length&&(a=me(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),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.m=Date.now();return c};
|
|
145
|
-
r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};r.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){var c=this.h;if(!(c.g>=c.i))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(ne(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this
|
|
146
|
-
r.
|
|
147
|
-
le.prototype.
|
|
145
|
+
r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};r.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){var c=this.h;if(!(c.g>=c.i))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(ne(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(ne(this))};r.setVariants=function(a){this.i=a};r.playbackRateChanged=function(a){this.o=a};
|
|
146
|
+
r.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function ne(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function me(a,b){a&&(b=b.filter(function(c){return Md(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",le);le.prototype.configure=le.prototype.configure;
|
|
147
|
+
le.prototype.playbackRateChanged=le.prototype.playbackRateChanged;le.prototype.setVariants=le.prototype.setVariants;le.prototype.getBandwidthEstimate=le.prototype.getBandwidthEstimate;le.prototype.segmentDownloaded=le.prototype.segmentDownloaded;le.prototype.disable=le.prototype.disable;le.prototype.enable=le.prototype.enable;le.prototype.chooseVariant=le.prototype.chooseVariant;le.prototype.init=le.prototype.init;le.prototype.stop=le.prototype.stop;function oe(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}oe.prototype.add=function(a){return pe(this.h,a)?(this.g.add(a),!0):!1};
|
|
148
148
|
function pe(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&qe(c,d)&&re(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(qe(c,d)&&re(c.roles,d.roles)));return c?!1:!0}oe.prototype.values=function(){return this.g.values()};
|
|
149
149
|
function qe(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Qc(f)[0]}),d=b.codecs.split(",").map(function(f){return Qc(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function re(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function se(a){this.g=a;this.h=new te(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}se.prototype.create=function(a){var b=this,c=a.filter(function(d){return pe(b.g,d)});return c.length?new oe(c[0],c):this.h.create(a)};function te(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
150
150
|
te.prototype.create=function(a){var b=[];b=ue(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ve(b,this.j);a.length&&(b=a);this.g&&(a=Bd(b,this.g),a.length&&(b=a));this.h&&(a=we(b,this.h),a.length&&(b=a));a=new oe(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,pe(a.h,c)&&a.add(c);return a};function ue(a,b){var c=cd(b),d=jd(c,a.map(function(e){return id(e)}));return d?a.filter(function(e){return d==id(e)}):[]}
|
|
@@ -159,7 +159,7 @@ function Ve(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
|
|
|
159
159
|
r.request=function(a,b){var c=this,d=new We;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new Xe(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ne(b.retryParameters):Ce();b.uris=Ne(b.uris);e=Ye(this,a,b);var f=e.$(function(){return Ze(c,a,b,new Be(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return $e(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
160
160
|
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.vf||!c.l||q.fromCache||a!=af||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new Xe(m.promise,function(){return m.abort()},d);Qe(this.m,e);return e};
|
|
161
161
|
function Ye(a,b,c){var d=He(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={ed:e.ed},f=a.next())e.ed=f.value,d=d.$(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.ed(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
|
|
162
|
-
function Ze(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Xb(c.uris[e]),k=h.
|
|
162
|
+
function Ze(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Xb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Yb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ue[k])?k.Gf:null;if(!m)return Fe(new N(2,1,1E3,h));var n=k.Hf,p=null,q=null,v=!1,y=!1,w;return Ie(De(d)).$(function(){if(a.i)return Ge();w=Date.now();var x=m(c.uris[e],c,b,function(A,F,G){p&&p.stop();q&&q.S(B/1E3);a.l&&b==af&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0});
|
|
163
163
|
if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;x.abort()}),p.S(D/1E3));var B=c.retryParameters.stallTimeout;B&&(q=new O(function(){v=!0;x.abort()}));return x}).$(function(x){p&&p.stop();q&&q.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var D={response:x,vf:l};!y&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();q&&q.stop();if(a.s){var D=null,B=0;x instanceof N&&(D=x,1001==x.code&&(B=x.data[1]));a.s(c,D,B,v)}if(a.i)return Ge();v&&(x=new N(1,1,1003,
|
|
164
164
|
c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,Ze(a,b,c,d,e,x,g)}throw x;})}
|
|
165
165
|
function $e(a,b,c){var d=He(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={fd:e.fd},f=a.next())e.fd=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.fd(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Re);Re.prototype.request=Re.prototype.request;Re.prototype.destroy=Re.prototype.destroy;Re.makeRequest=Ve;
|
|
@@ -167,7 +167,7 @@ Re.defaultRetryParameters=function(){return Ce()};Re.prototype.clearAllResponseF
|
|
|
167
167
|
Re.NumBytesRemainingClass=We;function Xe(a,b,c){Ee.call(this,a,b);this.h=c}qa(Xe,Ee);Re.PendingRequest=Xe;var af=1;Re.RequestType={MANIFEST:0,SEGMENT:af,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Te=3;Re.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Te};var Ue={};function bf(a){this.g=!1;this.h=new rc;this.i=a}bf.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 cf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function df(){this.g=new kd}r=df.prototype;r.release=function(){this.Sa();this.g=null};r.A=function(a,b,c,d){this.g&&(a=new ef(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.oc(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};r.oc=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.oc(),this.g.remove(b,e))}};
|
|
168
168
|
r.Sa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.oc();this.g.g={}}};M("shaka.util.EventManager",df);df.prototype.removeAll=df.prototype.Sa;df.prototype.unlisten=df.prototype.oc;df.prototype.listenOnce=df.prototype.oa;df.prototype.listen=df.prototype.A;df.prototype.release=df.prototype.release;function ef(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ff(a,d);this.target.addEventListener(b,c,this.g)}
|
|
169
169
|
ef.prototype.oc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ff(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 gf(a)?b:b.capture||!1}
|
|
170
|
-
function gf(a){var b=hf;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}hf=b}return b||!1}var hf=void 0;function jf(){}function kf(a){a=xc(a);return(new Xb(a)).Fa}function lf(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=zc(b,!0):e=b;a=xc(a);a=zc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",jf);jf.initDataTransform=lf;jf.defaultGetContentId=kf;function mf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function nf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function of(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 pf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function qf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function rf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.F=new Set;this.l=this.s=null;this.fa=this.ca=!1;this.G=0;this.g=null;this.o=new df;this.i=new Map;this.C=[];this.u=new rc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ja=new Map;this.da=new Map;this.V=new O(function(){return sf(c)});this.L=!1;this.I=[];this.N=!1;this.ea=(new O(function(){tf(c)})).
|
|
170
|
+
function gf(a){var b=hf;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}hf=b}return b||!1}var hf=void 0;function jf(){}function kf(a){a=xc(a);return(new Xb(a)).Fa}function lf(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=zc(b,!0):e=b;a=xc(a);a=zc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",jf);jf.initDataTransform=lf;jf.defaultGetContentId=kf;function mf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function nf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function of(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 pf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function qf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function rf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.F=new Set;this.l=this.s=null;this.fa=this.ca=!1;this.G=0;this.g=null;this.o=new df;this.i=new Map;this.C=[];this.u=new rc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ja=new Map;this.da=new Map;this.V=new O(function(){return sf(c)});this.L=!1;this.I=[];this.N=!1;this.ea=(new O(function(){tf(c)})).Ca(b);this.u["catch"](function(){});this.j=new bf(function(){return uf(c)});this.W=!1}r=rf.prototype;r.destroy=function(){return this.j.destroy()};
|
|
171
171
|
function uf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.V.stop(),a.V=null,u(b,vf(a),2);case 2:if(!a.l){b.B(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:E(b);case 5:a.l=null;case 3:a.g=null,a.F.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,z(b)}})}r.configure=function(a){this.h=a};function wf(a,b,c){a.fa=!0;a.C=[];a.L=c;return xf(a,b)}
|
|
172
172
|
function yf(a,b,c){a.C=c;a.L=0<c.length;return xf(a,b)}function zf(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 Af(a,g,[])}
|
|
173
173
|
function xf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){if(c=Bf(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(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=of(a.h.servers),Df(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Ef(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,Ff(q,of(a.h.servers),of(a.h.advanced||{}));return u(w,
|
|
@@ -193,17 +193,17 @@ if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve()
|
|
|
193
193
|
function Mf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.A(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(f):Gf(a,f)});a.o.A(e,"keystatuseschange",function(f){return Sf(a,f)});a.i.set(e,{initData:c,loaded:!1,Ed:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Cc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
194
194
|
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.m(new N(2,6,6006,f.message,f,h))}})}function Uf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=kf(a),a=lf(a,c,b));return a}
|
|
195
195
|
function Gf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;L(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&Cc(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=Ve([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Nf(a.g.keySystem)&&Vf(g),h=Date.now(),C(w,2),l=a.D.mb.request(2,g),u(w,
|
|
196
|
-
l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=E(w),n=new N(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.G+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Cc(k.data);C(w,5);return u(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=E(w),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),w["return"]();case 6:v=new Q("drmsessionupdate")
|
|
197
|
-
y.S(Wf))
|
|
196
|
+
l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=E(w),n=new N(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.G+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Cc(k.data);C(w,5);return u(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=E(w),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),w["return"]();case 6:if(a.j.g)return w["return"]();v=new Q("drmsessionupdate");a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new O(function(){d.loaded=
|
|
197
|
+
!0;Tf(a)&&a.u.resolve()}),y.S(Wf));z(w)}})}function Vf(a){var b=vc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Dc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
198
198
|
function Sf(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Nf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Gc(h);a.ja.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),c.close()["catch"](function(){}));
|
|
199
199
|
Tf(a)&&(a.u.resolve(),a.V.S(Xf))}function sf(a){var b=a.ja,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Nc(pf(c))}
|
|
200
200
|
function Yf(){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.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".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,
|
|
201
201
|
c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return C(q,2),u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,sd("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:E(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](pf(f))})}
|
|
202
202
|
function Zf(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).S($f)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);E(c);z(c)})}
|
|
203
203
|
function vf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(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 C(g,2),a.fa||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Zf(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);E(g);z(g)})})),0)})}
|
|
204
|
-
function ag(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={
|
|
204
|
+
function ag(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Da:f.Da},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Da=[];f.Da=f.Da.concat(e.initData||[]);f.Da=f.Da.concat(h.initData||[]);f.Da=f.Da.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Da.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ja(e.keyIds),ja(h.keyIds))):
|
|
205
205
|
e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
|
|
206
|
-
initData:f.
|
|
206
|
+
initData:f.Da,keyIds:g});break}}return c}function Ef(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function tf(a){a.i.forEach(function(b,c){var d=b.Ed,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Ed=e)})}function Tf(a){a=a.i.values();return nf(a,function(b){return b.loaded})}
|
|
207
207
|
function Df(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
|
|
208
208
|
function Rf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=t(g.ra.initData),l=k.next();!l.done;h={rc:h.rc},l=k.next())h.rc=l.value,e.some(function(m){return function(n){var p=
|
|
209
209
|
m.rc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.rc)}if(g.ra.keyIds)for(h=t(g.ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
@@ -235,10 +235,10 @@ b.skip(1),d=lh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&
|
|
|
235
235
|
function ph(a,b,c){var d=null;b=t(oh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=fh(f,c,a.i));a.h[e]=null}return d}function qh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function rh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return sh[a<<2|b<<1|c]}
|
|
236
236
|
var th=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),sh="black blue green cyan red magenta yellow white".split(" ");function uh(){this.h=[];this.g=[];this.i=new ih;this.l=0;this.s=new Map([["CC1",new Qg(0,0)],["CC2",new Qg(0,1)],["CC3",new Qg(1,0)],["CC4",new Qg(1,1)]]);this.o=this.m=0;this.j=new Map;vh(this)}function vh(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Dg(b.i),Dg(b.l),Dg(b.o)}
|
|
237
237
|
function wh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=xh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())jh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=yh(a,e.value),c.push.apply(c,ja(e));a.i.i=[];a.h=[];a.g=[];return c}
|
|
238
|
-
function xh(a,b){var c=b.type;if(16===(b.
|
|
238
|
+
function xh(a,b){var c=b.type;if(16===(b.za&112)){var d=b.za>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.za&&255===b.Oa||!b.za&&!b.Oa||!zh(b.za)||!zh(b.Oa))return 45<=++a.l&&vh(a),null;a.l=0;b.za&=127;b.Oa&=127;if(!b.za&&!b.Oa)return null;d=null;if(16===(b.za&112))a:{var e=b.za;d=b.Oa;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Zg[f]:7===f&&(h=!0);
|
|
239
239
|
d=1===(d&1);if(c.h!==Ug){f=c.g;if(c.h===Tg&&e!==f.g){var k=1+e-f.h;Pg(f,k,1+f.g-f.h,f.h);Fg(f,0,k-1);Fg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Gg(c.g,Hg,32),g=!1,e=Zg[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Yg[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))Gg(c.g,Jg,d);else if(18===
|
|
240
240
|
(e&246)&&32===(d&224))Gg(c.g,e&1?Ng:Lg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Oa){case 32:Vg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Sg(c,2,d);break;case 38:e=Sg(c,3,d);break;case 39:e=Sg(c,4,d);break;case 40:Gg(c.g,Hg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Dg(c.o);Xg(c);break;case 43:Xg(c);break;case 44:e=c.i;g=null;c.h!==Ug&&(g=Eg(e,c.j,d));Fg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Tg?e=null:(g=Eg(e,c.j,d),h=e.g-e.h+1,Pg(e,h-1,h,e.h),Fg(e,
|
|
241
|
-
0,h-1),Fg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Fg(c.l,0,15);break;case 47:e=null,c.h!==Ug&&(e=Eg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Vg(c),c.j=d}d=e;break a}d=null}else e=b.Oa,Gg(c.g,Hg,b.
|
|
241
|
+
0,h-1),Fg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Fg(c.l,0,15);break;case 47:e=null,c.h!==Ug&&(e=Eg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Vg(c),c.j=d}d=e;break a}d=null}else e=b.Oa,Gg(c.g,Hg,b.za),Gg(c.g,Hg,e);return d}
|
|
242
242
|
function yh(a,b){var c=[];try{for(;b.ma();){var d=lh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=lh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new mh(e));for(var g=a.j.get(e),h=b.X();b.X()-h<f;){e=b;var k=lh(e),l=k.value,m=k.pts;if(16===l){var n=lh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!eh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=fh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;15>y;y++,
|
|
243
243
|
v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=ch()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=fh(q,p,g.i));q.i[q.h]=ch();q.g=0;break;case 12:q.isVisible()&&(e=fh(q,p,g.i)),bh(q),p=q,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=nh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?dh(g.g,"\u266a"):dh(g.g,
|
|
244
244
|
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&dh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(th.has(e)){var x=th.get(e);dh(g.g,x)}else dh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?dh(g.g,"_"):dh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function zh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ah(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,ce:c,Re:d}}function Bh(a,b){return{ld:1==b?a.Jb():a.M()}}function Ch(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.M()}}
|
|
@@ -247,7 +247,7 @@ Eh.prototype.init=function(a){var b=this,c=[],d=[];(new lg).box("moov",pg).box("
|
|
|
247
247
|
Eh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new lg).box("moof",pg).box("traf",pg).R("trun",function(k){f=Dh(k.reader,k.version,k.flags).te}).R("tfhd",function(k){k=Ah(k.reader,k.flags);d=k.ce||b.g;e=k.Re||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).R("tfdt",function(k){g=Bh(k.reader,k.version).ld}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.ma();){var w=k.M();if(6==
|
|
248
248
|
(k.Y()&31)){var x=0;q.length>v&&(x=q[v].Rc||0);x=(l+x)/m;for(var D=[],B,A=k.Za(w-1),F=B=0;F<A.length;)2==B&&3==A[F]?(B=0,A=[].concat(ja(A)),A.splice(F,1),A=new Uint8Array(A)):0==A[F]?B++:B=0,F++;B=A;for(F=0;F<B.length;){for(A=0;255==B[F];)A+=255,F++;A+=B[F++];for(var G=0;255==B[F];)G+=255,F++;G+=B[F++];4==A&&D.push(B.subarray(F,F+G));F+=G}D=t(D);for(B=D.next();!B.done;B=D.next())c.push({Ff:B.value,pts:x})}else try{k.skip(w-1)}catch(H){break}y-=w+4;0==y&&(l=q.length>v?l+(q[v].Ld||n):l+n,v++,y=q.length>
|
|
249
249
|
v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function Fh(){this.h=new Eh;this.g=new uh}Fh.prototype.init=function(a){this.h.init(a)};
|
|
250
|
-
function Gh(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Ff);if(0<f.length&&(d=a.g,e=e.pts,f=new ig(f,0),181===f.Y()&&49===f.Ib()&&1195456820===f.M()&&3===f.Y())){var g=f.Y();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Y(),l=(k&4)>>2,m=f.Y(),n=f.Y();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,
|
|
250
|
+
function Gh(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Ff);if(0<f.length&&(d=a.g,e=e.pts,f=new ig(f,0),181===f.Y()&&49===f.Ib()&&1195456820===f.M()&&3===f.Y())){var g=f.Y();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Y(),l=(k&4)>>2,m=f.Y(),n=f.Y();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,za:m,Oa:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return wh(a.g)}
|
|
251
251
|
;function Hh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ih(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Jh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Kh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
|
|
252
252
|
function Lh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Kh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Kh(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};function Mh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.I={};this.G={};this.g=null;this.L=d||function(){};this.i={};this.o=new df;this.s={};this.u=b;this.D=new rc;this.m=Nh(this,this.D);this.C=new bf(function(){return Oh(e)});this.F=""}function Nh(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.F);b.resolve()});a.F=Ph(c);a.j.src=a.F;return c}r=Mh.prototype;r.destroy=function(){return this.C.destroy()};
|
|
253
253
|
function Oh(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Qb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.s={};a.u=null;a.i=
|
|
@@ -259,53 +259,53 @@ function Xh(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=q
|
|
|
259
259
|
m,e));l.captions&&l.captions.length&&(n=a.h[g.Na].timestampOffset,p=Yc(l.captions),$c(a.g,p,d,e,n));q=l.data;q=Yh(a,q,d,b);return u(v,Zh(a,b,function(){a.h[b].appendBuffer(q)}),0)})}function $h(a,b){var c=Vh(a,"video")||0;Xc(a.g,b,c)}function ai(a){a.g&&Xc(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return L(function(f){e=qc;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,Zh(d,a,function(){c<=b?Rh(d,a):d.h[a].remove(b,c)}),0)})};
|
|
260
260
|
function bi(a,b){var c;return L(function(d){c=qc;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Zh(a,b,function(){var e=a.m.duration;0>=e?Rh(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=qc;return a==c.Z?d["return"]():u(d,Zh(b,a,function(){b.j.currentTime-=.001;Rh(b,a)}),0)})};
|
|
261
261
|
function ci(a,b,c,d,e){var f;return L(function(g){f=qc;return b==f.Z?(a.g.u=c,Wc(a.g,d,e),g["return"]()):u(g,Promise.all([Zh(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;Rh(a,b)}),Zh(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;Rh(a,b)}),Zh(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Rh(a,b)})]),0)})}
|
|
262
|
-
r.endOfStream=function(a){var b=this;return L(function(c){return u(c,di(b,function(){Sh(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ia=function(a){var b=this;return L(function(c){return u(c,di(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function Rh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),
|
|
263
|
-
function di(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:cf(a.C);c=[];d={};for(e in a.h)d.Pb=new rc,f={start:function(l){return function(){return l.Pb.resolve()}}(d),p:d.Pb},a.i[e].push(f),c.push(d.Pb),1==a.i[e].length&&f.start(),d={Pb:d.Pb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)
|
|
264
|
-
function hi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),
|
|
262
|
+
r.endOfStream=function(a){var b=this;return L(function(c){return u(c,di(b,function(){Sh(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ia=function(a){var b=this;return L(function(c){return u(c,di(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function Rh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),ei(a,b))}function Zh(a,b,c){cf(a.C);c={start:c,p:new rc};a.i[b].push(c);1==a.i[b].length&&hi(a,b);return c.p}
|
|
263
|
+
function di(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:cf(a.C);c=[];d={};for(e in a.h)d.Pb=new rc,f={start:function(l){return function(){return l.Pb.resolve()}}(d),p:d.Pb},a.i[e].push(f),c.push(d.Pb),1==a.i[e].length&&f.start(),d={Pb:d.Pb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)ei(a,h)}z(k)}})}function ei(a,b){a.i[b].shift();hi(a,b)}
|
|
264
|
+
function hi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),ei(a,b)}}function Yh(a,b,c,d){var e=a.G[d];null==c&&e&&(td()||rd())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=ug(b));return b}var Ph=window.URL.createObjectURL;function ii(a,b,c,d){this.sa=a;this.pa=b;this.ga=c;this.wd=void 0===d?null:d}ii.prototype.dc=function(){return this.pa};ii.prototype.$b=function(){return this.ga};function ji(a,b){return a&&b?a.dc()==b.dc()&&a.$b()==b.$b()&&hb(a.sa(),b.sa()):a==b}M("shaka.media.InitSegmentReference",ii);ii.prototype.getEndByte=ii.prototype.$b;ii.prototype.getStartByte=ii.prototype.dc;
|
|
265
265
|
function ki(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.pa=d;this.ga=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=ki.prototype;r.sa=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.Ze=function(){return this.endTime};r.dc=function(){return this.pa};r.$b=function(){return this.ga};r.rf=function(){return this.tilesLayout};
|
|
266
266
|
r.qf=function(){return this.i};M("shaka.media.SegmentReference",ki);ki.prototype.getTileDuration=ki.prototype.qf;ki.prototype.getTilesLayout=ki.prototype.rf;ki.prototype.getEndByte=ki.prototype.$b;ki.prototype.getStartByte=ki.prototype.dc;ki.prototype.getEndTime=ki.prototype.Ze;ki.prototype.getStartTime=ki.prototype.getStartTime;ki.prototype.getUris=ki.prototype.sa;function S(a,b,c){this.l=a;this.Qc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0}r=S.prototype;r.getDuration=function(){return this.i};r.ef=function(){return this.g};r.Ia=function(a){this.i=a};r.kf=function(){return this.l};r.ye=function(a){this.o=a};r.nc=function(a){this.s=a};r.Sd=function(a){this.m=a};r.Uf=function(a){this.Qc=a};r.Ye=function(){return this.Qc};
|
|
267
267
|
r.Fb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Cd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Cd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Bd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};r.T=function(){return Infinity==this.i&&!this.s};
|
|
268
268
|
r.lb=function(){return Infinity!=this.i&&!this.s};r.Qa=function(){return Math.max(this.u,this.gb()-this.m)};r.ze=function(a){this.u=a};r.gb=function(){return this.T()||this.lb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.cc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.gb()-this.m+a,this.Pa()))};r.Bb=function(){return this.cc(0)};
|
|
269
269
|
r.Pa=function(){return Math.max(0,this.gb()-(this.T()||this.lb()?this.Qc:0))};r.Ce=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.xe=function(a){this.D=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.xe;S.prototype.usingPresentationStartTime=S.prototype.Ce;S.prototype.getSeekRangeEnd=S.prototype.Pa;S.prototype.getSeekRangeStart=S.prototype.Bb;S.prototype.getSafeSeekRangeStart=S.prototype.cc;S.prototype.getSegmentAvailabilityEnd=S.prototype.gb;
|
|
270
270
|
S.prototype.setUserSeekStart=S.prototype.ze;S.prototype.getSegmentAvailabilityStart=S.prototype.Qa;S.prototype.isInProgress=S.prototype.lb;S.prototype.isLive=S.prototype.T;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Bd;S.prototype.notifyMinSegmentStartTime=S.prototype.Cd;S.prototype.notifySegments=S.prototype.Fb;S.prototype.getDelay=S.prototype.Ye;S.prototype.setDelay=S.prototype.Uf;S.prototype.setSegmentAvailabilityDuration=S.prototype.Sd;
|
|
271
|
-
S.prototype.setStatic=S.prototype.nc;S.prototype.setClockOffset=S.prototype.ye;S.prototype.getPresentationStartTime=S.prototype.kf;S.prototype.setDuration=S.prototype.Ia;S.prototype.getMaxSegmentDuration=S.prototype.ef;S.prototype.getDuration=S.prototype.getDuration;function li(a,b){this.j=a;this.m=mi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}li.prototype.release=function(){this.j=null;this.i=function(){}};function ni(a,b){a.i=b}function oi(a){this.g=a}function mi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Kh(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 pi(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.l=c;this.u=e;this.i=new df;this.s=!1;this.D=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.A(a,"waiting",function(){return qi(f)});this.m=(new O(function(){qi(f)})).
|
|
271
|
+
S.prototype.setStatic=S.prototype.nc;S.prototype.setClockOffset=S.prototype.ye;S.prototype.getPresentationStartTime=S.prototype.kf;S.prototype.setDuration=S.prototype.Ia;S.prototype.getMaxSegmentDuration=S.prototype.ef;S.prototype.getDuration=S.prototype.getDuration;function li(a,b){this.j=a;this.m=mi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}li.prototype.release=function(){this.j=null;this.i=function(){}};function ni(a,b){a.i=b}function oi(a){this.g=a}function mi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Kh(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 pi(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.l=c;this.u=e;this.i=new df;this.s=!1;this.D=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.A(a,"waiting",function(){return qi(f)});this.m=(new O(function(){qi(f)})).Ca(.25)}pi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.u=null};pi.prototype.Fd=function(){this.o=!0;qi(this)};
|
|
272
272
|
function qi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.D&&(a.j=!1,a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=mi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Lh(b,g,a.l.gapDetectionThreshold);if(!(null==
|
|
273
273
|
c||0==c&&!a.o||(d=b.start(c),d>=a.C.Pa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new Q("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function ri(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=si.value().get(b),c.oa(a,b,d))}var si=new sc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function ti(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new df;this.i=new ui(a);ri(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){vi(d,d.j)})}ti.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function wi(a){return a.m?a.g.currentTime:a.j}function xi(a,b){0<a.g.readyState?yi(a.i,b):ri(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){vi(a,a.j)})}
|
|
274
274
|
function vi(a,b){.001>Math.abs(a.g.currentTime-b)?zi(a):(a.h.oa(a.g,"seeking",function(){zi(a)}),yi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function zi(a){a.m=!0;a.h.A(a.g,"seeking",function(){return a.l()})}function ui(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}ui.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
275
|
-
function yi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.
|
|
275
|
+
function yi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Ai(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.oa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new df;ri(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Ai.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Ai.prototype.o=function(a){this.h=this.j?this.h:a};Ai.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Ai.prototype.D=function(){};
|
|
276
276
|
function Bi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.u=null;this.j=new pi(a,b.presentationTimeline,c,Ci(a,c),f);this.h=new ti(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=wi(g.h);h=Di(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;xi(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Ei(this,d));this.s=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=wi(g.h),k=g.g.Bb(),l=g.g.Pa();3>l-k&&(k=
|
|
277
|
-
l-3);h<k&&(h=Di(g,h),g.i.currentTime=h)}})).
|
|
277
|
+
l-3);h<k&&(h=Di(g,h),g.i.currentTime=h)}})).Ca(.25)}Bi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};Bi.prototype.o=function(a){xi(this.h,a)};Bi.prototype.m=function(){var a=wi(this.h);return 0<this.i.readyState&&!this.i.paused?Fi(this,a):a};
|
|
278
278
|
function Ei(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Bb():a.g.Pa():0>b&&(b=a.g.Pa()+b);return Gi(a,Fi(a,b))}Bi.prototype.D=function(){this.j.Fd()};function Gi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Di(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.Pa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.cc(c),k=a.g.cc(d);c=a.g.cc(c+d);return b>=g?Gi(a,b):b>f?f:b<e?Ih(a.i.buffered,k)?k:c:b>=h||Ih(a.i.buffered,b)?b:c}
|
|
279
279
|
function Fi(a,b){var c=a.g.Bb();if(b<c)return c;c=a.g.Pa();return b>c?c:b}function Ci(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new li(new oi(a),b.stallThreshold);ni(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=T.prototype;r.destroy=function(){Kb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};r.zf=function(){this.i=!0};
|
|
280
280
|
r.find=function(a){for(var b=this.K.length-1,c=b;0<=c;--c){var d=this.K[c],e=c<b?this.K[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.K.length&&a<this.K[0].startTime?this.h:null};r.get=function(a){if(0==this.K.length)return null;a-=this.h;return 0>a||a>=this.K.length?null:this.K[a]};r.offset=function(a){if(!this.i)for(var b=t(this.K),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
|
|
281
281
|
r.Db=function(a){!this.i&&a.length&&(this.K=this.K.filter(function(b){return b.startTime<a[0].startTime}),this.K.push.apply(this.K,ja(a)))};r.Eb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.K.length||d.endTime>c.K[0].startTime)});this.Db(a);this.cb(b)};r.cb=function(a){if(!this.i){var b=this.K.length;this.K=this.K.filter(function(c){return c.endTime>a});this.h+=b-this.K.length}};
|
|
282
282
|
r.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new ki(a.startTime,b,a.j,a.pa,a.ga,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
|
|
283
|
-
r.Sc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ja(d)):(c.g.stop(),c.g=null)}),this.g.
|
|
283
|
+
r.Sc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ja(d)):(c.g.stop(),c.g=null)}),this.g.Ca(a))};T.prototype[Symbol.iterator]=function(){return this.fb(0)};T.prototype.fb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Hi(this,b,d)};
|
|
284
284
|
function Ii(a,b,c){return new T([new ki(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",T);T.forSingleSegment=Ii;T.prototype.getIteratorForTime=T.prototype.fb;T.prototype.updateEvery=T.prototype.Sc;T.prototype.fit=T.prototype.Xa;T.prototype.evict=T.prototype.cb;T.prototype.mergeAndEvict=T.prototype.Eb;T.prototype.merge=T.prototype.Db;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.zf;
|
|
285
285
|
T.prototype.release=T.prototype.release;T.prototype.destroy=T.prototype.destroy;function Hi(a,b,c){this.i=a;this.h=b;this.g=c}Hi.prototype.seek=function(a){Kb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.fb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
|
|
286
286
|
Hi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.sa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Hi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.sa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Hi);Hi.prototype.next=Hi.prototype.next;Hi.prototype.current=Hi.prototype.current;
|
|
287
287
|
Hi.prototype.seek=Hi.prototype.seek;function Ji(){T.call(this,[]);this.j=[]}qa(Ji,T);r=Ji.prototype;r.clone=function(){var a=new Ji;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.K.length}return null};
|
|
288
288
|
r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.K.length}return null};r.offset=function(){};r.Db=function(){};r.cb=function(){};r.Eb=function(){};r.Xa=function(){};r.Sc=function(){};M("shaka.media.MetaSegmentIndex",Ji);Ji.prototype.updateEvery=Ji.prototype.Sc;Ji.prototype.fit=Ji.prototype.Xa;Ji.prototype.mergeAndEvict=Ji.prototype.Eb;Ji.prototype.evict=Ji.prototype.cb;Ji.prototype.merge=Ji.prototype.Db;
|
|
289
|
-
Ji.prototype.offset=Ji.prototype.offset;Ji.prototype.get=Ji.prototype.get;Ji.prototype.find=Ji.prototype.find;Ji.prototype.release=Ji.prototype.release;function Ki(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Hc();this.h=new O(function(){b.g.oe(.25*b.i)})}Ki.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ki.prototype.set=function(a){this.i=a;Li(this)};Ki.prototype.Dc=function(){return this.g.Dc()};function Li(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Hc()!=b&&a.g.Rd(b);return}catch(c){}a.h.
|
|
289
|
+
Ji.prototype.offset=Ji.prototype.offset;Ji.prototype.get=Ji.prototype.get;Ji.prototype.find=Ji.prototype.find;Ji.prototype.release=Ji.prototype.release;function Ki(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Hc();this.h=new O(function(){b.g.oe(.25*b.i)})}Ki.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ki.prototype.set=function(a){this.i=a;Li(this)};Ki.prototype.Dc=function(){return this.g.Dc()};function Li(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Hc()!=b&&a.g.Rd(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Hc()&&a.g.Rd(0)};function Mi(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Ni(b,!1)})).Ca(.25)}Mi.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 Ni(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Oi(a){Me.call(this);this.g=new Map;this.h=a}qa(Oi,Me);Oi.prototype.release=function(){this.g.clear();Me.prototype.release.call(this)};function Pi(a,b){var c=a.g.get(b);c||(c={ic:[],ae:null,contentType:b},a.g.set(b,c));return c}function Qi(a,b,c){var d=Pi(a,b.contentType);Ri(a,d);a={wd:b,position:c};d=d.ic;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
290
290
|
Oi.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.ic;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.wd;break a}}d=null}if(e=d)e=c.ae,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);
|
|
291
|
-
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.ae=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Ri(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.ic;b.ic=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.ic=[]};function Si(a){Me.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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 Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).
|
|
291
|
+
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.ae=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Ri(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.ic;b.ic=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.ic=[]};function Si(a){Me.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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 Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}qa(Si,Me);Si.prototype.release=function(){this.g.clear();this.h.stop();Me.prototype.release.call(this)};function Ti(a){Me.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{sb:null,rb:Ui,kb:function(c,d){return Vi(b,"enter",c,d)}},{sb:Wi,rb:Ui,kb:function(c,d){return Vi(b,"enter",c,d)}},{sb:Xi,rb:Ui,kb:function(c,d){return Vi(b,"enter",c,d)}},{sb:Ui,rb:Wi,kb:function(c,d){return Vi(b,"exit",c,d)}},{sb:Ui,rb:Xi,kb:function(c,d){return Vi(b,"exit",c,d)}},{sb:Wi,rb:Xi,kb:function(c,d){return Vi(b,"skip",c,d)}},{sb:Xi,rb:Wi,kb:function(c,d){return Vi(b,"skip",c,d)}}];this.h=new df;this.h.A(this.i,"regionremove",
|
|
292
292
|
function(c){b.g["delete"](c.region)})}qa(Ti,Me);Ti.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Me.prototype.release.call(this)};Ti.prototype.j=function(a,b){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?Wi:a>d.endTime?Xi:Ui;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.sb==e&&h.rb==f&&h.kb(d,b)}};
|
|
293
293
|
function Vi(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Wi=1,Ui=2,Xi=3;function Yi(a,b,c,d,e){a=Ve(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Zi(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.u=1;this.o=this.l=null;this.i=new Map;this.C=!1;this.D=null;this.s=!1;this.j=new bf(function(){return $i(c)})}Zi.prototype.destroy=function(){return this.j.destroy()};function $i(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,aj(e),b.push(bj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;z(f)})}
|
|
294
294
|
Zi.prototype.configure=function(a){this.h=a;this.D=new Be({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)};Zi.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,cj(a),2);cf(a.j);a.C=!0;z(b)})};
|
|
295
295
|
function dj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=qc,C(k,2),u(k,bi(a.g.P,c.Z),4);case 4:va(k,3);break;case 2:if(d=E(k),a.g)a.g.onError(d);case 3:e=Nc(b.mimeType,b.codecs);Qh(a.g.P,e);f=a.g.P.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=ej(b),a.i.set(c.Z,h),fj(a,h,0);z(k)}})}function gj(a){var b=a.i.get(pc);b&&(aj(b),bj(b)["catch"](function(){}),a.i["delete"](pc));a.o=null}
|
|
296
296
|
function hj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.ob&&(ij(a,e,!1,0,!1),c.ob=d)}else if(d=c.ob)c.ob=null,ij(a,d,!0,0,!1)}}function jj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&ij(a,b.video,c,d,e),b.audio&&ij(a,b.audio,c,d,e))}function kj(a,b){a.o=b;a.C&&ij(a,b,!0,0,!1)}
|
|
297
297
|
function ij(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=pc?f&&(f.ob&&(b.trickModeVideo?(f.ob=b,b=b.trickModeVideo):f.ob=null),f.stream!=b||e)&&(b.type==pc&&Qh(a.g.P,Nc(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.Yb?f.Vc=!0:f.Ha?(f.qb=!0,f.xc=d,f.Vc=!0):(aj(f),lj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),mj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):dj(a,b)}
|
|
298
|
-
function mj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ua)return e["return"]();c=b.stream;d=b.ua;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e["return"]();var f=a.g.Gc();var g=Vh(a.g.P,b.type),h=b.stream.segmentIndex.find(b.
|
|
298
|
+
function mj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ua)return e["return"]();c=b.stream;d=b.ua;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e["return"]();var f=a.g.Gc();var g=Vh(a.g.P,b.type),h=b.stream.segmentIndex.find(b.Aa?b.Aa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ga?k.ga-k.pa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ga?k.ga-k.pa:null)||0),k=a.g.getBandwidthEstimate(),
|
|
299
299
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.ua.h.g>h?!0:!1):f=!1;f&&b.ua.abort();z(e)})}function nj(a,b){b.Yb||b.qb||(b.Ha?(b.qb=!0,b.xc=0):null==Th(a.g.P,b.type)?null==b.Ka&&fj(a,b,0):(aj(b),lj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
300
300
|
function cj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=qc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.bb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Na,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Z,a.o),d.add(a.o));e=a.g.P;f=a.h.forceTransmuxTS;return u(n,e.init(c,f),2)}cf(a.j);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.P.Ia(p):a.g.P.Ia(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
|
|
301
|
-
(m=ej(l),a.i.set(k,m),fj(a,m,0));z(n)})}function ej(a){return{stream:a,type:a.type,ba:null,
|
|
301
|
+
(m=ej(l),a.i.set(k,m),fj(a,m,0));z(n)})}function ej(a){return{stream:a,type:a.type,ba:null,Aa:null,Kc:null,ud:null,td:null,sd:null,ob:null,endOfStream:!1,Ha:!1,Ka:null,qb:!1,xc:0,Vc:!1,Yb:!1,Jd:!1,ec:!1,ua:null}}
|
|
302
302
|
function oj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:cf(a.j);if(b.Ha||null==b.Ka||b.Yb)return h["return"]();b.Ka=null;if(!b.qb){h.B(2);break}return u(h,lj(a,b,b.Vc,b.xc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ka&&fj(a,b,0),h["return"]();case 4:C(h,6);d=pj(a,b);null!=d&&(fj(a,b,d),b.ec=!1);va(h,7);break;case 6:return e=
|
|
303
303
|
E(h),u(h,qj(a,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.B(0);break}return u(h,a.g.P.endOfStream(),10);case 10:cf(a.j),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),z(h)}})}
|
|
304
|
-
function pj(a,b){if(rj(b))return $h(a.g.P,b.stream.originalId||""),null;b.type==pc&&ai(a.g.P);var c=a.g.Gc(),d=b.
|
|
305
|
-
var g=Array.from(a.i.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,rj(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.
|
|
306
|
-
function sj(a,b,c,d){if(b.ba)return b.ba.current();if(b.
|
|
304
|
+
function pj(a,b){if(rj(b))return $h(a.g.P,b.stream.originalId||""),null;b.type==pc&&ai(a.g.P);var c=a.g.Gc(),d=b.Aa?b.Aa.endTime:c,e=Wh(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(pc))&&rj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Vh(a.g.P,b.type);e=sj(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity;
|
|
305
|
+
var g=Array.from(a.i.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,rj(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.Aa?h.Aa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;tj(a,b,c,e)["catch"](function(){});return null}
|
|
306
|
+
function sj(a,b,c,d){if(b.ba)return b.ba.current();if(b.Aa||d)return b.ba=b.stream.segmentIndex.fb(b.Aa?b.Aa.endTime:d),b.ba&&b.ba.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.fb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.fb(c),e=b.ba&&b.ba.next().value);return e}
|
|
307
307
|
function tj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){switch(w.g){case 1:return e=qc,f=b.stream,g=b.ba,b.Ha=!0,C(w,2),u(w,uj(a,b,d),4);case 4:cf(a.j);if(a.s)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var D,B,A;return L(function(F){cf(a.j);if(a.s)return F["return"]();n=vj(n,x);D=!1;B=0;(new lg).box("mdat",function(G){B=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return F.B(0);
|
|
308
|
-
A=n.subarray(0,B);n=n.subarray(B);return u(F,wj(a,b,c,f,d,A),0)})},u(w,xj(a,b,d,p),6);l=xj(a,b,d);return u(w,l,7);case 7:return m=w.h,cf(a.j),a.s?w["return"]():b.qb?(b.Ha=!1,fj(a,b,0),w["return"]()):u(w,wj(a,b,c,f,d,m),6);case 6:cf(a.j);if(a.s)return w["return"]();b.
|
|
308
|
+
A=n.subarray(0,B);n=n.subarray(B);return u(F,wj(a,b,c,f,d,A),0)})},u(w,xj(a,b,d,p),6);l=xj(a,b,d);return u(w,l,7);case 7:return m=w.h,cf(a.j),a.s?w["return"]():b.qb?(b.Ha=!1,fj(a,b,0),w["return"]()):u(w,wj(a,b,c,f,d,m),6);case 6:cf(a.j);if(a.s)return w["return"]();b.Aa=d;g.next();b.Ha=!1;b.Jd=!1;q=a.g.P.Ya();v=q[b.type];$a(JSON.stringify(v));b.qb||a.g.Fd();fj(a,b,0);va(w,0);break;case 2:y=E(w);cf(a.j,y);if(a.s)return w["return"]();b.Ha=!1;if(7001==y.code)b.Ha=!1,b.Ka=null,fj(a,b,0),w.B(0);else if(b.type==
|
|
309
309
|
e.Z&&a.h.ignoreTextStreamFailures)a.i["delete"](e.Z),w.B(0);else if(3017==y.code)yj(a,b,y),w.B(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Ha=!1,b.Ka=null,fj(a,b,1),w.B(0);else return b.ec=!0,y.severity=2,u(w,qj(a,y),0)}})}function vj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
310
310
|
function yj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Jd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.ec=!0;a.s=!0;a.g.onError(c);return}b.Jd=!0}fj(a,b,4)}
|
|
311
311
|
function uj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.ud||e!=b.td||f!=b.sd)h=function(){var n;return L(function(p){if(1==p.g)return C(p,2),b.td=e,b.sd=f,b.ud=g,u(p,ci(a.g.P,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=E(p);b.td=null;b.sd=null;b.ud=null;throw n;})},d.push(h());!ji(c.g,b.Kc)&&(b.Kc=c.g)&&(k=xj(a,b,c.g),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return C(v,2),u(v,k,4);
|
|
@@ -314,7 +314,7 @@ function wj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedC
|
|
|
314
314
|
m=k.reader.jc(),n=k.reader.jc();k=k.reader.Za(k.reader.O.byteLength-k.reader.X());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Ef():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:y,messageData:k}),l=new Q(zj,l),a.g.onEvent(l))}).parse(f),u(h,Aj(a,b,c),2);if(3!=h.g)return cf(a.j),u(h,Xh(a.g.P,b.type,f,e.startTime,e.endTime,g),3);cf(a.j);z(h)})}
|
|
315
315
|
function Aj(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=Th(a.g.P,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.P.remove(b.type,e,e+g),2)}cf(a.j);z(h)})}function rj(a){return a&&a.type==pc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
316
316
|
function xj(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=af,f=Yi(c.sa(),c.pa,c.ga,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof ii,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.mb.request(e,f),b.ua=h,u(l,h.promise,2);k=l.h;b.ua=null;return l["return"](k.data)})}
|
|
317
|
-
function lj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.qb=!1,b.Vc=!1,b.xc=0,b.Yb=!0,b.
|
|
317
|
+
function lj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.qb=!1,b.Vc=!1,b.xc=0,b.Yb=!0,b.Aa=null,b.Kc=null,b.ba=null,d?(e=a.g.Gc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,bi(a.g.P,b.type),4);if(3!=g.g)return cf(a.j),c?u(g,a.g.P.flush(b.type),3):g.B(3);cf(a.j);b.Yb=!1;b.endOfStream=!1;fj(a,b,0);z(g)})}
|
|
318
318
|
function fj(a,b,c){var d=b.type;if(d!=pc||a.i.has(d))b.Ka=(new nd(function(){var e;return L(function(f){if(1==f.g)return C(f,2),u(f,oj(a,b),4);if(2!=f.g)return va(f,0);e=E(f);if(a.g)a.g.onError(e);z(f)})})).S(c)}function aj(a){null!=a.Ka&&(a.Ka.stop(),a.Ka=null)}function bj(a){return L(function(b){return a.ua?u(b,a.ua.abort(),0):b.B(0)})}function qj(a,b){return L(function(c){if(1==c.g)return u(c,De(a.D),2);cf(a.j);a.g.onError(b);b.handled||a.h.failureCallback(b);z(c)})};function Bj(a,b){var c=Cj(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Dj(d)});this.s=new bf(function(){return Ej(d)})}Bj.prototype.destroy=function(){return this.s.destroy()};function Ej(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Fj(a),u(e,a.u,2);a.g&&a.g.Ga.nb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.nb();a.g=null;a.m=[];a.j=null;z(e)})}
|
|
319
319
|
function Gj(a,b){var c={Gb:function(){},Mc:function(){},nb:function(){},onError:function(){},Oc:function(){},Kg:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();Fj(a);return c}
|
|
320
320
|
function Dj(a){return L(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.jb)var c=!1;else{a.g&&(a.g.Ga.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Gb(),a.g={node:d.node,payload:d.payload,jb:d.jb,Ga:c.Ga}):c.Ga.Oc();c=!0}c?c=Promise.resolve():a.g?c=Hj(a):(a.j.Cf(a.i),a.o=new rc,c=a.o);b=u(b,c,1)}return b})}
|
|
@@ -323,7 +323,7 @@ r.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fo
|
|
|
323
323
|
g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=t(c);for(var f=c.next();!f.done;e={ub:e.ub},f=c.next())e.ub=f.value,a.some(function(g){return function(h){return h.startTime==g.ub.startTime&&h.endTime==g.ub.endTime&&h.text==g.ub.payload?!0:!1}}(e))||(f=Kj(e.ub))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
|
|
324
324
|
d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};r.destroy=function(){this.g&&(Jj(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"};
|
|
325
325
|
function Kj(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}
|
|
326
|
-
function Jj(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}M("shaka.text.SimpleTextDisplayer",Ij);Ij.prototype.setTextVisibility=Ij.prototype.setTextVisibility;Ij.prototype.isTextVisible=Ij.prototype.isTextVisible;Ij.prototype.destroy=Ij.prototype.destroy;Ij.prototype.append=Ij.prototype.append;Ij.prototype.remove=Ij.prototype.remove;function Lj(){}function Mj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Lj);Lj.removeAllChildren=Mj;function Nj(a,b){var c=this;this.j=!1;this.i=[];this.u=a;this.m=b;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.m.appendChild(this.g);this.s=(new O(function(){Oj(c)})).
|
|
326
|
+
function Jj(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}M("shaka.text.SimpleTextDisplayer",Ij);Ij.prototype.setTextVisibility=Ij.prototype.setTextVisibility;Ij.prototype.isTextVisible=Ij.prototype.isTextVisible;Ij.prototype.destroy=Ij.prototype.destroy;Ij.prototype.append=Ij.prototype.append;Ij.prototype.remove=Ij.prototype.remove;function Lj(){}function Mj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Lj);Lj.removeAllChildren=Mj;function Nj(a,b){var c=this;this.j=!1;this.i=[];this.u=a;this.m=b;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.m.appendChild(this.g);this.s=(new O(function(){Oj(c)})).Ca(.25);this.h=new Map;this.o=new df;this.o.A(document,"fullscreenchange",function(){Oj(c,!0)});this.l=null;"ResizeObserver"in
|
|
327
327
|
window&&(this.l=new ResizeObserver(function(){Oj(c,!0)}),this.l.observe(this.g))}r=Nj.prototype;r.append=function(a){var b=[].concat(ja(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={pc:c.pc},d=a.next())c.pc=d.value,b.some(function(e){return function(f){return tb(f,e.pc)}}(c))||this.i.push(c.pc);Oj(this)};
|
|
328
328
|
r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.s&&this.s.stop();this.h.clear();this.o&&(this.o.release(),this.o=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Oj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
|
|
329
329
|
function Pj(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.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.De:null;l&&(g.push(l.$d),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Qj(a,k,e),l=a.h.get(k),n=l.De,f=!0));0<k.nestedCues.length&&n&&Pj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,q){return p.startTime!=q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});
|
|
@@ -360,12 +360,12 @@ function wk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=jd(
|
|
|
360
360
|
function Bk(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 Ck(){this.i=this.h=null;this.g=[]}function Dk(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 Ek(){this.o=this.s=this.F=this.C=this.m=this.j=this.D=this.l=this.i=this.G=this.I=this.L=this.u=this.N=NaN;this.g=new yk;this.h=new Ck};function U(a,b){Me.call(this);var c=this;this.l=Fk;this.zc=this.g=null;this.ja=!1;this.Cc=new df;this.Tb=new df;this.o=new df;this.pd=this.s=this.Sb=this.i=this.Ic=this.I=this.j=this.wa=this.W=this.Jc=this.L=this.Ac=this.G=this.wb=this.D=this.N=this.m=this.F=null;this.Dd=1E9;this.h=Gk(this);this.zd={width:Infinity,height:Infinity};this.u=null;this.La=new te(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ma=this.h.preferredTextLanguage;this.Wb=this.h.preferredTextRole;
|
|
361
361
|
this.Ub=this.h.preferForcedSubs;this.Mb=[];this.Xb=null;b&&b(this);this.F=Hk(this);this.F.Pd(this.h.streaming.forceHTTPS);this.C=null;Ik&&(this.C=Sb(Ik));this.Cc.A(window,"online",function(){c.Kd()});this.V={name:"detach"};this.ca={name:"attach"};this.fa={name:"unload"};this.Gd={name:"manifest-parser"};this.vd={name:"manifest"};this.vb={name:"media-source"};this.qd={name:"drm-engine"};this.da={name:"load"};this.Hd={name:"src-equals-drm-engine"};this.xb={name:"src-equals"};var d=new Map;d.set(this.ca,
|
|
362
362
|
function(e,f){return Ie(Jk(c,e,f))});d.set(this.V,function(e){e.J&&(c.Tb.Sa(),e.J=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return Ie(e)});d.set(this.fa,function(e){return Ie(Kk(c,e))});d.set(this.vb,function(e){e=Lk(c,e);return Ie(e)});d.set(this.Gd,function(e,f){var g=Mk(c,e,f);return Ie(g)});d.set(this.vd,function(e){return Nk(c,e)});d.set(this.qd,function(e){e=Ok(c,e);return Ie(e)});d.set(this.da,function(e,f){return Ie(Pk(c,e,f))});d.set(this.Hd,function(e,f){var g=Qk(c,e,f);return Ie(g)});
|
|
363
|
-
d.set(this.xb,function(e,f){return Rk(c,e,f)});this.
|
|
363
|
+
d.set(this.xb,function(e,f){return Rk(c,e,f)});this.xa=new Bj(this.V,{gf:function(e,f,g,h){var k=null;e==c.V&&(k=g==c.V?c.V:c.ca);e==c.ca&&(k=g==c.V||f.J!=h.J?c.V:g==c.ca?c.ca:g==c.vb||g==c.da?c.vb:g==c.xb?c.Hd:null);e==c.vb&&(k=g==c.da&&f.J==h.J?c.Gd:c.fa);e==c.Gd&&(k=Sk(c.da,c.vd,c.fa,g,f,h));e==c.vd&&(k=Sk(c.da,c.qd,c.fa,g,f,h));e==c.qd&&(k=Sk(c.da,c.da,c.fa,g,f,h));e==c.Hd&&(k=g==c.xb&&f.J==h.J?c.xb:c.fa);if(e==c.da||e==c.xb)k=c.fa;e==c.fa&&(k=h.J&&f.J==h.J?c.ca:c.V);return k},Te:function(e,f,
|
|
364
364
|
g){c.dispatchEvent(Tk(Uk,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,Kk(c,e),2):f["return"](e.J?c.ca:c.V)})},Cf:function(e){c.dispatchEvent(Tk(Vk,(new Map).set("state",e.name)))}});a&&this.Vb(a,!0)}qa(U,Me);function Tk(a,b){return new Q(a,b)}r=U.prototype;
|
|
365
|
-
r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Wk)return c["return"]();a.l=Wk;b=Gj(a.
|
|
366
|
-
a.W=null;if(!a.F){c.B(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Me.prototype.release.call(a),z(c)}})};r.Vb=function(a,b){b=void 0===b?!0:b;if(this.l==Wk)return Promise.reject(Xk());var c=Cj();c.J=a;od()||(b=!1);var d=b?this.vb:this.ca,e=Gj(this.
|
|
367
|
-
r.Wd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Wk)return Promise.reject(Xk());od()||(a=!1);var c=Cj(),d=Gj(this.
|
|
368
|
-
r.load=function(a,b,c){var d=this;this.Xb=null;if(this.l==Wk)return Promise.reject(Xk());this.dispatchEvent(Tk(Zk));var e=Cj();e.uri=a;e.Td=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=$k(this,e)?this.xb:this.da,g=Gj(this.
|
|
365
|
+
r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Wk)return c["return"]();a.l=Wk;b=Gj(a.xa,function(){return{node:a.V,payload:Cj(),jb:!1}});return u(c,new Promise(function(d){b.Gb=function(){};b.Mc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Oc=function(){d()}}),2);case 2:return u(c,a.xa.destroy(),3);case 3:a.Cc&&(a.Cc.release(),a.Cc=null);a.Tb&&(a.Tb.release(),a.Tb=null);a.o&&(a.o.release(),a.o=null);a.pd=null;a.s=null;a.h=null;a.u=null;a.zc=null;
|
|
366
|
+
a.W=null;if(!a.F){c.B(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Me.prototype.release.call(a),z(c)}})};r.Vb=function(a,b){b=void 0===b?!0:b;if(this.l==Wk)return Promise.reject(Xk());var c=Cj();c.J=a;od()||(b=!1);var d=b?this.vb:this.ca,e=Gj(this.xa,function(){return{node:d,payload:c,jb:!1}});e.Gb=function(){};return Yk(e)};r.detach=function(){var a=this;if(this.l==Wk)return Promise.reject(Xk());var b=Gj(this.xa,function(){return{node:a.V,payload:Cj(),jb:!1}});b.Gb=function(){};return Yk(b)};
|
|
367
|
+
r.Wd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Wk)return Promise.reject(Xk());od()||(a=!1);var c=Cj(),d=Gj(this.xa,function(e){var f=e.J&&a?b.vb:e.J?b.ca:b.V;c.J=e.J;return{node:f,payload:c,jb:!1}});d.Gb=function(){};return Yk(d)};r.bg=function(a){this.Xb=a};
|
|
368
|
+
r.load=function(a,b,c){var d=this;this.Xb=null;if(this.l==Wk)return Promise.reject(Xk());this.dispatchEvent(Tk(Zk));var e=Cj();e.uri=a;e.Td=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=$k(this,e)?this.xb:this.da,g=Gj(this.xa,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,jb:!0}});this.u=new Ek;this.W=al(this);g.Gb=function(){};return new Promise(function(h,k){g.Oc=function(){return k(new N(2,7,7002))};g.Mc=function(){h();d.dispatchEvent(Tk(bl))};g.nb=function(){return k(Xk())};
|
|
369
369
|
g.onError=function(l){return k(l)}})};function $k(a,b){if(!od())return!0;var c=b.mimeType,d=b.uri||"";c||(c=fg(d),c=cl[c]);if(c){if(""==(b.J||qd()).canPlayType(c))return!1;if(!od()||!(c in eg||fg(d)in gg)||a.h.streaming.preferNativeHls)return!0;if(vd())return a.h.streaming.useNativeHlsOnSafari}return!1}function Jk(a,b,c){null==b.J&&(b.J=c.J,a.Tb.A(b.J,"error",function(){var d=dl(a);d&&el(a,d)}));a.g=b.J;return Promise.resolve()}
|
|
370
370
|
function Kk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=Wk&&(a.l=Fk),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Tk(fl));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&a.o.Sa();a.wb&&(a.wb.release(),a.wb=null);a.Ac&&(a.Ac.stop(),a.Ac=null);if(!a.I){n.B(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Ic=null;case 3:if(!a.s){n.B(5);break}return u(n,a.s.stop(),5);case 5:if(!a.j){n.B(7);break}return u(n,a.j.destroy(),
|
|
371
371
|
8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.D&&(a.D.release(),a.D=null);if(!a.N){n.B(9);break}return u(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.C)a.C.onAssetUnload();if(!b.J||!b.J.src){n.B(11);break}return u(n,new Promise(function(p){return(new O(p)).S(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.m){n.B(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Sb=null;a.L=null;if(a.i){d=t(a.i.variants);
|
|
@@ -394,7 +394,7 @@ function Nl(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.A(b,"cuechange",func
|
|
|
394
394
|
function il(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Tk(Tl,b))}function Dl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Lb().S(.5);a.Mb.push(function(){c.stop()})}}function pl(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))}function ql(a,b){return new rf(b,a.h.drm.updateExpirationTime)}
|
|
395
395
|
function Hk(a){return new Re(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Tk(Ul,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Tk(Vl,b))})}
|
|
396
396
|
function yl(a,b){return new Bi(a.g,a.i,a.h.streaming,b,function(){a.wb&&Ni(a.wb,!0);if(a.j)for(var c=a.j,d=c.g.Gc(),e=c.h.smallGapLimit,f=t(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ba=null;var k=c.g.P;g==pc?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Uh(k,g),k=Ih(k,d,e));if(!k&&((null!=Vh(c.g.P,g)||h.Ha)&&nj(c,h),h.ua&&(h.ua.abort(),h.ua=null),g===pc))for(g=c.g.P.u.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,vh(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())qh(h.value)}a.L&&
|
|
397
|
-
Wl(a)},function(c){return a.dispatchEvent(c)})}function zl(a){var b=new Ti(a.Jc);b.addEventListener("enter",function(d){jl(a,Xl,d.region)});b.addEventListener("exit",function(d){jl(a,Yl,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(jl(a,Xl,e),jl(a,Yl,e))});var c=new Mi(a.g);c.g.add(b);a.wa&&c.g.add(a.wa);return c}function Al(a,b){a.L=new xe;a.L.g=ze;Ae(a.L,b,Math.min(.5,b/2));gl(a);a.Ac=(new O(function(){Wl(a)})).
|
|
397
|
+
Wl(a)},function(c){return a.dispatchEvent(c)})}function zl(a){var b=new Ti(a.Jc);b.addEventListener("enter",function(d){jl(a,Xl,d.region)});b.addEventListener("exit",function(d){jl(a,Yl,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(jl(a,Xl,e),jl(a,Yl,e))});var c=new Mi(a.g);c.g.add(b);a.wa&&c.g.add(a.wa);return c}function Al(a,b){a.L=new xe;a.L.g=ze;Ae(a.L,b,Math.min(.5,b/2));gl(a);a.Ac=(new O(function(){Wl(a)})).Ca(.25)}
|
|
398
398
|
function Wl(a){switch(a.l){case Ol:if(a.g.ended)var b=!0;else{var c=Hh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Cl:a:if(a.g.ended||Sh(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.gb();var d=Hh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Jh(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ye:ze;c.g=d;b!=d&&gl(a)}function hl(a,b,c,d){return new Mh(a,b,c,d)}
|
|
399
399
|
function al(a){return new Vj({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Ya:function(){return a.Ya()},getCurrentTime:function(){return a.g?a.g.currentTime:0},ib:function(){return a.ib()},Fc:function(){return a.Fc()},T:function(){return a.T()}},a.h.cmcd)}
|
|
400
400
|
function Bl(a){return new Zi(a.i,{Gc:function(){return a.D.m()},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Wj(a.W,b,c)},P:a.N,mb:a.F,onError:function(b){return el(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ef:function(){a.I&&a.I.update&&a.I.update()},Fd:function(){a.D&&a.D.D();Wl(a)},Df:function(b,c){var d=c.wd;d&&a.wa&&Qi(a.wa,d,b)}})}
|
|
@@ -420,7 +420,7 @@ r.Pf=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next
|
|
|
420
420
|
r.Xe=function(a){var b=cd(a),c=fm(this).filter(function(f){return cd(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Ql(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
|
|
421
421
|
function Sl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function fm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
422
422
|
r.Vf=function(a){a=!!a;if(this.ja!=a){this.ja=a;if(this.l==Cl)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=he(this.i.textStreams,this.Ma,this.Wb,this.Ub),0<a.length&&(kj(this.j,a[0]),bm(this))):gj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Ql(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")}Jl(this)}};
|
|
423
|
-
r.jf=function(){if(!this.T())return null;var a=this.
|
|
423
|
+
r.jf=function(){if(!this.T())return null;var a=this.xa.l,b=0;if(this.D)b=this.D.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
424
424
|
r.ie=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ya=function(){if(this.l==Cl)return this.N.Ya();var a={total:[],audio:[],video:[],text:[]};this.l==Ol&&(a.total=Kh(this.g.buffered));return a};
|
|
425
425
|
r.getStats=function(){if(this.l!=Cl&&this.l!=Ol)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};ul(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
426
426
|
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.u,b=Number(a.totalVideoFrames),c.L=Number(a.droppedVideoFrames),c.I=b,this.u.G=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.G?a.G:NaN):a=NaN;this.u.m=a;if(this.l==Cl){if(a=this.j.l)this.u.s=(this.G?this.G.i:1)*a.bandwidth;a&&a.video&&(c=this.u,b=a.video.height||NaN,c.N=a.video.width||NaN,c.u=b);this.T()&&(a=this.ie().valueOf()+1E3*this.kc().end,this.u.C=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
|
|
@@ -467,13 +467,13 @@ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=od()?Tc(l)?!0:MediaSource.isTyp
|
|
|
467
467
|
U.isBrowserSupported=function(){window.Promise||Ua("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Ua("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||sd("Trident/"))return!1;var a=wd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
|
|
468
468
|
!1:od()?!0:pd("application/x-mpegurl")};U.setAdManagerFactory=function(a){Ik=a};U.registerSupportPlugin=function(a,b){Am[a]=b};U.prototype.destroy=U.prototype.destroy;
|
|
469
469
|
var wm="abrstatuschanged",qm="adaptation",nm="buffering",Vl="downloadfailed",Ul="downloadheadersreceived",tl="drmsessionupdate",zj="emsg",xm="error",zm="expirationupdated",bl="loaded",Zk="loading",ol="manifestparsed",ll="mediaqualitychanged",Tl="metadata",Uk="onstatechange",Vk="onstateidle",om="ratechange",El="streaming",um="textchanged",vm="texttrackvisibility",kl="timelineregionadded",Xl="timelineregionenter",Yl="timelineregionexit",sm="trackschanged",fl="unloading",tm="variantchanged",Bm={dg:wm,
|
|
470
|
-
eg:qm,fg:nm,hg:Vl,ig:Ul,jg:tl,lg:zj,Error:xm,mg:zm,og:"largegap",pg:bl,qg:Zk,rg:ol,sg:ll,Metadata:Tl,ug:Uk,vg:Vk,wg:om,yg:"sessiondata",zg:El,Ag:um,Bg:vm,Cg:kl,Dg:Xl,Eg:Yl,Fg:sm,Gg:fl,Hg:tm},Wk=0,Fk=1,Cl=2,Ol=3;U.LoadMode={DESTROYED:Wk,NOT_LOADED:Fk,MEDIA_SOURCE:Cl,SRC_EQUALS:Ol};U.version="v3.3.
|
|
470
|
+
eg:qm,fg:nm,hg:Vl,ig:Ul,jg:tl,lg:zj,Error:xm,mg:zm,og:"largegap",pg:bl,qg:Zk,rg:ol,sg:ll,Metadata:Tl,ug:Uk,vg:Vk,wg:om,yg:"sessiondata",zg:El,Ag:um,Bg:vm,Cg:kl,Dg:Xl,Eg:Yl,Fg:sm,Gg:fl,Hg:tm},Wk=0,Fk=1,Cl=2,Ol=3;U.LoadMode={DESTROYED:Wk,NOT_LOADED:Fk,MEDIA_SOURCE:Cl,SRC_EQUALS:Ol};U.version="v3.3.6";var Cm=["3","3"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(Cm[0]),Number(Cm[1])));
|
|
471
471
|
var ym=["output-restricted","internal-error"],Am={},Ik=null,cl={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",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},gm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
472
472
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function Dm(){this.h=[];this.j=this.i=this.g=0};function V(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new df;this.j.A(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.A(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
473
473
|
r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
|
|
474
474
|
r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};
|
|
475
475
|
M("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;
|
|
476
|
-
V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function Em(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.m=null;this.h=new df;google.ima.settings.setLocale(c);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("v3.3.
|
|
476
|
+
V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function Em(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.m=null;this.h=new df;google.ima.settings.setLocale(c);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("v3.3.6");this.g=null;this.h.oa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Fm(e,f)});this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
477
477
|
function(f){Gm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Em.prototype.stop=function(){this.g&&this.g.stop();this.o&&Mj(this.o)};Em.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Gm(a,b){b.getError();Hm(a,null);a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
478
478
|
function Fm(a,b){a.j(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Im(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
479
479
|
a.h.A(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){Hm(a,null)}}
|
|
@@ -494,13 +494,13 @@ f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Km.prototyp
|
|
|
494
494
|
function Lm(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.A(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){Me.call(this);this.g=this.i=null;this.h=new Dm;this.j=navigator.language}qa(X,Me);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Em(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
495
495
|
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Me.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Dm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
|
|
496
496
|
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Km(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
497
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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="v3.3.
|
|
498
|
-
(c.F=!0),c.j=new rc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ua('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="v3.3.
|
|
499
|
-
r.
|
|
500
|
-
|
|
501
|
-
X.prototype.
|
|
502
|
-
X.
|
|
503
|
-
X.
|
|
497
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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="v3.3.6";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
498
|
+
(c.F=!0),c.j=new rc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ua('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="v3.3.6";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
|
|
499
|
+
r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,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)};M("shaka.ads.AdManager",X);
|
|
500
|
+
X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
|
|
501
|
+
X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
|
|
502
|
+
X.AD_VOLUME_CHANGED="ad-volume-changed";X.AD_MUTED="ad-muted";X.AD_PAUSED="ad-paused";X.AD_RESUMED="ad-resumed";X.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";X.CUEPOINTS_CHANGED="ad-cue-points-changed";X.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";X.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";X.AD_CLICKED="ad-clicked";X.AD_PROGRESS="ad-progress";X.AD_BUFFERING="ad-buffering";X.AD_IMPRESSION="ad-impression";X.AD_DURATION_CHANGED="ad-duration-changed";X.AD_CLOSED="ad-closed";
|
|
503
|
+
X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";Ik=function(){return new X};function Mm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof Q){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
|
|
504
504
|
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Kh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
|
|
505
505
|
function Nm(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Om(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
|
|
506
506
|
function Om(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
@@ -570,21 +570,21 @@ function Oo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)
|
|
|
570
570
|
function Qo(a){var b=Ro(a);if(7<b.length)throw new N(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=Ro(a);a:{d=t(So);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.X();else{if(8==b.length&&b[1]&224)throw new N(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.X()+b<=a.h.byteLength?b:a.h.byteLength-a.g.X();d=Ib(a.h,a.g.X(),b);a.g.skip(b);return new To(c,d)}
|
|
571
571
|
function Ro(a){var b=a.g.X(),c=a.g.Y();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var So=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function To(a,b){this.id=a;this.g=b}
|
|
572
572
|
function Uo(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Vo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Po(a.g);for(var n=null,p=null;a.ma();){var q=Qo(a);if(187==q.id){var v=Wo(q);v&&(q=c*v.ag,v=b+v.Kf,null!=n&&m.push(new ki(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new ki(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
573
|
-
function Wo(a){var b=new Po(a.g);a=Qo(b);if(179!=a.id)throw new N(2,3,3013);a=Uo(a);b=Qo(b);if(183!=b.id)throw new N(2,3,3012);b=new Po(b.g);for(var c=0;b.ma();){var d=Qo(b);if(241==d.id){c=Uo(d);break}}return{ag:a,Kf:c}};function Xo(a,b){var c=Ko(a,b,"Initialization");if(!c)return null;var d=a.H.
|
|
574
|
-
function Zo(a,b){var c=Number(Jo(a,$o,"presentationTimeOffset"))||0,d=Jo(a,$o,"timescale"),e=1;d&&(e=ro(d)||1);var f=c/e||0,g=Xo(a,$o);ap(a,g);var h=Oe(a);return{Ab:function(){var k=Ko(h,$o,"RepresentationIndex"),l=h.H.
|
|
573
|
+
function Wo(a){var b=new Po(a.g);a=Qo(b);if(179!=a.id)throw new N(2,3,3013);a=Uo(a);b=Qo(b);if(183!=b.id)throw new N(2,3,3012);b=new Po(b.g);for(var c=0;b.ma();){var d=Qo(b);if(241==d.id){c=Uo(d);break}}return{ag:a,Kf:c}};function Xo(a,b){var c=Ko(a,b,"Initialization");if(!c)return null;var d=a.H.ya,e=c.getAttribute("sourceURL");e&&(d=kc(a.H.ya,[e]));e=0;var f=null;if(c=mo(c,"range",po))e=c.start,f=c.end;return new ii(function(){return d},e,f,Yo(a))}
|
|
574
|
+
function Zo(a,b){var c=Number(Jo(a,$o,"presentationTimeOffset"))||0,d=Jo(a,$o,"timescale"),e=1;d&&(e=ro(d)||1);var f=c/e||0,g=Xo(a,$o);ap(a,g);var h=Oe(a);return{Ab:function(){var k=Ko(h,$o,"RepresentationIndex"),l=h.H.ya;k&&(k=k.getAttribute("sourceURL"))&&(l=kc(h.H.ya,[k]));k=bp(h);return cp(h,b,g,l,k.start,k.end,f)}}}
|
|
575
575
|
function cp(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,w,x,D,B,A,F;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Wa||!a.U.me,l=a.U.start,m=a.U.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.sa(),c.pa,c.ga):null],p=null,u(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;D=null;B=l-g;A=l;F=m?l+m:Infinity;if("mp4"==n)var H=No(w,e,d,c,B,A,F);else{H=new Po(x);if(440786851!=Qo(H).id)throw new N(2,3,3008);var J=Qo(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
|
|
576
576
|
J=new Po(J.g);for(var I=null;J.ma();){var K=Qo(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new Po(I.g);K=1E6;for(J=null;I.ma();){var P=Qo(I);if(2807729==P.id)K=Uo(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=K/1E9;J*=I;K=Qo(new Po(w));if(475249515!=K.id)throw new N(2,3,3007);H=Vo(K,H,I,J,d,c,B,A,F)}D=H;h.Fb(D);q=new T(D);k&&q.Xa(A,F,!0);return G["return"](q)})}
|
|
577
577
|
function $o(a){return a.lc}function bp(a){var b=Ko(a,$o,"RepresentationIndex");a=Jo(a,$o,"indexRange");a=po(a||"");b&&(a=mo(b,"range",po,a));return a}function ap(a,b){dp(a,b);if(!bp(a))throw new N(2,4,4002);}function dp(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=pc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
|
|
578
|
-
function Yo(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Lc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function ep(a,b){var c=Xo(a,fp),d=gp(a);if(!d.ia&&!d.timeline&&1<d.Cb.length)throw new N(2,4,4002);if(!d.ia&&!a.U.duration&&!d.timeline&&1==d.Cb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=hp(a.U.start,a.U.duration,a.H.
|
|
578
|
+
function Yo(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Lc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function ep(a,b){var c=Xo(a,fp),d=gp(a);if(!d.ia&&!d.timeline&&1<d.Cb.length)throw new N(2,4,4002);if(!d.ia&&!a.U.duration&&!d.timeline&&1==d.Cb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=hp(a.U.start,a.U.duration,a.H.ya,d,c);c=!e;e?e.Eb(g,a.presentationTimeline.Qa()):e=new T(g);a.presentationTimeline.Fb(g);a.Wa&&a.U.me||e.Xa(a.U.start,a.U.duration?a.U.start+a.U.duration:
|
|
579
579
|
Infinity,c);f&&(f.segmentIndex=e);return{Ab:function(){e&&0!=e.K.length||e.Db(g);return Promise.resolve(e)}}}function fp(a){return a.$a}function gp(a){var b=ip(a);a=Io(a,fp);var c=a.Kb;0==c&&(c=1);var d=0;a.ia?d=a.ia*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ia:a.ia,startTime:d,Kb:c,Ta:a.Ta,timeline:a.timeline,Cb:b}}
|
|
580
580
|
function hp(a,b,c,d,e){var f=d.Cb.length;d.timeline&&d.timeline.length!=d.Cb.length&&(f=Math.min(d.timeline.length,d.Cb.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={ad:m.ad},n++){var p=d.Cb[n];m.ad=kc(c,[p.Bf]);var q=void 0;q=null!=d.ia?l+d.ia:d.timeline?d.timeline[n].end:l+b;k.push(new ki(a+l,a+q,function(v){return function(){return v.ad}}(m),p.start,p.end,e,g,a,h));l=q}return k}
|
|
581
|
-
function ip(a){return[a.H.$a,a.ka.$a,a.aa.$a].filter(Rb).map(function(b){return eo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ke&&(a.ke=!0);var c=b.getAttribute("media");b=mo(b,"mediaRange",po,{start:0,end:null});return{Bf:c,start:b.start,end:b.end}})};function jp(a,b,c,d,e,f){var g=kp(a),h=lp(a);mp(h);var k=Oe(a);if(h.fc)return dp(a,g),{Ab:function(){var q=Ho(h.fc,k.H.id,null,k.bandwidth||null,null);q=kc(k.H.
|
|
581
|
+
function ip(a){return[a.H.$a,a.ka.$a,a.aa.$a].filter(Rb).map(function(b){return eo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ke&&(a.ke=!0);var c=b.getAttribute("media");b=mo(b,"mediaRange",po,{start:0,end:null});return{Bf:c,start:b.start,end:b.end}})};function jp(a,b,c,d,e,f){var g=kp(a),h=lp(a);mp(h);var k=Oe(a);if(h.fc)return dp(a,g),{Ab:function(){var q=Ho(h.fc,k.H.id,null,k.bandwidth||null,null);q=kc(k.H.ya,[q]);return cp(k,b,g,q,0,null,h.Ta)}};if(h.ia)return d||(a.presentationTimeline.Bd(h.ia),a.presentationTimeline.Cd(a.U.start)),{Ab:function(){return np(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=op(k,h,g);c=a.U.start;var n=a.U.duration?a.U.start+a.U.duration:Infinity,p=Infinity!=
|
|
582
582
|
n;l?(p&&(new T(m)).Xa(c,n,!0),l.Eb(m,a.presentationTimeline.Qa())):l=new T(m);a.presentationTimeline.Fb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{Ab:function(){l&&0!=l.K.length||l.Db(m);return Promise.resolve(l)}}}function pp(a){return a.mc}function lp(a){var b=Io(a,pp),c=Jo(a,pp,"media");a=Jo(a,pp,"index");return{ia:b.ia,timescale:b.timescale,Kb:b.Kb,Ta:b.Ta,Xd:b.Xd,timeline:b.timeline,yd:c,fc:a}}
|
|
583
583
|
function mp(a){var b=a.fc?1:0;b+=a.timeline?1:0;b+=a.ia?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.fc&&(a.timeline=null),a.ia=null);if(!a.fc&&!a.yd)throw new N(2,4,4002);}
|
|
584
584
|
function np(a,b,c,d,e){function f(I){var K=(I-q)*p,P=K+b.Ta,R=K+l;K=R+p;var ba=Math.min(K,h());R=new ki(R,ba,function(){var aa=Ho(y,x,I,w,P*v);return kc(D,[aa])},0,null,d,B,l,h());R.l=K;return R}function g(){var I=[Math.max(k.Qa(),l),Math.min(k.gb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+q})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.aa.id,n=a.U.duration,p=b.ia,q=b.Kb,v=b.timescale,
|
|
585
|
-
y=b.yd,w=a.bandwidth||null,x=a.H.id,D=a.H.
|
|
586
|
-
function op(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={$c:h.$c,dd:h.dd,gd:h.gd,Xc:h.Xc,jd:h.jd,Yc:h.Yc},k++){var l=b.timeline[k],m=l.start,n=l.$f;l=l.end;h.gd=k+b.Kb;h.jd=n+b.Xd;h.dd=a.H.id;h.Xc=a.bandwidth||null;h.$c=b.yd;h.Yc=a.H.
|
|
587
|
-
function kp(a){var b=Jo(a,pp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.
|
|
585
|
+
y=b.yd,w=a.bandwidth||null,x=a.H.id,D=a.H.ya,B=l-b.Ta,A=g();a=a.Wa?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new T(c);c=k.gb()<h();F=k.T();if(c||F){var J=Math.max(a,A+1);H.Sc(p,function(){var I=k.Qa();H.cb(I);var K=t(g());K.next();K=K.next().value;for(var P=[];J<=K;){var R=f(J);P.push(R);J++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
|
|
586
|
+
function op(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={$c:h.$c,dd:h.dd,gd:h.gd,Xc:h.Xc,jd:h.jd,Yc:h.Yc},k++){var l=b.timeline[k],m=l.start,n=l.$f;l=l.end;h.gd=k+b.Kb;h.jd=n+b.Xd;h.dd=a.H.id;h.Xc=a.bandwidth||null;h.$c=b.yd;h.Yc=a.H.ya;g.push(new ki(d+m,d+l,function(p){return function(){var q=Ho(p.$c,p.dd,p.gd,p.Xc||null,p.jd);return kc(p.Yc,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
587
|
+
function kp(a){var b=Jo(a,pp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.ya;return new ii(function(){var f=Ho(b,c,null,d,null);return kc(e,[f])},0,null,Yo(a))};function qp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}qp.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
|
|
588
588
|
function rp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da;return L(function(Fa){switch(Fa.g){case 1:d=qc;sp(b);tp(b);up(b);vp(b);if(!c&&1==b.length){e=b[0];a.g=e.vc;a.h=e.Uc;a.j=e.textStreams;a.i=e.imageStreams;Fa.B(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Fa["return"]();k=b.map(function(ya){return ya.vc});l=b.map(function(ya){return ya.Uc});m=b.map(function(ya){return ya.textStreams});n=b.map(function(ya){return ya.imageStreams});
|
|
589
589
|
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(wp(d.Z));y=t(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(wp(d.Rb));return u(Fa,xp(a.g,k,f,yp,zp),3);case 3:return u(Fa,xp(a.h,l,f,yp,zp),4);case 4:return u(Fa,xp(a.j,m,f,yp,zp),5);case 5:return u(Fa,xp(a.i,n,f,yp,zp),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(I=t(a.g),K=I.next();!K.done;K=I.next())for(P=K.value,R=t(a.h),ba=R.next();!ba.done;ba=R.next())aa=ba.value,Y=ag(P.drmInfos,aa.drmInfos),P.drmInfos.length&&aa.drmInfos.length&&
|
|
590
590
|
!Y.length||(Da=D++,B.push({id:Da,language:P.language,primary:P.primary,audio:P,video:aa,bandwidth:(P.bandwidth||0)+(aa.bandwidth||0),drmInfos:Y,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),F=t(A),G=F.next();!G.done;G=F.next())H=G.value,J=D++,B.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.bb?H:null,video:H.type==d.Na?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
@@ -633,13 +633,13 @@ l}}var n;m=eo(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.do
|
|
|
633
633
|
1,null!=q)for(q=t(q.split(";")),w=q.next();!w.done;w=q.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,cd(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=eo(c,"ContentProtection");var B=xo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=cd(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=eo(c,"Label"))&&l.length&&
|
|
634
634
|
(l=l[0],l.textContent&&(F=l.textContent));l=eo(c,"Representation");c=l.map(function(G){if(G=hq(a,b,B,h,A,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ka.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ka.contentType||"application"==b.ka.contentType)for(b.ka.contentType=iq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ka.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
635
635
|
m.value,p=t(B.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ja(q.keyIds),ja(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Rb);return{id:b.ka.id||"__fake__"+a.G++,contentType:b.ka.contentType,language:A,Jg:e,streams:c,drmInfos:B.drmInfos,Vd:f,Nf:k}}
|
|
636
|
-
function hq(a,b,c,d,e,f,g,h,k,l){b.H=dq(l,b.ka,null);a.u=Math.min(a.u,b.H.yb);if(!jq(b.H))return null;var m=b.U.start;b.bandwidth=mo(l,"bandwidth",ro)||0;var n=b.H.contentType,p=n==pc||"application"==n;n="image"==n;try{var q=function(H,J,I){return kq(a,H,J,I)};if(b.H.lc)var v=Zo(b,q);else if(b.H.$a)v=ep(b,a.l);else if(b.H.mc)v=jp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.H.
|
|
636
|
+
function hq(a,b,c,d,e,f,g,h,k,l){b.H=dq(l,b.ka,null);a.u=Math.min(a.u,b.H.yb);if(!jq(b.H))return null;var m=b.U.start;b.bandwidth=mo(l,"bandwidth",ro)||0;var n=b.H.contentType,p=n==pc||"application"==n;n="image"==n;try{var q=function(H,J,I){return kq(a,H,J,I)};if(b.H.lc)var v=Zo(b,q);else if(b.H.$a)v=ep(b,a.l);else if(b.H.mc)v=jp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.H.ya,w=b.U.duration||0;v={Ab:function(){return Promise.resolve(Ii(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
|
|
637
637
|
throw H;}q=eo(l,"ContentProtection");q=Ao(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var x=!1;eo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=eo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
638
638
|
(B=l.getAttribute("value")),!B))return null;var A;l=b.H.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"))&&(A="PQ");var F=b.H.id?b.aa.id+","+b.H.id:"",G={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,J,I;return L(function(K){if(1==K.g){J=(H=F&&b.Wa&&a.l[F])?a.l[F]:G;if(J.segmentIndex)return K.B(0);I=J;return u(K,v.Ab(),3)}I.segmentIndex=K.h;z(K)})},closeSegmentIndex:function(){G.segmentIndex&&
|
|
639
639
|
(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ka.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Lc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:x,closedCaptions:k,
|
|
640
640
|
hdr:A,tilesLayout:B,matchedStreams:[]};F&&b.Wa&&!a.l[F]&&(a.l[F]=G);return G}function Wp(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Xp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=E(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Yp(a,b);z(d)}})}function Yp(a,b){0>a.F||a.D.S(Math.max(3,a.F-b,Qa(a.I)))}
|
|
641
|
-
function dq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Lc:null,audioSamplingRate:null,yb:0};c=c||b.
|
|
642
|
-
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=eo(a,"AudioChannelConfiguration");m=lq(m)||b.Lc;p=mo(a,"audioSamplingRate",so)||b.audioSamplingRate;f||(f=iq(g,h));var q=co(a,"SegmentBase"),v=co(a,"SegmentTemplate"),y=q?mo(q,"availabilityTimeOffset",to)||0:0,w=v?mo(v,"availabilityTimeOffset",to)||0:0;d=d&&d.length?mo(d[0],"availabilityTimeOffset",to)||0:0;d=b.yb+d+y+w;return{
|
|
641
|
+
function dq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Lc:null,audioSamplingRate:null,yb:0};c=c||b.ya;var d=eo(a,"BaseURL"),e=d.map(ko),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=mo(a,"frameRate",uo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=eo(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
|
|
642
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=eo(a,"AudioChannelConfiguration");m=lq(m)||b.Lc;p=mo(a,"audioSamplingRate",so)||b.audioSamplingRate;f||(f=iq(g,h));var q=co(a,"SegmentBase"),v=co(a,"SegmentTemplate"),y=q?mo(q,"availabilityTimeOffset",to)||0:0,w=v?mo(v,"availabilityTimeOffset",to)||0:0;d=d&&d.length?mo(d[0],"availabilityTimeOffset",to)||0:0;d=b.yb+d+y+w;return{ya:kc(c,e),lc:q||b.lc,$a:co(a,"SegmentList")||b.$a,mc:v||b.mc,width:mo(a,"width",so)||b.width,height:mo(a,
|
|
643
643
|
"height",so)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Lc:m,audioSamplingRate:p,yb:d}}
|
|
644
644
|
function lq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("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=
|
|
645
645
|
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 jq(a){var b=a.lc?1:0;b+=a.$a?1:0;b+=a.mc?1:0;if(0==b)return a.contentType==pc||"application"==a.contentType?!0:!1;1!=b&&(a.lc&&(a.$a=null),a.mc=null);return!0}
|
|
@@ -654,14 +654,14 @@ function Bq(a,b,c){b=uc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
654
654
|
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Cq(a,m),Dq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=kc([d],[m.trim()])[0],h&&g.push(h),e.push(new qq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new qq("",g,k)));return new nq(c,b,f,e)}f.push(h);
|
|
655
655
|
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new rq("URI",k)),e=!0)}}return new nq(c,b,f)}function Cq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new wq(f);var h;(h=yq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=yq(f,k);)d.push(new rq(h[1],h[2]||h[3])),xq(f)}return new oq(c,e,d,g)}
|
|
656
656
|
var Dq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Eq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Fq(){}function Gq(a){try{var b=Hq(a);return He({uri:a,pe:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Fe(c)}}function Hq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Dc(a):e=yc(a);return{data:e,contentType:c}}
|
|
657
|
-
M("shaka.net.DataUriPlugin",Fq);Fq.parse=Gq;Se("data",Gq);function Iq(){var a=this;this.g=this.i=null;this.
|
|
658
|
-
r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Lq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,u(f,Mq(c,d.data),3);e=c.
|
|
657
|
+
M("shaka.net.DataUriPlugin",Fq);Fq.parse=Gq;Se("data",Gq);function Iq(){var a=this;this.g=this.i=null;this.La=1;this.o=new Map;this.u=new Map;this.xa=new Set;this.h=new Map;this.j=null;this.N="";this.da=new Aq;this.wa=0;this.C=new O(function(){Jq(a)});this.m=Kq;this.D=null;this.fa=0;this.G=Infinity;this.ca=this.ja=0;this.F=new Pe;this.W=[];this.L=new Map;this.Ma=!1;this.s=new Map;this.V=null;this.ea=new Map;this.I=new Map;this.l=!1}r=Iq.prototype;r.configure=function(a){this.g=a};
|
|
658
|
+
r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Lq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,u(f,Mq(c,d.data),3);e=c.wa;0<e&&c.C.S(e);return f["return"](c.D)})};r.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.F&&(a.push(this.F.destroy()),this.F=null);this.g=this.i=null;this.xa.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
659
659
|
r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==Kq)return e["return"]();b=[];a.V=null;c=Array.from(a.h.values());return c.length?u(e,Nq(a,c[0]),2):e.B(2)}for(d=1;d<c.length;d++)b.push(Nq(a,c[d]));return u(e,Promise.all(b),0)})};
|
|
660
660
|
function Nq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return c=Oq,d=b.Ge,e=new Xb(d),a.l&&b.Le&&$b(e,new bc("_HLS_skip=YES")),u(y,Lq(a,e.toString()),2);if(3!=y.g){f=y.h;g=Bq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=sq(g.g,"EXT-X-DEFINE");k=Pq(a,h);l=b.stream;return u(y,Qq(a,b.Tc,g,l.type,l.mimeType,b.xd,k,b.Se,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.Eb(m,a.j.Qa());m.length&&(n=vq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.xd.get(n),l.segmentIndex.cb(p));q=m[m.length-
|
|
661
661
|
1];if(v=uq(g.g,"EXT-X-ENDLIST"))Rq(a,c.Fe),a.j.Ia(q.endTime);z(y)})}r.onExpirationUpdated=function(){};
|
|
662
662
|
function Mq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,ya,Ia,Pb,ld;return L(function(Ya){switch(Ya.g){case 1:c=Bq(a.da,b,a.N);if(0!=c.type)throw new N(2,4,4022);d=sq(c.g,"EXT-X-DEFINE");Sq(a,d);e=sq(c.g,"EXT-X-MEDIA");f=sq(c.g,"EXT-X-STREAM-INF");g=sq(c.g,"EXT-X-IMAGE-STREAM-INF");Tq(a,f);h=sq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),q=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
|
|
663
|
-
kc([a.N],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),w=new Q("sessiondata",y),a.i)a.i.onEvent(w);return u(Ya,Uq(a,e),2);case 2:return Vq(a,e),u(Ya,Wq(a,f),3);case 3:return x=Ya.h,u(Ya,Xq(a,e),4);case 4:return D=Ya.h,u(Ya,Yq(a,g),5);case 5:B=Ya.h;if(!a.i)throw new N(2,7,7001);if(a.
|
|
664
|
-
a.g.defaultPresentationDelay:a.ca?a.ca:3*a.fa),a.j.nc(!1)):(a.j=new S(null,0),a.j.nc(!0));Zq(a);if(a.m!=Kq)a.
|
|
663
|
+
kc([a.N],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),w=new Q("sessiondata",y),a.i)a.i.onEvent(w);return u(Ya,Uq(a,e),2);case 2:return Vq(a,e),u(Ya,Wq(a,f),3);case 3:return x=Ya.h,u(Ya,Xq(a,e),4);case 4:return D=Ya.h,u(Ya,Yq(a,g),5);case 5:B=Ya.h;if(!a.i)throw new N(2,7,7001);if(a.Ma&&0==x.length)throw new N(2,4,4034);F=A=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,A=Math.min(A,J.ne),"text"!=J.stream.type&&(F=Math.min(F,J.Af-J.ne));a.m!=Kq?(a.j=new S(0,a.g.defaultPresentationDelay?
|
|
664
|
+
a.g.defaultPresentationDelay:a.ca?a.ca:3*a.fa),a.j.nc(!1)):(a.j=new S(null,0),a.j.nc(!0));Zq(a);if(a.m!=Kq)a.wa=a.G,I=Oq,a.m==I.Ee&&(K=a.j.Qc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.j.Sd(K));else for(a.j.Ia(F),a.j.offset(-A),P=t(a.h.values()),H=P.next();!H.done;H=P.next())R=H.value,R.stream.segmentIndex.offset(-A),R.stream.segmentIndex.Xa(0,F);a.W=[];ba=[];aa=t(x);for(Y=aa.next();!Y.done;Y=aa.next())for(Da=Y.value,Fa=t([Da.video,Da.audio]),ya=Fa.next();!ya.done;ya=
|
|
665
665
|
Fa.next())(Ia=ya.value)&&ba.push(Ia);return u(Ya,Promise.all(ba.map(function(Fc){return L(function(ie){return u(ie,Fc.createSegmentIndex(),0)})})),6);case 6:Pb=t(ba);for(ya=Pb.next();!ya.done;ya=Pb.next())ld=ya.value,a.W.push(ld.segmentIndex.K);Zq(a);a.D={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.D);z(Ya)}})}
|
|
666
666
|
function Sq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}function Pq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}
|
|
667
667
|
function Tq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=$q(a,e);if(g){var h=nc(pc,e);a.s.set(g,h);fb(e,h)}f&&(g=mc("audio",e),a.s.set(f,g));d&&(f=mc("video",e),a.s.set(d,f))}}
|
|
@@ -670,8 +670,8 @@ t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"
|
|
|
670
670
|
function Yq(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);C(l,2);return u(l,br(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
|
|
671
671
|
function Uq(a,b){var c;return L(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,ar(a,b[0]),2):d.B(2);c=b.slice(1).map(function(e){return ar(a,e)});return u(d,Promise.all(c),0)})}
|
|
672
672
|
function Wq(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(pq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,cr(a,g,k),2);if(v=y.h){for(var w=y["return"],x=v.audio,D=v.video,B=t(D),A=B.next();!A.done;A=B.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
|
|
673
|
-
void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;B=a.g.disableAudio;if(!x.length||B)x=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];x=t(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=t(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var J=H?H.stream:null,I=A?A.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Tc:"")+" - "+(A?A.Tc:"");G&&J&&I.length&&K.length&&!(0<ag(I,K).length)||a.
|
|
674
|
-
!!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.
|
|
673
|
+
void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;B=a.g.disableAudio;if(!x.length||B)x=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];x=t(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=t(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var J=H?H.stream:null,I=A?A.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Tc:"")+" - "+(A?A.Tc:"");G&&J&&I.length&&K.length&&!(0<ag(I,K).length)||a.xa.has(H)||(G={id:a.La++,language:G?G.language:"und",primary:!!G&&G.primary||
|
|
674
|
+
!!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.xa.add(H))}}y=w.call(y,B)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ob,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
675
675
|
function cr(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){if(1==x.g)return d=qc,e=$q(a,b),f=Z(b,"AUDIO"),g=Z(b,"VIDEO"),k=(h=f||g)&&a.u.has(h)?a.u.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=pq(b,"URI"),q=l.audio.find(function(D){return D&&D.Tc==p}),v=nc(d.Na,e),(y=nc(d.bb,e))&&!v?m=d.bb:!k.length&&y&&v?(m=d.Na,e=[[v,y].join()]):l.audio.length&&q?(m=d.bb,n=!0):m=l.video.length?d.bb:d.Na,n?x.B(2):u(x,dr(a,b,e,m,c),3);2!=x.g&&(w=x.h);if(w)l[w.stream.type]=[w];else if(null===w)return x["return"](null);
|
|
676
676
|
er(l);return x["return"](l)})}function $q(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Qc(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function fr(a){a=Z(a,"LANGUAGE")||"und";return cd(a)}
|
|
677
677
|
function er(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Vq(a,b){var c=tq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=fr(e);var f=pq(e,"GROUP-ID");e=pq(e,"INSTREAM-ID");a.L.get(f)||a.L.set(f,new Map);a.L.get(f).set(e,d)}}
|
|
@@ -680,14 +680,14 @@ v="YES"==q;return u(w,hr(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.u.has(c)?a.u.get
|
|
|
680
680
|
function br(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=gr(pq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=fr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,hr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Z(b,"RESOLUTION"))if(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=
|
|
681
681
|
Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
|
|
682
682
|
function dr(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g){f=gr(pq(b,"URI"),a.o);if(a.h.has(f))return l["return"](a.h.get(f));var m=Z(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.L.get(m):null;h=mc(d,c);return u(l,hr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
|
|
683
|
-
function hr(a,b,c,d,e,f,g,h,k,l,m,n,p){var q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,ya,Ia,Pb,ld,Ya,Fc,ie,zn,An,Bn,Cn,
|
|
684
|
-
P=pq(K,"METHOD"),"NONE"!=P){F=!0;if("AES-128"==P)return a.
|
|
685
|
-
if(4035==ie.code)return Ua("Skipping unsupported HLS stream",Pb,b),cb["return"](null);throw ie;case 5:zn=Fc[0].startTime;An=Fc[Fc.length-1].endTime;Bn=new T(Fc);Cn=d==pc?"subtitle":void 0;
|
|
686
|
-
drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:
|
|
687
|
-
function jr(a,b){var c=uq(b.g,"EXT-X-PLAYLIST-TYPE"),d=uq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Rq(a,Kq);else{c?Rq(a,mr):Rq(a,nr);d=uq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=uq(b.g,"EXT-X-PART-INF");a.l&&c?(a.
|
|
683
|
+
function hr(a,b,c,d,e,f,g,h,k,l,m,n,p){var q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,ya,Ia,Pb,ld,Ya,Fc,ie,zn,An,Bn,Cn,fi,gi,Cf,Dn,En,Fn,Gn;return L(function(cb){switch(cb.g){case 1:return q=kc([a.N],[b])[0],u(cb,Lq(a,q),2);case 2:v=cb.h;q=v.uri;y=Bq(a.da,v.data,q);if(1!=y.type)throw new N(2,4,4017);w=[];if(y.segments)for(x=t(y.segments),D=x.next();!D.done;D=x.next())B=D.value,A=sq(B.g,"EXT-X-KEY"),w.push.apply(w,ja(A));F=!1;G=[];H=new Set;J=t(w);for(I=J.next();!I.done;I=J.next())if(K=I.value,
|
|
684
|
+
P=pq(K,"METHOD"),"NONE"!=P){F=!0;if("AES-128"==P)return a.Ma=!0,cb["return"](null);R=pq(K,"KEYFORMAT");if(aa=(ba=ir[R])?ba(K):null){if(aa.keyIds)for(Y=t(aa.keyIds),Da=Y.next();!Da.done;Da=Y.next())Fa=Da.value,H.add(Fa);G.push(aa)}}if(F&&!G.length)throw new N(2,4,4026);ya=sq(y.g,"EXT-X-DEFINE");Ia=Pq(a,ya);jr(a,y);return u(cb,kr(a,d,c,y,Ia),3);case 3:return Pb=cb.h,lr.includes(Pb)&&(c=""),ld=new Map,Ya=new Map,C(cb,4),u(cb,Qq(a,b,y,d,Pb,ld,Ia,Ya,c,p),6);case 6:Fc=cb.h;va(cb,5);break;case 4:ie=E(cb);
|
|
685
|
+
if(4035==ie.code)return Ua("Skipping unsupported HLS stream",Pb,b),cb["return"](null);throw ie;case 5:zn=Fc[0].startTime;An=Fc[Fc.length-1].endTime;Bn=new T(Fc);Cn=d==pc?"subtitle":void 0;fi=[];if(l)for(gi=t(l.split(",")),Cf=gi.next();!Cf.done;Cf=gi.next())Dn=Cf.value,fi.push(Dn);Fn=(En=uq(y.g,"EXT-X-SERVER-CONTROL"))?null!=En.getAttribute("CAN-SKIP-UNTIL"):!1;Gn={id:a.La++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Bn,mimeType:Pb,codecs:c,kind:Cn,encrypted:F,
|
|
686
|
+
drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:fi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return cb["return"]({stream:Gn,Tc:b,Ge:q,ne:zn,Af:An,xd:ld,Se:Ya,Le:Fn})}})}
|
|
687
|
+
function jr(a,b){var c=uq(b.g,"EXT-X-PLAYLIST-TYPE"),d=uq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Rq(a,Kq);else{c?Rq(a,mr):Rq(a,nr);d=uq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=uq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ja=Number(pq(c,"PART-TARGET")),a.G=Math.min(a.ja,a.G),c=uq(b.g,"EXT-X-SERVER-CONTROL"),a.ca=c?Number(pq(c,"PART-HOLD-BACK")):0):a.G=Math.min(d,a.G);a.fa=Math.max(d,a.fa)}}
|
|
688
688
|
function or(a,b,c,d){c=uq(c,"EXT-X-MAP");if(!c)return null;var e=pq(c,"URI");d=gr(kc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=pr(d,c),a.ea.set(b,c));return a.ea.get(b)}function pr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new ii(function(){return[a]},c,d)}
|
|
689
|
-
function qr(a,b,c,d,e,f,g,h,k){var l=d.g,m=gr(d.h,g),n=uq(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)
|
|
690
|
-
B,function(
|
|
689
|
+
function qr(a,b,c,d,e,f,g,h,k){var l=d.g,m=gr(d.h,g),n=uq(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={bd:y.bd},w++){var x=d.i[w],D=0==w?c:v[v.length-1],B=0==w?e:D.endTime,A=Number(Z(x,"DURATION"))||a.ja;if(A){A=B+A;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(D=Z(x,"BYTERANGE-START"))?Number(D):0:(F=Z(x,"BYTERANGE"),D=t(rr(D,F)),F=D.next().value,G=D.next().value);if(x=Z(x,"URI"))y.bd=kc([h],
|
|
690
|
+
[x])[0],v.push(new ki(B,A,function(H){return function(){return[H.bd]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=uq(l,"EXT-X-BYTERANGE"))?(q=t(rr(c,a.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].pa,q=v[v.length-1].ga);c="";a=null;"image"==k&&(c="1x1",k=uq(l,"EXT-X-TILES"))&&(c=pq(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(a=Number(k)));return new ki(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,a)}
|
|
691
691
|
function rr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ga+1,d=c+d-1);return[c,d]}function Zq(a){if(a.j){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.j.Fb(c.value);a.W=[]}}
|
|
692
692
|
function Qq(a,b,c,d,e,f,g,h,k,l){var m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:m=c.segments;p=vq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(q=uq(c.g,"EXT-X-SKIP"))?Number(Z(q,"SKIPPED-SEGMENTS")):0;y=p+v;if(a.m!=Kq&&f.has(y)){w=f.get(y);Y.B(2);break}if(null!=a.V){Y.B(3);break}n=or(a,c.h,m[0].g,g);x=a;return u(Y,sr(a,b,n,e,y,!1,m[0],g,d,k,l),4);case 4:x.V=Y.h;case 3:w=a.V;case 2:D=m[0].h;D.split("/").pop();B=vq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(B)||
|
|
693
693
|
h.set(B,y),v))for(A=h;A.has(B+1)&&A.get(B+1)<y;)B++;F=a.I.get(B)||0;G=[];H=0;case 5:if(!(H<m.length)){Y.B(7);break}J=m[H];I=G[G.length-1];K=0==H?w:I.endTime;y=p+v+H;f.set(y,K);n=or(a,c.h,J.g,g);P=uq(J.g,"EXT-X-DISCONTINUITY");if(!P){Y.B(8);break}B++;h.set(B,y);return u(Y,tr(a,B,b,n,e,y,J,g,K,d,k,l),9);case 9:F=Y.h;case 8:!a.l&&(R=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ba=uq(J.g,"EXTINF");a.l||ba?(aa=qr(a,n,I,J,K,F,g,c.h,d))&&G.push(aa):a.l||Ua("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.");
|
|
@@ -700,7 +700,7 @@ function wr(a,b,c,d){var e=0;(new lg).box("moov",pg).box("trak",pg).box("mdia",p
|
|
|
700
700
|
function xr(a,b,c){function d(){f.seek(g+188);h=f.Y();71!=h&&(f.seek(g+192),h=f.Y());71!=h&&(f.seek(g+204),h=f.Y());71!=h&&e();f.se(1)}function e(){throw new N(2,4,4030,a,b);}var f=new ig(c,0),g=0,h=0;for(c=Math.min(f.O.byteLength-188,940);;){g=f.X();h=f.Y();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Ib();if(8191==(k&8191))d();else if(k&16384)if(k=(f.Y()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.Y(),f.skip(k)),1!=f.M()>>8)d();else{f.skip(3);c=f.Y()>>6;0!=c&&1!=c||e();0==f.Y()&&e();c=f.Y();k=f.Ib();var l=
|
|
701
701
|
f.Ib();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function gr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
|
|
702
702
|
function kr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){f=qc;g=af;h=gr(d.segments[0].h,e);k=new Xb(h);l=k.va.split(".").pop();m=yr[b];if(n=m[l])return w["return"](n);if(b==f.Z)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.Rb&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=Ve([h],a.g.retryParameters);p.method="HEAD";return u(w,vr(a,p,g),2)}q=w.h;v=q.headers["content-type"];return v?w["return"](v.split(";")[0]):(y=m.mp4,w["return"](y))})}
|
|
703
|
-
function Lq(a,b){var c=Ve([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return vr(a,c,0)}function Jq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.
|
|
703
|
+
function Lq(a,b){var c=Ve([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return vr(a,c,0)}function Jq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.wa,a.C.S(b),va(d,0);c=E(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.S(.1);z(d)})}function Rq(a,b){a.m=b;a.j&&a.j.nc(a.m==Kq);a.m!=Kq||a.C.stop()}
|
|
704
704
|
function vr(a,b,c){if(!a.F)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);Qe(a.F,b);return b.promise}M("shaka.hls.HlsParser",Iq);
|
|
705
705
|
var lr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],yr={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",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},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"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
706
706
|
vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},ir={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=pq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=pq(a,"URI");b=Hq(b);b=Fb(b.data);b=lc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
|
|
@@ -720,7 +720,7 @@ function ds(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a
|
|
|
720
720
|
function es(a,b,c,d){a=as(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={sc:e.sc},f=c.next())e.sc=f.value,b["delete"](e.sc).onsuccess=function(g){return function(){return d(g.sc)}}(e);return a.promise()}
|
|
721
721
|
function fs(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=bs(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Qb:h.Qb,Ob:h.Ob},l=k.next())h.Ob=l.value,h.Qb=e.get(h.Ob),h.Qb.onsuccess=function(n){return function(){void 0==n.Qb.result&&g.push(n.Ob);f[n.Ob]=n.Qb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function hs(a){this.g=new $r(a)}hs.prototype.destroy=function(){return this.g.destroy()};hs.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=bs(a.g,"session-ids","readonly"),c=[],u(d,Zr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};hs.prototype.add=function(a){var b=as(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
722
722
|
hs.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=as(b.g,"session-ids"),u(d,Zr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function is(){this.g=new Map}is.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};is.prototype.init=function(){var a=this;js.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
723
|
-
function ks(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{
|
|
723
|
+
function ks(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ba:d,la:f},la:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function ls(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ba:d,la:f},e)})})}
|
|
724
724
|
function ms(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function ns(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function os(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
725
725
|
function ps(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=js,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function qs(a,b){js.set(a,b)}M("shaka.offline.StorageMuxer",is);is.unregister=function(a){js["delete"](a)};is.register=qs;is.prototype.destroy=is.prototype.destroy;var js=new Map;function rs(){cs.apply(this,arguments)}qa(rs,cs);rs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=as(c.h,c.g);e=d.store();f=new rc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
|
|
726
726
|
rs.prototype.Zb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=ss(a.periods[c],e),b.push(f);return u(h,Ap(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
|
|
@@ -738,7 +738,7 @@ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new ys(d,"segment-v5","man
|
|
|
738
738
|
r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
|
|
739
739
|
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};
|
|
740
740
|
r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,As(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
741
|
-
function As(){var a=new rc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}qs("idb",function(){return ud()||rd()||!window.indexedDB?null:new zs});function Bs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Bs.prototype.
|
|
741
|
+
function As(){var a=new rc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}qs("idb",function(){return ud()||rd()||!window.indexedDB?null:new zs});function Bs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Bs.prototype.Ba=function(){return this.i};Bs.prototype.la=function(){return this.h};Bs.prototype.key=function(){return this.l};Bs.prototype.toString=function(){return this.j};
|
|
742
742
|
function Cs(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Bs(b,c,d,Number(a[4])):null};function Ds(a,b){this.h=a;this.g=b}
|
|
743
743
|
function Es(a,b){var c=new S(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Fs(a,d,e,c);e=b.streams.filter(function(l){return l.type==pc}).map(function(l){return Gs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Gs(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
744
744
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f}}
|
|
@@ -747,23 +747,23 @@ e.value,g=Gs(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.va
|
|
|
747
747
|
function Gs(a,b,c){var d=b.segments.map(function(e){return Hs(a,e)});c.Fb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new T(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
748
748
|
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Hs(a,b){var c=new Bs("segment",a.h,a.g,b.dataKey);return new ki(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Is(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
749
749
|
function Is(a,b){var c=new Bs("segment",a.h,a.g,b);return new ii(function(){return[c.toString()]},0,null)};function Js(){this.g=null}r=Js.prototype;r.configure=function(){};
|
|
750
|
-
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Cs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new is;ua(m);return u(m,e.init(),4);case 4:return u(m,ms(e,d.
|
|
751
|
-
r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new is,C(m,2,3),u(m,e.init(),5);case 5:return u(m,ms(e,d.
|
|
750
|
+
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Cs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new is;ua(m);return u(m,e.init(),4);case 4:return u(m,ms(e,d.Ba(),d.la()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ds(d.Ba(),d.la()),l=Es(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
751
|
+
r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new is,C(m,2,3),u(m,e.init(),5);case 5:return u(m,ms(e,d.Ba(),d.la()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:E(m),m.B(3)}})};
|
|
752
752
|
eg["application/x-offline-manifest"]=function(){return new Js};function Ks(){}function Ls(a){var b=Cs(a);b&&"manifest"==b.g?(a={uri:a,pe:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=He(a)):a=b&&"segment"==b.g?Ms(b.key(),b):Fe(new N(2,1,9004,a));return a}
|
|
753
|
-
function Ms(a,b){var c=new is;return He(void 0).$(function(){return c.init()}).$(function(){return ms(c,b.
|
|
753
|
+
function Ms(a,b){var c=new is;return He(void 0).$(function(){return c.init()}).$(function(){return ms(c,b.Ba(),b.la())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Ks);Ks.plugin=Ls;Se("offline",Ls);function Ns(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),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,Os(y.info,p)){y.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Ps(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l["return"](d)}})}
|
|
754
754
|
function Ps(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new rf({mb:b,onError:function(){},Nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,zf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,Jf(d),8);case 8:va(f,7);break;case 6:return E(f),u(f,d.destroy(),
|
|
755
755
|
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return C(h,2),u(h,Kf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);E(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
756
|
-
function Os(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&gb(a.audioCapabilities,b.audioCapabilities,c)&&gb(a.videoCapabilities,b.videoCapabilities,c)};function Qs(a,b,c){var d=b.presentationTimeline.getDuration();b=Rs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ss(a,b){var c=Es(new Ds(a.
|
|
756
|
+
function Os(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&gb(a.audioCapabilities,b.audioCapabilities,c)&&gb(a.videoCapabilities,b.videoCapabilities,c)};function Qs(a,b,c){var d=b.presentationTimeline.getDuration();b=Rs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ss(a,b){var c=Es(new Ds(a.Ba(),a.la()),b),d=b.appMetadata||{};c=Rs(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}}
|
|
757
757
|
function Rs(a){var b=[],c=ge(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Yd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Zd(c.value));return b};function Ts(){this.g={}}function Us(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 Vs(a,b){a.g[b.id]=b.bandwidth||2048}function Ws(a,b){var c=a.g[b];null==c&&(c=0);return c};function Xs(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.bc()):(this.h=vk(),this.g=new Re);this.i=[];this.j=[];var c=!a;this.l=new bf(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Tr(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 u(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return u(k,b.g.destroy(),4);
|
|
758
758
|
case 4:b.h=null,b.g=null,z(k)}})})}function Ys(){if(od())a:{var a=t(js.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=Xs.prototype;r.destroy=function(){return this.l.destroy()};
|
|
759
759
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=sk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return xk(this.h,a)};r.getConfiguration=function(){var a=vk();xk(a,this.h,vk());return a};r.bc=function(){return this.g};
|
|
760
760
|
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Sr(this.g);this.j.push(f);b=Zs(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,dg(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Sb(h))})},e,f);var g=new Ee(b,function(){return Tr(f)});g["finally"](function(){fb(d.j,f)});g.then=function(h){Kb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
|
|
761
761
|
return g.promise.then(h)};return $s(this,g)};r.lf=function(){Kb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
|
|
762
762
|
function Zs(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,w,x,D,B;return L(function(A){switch(A.g){case 1:return at(),h=g=null,k=new is,n=m=l=null,C(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,bt(a,b,g,e),6);case 6:p=A.h;ct(a);q=!p.presentationTimeline.T()&&!p.presentationTimeline.lb();if(!q)throw new N(2,9,9005,b);return u(A,dt(a,p,function(F){n=n||F},e),7);case 7:h=A.h;ct(a);if(n)throw n;return u(A,et(p,e),8);case 8:return u(A,k.init(),9);case 9:return ct(a),u(A,ks(k),10);case 10:return l=A.h,ct(a),v=ft(h,
|
|
763
|
-
p,b,c,e,f),y=v.yf,w=v.Ud,u(A,l.la.addManifests([y]),11);case 11:x=A.h;ct(a);m=x[0];ct(a);if(n)throw n;return u(A,gt(a,w,m,y,f,e,l.la,p,h),12);case 12:return ct(a),D=new Bs("manifest",l.path.
|
|
763
|
+
p,b,c,e,f),y=v.yf,w=v.Ud,u(A,l.la.addManifests([y]),11);case 11:x=A.h;ct(a);m=x[0];ct(a);if(n)throw n;return u(A,gt(a,w,m,y,f,e,l.la,p,h),12);case 12:return ct(a),D=new Bs("manifest",l.path.Ba,l.path.la,m),A["return"](Ss(D,y));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.B(14);break}return u(A,g.stop(),14);case 14:if(!h){A.B(16);break}return u(A,h.destroy(),16);case 16:xa(A,0);break;case 2:B=E(A);if(null==m){A.B(18);break}return u(A,ht(m),18);case 18:throw n||B;}})}
|
|
764
764
|
function gt(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,F){var G,H,J,I,K,P,R;return L(function(ba){if(1==ba.g){G={};H=t(A);for(J=H.next();!J.done;G={ab:G.ab},J=H.next())G.ab=J.value,I=Pr(G.ab,f),K=G.ab.i,P=G.ab.h,R=function(aa){return function(Y){var Da,Fa,ya;return L(function(Ia){if(1==Ia.g)return u(Ia,g.addSegments([{data:Y}]),2);Da=Ia.h;ct(a);Fa=aa.ab.g;ya=Or(Fa);l[ya]=Da[0];m+=Y.byteLength;z(Ia)})}}(G),Vr(e,G.ab.groupId,I,K,P,R);return u(ba,
|
|
765
765
|
Xr(e),2)}if(!F)return ba.B(0);ct(a);it(h,d,k,f);return u(ba,g.updateManifest(c,d),0)})};p=!1;C(B,2);if(!jt(h)||!p||kt(h)){B.B(4);break}return u(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return ct(a),b=b.filter(function(A){return!A.h}),q=l,v=m,l={},m=0,u(B,lt(g,c,d,q,v,function(){return ct(a)}),6);case 6:ct(a);case 4:if(p){B.B(7);break}return u(B,n(b,!1),8);case 8:return ct(a),y=l,w=m,l={},m=0,u(B,lt(g,c,d,y,w,function(){return ct(a)}),9);case 9:ct(a);case 7:va(B,0);break;case 2:return x=
|
|
766
|
-
E(B),D=Object.values(l),u(B,g.removeSegments(D,function(){}),10);case 10:throw x;}})}function ht(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new is,u(f,b.init(),2);case 2:return u(f,ks(b),3);case 3:return c=f.h,d=new Bs("manifest",c.path.
|
|
766
|
+
E(B),D=Object.values(l),u(B,g.removeSegments(D,function(){}),10);case 10:throw x;}})}function ht(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new is,u(f,b.init(),2);case 2:return u(f,ks(b),3);case 3:return c=f.h,d=new Bs("manifest",c.path.Ba,c.path.la,a),u(f,b.destroy(),4);case 4:return e=new Xs,u(f,e.remove(d.toString()),0)}})}
|
|
767
767
|
function lt(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,w;return L(function(x){switch(x.g){case 1:g=!1;C(x,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
|
|
768
768
|
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(x,a.updateManifest(b,c),4);case 4:g=!0;f();va(x,0);break;case 2:return y=E(x),u(x,ht(b),5);case 5:if(g){x.B(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
|
|
769
769
|
function et(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:return c={width:Infinity,height:Infinity},Ld(a,b.restrictions,c),u(Y,Od(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;zd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Yd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
|
|
@@ -772,11 +772,11 @@ ba.next())aa=F.value,"variant"==aa.type&&K.add(aa.id),"text"==aa.type&&P.add(aa.
|
|
|
772
772
|
function ft(a,b,c,d,e,f){var g=Qs(c,b,d),h=e.offline.progressCallback;Ur(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&If(a,"cenc",q)});var k=jt(b)&&!kt(b),l=null;k&&(l=nt.get(a.g.keySystem));for(var m=new Ts,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Vs(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Us(m,n.value);m=ot(f,m,b);f=m.streams;m=m.Ud;p=a.g;n=e.offline.usePersistentLicense;
|
|
773
773
|
p&&n&&(p.initData=[]);return{yf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ac(),streams:f,sessionIds:n?Of(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Ud:m}}function jt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
774
774
|
function kt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function it(a,b,c,d){b.expiration=c.ac();c=Of(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(jt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return pt(this,qt(this,a))};
|
|
775
|
-
function qt(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:at();c=Cs(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new is;ua(k);return u(k,e.init(),4);case 4:return u(k,ms(e,d.
|
|
775
|
+
function qt(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:at();c=Cs(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new is;ua(k);return u(k,e.init(),4);case 4:return u(k,ms(e,d.Ba(),d.la()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([rt(a,h,e),st(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
|
|
776
776
|
function tt(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Nc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Nc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function rt(a,b,c){return L(function(d){return u(d,ut(a.g,a.h.drm,c,b),0)})}
|
|
777
777
|
function st(a,b,c){function d(){}var e=vt(c);Ss(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Mf=function(){return pt(this,wt(this))};
|
|
778
778
|
function wt(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return at(),b=a.g,c=a.h.drm,d=new is,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],ns(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Ns(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
|
|
779
|
-
r.list=function(){return pt(this,xt())};function xt(){var a,b,c;return L(function(d){switch(d.g){case 1:return at(),a=[],b=new is,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ls(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Ss(new Bs("manifest",e.
|
|
779
|
+
r.list=function(){return pt(this,xt())};function xt(){var a,b,c;return L(function(d){switch(d.g){case 1:return at(),a=[],b=new is,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ls(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Ss(new Bs("manifest",e.Ba,e.la,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
|
|
780
780
|
function bt(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),ct(a),u(l,c.start(b,
|
|
781
781
|
g),2);if(3!=l.g)return h=l.h,ct(a),k=yt(h),u(l,Promise.all(mf(k,function(m){return m.createSegmentIndex()})),3);ct(a);if(e)throw e;return l["return"](h)})}function dt(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new rf({mb:a.g,onError:c,Nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,wf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Jf(e),3);case 3:return u(f,Hf(e),4);case 4:return f["return"](e)}})}
|
|
782
782
|
function ot(a,b,c){var d=new Map,e=yt(c),f=new Map;e=t(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=zt(a,b,c,g,d);f.set(g.id,h)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Ud:Array.from(d.values())}}
|