shaka-player 4.10.8 → 4.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales.js +37 -37
- package/dist/shaka-player.compiled.d.ts +5 -0
- package/dist/shaka-player.compiled.debug.d.ts +5 -0
- package/dist/shaka-player.compiled.debug.externs.js +16 -0
- package/dist/shaka-player.compiled.debug.js +40 -37
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +16 -0
- package/dist/shaka-player.compiled.js +146 -142
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +5 -0
- package/dist/shaka-player.ui.debug.d.ts +5 -0
- package/dist/shaka-player.ui.debug.externs.js +16 -0
- package/dist/shaka-player.ui.debug.js +45 -42
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +16 -0
- package/dist/shaka-player.ui.js +147 -143
- package/dist/shaka-player.ui.map +3 -3
- package/externs/shaka/ads.js +5 -0
- package/lib/ads/client_side_ad.js +8 -0
- package/lib/ads/interstitial_ad.js +7 -0
- package/lib/ads/interstitial_ad_manager.js +8 -6
- package/lib/ads/media_tailor_ad.js +7 -0
- package/lib/ads/server_side_ad.js +7 -0
- package/lib/media/streaming_engine.js +7 -6
- package/lib/player.js +2 -2
- package/lib/text/ui_text_displayer.js +37 -10
- package/package.json +1 -1
- package/ui/seek_bar.js +1 -1
- package/ui/skip_ad_button.js +1 -1
|
@@ -79,10 +79,10 @@ var tc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
79
79
|
Copyright 2006 The Closure Library Authors
|
|
80
80
|
SPDX-License-Identifier: Apache-2.0
|
|
81
81
|
*/
|
|
82
|
-
function uc(a){var b;a instanceof uc?(vc(this,a.
|
|
83
|
-
r.toString=function(){var a=[],b=this.
|
|
84
|
-
r.resolve=function(a){var b=this.clone();"data"===b.
|
|
85
|
-
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Pa=d:c=""!==a.g.toString();c?yc(b,a.g.clone()):c=!!a.lc;c&&(b.lc=a.lc);return b};r.clone=function(){return new uc(this)};function vc(a,b,c){a.
|
|
82
|
+
function uc(a){var b;a instanceof uc?(vc(this,a.Db),this.yc=a.yc,wc(this,a.Gb),xc(this,a.Pc),this.Pa=a.Pa,yc(this,a.g.clone()),this.lc=a.lc):a&&(b=String(a).match(tc))?(vc(this,b[1]||"",!0),this.yc=zc(b[2]||""),wc(this,b[3]||"",!0),xc(this,b[4]),this.Pa=zc(b[5]||"",!0),yc(this,b[6]||"",!0),this.lc=zc(b[7]||"")):this.g=new Ac(null)}r=uc.prototype;r.Db="";r.yc="";r.Gb="";r.Pc=null;r.Pa="";r.lc="";
|
|
83
|
+
r.toString=function(){var a=[],b=this.Db;b&&a.push(Bc(b,Cc,!0),":");if(b=this.Gb){a.push("//");var c=this.yc;c&&a.push(Bc(c,Cc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Pc;null!=b&&a.push(":",String(b))}if(b=this.Pa)this.Gb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Bc(b,"/"==b.charAt(0)?Dc:Ec,!0));(b=this.g.toString())&&a.push("?",b);(b=this.lc)&&a.push("#",Bc(b,Fc));return a.join("")};
|
|
84
|
+
r.resolve=function(a){var b=this.clone();"data"===b.Db&&(b=new uc);var c=!!a.Db;c?vc(b,a.Db):c=!!a.yc;c?b.yc=a.yc:c=!!a.Gb;c?wc(b,a.Gb):c=null!=a.Pc;var d=a.Pa;if(c)xc(b,a.Pc);else if(c=!!a.Pa){if("/"!=d.charAt(0))if(this.Gb&&!this.Pa)d="/"+d;else{var e=b.Pa.lastIndexOf("/");-1!=e&&(d=b.Pa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
|
|
85
|
+
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Pa=d:c=""!==a.g.toString();c?yc(b,a.g.clone()):c=!!a.lc;c&&(b.lc=a.lc);return b};r.clone=function(){return new uc(this)};function vc(a,b,c){a.Db=c?zc(b,!0):b;a.Db&&(a.Db=a.Db.replace(/:$/,""))}function wc(a,b,c){a.Gb=c?zc(b,!0):b}function xc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Pc=b}else a.Pc=null}
|
|
86
86
|
function yc(a,b,c){b instanceof Ac?a.g=b:(c||(b=Bc(b,Gc)),a.g=new Ac(b))}function zc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Bc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Hc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Hc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Cc=/[#\/\?@]/g,Ec=/[#\?:]/g,Dc=/[#\?]/g,Gc=/[#\?@]/g,Fc=/#/g;function Ac(a){this.g=a||null}
|
|
87
87
|
function Ic(a){if(!a.Ka&&(a.Ka={},a.pd=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=Ac.prototype;r.Ka=null;r.pd=null;function Jc(a){Ic(a);return a.pd}r.add=function(a,b){Ic(this);this.g=null;var c=this.Ka.hasOwnProperty(a)?this.Ka[a]:null;c||(this.Ka[a]=c=[]);c.push(b);this.pd++;return this};
|
|
88
88
|
r.set=function(a,b){Ic(this);this.g=null;this.Ka.hasOwnProperty(a)?this.Ka[a]=[b]:this.add(a,b);return this};r.get=function(a){Ic(this);return this.Ka[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ka)return"";var a=[],b;for(b in this.Ka)for(var c=encodeURIComponent(b),d=this.Ka[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
@@ -124,8 +124,8 @@ audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUr
|
|
|
124
124
|
function Wd(a,b){var c=[];a=t(Ud[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Vd="text",Xd={ga:"video",X:"audio",ta:Vd,Ze:"image",nj:"application"},Yd=1/15,Ud={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Zd(){}function $d(a,b){var c=a;b&&!ae.includes(a)&&(c+='; codecs="'+b+'"');return c}function be(a,b){b&&(a+='; codecs="'+b+'"');return a}function ce(a,b,c){var d=$d(a,b);b=be(a,b);oc(b)?(a=oc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
125
125
|
function de(a,b,c){var d=[b];ee.forEach(function(e,f){var g=a[f];"codecs"==f?ae.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function fe(a){return a.split(";")[0].split("/")[1]}
|
|
126
126
|
function ge(a){var b=he(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
127
|
-
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function ie(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=he(c.value),b.push(c[0]);return b.sort().join(",")}function
|
|
128
|
-
function oe(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function
|
|
127
|
+
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function ie(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=he(c.value),b.push(c[0]);return b.sort().join(",")}function je(a){return a.split(";")[0]}
|
|
128
|
+
function oe(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function pe(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function he(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",Zd);Zd.getFullTypeWithAllCodecs=be;Zd.getFullType=$d;
|
|
129
129
|
var ee=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),ae=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function re(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function se(a){return te[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Jb:!1}re.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
130
130
|
function ue(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return G(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Ab(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Ab(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(q){return q.startTime>=a.l&&q.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(p)})}
|
|
131
131
|
re.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return G(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));H(d)})};function ve(a,b,c){a.l=b;a.m=c}function we(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
@@ -154,12 +154,12 @@ function Ze(a,b){var c=Zc(),d=$c("Firefox")&&od(),e=a.video,f=e&&e.width||0,g=e&
|
|
|
154
154
|
if(e){d=bf(e.codecs,e.mimeType);c=ce(e.mimeType,d,"audio");if(!nb(c))return!1;e.codecs=d}return a.decodingInfos.some(function(h){return!h.supported||b&&(h=h.keySystemAccess)&&h.keySystem!=b?!1:!0})}function cf(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=cf(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
155
155
|
function df(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Ne(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f={};g=t(b);for(h=g.next();!h.done;f={Wc:f.Wc,Xc:f.Xc},h=g.next())k=h.value,f.Xc=cf(k),f.Wc=ef,f.Wc[f.Xc]?d=c(d,f.Wc[f.Xc]):e.push(ff(k).then(function(m){return function(n){var p=
|
|
156
156
|
null;n=t(n||[]);for(var q=n.next();!q.done;q=n.next())p=c(p,q.value);p&&(m.Wc[m.Xc]=p,d=c(d,p))}}(f)));return G(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
|
|
157
|
-
function ff(a){var b=[""];a.video&&(b=oe(a.video.contentType).split(","));var c=[""];a.audio&&(c=oe(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={fc:f.fc},h=g.next())h=h.value,f.fc=Me(a),a.video&&(f.fc.video.contentType=$d(
|
|
157
|
+
function ff(a){var b=[""];a.video&&(b=oe(a.video.contentType).split(","));var c=[""];a.audio&&(c=oe(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={fc:f.fc},h=g.next())h=h.value,f.fc=Me(a),a.video&&(f.fc.video.contentType=$d(je(f.fc.video.contentType),e)),a.audio&&(f.fc.audio.contentType=$d(je(f.fc.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.fc).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
158
158
|
return null})}
|
|
159
159
|
function Ye(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z;return O(function(B){switch(B.g){case 1:if(e=a.some(function(C){return C.decodingInfos.length}))return B.return();f={};g=t(d);h=g.next();case 2:if(h.done){B.u(4);break}f.Se=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){B.u(7);break}n=m.value;p=gf(n,b,c).filter(function(C){return function(F){F=F[0];return(F.keySystemConfiguration&&F.keySystemConfiguration.keySystem)===C.Se}}(f));q=t(p);u=q.next();case 8:if(u.done){B.u(10);break}w=u.value;
|
|
160
160
|
return G(B,df(n,w),9);case 9:u=q.next();B.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();B.u(5);break;case 7:if(k)return B.return();f={Se:f.Se};h=g.next();B.u(2);break;case 4:v=t(a),m=v.next();case 12:if(m.done){B.u(0);break}A=m.value;y=gf(A,b,c).filter(function(C){C=C[0];C=C.keySystemConfiguration&&C.keySystemConfiguration.keySystem;return!C||!d.includes(C)});D=t(y);u=D.next();case 15:if(u.done){m=v.next();B.u(12);break}z=u.value;return G(B,df(A,z),16);case 16:u=D.next(),B.u(15)}})}
|
|
161
|
-
function gf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=oe(k);if(l.includes(",")&&!d){var m=l.split(","),n=
|
|
162
|
-
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=
|
|
161
|
+
function gf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=oe(k);if(l.includes(",")&&!d){var m=l.split(","),n=je(k);l=Sd("video",m);m=Sd("audio",m);m=bf(m,n);n=ce(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=af(l);k={contentType:ce(je(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
|
|
162
|
+
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=je(l),l=bf(oe(l),k),k=ce(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
|
|
163
163
|
k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(var p=g.next();!p.done;p=g.next())f=p.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=
|
|
164
164
|
n.next();!m.done;m=n.next()){m=Object.assign({},m.value);var q=c.get(k),u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};q=t(q);for(p=q.next();!p.done;p=q.next()){p=p.value;if(p.initData&&p.initData.length){for(var w=new Set,v=t(p.initData),A=v.next();!A.done;A=v.next())w.add(A.value.initDataType);u.initDataType=p.initData[0].initDataType}p.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");p.persistentStateRequired&&(u.persistentState=
|
|
165
165
|
"required");p.sessionType&&(u.sessionTypes=[p.sessionType]);d&&(u.audio?(p.encryptionScheme&&(u.audio.encryptionScheme=u.audio.encryptionScheme||p.encryptionScheme),u.audio.robustness=u.audio.robustness||p.audioRobustness):(u.audio={robustness:p.audioRobustness},p.encryptionScheme&&(u.audio.encryptionScheme=p.encryptionScheme)),""==u.audio.robustness&&delete u.audio.robustness);e&&(u.video?(p.encryptionScheme&&(u.video.encryptionScheme=u.video.encryptionScheme||p.encryptionScheme),u.video.robustness=
|
|
@@ -178,7 +178,7 @@ videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audio
|
|
|
178
178
|
function qf(a){var b=rf(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="unknown");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function sf(a){var b=rf(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
|
|
179
179
|
function rf(a){var b=a.language;return{id:of(a),active:!1,type:"",bandwidth:0,language:Ee(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,
|
|
180
180
|
originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function tf(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function uf(a){return a.filter(function(b){return tf(b)})}
|
|
181
|
-
function
|
|
181
|
+
function vf(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Le(Ee(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Ee(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Af(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(ze,[]);return a.length?
|
|
182
182
|
Af(e,a[0]):e}function Af(a,b){return a.filter(function(c){return c.roles.includes(b)})}function $e(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"}S("shaka.util.StreamUtils",Oe);Oe.meetsRestrictions=Se;
|
|
183
183
|
var ef={},pf=0,hf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),jf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Bf(){var a=this;this.A=null;this.s=!1;this.i=new Va;this.F=new gb;navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",function(){if(a.s&&a.g.useNetworkInformation){a.i=new Va;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.o=[];this.B=1;this.G=!1;this.h=this.m=this.g=this.j=null;this.C=new Tc(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
184
184
|
b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.l=null}r=Bf.prototype;r.stop=function(){this.A=null;this.s=!1;this.o=[];this.B=1;this.m=this.j=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.l=null};r.release=function(){this.F.release();this.C=null};r.init=function(a){this.A=a};
|
|
@@ -210,7 +210,7 @@ function tg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
|
|
|
210
210
|
r.request=function(a,b,c){var d=this,e=new ug;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new vg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Me(b.retryParameters):$f();b.uris=Me(b.uris);f=wg(this,a,b,c);var g=f.Aa(function(){return xg(d,a,b,c,new Zf(b.retryParameters,!1),0,null,e)}),h=g.Aa(function(p){return yg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
211
211
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Aa(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.pi||!d.l||u.fromCache||"HEAD"==b.method||a!=zg||d.l(u.timeMs,u.data.byteLength,Ag(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new vg(n.promise,function(){return n.abort()},e);ng(this.m,f);return f};
|
|
212
212
|
function wg(a,b,c,d){function e(h){f=f.Aa(function(){c.body&&(c.body=Cb(c.body));return h(b,c,d)})}var f=fg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Aa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
213
|
-
function xg(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new uc(c.uris[f]),l=k.
|
|
213
|
+
function xg(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new uc(c.uris[f]),l=k.Db,m=!1;l||(l=location.protocol,l=l.slice(0,-1),vc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=rg[l])?l.De:null;if(!n)return dg(new T(2,1,1E3,k));var p=l.Ki,q=null,u=null,w=!1,v=!1,A;return gg(ag(e)).Aa(function(){if(a.i)return eg();A=Date.now();var y=0;c.requestStartTime=Date.now();
|
|
214
214
|
var D=n(c.uris[f],c,b,function(C,F,I){q&&q.stop();u&&u.Y(B/1E3);a.l&&b==zg&&(y++,c.packetNumber=y,a.l(C,F,Ag(d),c),m=!0,h.g=I)},function(C){a.j&&a.j(C,c,b);v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return D;var z=c.retryParameters.connectionTimeout;z&&(q=new Tc(function(){w=!0;D.abort()}),q.Y(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Tc(function(){w=!0;D.abort()}));return D}).Aa(function(y){q&&q.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var D={response:y,
|
|
215
215
|
pi:m};!v&&a.j&&a.j(y.headers,c,b);return D},function(y){q&&q.stop();u&&u.stop();if(a.A){var D=null,z=0;y instanceof T&&(D=y,1001==y.code&&(z=y.data[1]));a.A(c,D,z,w)}if(a.i)return eg();w&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return D=(new Map).set("error",y),D=new U("retry",D),a.dispatchEvent(D),f=(f+1)%c.uris.length,xg(a,b,c,d,e,f,y,h)}throw y;})}
|
|
216
216
|
function yg(a,b,c,d){var e=fg(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ue:f.Ue},g=a.next())f.Ue=g.value,e=e.Aa(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return h.Ue(b,k,d)}}(f));return e.Aa(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function Ag(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Kd)return!1}return!0}S("shaka.net.NetworkingEngine",og);
|
|
@@ -252,7 +252,7 @@ w.next())v=q.value,Qh(v,Gg(a.h.servers),Gg(a.h.advanced||{}),a.h.keySystemsMappi
|
|
|
252
252
|
function Rh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return G(c,a.G,3);case 3:return Cg(a.j),c.return();case 2:return sa(c,4),a.G=a.m.setMediaKeys(a.s),G(c,a.G,6);case 6:va(c,5);break;case 4:b=wa(c),a.o(new T(2,6,6003,b.message));case 5:Cg(a.j),H(c)}})}function Sh(a,b){return O(function(c){if(1==c.g)return G(c,Rh(a),2);Th(a,b.initDataType,Ab(b.initData));H(c)})}
|
|
253
253
|
r.Ub=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.ha(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.ha(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Uh(b,e.value);b.U=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Hh(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
|
|
254
254
|
b.A.size?G(c,Rh(b),2):c.u(2)}Vh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Sh(b,d)});H(c)})};
|
|
255
|
-
function Wh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=tg([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.C.
|
|
255
|
+
function Wh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=tg([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.C.Nb.request(5,b);return G(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ab(d.data);va(g,4);break;case 3:throw e=wa(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
256
256
|
sa(g,6);return G(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new T(2,6,6004,f.message);}})}function Xh(a,b){var c,d,e;return O(function(f){if(1==f.g)return G(f,Yh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.mb=new bg,d.push(e.mb);d.push(c.remove());return G(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
|
|
257
257
|
function Vh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){Yh(a,k,h)});return G(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Zh(a))return g.return(a.l);a.l=new bg;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Th(a,f.initDataType,f.initData);$h(a)&&a.l.resolve();return g.return(a.l)})}
|
|
258
258
|
function Th(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(yb(c,e.value.initData))return}0<a.i.size&&$h(a)&&(a.l.resolve(),a.l=new bg,a.l.catch(function(){}));ai(a,b,c,a.g.sessionType)}}function bi(a){a=a.i.keys();a=Dg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
@@ -272,7 +272,7 @@ d.load(b),4);case 4:return g=m.h,Cg(a.j),g||(a.i.delete(d),h=a.h.persistentSessi
|
|
|
272
272
|
function ai(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.U?a.N.push(f):Uh(a,f)});a.B.D(e,"keystatuseschange",function(f){return ii(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Rf:Infinity,mb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Gd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
273
273
|
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.o(new T(2,6,6006,f.message,f,h))}})}
|
|
274
274
|
function Uh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w;O(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&Gd(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=tg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
|
|
275
|
-
f.headers[h];if(Pc(a.g.keySystem)){var A=xd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=ah(A,"PlayReadyKeyMessage");var y=jh(A,"HttpHeader");y=t(y);for(var D=y.next();!D.done;D=y.next()){var z=D.value;D=jh(z,"name")[0];z=jh(z,"value")[0];g.headers[hh(D)]=hh(z)}A=jh(A,"Challenge")[0];g.body=Hd(hh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();sa(v,2);m=a.C.
|
|
275
|
+
f.headers[h];if(Pc(a.g.keySystem)){var A=xd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=ah(A,"PlayReadyKeyMessage");var y=jh(A,"HttpHeader");y=t(y);for(var D=y.next();!D.done;D=y.next()){var z=D.value;D=jh(z,"name")[0];z=jh(z,"value")[0];g.headers[hh(D)]=hh(z)}A=jh(A,"Challenge")[0];g.body=Hd(hh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();sa(v,2);m=a.C.Nb.request(2,g);return G(v,m.promise,4);case 4:l=v.h;va(v,3);break;case 2:n=wa(v);if(a.j.g)return v.return();
|
|
276
276
|
p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.mb&&d.mb.reject(p)):(d&&d.mb&&d.mb.reject(p),a.i.delete(c),$h(a)&&(a.l.resolve(),a.L.Y(.1)));return v.return();case 3:if(a.j.g)return v.return();a.I+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Gd(l.data);sa(v,5);return G(v,c.update(l.data),7);case 7:va(v,6);break;case 5:return q=wa(v),u=new T(2,6,6008,q.message),a.o(u),d&&d.mb&&d.mb.reject(u),v.return();case 6:if(a.j.g)return v.return();w=new U("drmsessionupdate");a.C.onEvent(w);d&&(d.mb&&d.mb.resolve(),
|
|
277
277
|
gi(a,d));H(v)}})}
|
|
278
278
|
function ii(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Pc(a.g.keySystem)&&16==g.byteLength&&(Yc()||jd())){h=Fb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Jd(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.mb&&(a.i.delete(b),b.close().catch(function(){}));$h(a)&&
|
|
@@ -396,9 +396,9 @@ function rk(a,b,c,d){return dk(a,b,function(){b!==Vd&&(pb()&&(a.j[b]&&(a.j[b].de
|
|
|
396
396
|
function sk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L;return O(function(J){switch(J.g){case 1:c=Xd;a.C=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.ra&&(a.i.autoplay=!1);ua(J,2);a.s.Ra();g=[];for(h in a.j)g.push(a.j[h].destroy());for(k in a.l)for(l=a.l[k],m=l[0],a.l[k]=l.slice(0,1),m&&g.push(m.p.catch(Ae)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())q=p.value,q.p.reject(new T(2,7,7003,void 0));for(u in a.h){w=a.h[u];try{a.m.removeSourceBuffer(w)}catch(E){}}return G(J,
|
|
397
397
|
Promise.all(g),4);case 4:return a.j={},a.h={},v=a.m.duration,a.L=new bg,a.m=Oj(a,a.L),G(J,a.L,5);case 5:!isNaN(v)&&v?a.m.duration=v:!isNaN(a.ea)&&a.ea&&(a.m.duration=a.ea),A=new bg,y=a.m.sourceBuffers,D=b.size,z=0,B=function(){z++;z===D&&(A.resolve(),a.s.lb(y,"addsourcebuffer",B))},a.s.D(y,"addsourcebuffer",B),C=t(b.keys()),F=C.next();case 6:if(F.done)return a.i.currentTime=d,G(J,A,2);I=F.value;L=b.get(I);return G(J,Sj(a,I,L,L.codecs),9);case 9:a.o?(a.l[c.X]=[],a.l[c.ga]=[]):a.l[I]=[];F=C.next();
|
|
398
398
|
J.u(6);break;case 2:xa(J),a.C=!1,Cg(a.I),a.s.ha(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),ya(J,0)}})}function tk(a,b){return ok(a,function(){return sk(a,b)})}
|
|
399
|
-
function mk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,A,y,D;return O(function(z){if(1==z.g){f=Xd;if(b==f.ta)return z.return(!1);g=ie(oe(a.G[b]));h=
|
|
399
|
+
function mk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,A,y,D;return O(function(z){if(1==z.g){f=Xd;if(b==f.ta)return z.return(!1);g=ie(oe(a.G[b]));h=je(a.G[b]);l=!1;m=$d(c,d);n=a.A.forceTransmux;if(!nb(m)||!a.B&&ae.includes(m))n=!0;n&&(p=be(c,d),q=oc(p))&&(k=q(),u=Td(f.X,(d||"").split(",")),w=Td(f.ga,(d||"").split(",")),u&&w?(l=!0,v=w,b==f.X&&(v=u),m=k.convertCodecs(b,be(c,v))):m=k.convertCodecs(b,p));A=ie(oe(m));y=je(m);if(g===A&&h===y)return a.j[b]&&!k?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&k?a.j[b]=
|
|
400
400
|
k:k&&(a.j[b]&&a.j[b].transmux!=k.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=k):k.destroy()),z.return(!1);D=!0;if(a.o||l&&k&&!a.j[b])D=!1;if(D&&"smooth"===a.A.codecSwitchingStrategy&&pb())return G(z,rk(a,b,m,k),3);k&&k.destroy();return G(z,tk(a,e),3)}return z.return(!0)})}
|
|
401
|
-
function uk(a,b,c,d){if(b==Vd)var e=!1;else{e=ie(oe(a.G[b]));var f=
|
|
401
|
+
function uk(a,b,c,d){if(b==Vd)var e=!1;else{e=ie(oe(a.G[b]));var f=je(a.G[b]),g=$d(c,d),h=a.A.forceTransmux;if(!nb(g)||!a.B&&ae.includes(g))h=!0;c=be(c,d);h&&(h=oc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ie(oe(g));g=je(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var Qj=window.URL.createObjectURL,Uj="sequence";function vk(a,b,c){this.i=a;this.A=b;this.o=this.j=Infinity;this.g=1;this.h=this.l=null;this.B=0;this.G=!0;this.H=0;this.C=void 0===c?!0:c;this.F=0;this.s=!1;this.m=a}r=vk.prototype;r.getDuration=function(){return this.j};r.Zh=function(){return this.g};r.mh=function(a){this.i=a};r.$a=function(a){this.j=a};r.di=function(){return this.i};r.kh=function(a){this.B=a};r.wc=function(a){this.G=a};r.Ie=function(a){this.o=a};r.je=function(){return this.o};r.eg=function(a){this.A=a};r.Sh=function(){return this.A};
|
|
402
402
|
r.$g=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.ye(a[0].start+b);this.g=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.g);this.h=Math.max(this.h,d);null!=this.i&&this.C&&!this.s&&(this.i=c-this.h-this.g)}}};
|
|
403
403
|
r.Jd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.ye(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.s&&(this.i=d-this.h-this.g)}};r.$h=function(){return this.h};r.re=function(){this.s=!0};r.zi=function(){return this.s};r.lh=function(a){this.m=a};r.Wh=function(){return this.m};
|
|
404
404
|
r.ye=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.Pf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.V=function(){return Infinity==this.j&&!this.G};r.qc=function(){return Infinity!=this.j&&!this.G};r.nb=function(){return Math.max(this.H,this.Zb()-this.o)};r.qh=function(a){this.H=a};
|
|
@@ -416,19 +416,19 @@ function Mk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.
|
|
|
416
416
|
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Yb():g.g.Ab():0>h&&(h=g.g.Ab()+h);return Pk(g,Qk(g,h))});this.m=new Tc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Hk(g.h),k=g.g.Yb(),l=g.g.Ab();3>l-k&&(k=l-3);h<k&&(h=Ok(g,h),g.i.currentTime=h)}})}r=Mk.prototype;r.$e=function(){this.m.Sa(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};
|
|
417
417
|
r.af=function(a){Ik(this.h,a)};r.$d=function(){var a=Hk(this.h);return 0<this.i.readyState&&!this.i.paused?Qk(this,a):a};r.vg=function(){return this.o?this.o.o:0};r.ug=function(){return this.j.C};r.Zg=function(){this.j.Sf()};function Pk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
418
418
|
function Ok(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Yb(),f=a.g.Ab(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ud(c),k=a.g.ud(d);c=a.g.ud(c+d);return b>=g?Pk(a,b):b>f?f:b<e?Ii(a.i.buffered,k)?k:c:b>=h||Ii(a.i.buffered,b)?b:c}function Qk(a,b){var c=a.g.Yb();if(b<c)return c;a=a.g.Ab();return b>a?a:b}
|
|
419
|
-
function Nk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new wk(new zk(a),b.stallThreshold,c);yk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Rk(a){this.O=a;this.l=null;this.i=0;this.m=!1}r=Rk.prototype;r.getNumReferences=function(){return this.O.length};r.getNumEvicted=function(){return this.i};r.release=function(){this.m||(this.O=[],this.l&&this.l.stop(),this.l=null)};r.Fi=function(){this.m=!0};r.
|
|
419
|
+
function Nk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new wk(new zk(a),b.stallThreshold,c);yk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Rk(a){this.O=a;this.l=null;this.i=0;this.m=!1}r=Rk.prototype;r.getNumReferences=function(){return this.O.length};r.getNumEvicted=function(){return this.i};r.release=function(){this.m||(this.O=[],this.l&&this.l.stop(),this.l=null)};r.Fi=function(){this.m=!0};r.Jb=function(a){for(var b=t(this.O),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
420
420
|
r.find=function(a){for(var b=this.O.length-1,c=b;0<=c;--c){var d=this.O[c],e=c<b?this.O[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.O.length&&a<this.O[0].startTime?this.i:null};r.get=function(a){if(0==this.O.length)return null;a-=this.i;return 0>a||a>=this.O.length?null:this.O[a]};r.offset=function(a){if(!this.m)for(var b=t(this.O),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
421
421
|
r.ue=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.O=this.O.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.O.push.apply(this.O,x(a))}};r.Id=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.O.length||d.endTime>c.O[0].startTime)});this.ue(a);this.Oa(b)};r.Oa=function(a){if(!this.m){var b=this.O.length;this.O=this.O.filter(function(c){return c.endTime>a});this.i+=b-this.O.length}};
|
|
422
422
|
r.Ec=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.i++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],b=new Ci(a.startTime,b,a.C,a.Ha,a.sa,a.$,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.O[this.O.length-1]=b)}};
|
|
423
|
-
r.Me=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Tc(function(){var d=b();d?c.O.push.apply(c.O,x(d)):(c.l.stop(),c.l=null)}),this.l.Sa(a))};Rk.prototype[Symbol.iterator]=function(){return this.
|
|
424
|
-
Rk.prototype.
|
|
425
|
-
S("shaka.media.SegmentIndex",Rk);Rk.forSingleSegment=Tk;Rk.prototype.getIteratorForTime=Rk.prototype.
|
|
423
|
+
r.Me=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Tc(function(){var d=b();d?c.O.push.apply(c.O,x(d)):(c.l.stop(),c.l=null)}),this.l.Sa(a))};Rk.prototype[Symbol.iterator]=function(){return this.Kb(0)};
|
|
424
|
+
Rk.prototype.Kb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Za("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Sk(this,d,f,c)};function Tk(a,b,c){a=new Ci(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Rk([a])}
|
|
425
|
+
S("shaka.media.SegmentIndex",Rk);Rk.forSingleSegment=Tk;Rk.prototype.getIteratorForTime=Rk.prototype.Kb;Rk.prototype.updateEvery=Rk.prototype.Me;Rk.prototype.fit=Rk.prototype.Ec;Rk.prototype.evict=Rk.prototype.Oa;Rk.prototype.mergeAndEvict=Rk.prototype.Id;Rk.prototype.offset=Rk.prototype.offset;Rk.prototype.get=Rk.prototype.get;Rk.prototype.find=Rk.prototype.find;Rk.prototype.markImmutable=Rk.prototype.Fi;Rk.prototype.release=Rk.prototype.release;Rk.prototype.getNumEvicted=Rk.prototype.getNumEvicted;
|
|
426
426
|
Rk.prototype.getNumReferences=Rk.prototype.getNumReferences;function Sk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Sk.prototype.Uc=function(a){this.reverse=a};Sk.prototype.Lh=function(){return this.h};Sk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
427
427
|
Sk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Sk);Sk.prototype.next=Sk.prototype.next;Sk.prototype.current=Sk.prototype.current;Sk.prototype.currentPosition=Sk.prototype.Lh;
|
|
428
|
-
Sk.prototype.setReverse=Sk.prototype.Uc;function Uk(){Rk.call(this,[]);this.g=[]}oa(Uk,Rk);r=Uk.prototype;r.clone=function(){var a=new Uk;a.g=this.g.slice();return a};r.release=function(){for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};r.
|
|
428
|
+
Sk.prototype.setReverse=Sk.prototype.Uc;function Uk(){Rk.call(this,[]);this.g=[]}oa(Uk,Rk);r=Uk.prototype;r.clone=function(){var a=new Uk;a.g=this.g.slice();return a};r.release=function(){for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};r.Jb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.Jb(a)};r.find=function(a){for(var b=0,c=t(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};
|
|
429
429
|
r.get=function(a){for(var b=0,c=t(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.ue=function(){};r.Oa=function(){};r.Id=function(){};r.Ec=function(){};r.Me=function(){};S("shaka.media.MetaSegmentIndex",Uk);Uk.prototype.updateEvery=Uk.prototype.Me;Uk.prototype.fit=Uk.prototype.Ec;Uk.prototype.mergeAndEvict=Uk.prototype.Id;Uk.prototype.evict=Uk.prototype.Oa;Uk.prototype.merge=Uk.prototype.ue;
|
|
430
|
-
Uk.prototype.offset=Uk.prototype.offset;Uk.prototype.get=Uk.prototype.get;Uk.prototype.find=Uk.prototype.find;Uk.prototype.forEachTopLevelReference=Uk.prototype.
|
|
431
|
-
function gl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.
|
|
430
|
+
Uk.prototype.offset=Uk.prototype.offset;Uk.prototype.get=Uk.prototype.get;Uk.prototype.find=Uk.prototype.find;Uk.prototype.forEachTopLevelReference=Uk.prototype.Jb;Uk.prototype.release=Uk.prototype.release;function Vk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ie();this.h=new Tc(function(){b.g.Yg(.25*b.i)})}Vk.prototype.release=function(){this.set(this.nc());this.h&&(this.h.stop(),this.h=null);this.g=null};Vk.prototype.set=function(a){this.i=a;Wk(this)};Vk.prototype.nc=function(){return this.g.nc()};function Wk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ie()!=b&&a.g.hg(b);return}catch(c){}a.h.Sa(.25);0!=a.g.ie()&&a.g.hg(0)};function Xk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Tc(function(){Yk(b,!1)})).Sa(.25)}Xk.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 Yk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Zk(){this.g=null;this.h=[]}function $k(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function al(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 bl(){this.i=this.h=null;this.g=[]}function cl(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 dl(){this.ae=this.Ug=this.A=this.B=this.I=this.C=this.s=this.j=this.H=this.m=this.i=this.U=this.Z=this.L=this.N=this.R=this.l=this.o=NaN;this.K=0;this.F=this.G=NaN;this.g=new Zk;this.h=new bl};function el(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function fl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
431
|
+
function gl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Kb(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.sa&&(c=!1);2==b.ac()&&(c=!1);c&&b.$&&hl(a,b.$);c&&!a.h.has(b)&&(c=new il(a.l),jl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.Kd&&b.pe)break}kl(a)}}function hl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Bi(d,b)})){var c=new il(a.l);jl(c,b,a.i);a.j.set(b,c)}}
|
|
432
432
|
function ll(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&ml(a,c)}function nl(a){ll(a,a.h);ll(a,a.j);a.g=null}el.prototype.Oa=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&ml(this,d);b&&kl(this)};el.prototype.Uc=function(a){this.o=a;this.g&&this.g.Uc(a)};
|
|
433
433
|
function kl(a){for(var b=Array.from(a.h.keys()),c={},d=t(a.j.keys()),e=d.next();!e.done;c={Vd:c.Vd},e=d.next())c.Vd=e.value,b.some(function(f){return function(g){return Bi(g.$,f.Vd)}}(c))||ml(a,c.Vd)}function ol(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&ml(a,d)}kl(a)}function pl(a,b){b&&b!==a.i&&(nl(a),a.i=b)}function ml(a,b){var c=a.h;b instanceof Ai&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function il(a){this.g=a;this.Be=this.ig=null}
|
|
434
434
|
function jl(a,b,c){var d=new Uint8Array(0);a.Be=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Md(d,e):d=e,a.ig?G(f,a.ig(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}il.prototype.abort=function(){this.Be&&this.Be.abort()};function ql(a){lg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Tc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Sa(2)}oa(ql,lg);ql.prototype.release=function(){this.g.clear();this.h.stop();lg.prototype.release.call(this)};function rl(a){lg.call(this);this.g=new Map;this.h=a}oa(rl,lg);rl.prototype.release=function(){this.g.clear();lg.prototype.release.call(this)};function sl(a,b){var c=a.g.get(b);c||(c={Md:[],kf:null,contentType:b},a.g.set(b,c));return c}function tl(a,b,c){var d=sl(a,b.contentType);ul(a,d);a={Lc:b,position:c};d=d.Md;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
@@ -436,7 +436,7 @@ rl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.n
|
|
|
436
436
|
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Rb(d.roles,e.roles);(g||h||d)&&vl(this,a,e.contentType)&&(c.kf=e,d=new U("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&vl(this,a,e.contentType)&&(c.kf=e,JSON.stringify(e),c=new U("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
|
|
437
437
|
function vl(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function ul(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Md;b.Md=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Md=[]}
|
|
438
438
|
function wl(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
|
|
439
|
-
a.language);return b};function xl(a){var b=
|
|
439
|
+
a.language);return b};function xl(a){var b=je(a),c=b.split("/")[0];a=oe(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Qd:null,colorGamut:null}}
|
|
440
440
|
function yl(a,b){function c(z){v=z.name;var B=z.reader;B.skip(24);var C=B.ka(),F=B.ka();B.skip(50);n=String(C);m=String(F);z.reader.oa()&&Qg(z)}function d(z){var B=$i(z.reader);p=B.channelCount;q=B.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
|
|
441
441
|
k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,q=null,u=null,w=null,v;(new Lg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).S("mdhd",function(z){l=Yi(z.reader,z.version).language}).box("minf",Qg).box("stbl",Qg).S("stsd",Ug).box("mp4a",function(z){var B=$i(z.reader);p=B.channelCount;q=B.sampleRate;z.reader.oa()?Qg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
|
|
442
442
|
"mp4a",C,F;z.oa();){C=z.T();for(var I=z.T();I&128;)I=z.T();if(3==C)z.ka(),I=z.T(),I&128&&z.ka(),I&64&&z.skip(z.T()),I&32&&z.ka();else if(4==C)F=z.T(),z.skip(12);else if(5==C)break}F&&(B+="."+cj(F),5==C&&z.oa()&&(C=z.T(),F=(C&248)>>3,31===F&&z.oa()&&(F=32+((C&7)<<3)+((z.T()&224)>>5)),B+="."+F));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
|
|
@@ -461,31 +461,31 @@ f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.kb.h.g>h?
|
|
|
461
461
|
r.Nd=function(){if(this.g)for(var a=this.g.he(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ca;e.C?e=!1:d==Vd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Yj(e,d),e=Ii(e,a));if(!e){c.W&&(c.W.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.ia=null;(null!=Zj(this.g.ca,d)||c.Qa)&&Wl(this,c);c.kb&&(c.kb.abort(),c.kb=null);d===Vd&&(d=this.g.ca,d.H&&d.H.g());c.Nd=!0}}};
|
|
462
462
|
function Wl(a,b){b.nd||b.ec||(b.Qa?(b.ec=!0,b.ee=0):null==Xj(a.g.ca,b.type)?null==b.ub&&Ol(a,b,0):(Gl(b),Ul(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
463
463
|
function Ll(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Xd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.X,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ga,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ta,a.s),e.add(a.s));f=a.g.ca;return G(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Cg(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Nl(a,l),b.has(l.id)&&(n=
|
|
464
|
-
b.get(l.id),fl(n,function(q,u,w){return Xl(q,u,w||null,a.h.retryParameters,a.g.
|
|
465
|
-
function Il(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Vd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Vd&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.W)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new el(a.h.segmentPrefetchLimit,b,function(d,e,f){return Xl(d,e,f||null,a.h.retryParameters,a.g.
|
|
464
|
+
b.get(l.id),fl(n,function(q,u,w){return Xl(q,u,w||null,a.h.retryParameters,a.g.Nb)}),m.W=n),a.i.set(k,m),Ol(a,m,0));H(p)})}function Nl(a,b){return{stream:b,type:b.type,ia:null,W:Il(a,b),Ya:null,Kc:null,qe:null,oe:null,ne:null,vc:null,endOfStream:!1,Qa:!1,ub:null,ec:!1,ee:0,Oe:!1,nd:!1,Nd:!0,Yf:!1,yd:!1,kb:null}}
|
|
465
|
+
function Il(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Vd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Vd&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.W)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new el(a.h.segmentPrefetchLimit,b,function(d,e,f){return Xl(d,e,f||null,a.h.retryParameters,a.g.Nb)},0>a.g.fb()):null}
|
|
466
466
|
function Jl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.l.variants),f=e.next();!f.done;d={Ta:d.Ta},f=e.next())if(d.Ta=f.value,d.Ta.audio)if(a.o.has(d.Ta.audio)){if(f=a.o.get(d.Ta.audio),ol(f,b),!(0<b&&c.some(function(h){return function(k){return De(h.Ta.audio.language,k)}}(d)))){var g=a.i.get(d.Ta.audio.type);f!==(g&&g.W)&&nl(f);a.o.delete(d.Ta.audio)}}else 0>=b||!c.some(function(h){return function(k){return De(h.Ta.audio.language,k)}}(d))||!(f=Il(a,d.Ta.audio))||
|
|
467
467
|
(d.Ta.audio.segmentIndex||d.Ta.audio.createSegmentIndex(),a.o.set(d.Ta.audio,f))}r.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.ca.$a(a):this.g.ca.$a(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
468
468
|
function Yl(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Cg(a.m);if(b.Qa||null==b.ub||b.nd)return k.return();b.ub=null;if(!b.ec){k.u(2);break}return G(k,Ul(a,b,b.Oe,b.ee),3);case 3:return k.return();case 2:if(b.stream.segmentIndex){k.u(4);break}c=b.stream;sa(k,5);return G(k,b.stream.createSegmentIndex(),7);case 7:va(k,6);break;case 5:return d=wa(k),G(k,Zl(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Qa||b.ub||Ol(a,b,0),
|
|
469
469
|
k.return();case 4:sa(k,9);e=$l(a,b);null!=e&&(Ol(a,b,e),b.yd=!1);va(k,10);break;case 9:return f=wa(k),G(k,Zl(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.C||!g.every(function(l){return l.endOfStream})){k.u(0);break}return G(k,a.g.ca.endOfStream(),13);case 13:Cg(a.m),h=a.g.ca.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.$a(h),H(k)}})}
|
|
470
470
|
function $l(a,b){if(am(b))return hk(a.g.ca,b.stream.originalId||""),null;b.type==Vd&&ik(a.g.ca);if(!a.g.ca.xa&&b.type!=Vd)return a.h.updateIntervalSeconds/2;var c=a.g.he();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Oa(c,!0),gl(e,c);d=b.Ya?b.Ya.endTime:c;e=ak(a.g.ca,b.type,c);var f=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.l.presentationTimeline.getDuration()-d,h=Zj(a.g.ca,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
471
471
|
!0,"video"==b.type&&(a=a.i.get(Vd))&&am(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=bm(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,am(h)||h.ia&&!h.ia.current()||(f=Math.min(f,h.Ya?h.Ya.endTime:c));if(d>=f+a.l.presentationTimeline.g)return a.h.updateIntervalSeconds;b.W&&b.ia&&!a.o.has(b.stream)&&(b.W.Oa(e.startTime),gl(b.W,e.startTime));cm(a,b,c,e).catch(function(){});
|
|
472
|
-
return null}function bm(a,b,c,d){if(b.ia)return b.ia.current();if(b.Ya||d)return b.ia=b.stream.segmentIndex.
|
|
472
|
+
return null}function bm(a,b,c,d){if(b.ia)return b.ia.current();if(b.Ya||d)return b.ia=b.stream.segmentIndex.Kb(b.Ya?b.Ya.endTime:d,!1,0>a.g.fb()),b.ia&&b.ia.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.fb();var f=null;d&&(b.ia=b.stream.segmentIndex.Kb(e,!1,a),f=b.ia&&b.ia.next().value);f||(b.ia=b.stream.segmentIndex.Kb(c,!1,a),f=b.ia&&b.ia.next().value);return f}
|
|
473
473
|
function cm(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z;return O(function(B){switch(B.g){case 1:e=Xd;f=b.stream;g=b.ia;b.Qa=!0;sa(B,2);if(2==d.ac())throw new T(1,1,1011);return G(B,dm(a,b,d),4);case 4:Cg(a.m);if(a.A)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if((l=a.h.lowLatencyMode&&a.l.isLowLatency)&&k&&h&&("HLS"!=a.l.type||d.m))return p=new Uint8Array(0),u=q=!1,v=function(C){var F,I,L,J;return O(function(E){switch(E.g){case 1:if(q)return E.return();
|
|
474
474
|
u=!0;Cg(a.m);if(a.A)return E.return();sa(E,2);p=em(p,C);F=!1;I=0;(new Lg).box("mdat",function(K){I=K.size+K.start;F=!0}).parse(p,!1,!0);if(!F){E.u(4);break}L=p.subarray(0,I);p=p.subarray(I);return G(E,fm(a,b,c,f,d,L,!0),5);case 5:b.W&&b.ia&&gl(b.W,d.startTime,!0);case 4:va(E,0);break;case 2:w=J=wa(E),H(E)}})},G(B,gm(a,b,d,v),9);m=gm(a,b,d);return G(B,m,7);case 7:n=B.h;Cg(a.m);if(a.A)return B.return();Cg(a.m);return b.ec?(b.Qa=!1,Ol(a,b,0),B.return()):G(B,fm(a,b,c,f,d,n),6);case 9:A=B.h;if(w)throw w;
|
|
475
475
|
if(u){B.u(10);break}q=!0;Cg(a.m);return a.A?B.return():b.ec?(b.Qa=!1,Ol(a,b,0),B.return()):G(B,fm(a,b,c,f,d,A),10);case 10:b.W&&b.ia&&gl(b.W,d.startTime,!0);case 6:Cg(a.m);if(a.A)return B.return();b.Ya=d;g.next();b.Qa=!1;b.Yf=!1;y=a.g.ca.yb();D=y[b.type];db(JSON.stringify(D));b.ec||a.g.Sf(d,b.stream);Ol(a,b,0);va(B,0);break;case 2:z=wa(B);Cg(a.m,z);if(a.A)return B.return();b.Qa=!1;if(7001==z.code)b.Qa=!1,Gl(b),Ol(a,b,0),B.u(0);else if(b.type==e.ta&&a.h.ignoreTextStreamFailures)a.i.delete(e.ta),B.u(0);
|
|
476
476
|
else if(3017==z.code)hm(a,b,z),B.u(0);else return b.yd=!0,1==z.category&&b.W&&ml(b.W,d),z.severity=2,G(B,Zl(a,b,z),0)}})}function em(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function hm(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Yf})){if(a.g.disableStream(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.yd=!0;a.A=!0;a.g.onError(c);return}b.Yf=!0}Ol(a,b,4)}
|
|
477
|
-
function dm(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u;return O(function(w){switch(w.g){case 1:d=Xd;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=ie(c.codecs||b.stream.codecs);k=
|
|
477
|
+
function dm(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u;return O(function(w){switch(w.g){case 1:d=Xd;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);g=Math.min(c.appendWindowEnd,a.L)+.01;h=ie(c.codecs||b.stream.codecs);k=je(c.mimeType||b.stream.mimeType);l=c.timestampOffset;if(l==b.qe&&f==b.oe&&g==b.ne&&h==b.Lf&&k==b.Mf){w.u(2);break}m=b.Lf&&b.Mf&&uk(a.g.ca,b.type,k,h);if(!m){w.u(3);break}n=null;b.type===d.ga?n=a.i.get(d.X):b.type===d.X&&(n=a.i.get(d.ga));if(!n){w.u(3);break}return G(w,Hl(n).catch(function(){}),
|
|
478
478
|
5);case 5:n.Kc=null,Wl(a,n);case 3:return G(w,im(a,b,l,f,g,c,h,k),2);case 2:return Bi(c.$,b.Kc)||(b.Kc=c.$,c.l&&c.$&&(p=gm(a,b,c.$),q=function(){var v,A,y,D,z,B,C;return O(function(F){switch(F.g){case 1:return sa(F,2),G(F,p,4);case 4:return v=F.h,Cg(a.m),A=null,y=new Map,D={projection:null,hfov:null},z=new Lg,z.box("moov",Qg).box("trak",Qg).box("mdia",Qg).S("mdhd",function(I){A=Yi(I.reader,I.version).timescale}).box("hdlr",function(I){I=I.reader;I.skip(8);switch(I.tc()){case "soun":y.set(d.X,A);break;
|
|
479
479
|
case "vide":y.set(d.ga,A)}A=null}).box("minf",Qg).box("stbl",Qg).S("stsd",Ug).box("encv",Vg).box("avc1",Vg).box("avc3",Vg).box("hev1",Vg).box("hvc1",Vg).box("dvav",Vg).box("dva1",Vg).box("dvh1",Vg).box("dvhe",Vg).box("vexu",Qg).box("proj",Qg).S("prji",function(I){I=I.reader.tc();D.projection=I}).box("hfov",function(I){I=I.reader.P()/1E3;D.hfov=I}).parse(v),jm(a,D),y.has(b.type)?c.$.timescale=y.get(b.type):null!=A&&(c.$.timescale=A),B=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,G(F,a.g.yg(b.type,
|
|
480
480
|
v),5);case 5:return G(F,ck(a.g.ca,b.type,v,null,b.stream,B),6);case 6:va(F,0);break;case 2:throw C=wa(F),b.Kc=null,C;}})},a.g.Hi(c.startTime,c.$),e.push(q()))),a.l.sequenceMode&&(u=b.Ya?b.Ya.i:null,c.i!=u&&e.push(nk(a.g.ca,b.type,c.startTime))),G(w,Promise.all(e),0)}})}
|
|
481
481
|
function im(a,b,c,d,e,f,g,h){var k,l,m,n;return O(function(p){if(1==p.g)return k=Xd,l=new Map,a.j.audio&&l.set(k.X,a.j.audio),a.j.video&&l.set(k.ga,a.j.video),sa(p,2),b.oe=d,b.ne=e,g&&(b.Lf=g),h&&(b.Mf=h),b.qe=c,m=a.l.sequenceMode||"HLS"==a.l.type,G(p,lk(a.g.ca,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return va(p,0);n=wa(p);b.oe=null;b.ne=null;b.Lf=null;b.Mf=null;b.qe=null;throw n;})}
|
|
482
482
|
function fm(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p,q,u,w;return O(function(v){switch(v.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.F;n="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;p=null;e.$&&(p=e.$.timescale);q=n&&p&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(l||m||q)k=new Lg;l&&k.S("emsg",function(A){var y=d.emsgSchemeIdUris;if(0===A.version){var D=
|
|
483
|
-
A.reader.tc();var z=A.reader.tc();var B=A.reader.P();var C=A.reader.P();var F=A.reader.P();var I=A.reader.P();var L=e.startTime+C/B}else B=A.reader.P(),L=A.reader.Qc()/B+e.timestampOffset,C=L-e.startTime,F=A.reader.P(),I=A.reader.P(),D=A.reader.tc(),z=A.reader.tc();A=A.reader.rb(A.reader.getLength()-A.reader.ua());if(y&&y.includes(D)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==D)a.g.Ii();else if(y=(new Map).set("detail",{startTime:L,endTime:
|
|
484
|
-
eventDuration:F,id:I,messageData:A}),
|
|
485
|
-
|
|
486
|
-
|
|
483
|
+
A.reader.tc();var z=A.reader.tc();var B=A.reader.P();var C=A.reader.P();var F=A.reader.P();var I=A.reader.P();var L=e.startTime+C/B}else B=A.reader.P(),L=A.reader.Qc()/B+e.timestampOffset,C=L-e.startTime,F=A.reader.P(),I=A.reader.P(),D=A.reader.tc(),z=A.reader.tc();A=A.reader.rb(A.reader.getLength()-A.reader.ua());if(y&&y.includes(D)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==D)a.g.Ii();else if(y=L+F/B,B=(new Map).set("detail",{startTime:L,endTime:y,schemeIdUri:D,value:z,timescale:B,
|
|
484
|
+
presentationTimeDelta:C,eventDuration:F,id:I,messageData:A}),B=new U("emsg",B),B.cancelable=!0,a.g.onEvent(B),!B.defaultPrevented&&("https://aomedia.org/emsg/ID3"==D||"https://developer.apple.com/streaming/emsg-id3"==D)&&(D=Ui(A),D.length))a.g.onMetadata([{cueTime:L,data:A,frames:D,dts:L,pts:L}],0,y)});m&&k.S("prft",function(A){if(!a.F&&e.$.timescale){var y=A.reader,D=A.version;y.P();A=y.P();var z=y.P();A=1E3*A+z/Math.pow(2,32)*1E3;0===D?y=y.P():(D=y.P(),y=y.P(),y=D*Math.pow(2,32)+y);A=(new Date((new Date(Date.UTC(1900,
|
|
485
|
+
0,1,0,0,0))).getTime()+A)).getTime();y=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-y/e.$.timescale*1E3)});y=new U("prft",y);a.g.onEvent(y);a.F=!0}});q&&k.box("moof",Qg).box("traf",Qg).S("tfdt",function(A){var y,D,z,B,C,F;return O(function(I){y=Xi(A.reader,A.version);D=y.baseMediaDecodeTime;if(!D)return I.return();z=-D/p;B=Number(b.qe)||0;if(!(B<z))return I.u(0);C=b.oe;F=b.ne;return G(I,im(a,b,z,C,F,e),0)})});(l||m||q)&&k.parse(f,!1,g);return G(v,km(a,b,c),2);case 2:return Cg(a.m),
|
|
486
|
+
u=b.Nd,b.Nd=!1,w=b.wg,b.wg=!1,G(v,a.g.yg(b.type,f),3);case 3:return G(v,ck(a.g.ca,b.type,f,e,d,h,u,w,g),4);case 4:Cg(a.m),H(v)}})}function km(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.l.presentationTimeline.g);e=Xj(a.g.ca,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():G(h,a.g.ca.remove(b.type,e,e+g),2)}Cg(a.m);H(h)})}
|
|
487
487
|
function am(a){return a&&a.type==Vd&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
488
|
-
function gm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.vd())return l.return(e);f=null;if(b.W){var m=b.W,n=m.h;c instanceof Ai&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.ig=d),f=m.Be):f=null}f||(f=Xl(c,b.stream,d||null,a.h.retryParameters,a.g.
|
|
488
|
+
function gm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.vd())return l.return(e);f=null;if(b.W){var m=b.W,n=m.h;c instanceof Ai&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.ig=d),f=m.Be):f=null}f||(f=Xl(c,b.stream,d||null,a.h.retryParameters,a.g.Nb));g=0;b.ia&&(g=b.ia.h);b.kb=f;return G(l,f.promise,2);case 2:h=l.h;b.kb=null;k=h.data;if(!c.aesKey){l.u(3);break}return G(l,Cl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
489
489
|
function Xl(a,b,c,d,e){var f=a instanceof Ci?a:void 0,g=f?1:0;a=Dl(a.M(),a.Ha,a.sa,d,c);a.contentType=b.type;return e.request(zg,a,{type:g,stream:b,segment:f})}
|
|
490
490
|
function Ul(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.ec=!1,b.Oe=!1,b.ee=0,b.nd=!0,b.Ya=null,b.ia=null,b.W&&!a.o.has(b.stream)&&nl(b.W),d?(e=a.g.he(),f=a.g.ca.getDuration(),G(g,a.g.ca.remove(b.type,e+d,f),3)):G(g,kk(a.g.ca,b.type),4);if(3!=g.g)return Cg(a.m),c?G(g,a.g.ca.flush(b.type),3):g.u(3);Cg(a.m);b.nd=!1;b.endOfStream=!1;b.Qa||b.ub||Ol(a,b,0);H(g)})}
|
|
491
491
|
function Ol(a,b,c){var d=b.type;if(d!=Vd||a.i.has(d))b.ub=(new Sc(function(){var e;return O(function(f){if(1==f.g)return sa(f,2),G(f,Yl(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);H(f)})})).Y(c)}function Gl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function Hl(a){return O(function(b){return a.kb?G(b,a.kb.abort(),0):b.u(0)})}
|
|
@@ -495,7 +495,7 @@ function jm(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.p
|
|
|
495
495
|
function nm(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Me(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Me(n)),m=nm(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Za("Invalid config, wrong type for "+m),
|
|
496
496
|
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&$a("Unexpected number of arguments for "+m),a[l]=b[l]):(Za("Invalid config, unrecognized key "+m),k=!1)}return k}function om(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function pm(a,b){return a&&b}
|
|
497
497
|
function qm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]=
|
|
498
|
-
m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",mm);mm.getDifferenceFromConfigObjects=qm;mm.convertToConfigObject=om;mm.mergeConfigObjects=nm;function rm(){}function sm(a){a=zd(a);return(new uc(a)).
|
|
498
|
+
m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",mm);mm.getDifferenceFromConfigObjects=qm;mm.convertToConfigObject=om;mm.mergeConfigObjects=nm;function rm(){}function sm(a){a=zd(a);return(new uc(a)).Gb}function tm(a,b,c){function d(h){Fb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Bd(b,!0):e=b;a=zd(a);a=Bd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function um(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split("skd://").pop();return tm(a,c,b)}
|
|
499
499
|
function vm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",rm);rm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=vd(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Cb(Hd(c)))}};rm.expressplayFairPlayRequest=function(a,b){vm(a,b)};
|
|
500
500
|
rm.conaxFairPlayRequest=function(a,b){vm(a,b)};rm.ezdrmFairPlayRequest=function(a,b){vm(a,b)};rm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ab(b.body),a=Gd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ad("spc="+a))};rm.expressplayInitDataTransform=function(a,b,c){return um(a,b,c)};
|
|
501
501
|
rm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Eb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return tm(a,d,b)};rm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split(";").pop();return tm(a,c,b)};rm.verimatrixInitDataTransform=function(a,b,c){return um(a,b,c)};rm.initDataTransform=tm;
|
|
@@ -524,7 +524,7 @@ r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(n
|
|
|
524
524
|
function Lm(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Pm(a,"manifest-parser");a.j||(a.F=ui(a.L,a.U),a.j=a.F(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Pm(a,"manifest");if(a.h)return g.u(2);c=a;return G(g,a.j.start(a.L,a.bb),3)}2!=g.g&&(c.h=g.h);d=new U("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new T(2,4,4036);Qm(a.h);e=Date.now()/1E3;f=e-b;a.Z.H=f;H(g)})}
|
|
525
525
|
function Nm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Pm(a,"drm-engine");a.ra=Date.now()/1E3;a.l=a.Fa();a.C.g=a.l;a.l.configure(a.g.drm);var h=a.C;b=Te(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return G(g,Promise.resolve(),3);case 3:Mm(a),a.dispatchEvent(c);case 2:return d=uf(a.h.variants),G(g,Kh(a.l,d,a.h.offlineSessionIds),4);case 4:return Mm(a),G(g,oi(a.C,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return G(g,
|
|
526
526
|
Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}r.configure=function(a,b){a=om(a,b);Bm(this.g,a)};r.getConfiguration=function(){return Me(this.g)};
|
|
527
|
-
function Om(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new el(d,b,function(l,m,n){return Xl(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.K.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.A||0;(h=(g=b.segmentIndex.
|
|
527
|
+
function Om(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new el(d,b,function(l,m,n){return Xl(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.K.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.A||0;(h=(g=b.segmentIndex.Kb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.$&&hl(e,h.$):gl(e,h.startTime));H(k)})}r.mj=function(){return this.m};
|
|
528
528
|
r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ea){e.u(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return G(e,a.i.stop(),4);case 4:a.G&&!a.pa&&a.G.release();if(!a.l||a.da){e.u(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.K.size&&!a.qa)for(b=t(a.K.values()),c=b.next();!c.done;c=b.next())d=c.value,nl(d);H(e)}})};
|
|
529
529
|
function Qm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",Cm);Cm.prototype.destroy=Cm.prototype.destroy;Cm.prototype.waitForFinish=Cm.prototype.mj;function Rm(a,b){lg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Ac:null,zc:Sm,pc:function(d,e){return Tm(c,"enter",d,e)}},{Ac:Um,zc:Sm,pc:function(d,e){return Tm(c,"enter",d,e)}},{Ac:Vm,zc:Sm,pc:function(d,e){return Tm(c,"enter",d,e)}},{Ac:Sm,zc:Um,pc:function(d,e){return Tm(c,"exit",d,e)}},{Ac:Sm,zc:Vm,pc:function(d,e){return Tm(c,"exit",d,e)}},{Ac:Um,zc:Vm,pc:function(d,e){return Tm(c,"skip",d,e)}},{Ac:Vm,zc:Um,pc:function(d,e){return Tm(c,"skip",d,e)}}];this.h=new gb;this.h.D(this.i,
|
|
530
530
|
"regionremove",function(d){c.g.delete(d.region)})}oa(Rm,lg);Rm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;lg.prototype.release.call(this)};Rm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Um:a>d.endTime?Vm:Sm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Ac==e&&h.zc==f&&h.pc(d,b)}}};
|
|
@@ -552,9 +552,10 @@ g.height/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*g.width/100+m);0!=
|
|
|
552
552
|
function Cn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Tb?c:"left"===a||"start"===a&&b===Vb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Vb?"line-right":"center"}
|
|
553
553
|
function Bn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Dn(c.linePadding,c,a.s);f.paddingRight=Dn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
554
554
|
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=En(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=En(d,function(m){return m.fontFamily}))&&
|
|
555
|
-
(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer
|
|
556
|
-
32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Wb?(f.width="100%",c.lineAlign==Yb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Yb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Yb?f.right=d+"%":"end"==c.lineAlign&&
|
|
557
|
-
|
|
555
|
+
(l.style.fontFamily=b);k&&(l.textContent=k)}if(h&&!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();
|
|
556
|
+
f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Dn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Xb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Wb?(f.width="100%",c.lineAlign==Yb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Yb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Yb?f.right=d+"%":"end"==c.lineAlign&&
|
|
557
|
+
(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=Cn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Wb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Wb?(f.right=c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Wb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+
|
|
558
|
+
"%");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Wb?f.width=c.size+"%":f.height=c.size+"%")}
|
|
558
559
|
function Dn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function En(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",wn);wn.prototype.setTextVisibility=wn.prototype.setTextVisibility;
|
|
559
560
|
wn.prototype.isTextVisible=wn.prototype.isTextVisible;wn.prototype.remove=wn.prototype.remove;wn.prototype.destroy=wn.prototype.destroy;wn.prototype.append=wn.prototype.append;wn.prototype.configure=wn.prototype.configure;function Fn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=on(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
560
561
|
break;case "right":g.push("align:right");break;case Ub:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Gn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}Gn.prototype.configure=function(a){this.g=a};function Hn(a){a.i=!1;a.l=!0;a.j=!1}
|
|
@@ -567,17 +568,17 @@ function Nn(a){function b(n){return 100*c(n/100)}function c(n){return Math.round
|
|
|
567
568
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Sn(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Nn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
568
569
|
function On(a,b){if(!b||a.includes("offline:"))return a;a=new uc(a);a.g.set("CMCD",b);return a.toString()}var Mn="m",Kn="a",Qn="v",Ln="av",Un="i",Wn="c",Vn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",yh:"s",OTHER:"o"});function $n(a){this.h=a;this.g=null}r=$n.prototype;r.configure=function(a){this.h=a};r.Ng=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(ao)?1E3*this.g.get(ao):null};r.Lg=function(){return this.h.enabled&&this.g&&this.g.has(bo)?1E3*this.g.get(bo):null};r.ei=function(){return this.h.enabled&&this.g&&this.g.has(co)?this.g.get(co):null};r.fi=function(){return this.h.enabled&&this.g&&this.g.has(eo)?this.g.get(eo):null};
|
|
569
570
|
r.getBandwidthEstimate=function(a){var b=this.Lg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function fo(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",$n);$n.prototype.getBandwidthEstimate=$n.prototype.getBandwidthEstimate;$n.prototype.getRoundTripTime=$n.prototype.fi;$n.prototype.getResponseDelay=$n.prototype.ei;$n.prototype.getEstimatedThroughput=$n.prototype.Lg;
|
|
570
|
-
$n.prototype.getMaxBitrate=$n.prototype.Ng;var bo="etp",ao="mb",co="rd",eo="rtt";function go(){this.g=null;this.h=[]}function ho(a,b){return O(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}go.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){lg.call(this);var c=this;this.l=io;this.ze=this.h=null;this.pa=!1;this.Je=new gb;this.zd=new gb;this.m=new gb;this.Fa=new gb;this.wb=new gb;this.C=this.G=this.B=this.H=null;this.Le=0;this.Z=new go;this.qa=this.pg=this.da=this.i=this.bb=this.F=this.j=this.rd=this.K=this.tg=this.ea=this.N=this.wd=this.L=this.Ce=this.I=this.
|
|
571
|
-
this.xe=new ni(this.g,this.fa,null);this.Fe=[];this.s=null;this.za=new Lf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.
|
|
572
|
-
b(this);this.N=ko(this);this.ea=new $n(this.g.cmsd);this.H=lo(this);this.H.fg(this.g.streaming.forceHTTP);this.H.gg(this.g.streaming.forceHTTPS);this.
|
|
573
|
-
g.g){c.sg.stop();if(c.aa)return g.u(0);c.
|
|
571
|
+
$n.prototype.getMaxBitrate=$n.prototype.Ng;var bo="etp",ao="mb",co="rd",eo="rtt";function go(){this.g=null;this.h=[]}function ho(a,b){return O(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}go.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){lg.call(this);var c=this;this.l=io;this.ze=this.h=null;this.pa=!1;this.Je=new gb;this.zd=new gb;this.m=new gb;this.Fa=new gb;this.wb=new gb;this.C=this.G=this.B=this.H=null;this.Le=0;this.Z=new go;this.qa=this.pg=this.da=this.i=this.bb=this.F=this.j=this.rd=this.K=this.tg=this.ea=this.N=this.wd=this.L=this.Ce=this.I=this.Hb=null;this.Ea=!1;this.xa=this.o=null;this.rg=1E9;this.Hd=[];this.U=NaN;this.g=jo(this);this.R=null;this.Ne=-1;this.Da=null;this.fa={width:Infinity,height:Infinity};
|
|
572
|
+
this.xe=new ni(this.g,this.fa,null);this.Fe=[];this.s=null;this.za=new Lf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Fb=this.g.preferredTextLanguage;this.Gd=this.g.preferredTextRole;this.Fd=this.g.preferForcedSubs;this.Ed=[];b&&
|
|
573
|
+
b(this);this.N=ko(this);this.ea=new $n(this.g.cmsd);this.H=lo(this);this.H.fg(this.g.streaming.forceHTTP);this.H.gg(this.g.streaming.forceHTTPS);this.Ib=this.aa=this.A=null;this.Ye=!1;this.sg=new Tc(function(){return O(function(d){if(1==d.g)return c.aa?G(d,c.Ub(c.Ib,!0),3):d.u(0);if(4!=d.g)return G(d,c.load(c.aa),4);c.Ye?c.Ib.pause():c.Ib.play();c.aa=null;c.Ye=!1;H(d)})});mo&&(this.A=mo(),this.A.configure(this.g.ads),this.wb.D(this.A,"ad-content-pause-requested",function(d){var e,f;return O(function(g){if(1==
|
|
574
|
+
g.g){c.sg.stop();if(c.aa)return g.u(0);c.Ib=c.h;c.Ye=c.h.ended;e=d.saveLivePosition||!1;f=c;return G(g,c.Eg(!0,e),3)}f.aa=g.h;H(g)})}),this.wb.D(this.A,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.aa){var e=c.aa;e.A&&d&&(e.A+=d)}c.sg.Y(.1)}),this.wb.D(this.A,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Ib?d.u(0):G(d,c.Ub(c.Ib,!0),0)})}));this.Je.D(window,"online",function(){no(c);c.Zf()});this.Ee=new Tc(function(){for(var d=Date.now()/1E3,e=!1,f=!0,
|
|
574
575
|
g=t(c.i.variants),h=g.next();!h.done;h=g.next())h=h.value,0<h.disabledUntilTime&&h.disabledUntilTime<=d&&(h.disabledUntilTime=0,e=!0),0<h.disabledUntilTime&&(f=!1);f&&c.Ee.stop();e&&oo(c,!1,void 0,!1,!1)});this.ra=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ub(a,!0))}oa(X,lg);function po(a){null!=a.K&&(Fj(a.K),a.K.release(),a.K=null)}
|
|
575
576
|
function qo(a,b){b.lcevc.enabled?(po(a),null==a.K&&(a.K=new Ej(a.h,a.tg,b.lcevc),a.G&&(a.G.Z=a.K))):po(a)}function ro(a,b){return new U(a,b)}r=X.prototype;
|
|
576
577
|
r.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.l==so)return c.return();po(a);b=a.detach();a.l=so;return G(c,b,2);case 2:return G(c,a.lf(),3);case 3:a.Je&&(a.Je.release(),a.Je=null);a.zd&&(a.zd.release(),a.zd=null);a.m&&(a.m.release(),a.m=null);a.Fa&&(a.Fa.release(),a.Fa=null);a.wb&&(a.wb.release(),a.wb=null);a.xa=null;a.g=null;a.s=null;a.ze=null;a.N=null;a.ea=null;if(!a.H){c.u(4);break}return G(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.o&&(a.o.release(),a.o=null),
|
|
577
578
|
lg.prototype.release.call(a),H(c)}})};function to(a,b){a.dispatchEvent(ro("onstatechange",(new Map).set("state",b)))}
|
|
578
579
|
r.Ub=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==so)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return G(g,c.detach(),2);case 2:return G(g,uo(c,"attach"),4);case 4:if(g.h)return g.return();sa(g,5,6);d||(to(c,"attach"),e=function(){var h=vo(c);h&&wo(c,h)},c.zd.D(a,"error",e),c.h=a);if(!b||!Uc()||c.G){g.u(6);break}return G(g,xo(c),6);case 6:xa(g);c.Z.release();ya(g,0);break;case 5:return f=wa(g),G(g,c.detach(),10);case 10:throw f;
|
|
579
580
|
}})};r.Gh=function(a){this.tg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==so)throw new T(2,7,7E3);return G(c,b.dc(!1,a),2)}if(3!=c.g)return G(c,uo(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.zd.Ra(),b.h=null),to(b,"detach"),b.A&&!a&&b.A.release()}finally{b.Z.release()}H(c)})};function uo(a,b){var c;return O(function(d){return 1==d.g?(c=++a.Le,G(d,ho(a.Z,b),2)):c!=a.Le?(a.Z.release(),d.return(!0)):d.return(!1)})}
|
|
580
|
-
r.dc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:return c.l!=so&&(c.l=io),G(p,uo(c,"unload"),2);case 2:if(p.h)return p.return();ua(p,3);c.Ea=!1;to(c,"unload");a&&!Uc()&&(a=!1);po(c);d=c.Ed.map(function(q){return q()});c.Ed=[];return G(p,Promise.all(d),5);case 5:c.dispatchEvent(ro("unloading"));c.wd&&(c.wd.release(),c.wd=null);c.h&&(c.m.Ra(),c.Fa.Ra());c.Ee.stop();c.
|
|
581
|
+
r.dc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:return c.l!=so&&(c.l=io),G(p,uo(c,"unload"),2);case 2:if(p.h)return p.return();ua(p,3);c.Ea=!1;to(c,"unload");a&&!Uc()&&(a=!1);po(c);d=c.Ed.map(function(q){return q()});c.Ed=[];return G(p,Promise.all(d),5);case 5:c.dispatchEvent(ro("unloading"));c.wd&&(c.wd.release(),c.wd=null);c.h&&(c.m.Ra(),c.Fa.Ra());c.Ee.stop();c.Hb&&(c.Hb.release(),c.Hb=null);c.Ce&&(c.Ce.stop(),c.Ce=null);
|
|
581
582
|
if(!c.F){p.u(6);break}return G(p,c.F.stop(),7);case 7:c.F=null,c.bb=null;case 6:if(!c.o){p.u(8);break}return G(p,c.o.stop(),8);case 8:if(!c.j){p.u(10);break}return G(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.C&&(c.C.release(),c.C=null);if(!sd("webkit")||!c.B){p.u(12);break}return G(p,c.B.destroy(),13);case 13:c.B=null;case 12:if(!c.G){p.u(14);break}return G(p,c.G.destroy(),15);case 15:c.G=null;case 14:if(c.A&&!b)c.A.onAssetUnload();c.aa&&!b&&(c.aa.destroy(),c.aa=
|
|
582
583
|
null);b||c.sg.stop();c.N&&Hn(c.N);c.ea&&(c.ea.g=null);c.h&&vn(c.h);if(!c.h||!c.h.src){p.u(16);break}return G(p,new Promise(function(q){return(new Tc(q)).Y(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.B){p.u(18);break}return G(p,c.B.destroy(),19);case 19:c.B=null;case 18:c.ra&&c.da!=c.ra.Gc()&&(c.ra.s||c.ra.destroy(),c.ra=null);c.da=null;c.pg=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=
|
|
583
584
|
h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(ef={},Rc.clear());c.i=null;c.s=new dl;c.qg=null;c.Da=null;c.R=null;c.Ne=-1;c.Hd=[];c.U=NaN;yo(c);case 3:xa(p);c.Z.release();ya(p,4);break;case 4:if(a&&Uc()&&!c.G&&c.h)return G(p,xo(c),0);p.u(0)}})};r.lj=function(a){this.qa=a};
|
|
@@ -597,42 +598,42 @@ filter:function(F){var I,L;return O(function(J){if(1==J.g)return G(J,oi(q,F),2);
|
|
|
597
598
|
new U("regionadd",new Map([["region",F]])),I.dispatchEvent(F))},onEvent:function(F){return h.dispatchEvent(F)},onError:function(F){return h.onError(F)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.R&&a.j.updateDuration()},newDrmInfo:function(F){var I=h.l,L=I?I.g:null;L&&I.s&&qi(q,L.keySystem,F)},onManifestUpdated:function(){var F=
|
|
598
599
|
(new Map).set("isLive",a.V());h.dispatchEvent(ro("manifestupdated",F));Dm(h,!1,function(){if(a.A)a.A.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(F,I,L,J){var E=F;if("com.apple.hls.interstitial"==F&&(E="com.apple.quicktime.HLS",F={startTime:I,endTime:L,values:J},a.A))a.A.onInterstitialMetadata(a,a.h,F);F={};J=t(J);for(var K=J.next();!K.done;F={Re:F.Re},K=J.next())F.Re=K.value,Dm(h,!1,function(N){return function(){Jo(a,I,L,E,N.Re)}}(F))},
|
|
599
600
|
disableStream:function(F){return a.disableStream(F,a.g.streaming.maxDisabledTime)}};w=new ql(function(){return a.Qb()});w.addEventListener("regionadd",function(F){var I=F.region;Ko(a,"timelineregionadded",I,h);Dm(h,!1,function(){if(a.A)a.A.onDashTimedMetadata(I)})});v=null;k.streaming.observeQualityChanges&&(v=new rl(function(){return a.yb()}),v.addEventListener("qualitychange",function(F){Lo(a,F.quality,F.position)}),v.addEventListener("audiotrackchange",function(F){Lo(a,F.quality,F.position,!0)}));
|
|
600
|
-
A=!0;y={
|
|
601
|
+
A=!0;y={Nb:a.H,onError:function(F){return h.onError(F)},Ae:function(F){Dm(h,!0,function(){a:{var I=F,L=ro("keystatuschanged");a.dispatchEvent(L);var J=Object.keys(I);1==J.length&&""==J[0]&&(J=["00"],I={"00":I[""]});L=1==J.length&&"00"==J[0];var E=!1;if(J.length){J=t(a.i.variants);for(var K=J.next();!K.done;K=J.next()){K=K.value;var N=[];K.audio&&N.push(K.audio);K.video&&N.push(K.video);N=t(N);for(var M=N.next();!M.done;M=N.next()){var P=M.value;M=K.allowedByKeySystem;if(P.keyIds.size){K.allowedByKeySystem=
|
|
601
602
|
!0;P=t(P.keyIds);for(var R=P.next();!R.done;R=P.next())if(R=R.value,(R=I[L?"00":R])||a.B.F)K.allowedByKeySystem=K.allowedByKeySystem&&!!R&&!si.includes(R)}M!=K.allowedByKeySystem&&(E=!0)}}}if(E&&(Mo(a),!No(a)))break a;(I=a.j.j)&&!I.allowedByKeySystem&&oo(a)}})},onExpirationUpdated:function(F,I){var L=ro("expirationupdated");h.dispatchEvent(L);if((L=h.j)&&L.onExpirationUpdated)L.onExpirationUpdated(F,I)},onEvent:function(F){h.dispatchEvent(F);"drmsessionupdate"==F.type&&A&&(A=!1,F=Date.now()/1E3-h.ra,
|
|
602
603
|
(a.s||h.getStats()).j=F,a.K&&Fj(a.K))}};D=lo(a,l);sg(a.H,D);z=function(){return a.Dc(y)};B={config:k,Di:u,Mi:w,Li:v,Dc:z,Ci:q,networkingEngine:D,Fh:e,Eh:g};h=new Cm(b,d,c,B);return C.return(h)})}function zo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,G(e,kn(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&hd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
603
|
-
function Ho(a,b){if(!Uc())return!0;if(b){if(""==(a.h||Wc()).canPlayType(b))return!1;if(!(Uc()&&b in vi))return!0;if(
|
|
604
|
+
function Ho(a,b){if(!Uc())return!0;if(b){if(""==(a.h||Wc()).canPlayType(b))return!1;if(!(Uc()&&b in vi))return!0;if(pe(b))return hd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls}return!1}
|
|
604
605
|
function xo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return to(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.qg=b,d=Oo(a.h,c,{Xh:function(){return a.keySystem()},onMetadata:function(h,k,l){Po(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.fa=f,G(g,d.L,2);a.G=d;H(g)})}
|
|
605
|
-
function Do(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L;return O(function(J){switch(J.g){case 1:to(a,"load"),e=a.h,a.I=new Vk({ie:function(){return e.playbackRate},nc:function(){return e.defaultPlaybackRate},hg:function(E){e.playbackRate=E},Yg:function(E){e.currentTime+=E}}),f=function(){return Qo(a)},g=function(){return Ro(a)},a.m.D(e,"playing",f),a.m.D(e,"pause",f),a.m.D(e,"ended",f),a.m.D(e,"ratechange",g),qo(a,a.g),a.
|
|
606
|
+
function Do(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L;return O(function(J){switch(J.g){case 1:to(a,"load"),e=a.h,a.I=new Vk({ie:function(){return e.playbackRate},nc:function(){return e.defaultPlaybackRate},hg:function(E){e.playbackRate=E},Yg:function(E){e.currentTime+=E}}),f=function(){return Qo(a)},g=function(){return Ro(a)},a.m.D(e,"playing",f),a.m.D(e,"pause",f),a.m.D(e,"ended",f),a.m.D(e,"ratechange",g),qo(a,a.g),a.Fb=a.g.preferredTextLanguage,a.Gd=a.g.preferredTextRole,a.Fd=a.g.preferForcedSubs,
|
|
606
607
|
So(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.o.init(function(E,K,N){a.i&&a.j&&E!=a.j.j&&To(a,E,!0,void 0===K?!1:K,void 0===N?0:N)}),a.o.setMediaElement(e),a.o.setCmsdManager(a.ea),a.j=Uo(a),a.j.configure(a.g.streaming),a.l=Vo,e.textTracks&&a.m.D(e.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Wo(a,E)}}),a.dispatchEvent(ro("streaming")),h=c;case 2:(l=a.j.j)||h||(h=Xo(a,!0));m=[];k=l||h;n=t([k.video,k.audio]);for(p=n.next();!p.done;p=n.next())(q=
|
|
607
608
|
p.value)&&!q.segmentIndex&&m.push(q.createSegmentIndex());if(!(0<m.length)){J.u(4);break}return G(J,Promise.all(m),4);case 4:if(!k||0!=k.disabledUntilTime){J.u(2);break}if(a.F&&a.F.onInitialVariantChosen)a.F.onInitialVariantChosen(k);a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&$a("Low-latency 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.");So(a.i.presentationTimeline,
|
|
608
|
-
a.g.playRangeStart,a.g.playRangeEnd);Kl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(E){a.C=Yo(a,E);a.
|
|
609
|
-
z||((B=
|
|
609
|
+
a.g.playRangeStart,a.g.playRangeEnd);Kl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(E){a.C=Yo(a,E);a.Hb=Zo(a,E);$o(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.qa);if(l){J.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){J.u(8);break}w=a.i.presentationTimeline;v=a.qa||a.h.currentTime;A=w.Yb();y=w.Ab();v<A?v=A:v>y&&(v=y);return G(J,ap(h,v),9);case 9:D=J.h,u(D);case 8:To(a,h,!0,!1,0);case 7:return a.C.$e(),z=a.Hc().find(function(E){return E.active}),
|
|
610
|
+
z||((B=vf(a.i.textStreams,a.Fb,a.Gd,a.Fd)[0]||null)&&cl(a.s.h,B,!0),h&&(B?(bp(a,h.audio,B)&&(a.pa=!0),a.pa&&a.G.F.setTextVisibility(!0),cp(a)):a.pa=!1),B&&(a.g.streaming.alwaysStreamText||a.Kf())&&Tl(a.j,B)),G(J,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),dp(a));Mo(a);No(a);a.i.variants.some(function(E){return E.primary});if((C=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)F=
|
|
610
611
|
function(){return ep(a)},a.m.D(e,"timeupdate",F);C||(I=function(){return fp(a)},a.m.D(e,"timeupdate",I),fp(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(L=function(){var E,K;return O(function(N){if(1==N.g){E=a.h.duration-a.h.currentTime;if(isNaN(E)||!(E<=a.g.streaming.preloadNextUrlWindow))return N.u(0);a.m.lb(e,"timeupdate",L);K=a;return G(N,a.preload(a.i.nextUrl),4)}K.ra=N.h;H(N)})},a.m.D(e,"timeupdate",L)),a.m.D(e,"ended",function(){a.load(a.ra||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(C);
|
|
611
612
|
a.Ea=!0;a.m.ha(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(J)}})}
|
|
612
|
-
function Bo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Xd,d=Date.now()/1E3,e=!0,a.B=a.Dc({
|
|
613
|
-
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?
|
|
613
|
+
function Bo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Xd,d=Date.now()/1E3,e=!0,a.B=a.Dc({Nb:a.H,onError:function(k){wo(a,k)},Ae:function(){},onExpirationUpdated:function(){var k=ro("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
614
|
+
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?je(b):"",codecs:b?oe(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ga,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add($d(g.mimeType,
|
|
614
615
|
g.codecs)),b.startsWith("audio/")?(g.type=c.X,f.audio=g):f.video=g,a.B.aa=!0,G(h,Kh(a.B,[f],[]),2)):G(h,a.B.Ub(a.h),0)})}
|
|
615
616
|
function Eo(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return to(a,"src-equals"),d=a.h,a.C=new Lk(d),e=!1,a.Ed.push(function(){e=!0}),null!=a.qa&&a.C.af(a.qa),a.I=new Vk({ie:function(){return d.playbackRate},nc:function(){return d.defaultPlaybackRate},hg:function(w){d.playbackRate=w},Yg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,$o(a,d,f),g=function(){return Qo(a)},h=function(){return Ro(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
616
617
|
"ratechange",h),"none"!=d.preload&&a.m.ha(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return Mo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return Mo(a)}),a.m.D(d.audioTracks,"change",function(){return Mo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":gp(a,w);break;case "chapters":Wo(a,w);break;default:Mo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return Mo(a)}),
|
|
617
|
-
a.m.D(d.textTracks,"change",function(){return Mo(a)})),d.src=In(a.N,a.da,c),(ad()||dd())&&d.load(),"none"!=d.preload&&!d.autoplay&&
|
|
618
|
+
a.m.D(d.textTracks,"change",function(){return Mo(a)})),d.src=In(a.N,a.da,c),(ad()||dd())&&d.load(),"none"!=d.preload&&!d.autoplay&&pe(c)&&md()&&d.load(),a.l=hp,a.dispatchEvent(ro("streaming")),k=new bg,Ck(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.$e();k.resolve()}),Ck(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(v){if(1==v.g)return ip(a),w=jp(a),w.find(function(A){return"disabled"!=A.mode})?(0<w.length&&(a.pa=!0),v.u(2)):G(v,new Promise(function(A){a.m.ha(d.textTracks,
|
|
618
619
|
"change",A);(new Tc(A)).Y(1)}),2);if(e)return v.return();kp(a);H(v)})}),d.error?k.reject(vo(a)):"none"==d.preload&&($a('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.ha(d,"error",function(){k.reject(vo(a))}),l=new Promise(function(w,v){(new Tc(v)).Y(a.g.streaming.loadTimeout)}),G(u,Promise.race([k,
|
|
619
620
|
l]),2);if((m=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)n=function(){return ep(a)},a.m.D(d,"timeupdate",n);m||(p=function(){return fp(a)},a.m.D(d,"timeupdate",p),fp(a));a.A&&(a.A.onManifestUpdated(m),m&&(q=a.Qb().end,a.m.D(d,"progress",function(){var w=a.Qb().end;q!=w&&(a.A.onManifestUpdated(a.V()),q=w)})));a.Ea=!0;H(u)})}
|
|
620
621
|
function ip(a){var b=a.g.preferredAudioLanguage;""!=b&&a.gh(b,a.g.preferredVariantRole)}function kp(a){var b=a.g.preferredTextLanguage;""!=b&&a.bg(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
621
622
|
function gp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues){for(var d=[],e={},f=t(b.activeCues),g=f.next();!g.done;e={Ma:e.Ma},g=f.next()){e.Ma=g.value;Jo(a,e.Ma.startTime,e.Ma.endTime,e.Ma.type,e.Ma.value);if(a.A)a.A.onCueMetadataChange(e.Ma.value);"com.apple.quicktime.HLS"==e.Ma.type&&null!=e.Ma.startTime&&(g=d.find(function(h){return function(k){return k.startTime==h.Ma.startTime&&k.endTime==h.Ma.endTime}}(e)),g||(g={startTime:e.Ma.startTime,endTime:e.Ma.endTime,
|
|
622
623
|
values:[]},d.push(g)),g.values.push(e.Ma.value))}d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.A&&(e.values.push({key:"CUE",description:"",data:"ONCE",mimeType:null,pictureType:null}),a.A.onInterstitialMetadata(a,a.h,e))}});var c=(new Tc(function(){var d=lp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).xc().Y(.5);a.Ed.push(function(){c.stop()})}}
|
|
623
|
-
function Po(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Jo(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Jo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(ro("metadata",b))}
|
|
624
|
+
function Po(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Jo(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Jo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(ro("metadata",b))}
|
|
624
625
|
function Wo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Tc(function(){b.mode="hidden"})).xc().Y(.5);a.Ed.push(function(){c.stop()})}}r.Qi=function(){for(var a=this.Z;a.g;)a.release()};r.Dc=function(a){return new Dh(a)};
|
|
625
626
|
function lo(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Dm(b(),!0,e):e()}b||(b=function(){return null});return new og(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(ro("downloadheadersreceived",f));d(function(){if(a.ea){var h=a.ea;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
626
627
|
fo(n[1]))}}catch(v){}if(l=e["cmsd-dynamic"]){try{var p=new Map,q=l.split(";");for(l=1;l<q.length;l++){var u=q[l].split("=");p.set(u[0],fo(u[1]))}var w=p}catch(v){w=null}w&&(h.g=w)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(ro("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Pn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
627
628
|
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Pn(h,f,{ot:Mn,su:!h.i})}}catch(M){ab("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case zg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.V()?"l":"v"};n.ot=Tn(k);var p=n.ot===Qn||n.ot===Kn||n.ot===Ln||n.ot===Vn,q=k.stream;if(q){var u=h.h.fb();if(p&&(n.bl=Xn(h,q.type),n.ot!==Vn)){var w=Yn(h,q.type);n.dl=u?w/Math.abs(u):w}q.bandwidth&&(n.br=q.bandwidth/1E3);
|
|
628
|
-
if(q.segmentIndex&&m){var v=q.segmentIndex.
|
|
629
|
+
if(q.segmentIndex&&m){var v=q.segmentIndex.Kb(m.endTime,!0,0>u);if(v){var A=v.next().value;if(A&&A!=m){if(!Rb(m.M(),A.M())){var y=A.M()[0],D=f.uris[0],z=new URL(y),B=new URL(D);if(z.origin!==B.origin)var C=y;else{for(var F=z.pathname.split("/").slice(1),I=B.pathname.split("/").slice(1,-1);F[0]===I[0];)F.shift(),I.shift();for(;I.length;)I.shift(),F.unshift("..");C=F.join("/")}n.nor=C}if((A.Ha||A.sa)&&(m.Ha!=A.Ha||m.sa!=A.sa)){var L=A.Ha+"-";A.sa&&(L+=A.sa);n.nrr=L}}}var J=h.h.fb()||1,E=Yn(h,q.type)||
|
|
629
630
|
500,K=q.bandwidth;var N=K?K*(m.endTime-m.startTime)/1E3/(E/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}p&&n.ot!==Vn&&(n.tb=Zn(h,n.ot)/1E3);Pn(h,f,n)}}catch(M){ab("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:Pn(h,f,{ot:"k"});break;case 4:Pn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.F)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.s;g&&(g.ae=isNaN(g.ae)?f:g.ae+f,0===e&&(g.Ug=f))}})}
|
|
630
|
-
function Yo(a,b){return new Mk(a.h,a.i,a.g.streaming,b,function(){a.
|
|
631
|
+
function Yo(a,b){return new Mk(a.h,a.i,a.g.streaming,b,function(){a.Hb&&Yk(a.Hb,!0);a.j&&a.j.Nd();a.L&&mp(a)},function(c){return a.dispatchEvent(c)})}
|
|
631
632
|
function Zo(a,b){b=new Rm(a.wd,a.V()||0<b);b.addEventListener("enter",function(d){Ko(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ko(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ko(a,"timelineregionenter",e),Ko(a,"timelineregionexit",e))});var c=new Xk(a.h);c.g.add(b);a.rd&&c.g.add(a.rd);return c}
|
|
632
633
|
function $o(a,b,c){a.L=new Vf;a.L.g=Xf;Yf(a.L,c,Math.min(.5,c/2));yo(a);a.Ce=(new Tc(function(){mp(a)})).Sa(.25);a.m.D(b,"waiting",function(){return mp(a)});a.m.D(b,"stalled",function(){return mp(a)});a.m.D(b,"canplaythrough",function(){return mp(a)});a.m.D(b,"progress",function(){return mp(a)})}
|
|
633
634
|
function mp(a){switch(a.l){case hp:if(a.h.ended)var b=!0;else{var c=Hi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Vo:a:if(a.h.ended||Wj(a.G))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.Zb();var d=Hi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ji(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Wf:Xf;c.g=d;(b=b!=d)&&d===Wf&&(c.h=Date.now());b&&yo(a)}function Oo(a,b,c,d){return new Nj(a,b,c,d)}
|
|
634
635
|
function ko(a){return new Gn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},yb:function(){return a.yb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},fb:function(){return a.fb()},zb:function(){return a.zb()},oc:function(){return a.oc()},V:function(){return a.V()}},a.g.cmcd)}
|
|
635
|
-
function Uo(a){return new El(a.i,{he:function(){return a.C?a.C.$d():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},fb:function(){return a.fb()},ca:a.G,
|
|
636
|
+
function Uo(a){return new El(a.i,{he:function(){return a.C?a.C.$d():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},fb:function(){return a.fb()},ca:a.G,Nb:a.H,onError:function(b){return wo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ii:function(){a.F&&a.F.update&&a.F.update()},Sf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.C){a.C.Zg();var h=Xj(a.G,f);!a.V()&&a.h.paused&&null!=h&&0<h&&a.C.$d()<h&&a.C.af(h)}mp(a);d=(new Map).set("start",
|
|
636
637
|
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(ro("segmentappended",d));a.o&&c.fastSwitching&&b.Kd&&b.pe&&a.o.trySuggestStreams()},Hi:function(b,c){(c=c.Lc)&&a.rd&&tl(a.rd,c,b)},yg:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Yg(Ab(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,
|
|
637
638
|
f),f+=b.length;Th(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){Po(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
|
|
638
639
|
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=om(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(rb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(rb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
@@ -657,20 +658,20 @@ r.Pd=function(a){var b=this;0==a?$a("A trick play rate of 0 is unsupported!"):(t
|
|
|
657
658
|
r.md=function(){var a=this.I.nc();this.l==hp&&this.I.set(a);this.l==Vo&&(this.I.set(a),this.o.playbackRateChanged(a),Ql(this.j,!1));this.Fa.Ra()};
|
|
658
659
|
r.oc=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,tf(e)){var f=lf(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return sf(g)}):[]};
|
|
659
660
|
r.Hc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=mf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?jp(this).map(function(f){return qf(f)}):[]};r.Vh=function(){var a=this.Hd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return nf(b)})};
|
|
660
|
-
r.Nh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Vo&&b.l!=hp)return g.return(null);c=b.Hd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.
|
|
661
|
+
r.Nh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Vo&&b.l!=hp)return g.return(null);c=b.Hd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Jb(function(h){var k=op(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.kc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.Qg(a,h.startTime+l*m/k))}}),G(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
661
662
|
function op(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{kc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
662
663
|
r.Qg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z;return O(function(B){if(1==B.g){if(c.l!=Vo&&c.l!=hp)return B.return(null);d=c.Hd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(C){return C.id==a}))?e.segmentIndex?B.u(2):G(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=op(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.kc;n=l/h.rows;p=h.kc*h.rows;q=g.j-g.startTime;
|
|
663
664
|
u=g.A||q/p;w=g.startTime;A=v=0;1<p&&(y=Math.floor((b-g.startTime)/u),w=g.startTime+y*u,v=y%h.kc*m,A=Math.floor(y/h.kc)*n);D=!1;if(z=g.s)D=!0,n=z.height,v=z.positionX,A=z.positionY,m=z.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:v,positionY:A,startTime:w,duration:u,uris:g.M(),width:m,sprite:D})})};
|
|
664
|
-
r.hh=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(cl(this.s.h,b,!1),Tl(this.j,b),pp(this),this.
|
|
665
|
+
r.hh=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(cl(this.s.h,b,!1),Tl(this.j,b),pp(this),this.Fb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=jp(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,of(c)==a.id?c.mode=this.pa?"showing":"hidden":c.mode="disabled";pp(this)}};
|
|
665
666
|
r.cg=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&tf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&$a("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");To(this,d,!1,b,c);this.za=new Kf(d,
|
|
666
667
|
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);No(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,of(c)==a.id){qp(this,c);break}};r.Ph=function(){return rp(this.oc())};r.hi=function(){return rp(this.Hc())};r.Oh=function(){return Array.from(sp(this.oc()))};r.gi=function(){return Array.from(sp(this.Hc()))};
|
|
667
668
|
r.gh=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.C){this.za=new Lf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;e=this.za.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=f.value,
|
|
668
|
-
tf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=lf(c),this.cg(a,!0,d)):oo(this))}else this.h&&this.h.audioTracks&&(d=
|
|
669
|
+
tf(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=lf(c),this.cg(a,!0,d)):oo(this))}else this.h&&this.h.audioTracks&&(d=vf(this.oc(),a,b||"",!1)[0])&&this.cg(d)};r.bg=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Fb=a,this.Gd=b||"",this.Fd=c,(a=vf(this.i.textStreams,this.Fb,this.Gd,this.Fd)[0]||null)&&a!=this.j.s&&(cl(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.Kf()))Tl(this.j,a),pp(this)}else(a=vf(this.Hc(),a,b||"",c)[0])&&this.hh(a)};
|
|
669
670
|
r.$i=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.za=new Lf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),oo(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&qp(this,b)}};
|
|
670
671
|
r.Kf=function(){var a=this.pa;return this.G&&this.l==Vo?this.G.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?jp(this).some(function(b){return"showing"==b.mode}):a};r.Kg=function(){return this.h&&this.h.src&&this.h.textTracks?tp(this).map(function(a){return qf(a)}):[]};
|
|
671
672
|
r.Rh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Ee(a),c=tp(this).filter(function(h){return Ee(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
672
673
|
function jp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function lp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function tp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
673
|
-
r.nh=function(a){a=!!a;if(this.pa!=a){this.pa=a;if(this.l==Vo)this.G.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=
|
|
674
|
+
r.nh=function(a){a=!!a;if(this.pa!=a){this.pa=a;if(this.l==Vo)this.G.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=vf(this.i.textStreams,this.Fb,this.Gd,this.Fd),0<a.length&&(Tl(this.j,a[0]),pp(this))):Pl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=jp(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")}cp(this)}};
|
|
674
675
|
r.ci=function(){if(this.C)var a=this.C.$d();else{if(null==this.qa)return new Date;a=this.qa}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.Pg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
675
676
|
r.je=function(){return this.V()?this.i?this.i.presentationTimeline.je():null:null};r.yb=function(){if(this.l==Vo)return this.G.yb();var a={total:[],audio:[],video:[],text:[]};this.l==hp&&(a.total=Ki(this.h.buffered));return a};
|
|
676
677
|
r.getStats=function(){if(this.l!=Vo&&this.l!=hp)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],
|
|
@@ -694,7 +695,7 @@ r.Ef=function(){$a("Shaka Player's internal Manifest structure is NOT covered by
|
|
|
694
695
|
function jo(a){var b=xm();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Zf(d))}};b.textDisplayFactory=function(){if(a.ze){var c=a.getConfiguration();return new wn(a.h,a.ze,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new rn(a.h,"Shaka Player TextTrack"):new tn};return b}r.rh=function(a){this.ze=a};
|
|
695
696
|
function Io(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Uk,l=e.closedCaptions.get(g);h={id:a.rg++,originalId:g,groupId:null,
|
|
696
697
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Vd,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([$d(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
697
|
-
function ap(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(q){if(1==q.g)return k?G(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.
|
|
698
|
+
function ap(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(q){if(1==q.g)return k?G(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.Kb(l))?m.next().value:null;if(!n)return q.return(null);p=n.startTime;return q.return(p)})},G(h,e(c,b),2);if(3!=h.g)return f=h.h,G(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
698
699
|
function yo(a){var b=a.Jf();if(a.s&&a.L&&a.C){var c=a.I;c.j=b;Wk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Qo(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Ne<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.R&&(a.R=Math.min(a.R+ ++a.Ne*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(ro("buffering",
|
|
699
700
|
b))}function Ro(a){var b=a.h.playbackRate;0!=b&&(a.I&&a.I.set(b),b=ro("ratechange"),a.dispatchEvent(b))}
|
|
700
701
|
function Qo(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Xf?c="buffering":a.h.paused?c="paused":a.h.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(ro("statechanged",c)))}}
|
|
@@ -725,16 +726,17 @@ X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Gh;X.
|
|
|
725
726
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return G(k,ki(),3);case 3:b=k.h;case 2:var l={};if(Uc())for(var m in vi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Uc()?!!vi[n]:Vc(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(ae));
|
|
726
727
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=se(n)?!0:Uc()?nb(n)||(oc(n)?!0:!1):Vc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return G(k,td(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Ap;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
727
728
|
X.isBrowserSupported=function(){window.Promise||$a("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||$c("Trident/"))return!1;var a=md();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Uc()?!0:Vc("application/x-mpegurl")};X.setAdManagerFactory=function(a){mo=a};
|
|
728
|
-
X.registerSupportPlugin=function(a,b){Ap[a]=b};X.prototype.destroy=X.prototype.destroy;var so=0,io=1,Vo=2,hp=3;X.LoadMode={DESTROYED:so,NOT_LOADED:io,MEDIA_SOURCE:Vo,SRC_EQUALS:hp};X.version="v4.10.
|
|
729
|
+
X.registerSupportPlugin=function(a,b){Ap[a]=b};X.prototype.destroy=X.prototype.destroy;var so=0,io=1,Vo=2,hp=3;X.LoadMode={DESTROYED:so,NOT_LOADED:io,MEDIA_SOURCE:Vo,SRC_EQUALS:hp};X.version="v4.10.9";var Bp=["4","10"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(Bp[0]),Number(Bp[1])));var Ap={},mo=null;function Cp(){this.g=[];this.i=this.l=this.j=this.h=0}function Dp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Ep(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new gb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=Ep.prototype;r.needsSkipUI=function(){return!1};r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
729
730
|
r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
730
731
|
r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
731
732
|
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
732
733
|
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",Ep);Ep.prototype.release=Ep.prototype.release;
|
|
733
734
|
Ep.prototype.getPodIndex=Ep.prototype.getPodIndex;Ep.prototype.getTimeOffset=Ep.prototype.getTimeOffset;Ep.prototype.getMediaUrl=Ep.prototype.getMediaUrl;Ep.prototype.getAdvertiserName=Ep.prototype.getAdvertiserName;Ep.prototype.getCreativeAdId=Ep.prototype.getCreativeAdId;Ep.prototype.getAdId=Ep.prototype.getAdId;Ep.prototype.getVastMediaWidth=Ep.prototype.getVastMediaWidth;Ep.prototype.getVastMediaHeight=Ep.prototype.getVastMediaHeight;Ep.prototype.getVastMediaBitrate=Ep.prototype.getVastMediaBitrate;
|
|
734
735
|
Ep.prototype.getDescription=Ep.prototype.getDescription;Ep.prototype.getTitle=Ep.prototype.getTitle;Ep.prototype.getPositionInSequence=Ep.prototype.getPositionInSequence;Ep.prototype.getSequenceLength=Ep.prototype.getSequenceLength;Ep.prototype.setMuted=Ep.prototype.setMuted;Ep.prototype.resize=Ep.prototype.resize;Ep.prototype.isLinear=Ep.prototype.isLinear;Ep.prototype.isMuted=Ep.prototype.isMuted;Ep.prototype.setVolume=Ep.prototype.setVolume;Ep.prototype.getVolume=Ep.prototype.getVolume;
|
|
735
|
-
Ep.prototype.play=Ep.prototype.play;Ep.prototype.pause=Ep.prototype.pause;Ep.prototype.skip=Ep.prototype.skip;Ep.prototype.canSkipNow=Ep.prototype.canSkipNow;Ep.prototype.getTimeUntilSkippable=Ep.prototype.getTimeUntilSkippable;Ep.prototype.isSkippable=Ep.prototype.isSkippable;Ep.prototype.isPaused=Ep.prototype.isPaused;Ep.prototype.getRemainingTime=Ep.prototype.getRemainingTime;Ep.prototype.getMinSuggestedDuration=Ep.prototype.getMinSuggestedDuration;Ep.prototype.getDuration=Ep.prototype.getDuration;
|
|
736
|
+
Ep.prototype.play=Ep.prototype.play;Ep.prototype.pause=Ep.prototype.pause;Ep.prototype.skip=Ep.prototype.skip;Ep.prototype.canSkipNow=Ep.prototype.canSkipNow;Ep.prototype.getTimeUntilSkippable=Ep.prototype.getTimeUntilSkippable;Ep.prototype.isSkippable=Ep.prototype.isSkippable;Ep.prototype.isPaused=Ep.prototype.isPaused;Ep.prototype.getRemainingTime=Ep.prototype.getRemainingTime;Ep.prototype.getMinSuggestedDuration=Ep.prototype.getMinSuggestedDuration;Ep.prototype.getDuration=Ep.prototype.getDuration;
|
|
737
|
+
Ep.prototype.needsSkipUI=Ep.prototype.needsSkipUI;function Fp(){}S("shaka.ads.Utils",Fp);Fp.ADS_LOADED="ads-loaded";Fp.AD_STARTED="ad-started";Fp.AD_FIRST_QUARTILE="ad-first-quartile";Fp.AD_MIDPOINT="ad-midpoint";Fp.AD_THIRD_QUARTILE="ad-third-quartile";Fp.AD_COMPLETE="ad-complete";Fp.AD_STOPPED="ad-stopped";Fp.AD_SKIPPED="ad-skipped";Fp.AD_VOLUME_CHANGED="ad-volume-changed";Fp.AD_MUTED="ad-muted";Fp.AD_PAUSED="ad-paused";Fp.AD_RESUMED="ad-resumed";Fp.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Fp.CUEPOINTS_CHANGED="ad-cue-points-changed";
|
|
736
738
|
Fp.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Fp.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Fp.AD_CLICKED="ad-clicked";Fp.AD_PROGRESS="ad-progress";Fp.AD_BUFFERING="ad-buffering";Fp.AD_IMPRESSION="ad-impression";Fp.AD_DURATION_CHANGED="ad-duration-changed";Fp.AD_CLOSED="ad-closed";Fp.AD_LOADED="ad-loaded";Fp.ALL_ADS_COMPLETED="all-ads-completed";Fp.AD_LINEAR_CHANGED="ad-linear-changed";Fp.AD_METADATA="ad-metadata";Fp.AD_RECOVERABLE_ERROR="ad-recoverable-error";Fp.AD_ERROR="ad-error";
|
|
737
|
-
Fp.AD_BREAK_READY="ad-break-ready";Fp.AD_INTERACTION="ad-interaction";Fp.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Fp.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Fp.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Gp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.
|
|
739
|
+
Fp.AD_BREAK_READY="ad-break-ready";Fp.AD_INTERACTION="ad-interaction";Fp.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Fp.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Fp.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Gp(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.9");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
|
|
738
740
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Hp(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Ip(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.ha(this.i,"play",function(){f.F=!0})}Gp.prototype.configure=function(a){this.o=a};Gp.prototype.stop=function(){this.g&&this.g.stop();this.s&&vn(this.s)};
|
|
739
741
|
Gp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function Ip(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new U("ad-error",b));Jp(a,null);a.l(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
740
742
|
function Hp(a,b){a.l(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.l(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -747,34 +749,35 @@ a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paus
|
|
|
747
749
|
a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
|
|
748
750
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
749
751
|
function Mp(a,b){var c=b.getAd();c?(a.j=new Ep(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new U("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new U("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.o.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):$a("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
750
|
-
function Jp(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new U("ad-content-resume-requested"));a.l(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function Np(a,b,c,d,e){this.g=a;this.h=b;this.j=c;this.l=d;this.i=e}r=Np.prototype;r.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h};
|
|
751
|
-
r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.j()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};
|
|
752
|
-
r.getTitle=function(){return""};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return""};r.getCreativeAdId=function(){return""};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};
|
|
753
|
-
Np.prototype.release=Np.prototype.release;Np.prototype.getPodIndex=Np.prototype.getPodIndex;Np.prototype.getTimeOffset=Np.prototype.getTimeOffset;Np.prototype.getMediaUrl=Np.prototype.getMediaUrl;Np.prototype.getAdvertiserName=Np.prototype.getAdvertiserName;Np.prototype.getCreativeAdId=Np.prototype.getCreativeAdId;Np.prototype.getAdId=Np.prototype.getAdId;Np.prototype.getVastMediaWidth=Np.prototype.getVastMediaWidth;
|
|
754
|
-
Np.prototype.getVastMediaBitrate=Np.prototype.getVastMediaBitrate;Np.prototype.getDescription=Np.prototype.getDescription;Np.prototype.getTitle=Np.prototype.getTitle;Np.prototype.getPositionInSequence=Np.prototype.getPositionInSequence;Np.prototype.getSequenceLength=Np.prototype.getSequenceLength;Np.prototype.setMuted=Np.prototype.setMuted;Np.prototype.resize=Np.prototype.resize;Np.prototype.isLinear=Np.prototype.isLinear;
|
|
755
|
-
Np.prototype.getVolume=Np.prototype.getVolume;Np.prototype.play=Np.prototype.play;Np.prototype.pause=Np.prototype.pause;Np.prototype.skip=Np.prototype.skip;Np.prototype.canSkipNow=Np.prototype.canSkipNow;Np.prototype.getTimeUntilSkippable=Np.prototype.getTimeUntilSkippable;Np.prototype.isSkippable=Np.prototype.isSkippable;Np.prototype.isPaused=Np.prototype.isPaused;Np.prototype.getRemainingTime=Np.prototype.getRemainingTime;
|
|
756
|
-
Np.prototype.getDuration=Np.prototype.getDuration;function Op(a,b,c,d){var e=this;this.F=a;this.B=b;this.i=c;this.C=null;this.
|
|
757
|
-
k=t(g);l=k.next();case 3:if(l.done){w.u(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.
|
|
758
|
-
Op.prototype.configure=function(a){this.F&&this.
|
|
759
|
-
Op.prototype.stop=function(){this.j&&this.j.Ra();this.G.clear();this.A.clear();this.h.lf();this.o.clear();this.h.detach();this.H=!1;this.
|
|
760
|
-
function Tp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.B.Mg()==hp&&a.
|
|
761
|
-
b);c&&Sp(a);H(m)})}function Qp(a,b,c){c=void 0===c?0:c;var d=0,e=null;if(a.A.size&&null!=a.
|
|
762
|
-
function Rp(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,q,u,w,v,A,y,D;O(function(z){switch(z.g){case 1:g=Date.now();!a.s.parentElement&&a.F&&a.F.appendChild(a.s);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.
|
|
763
|
-
C.g)return"detach"!=B.state?C.u(0):pd()?G(C,new Promise(function(F){return(new Tc(F)).Y(.1)}),3):C.u(3);h.resolve();a.j.lb(a.B,"onstatechange",k);H(C)})};a.j.D(a.B,"onstatechange",k);return G(z,h,2);case 2:return a.
|
|
764
|
-
m&&m.stop(),(B=Qp(a,b.
|
|
765
|
-
u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return G(B,p(),2)}a.g(new U("ad-complete"));H(B)})},w=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new U("ad-skipped"));return G(B,p(),0)})},v=new Np(a.s,b.isSkippable,w,c,d),a.
|
|
766
|
-
a.j.ha(a.h,"midpoint",function(){n();a.g(new U("ad-midpoint"))}),a.j.ha(a.h,"thirdquartile",function(){n();a.g(new U("ad-third-quartile"))}),a.j.ha(a.h,"complete",u),a.j.D(a.s,"play",function(){a.g(new U("ad-resumed"))}),a.j.D(a.s,"pause",function(){a.g(new U("ad-paused"))}),a.j.D(a.s,"volumechange",function(){a.s.muted?a.g(new U("ad-muted")):a.g(new U("ad-volume-changed"))}),sa(z,4),b.Wf&&(m=(new Tc(function(){v.skip()})).Y(b.Wf)),Pp(a),G(z,a.h.Ub(a.s),6);case 6:return a.o.has(b)?
|
|
767
|
-
10):G(z,a.h.load(b.uri),8);case 10:return A=z.h,a.o.delete(b),A?G(z,a.h.load(A),8):G(z,a.h.load(b.uri),8);case 8:y=(Date.now()-g)/1E3;a.g(new U("ads-loaded",(new Map).set("loadTime",y)));a.
|
|
752
|
+
function Jp(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new U("ad-content-resume-requested"));a.l(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function Np(a,b,c,d,e){this.g=a;this.h=b;this.j=c;this.l=d;this.i=e}r=Np.prototype;r.needsSkipUI=function(){return!0};r.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h};
|
|
753
|
+
r.getTimeUntilSkippable=function(){return this.h?0:Math.max(this.getRemainingTime(),0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.j()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};
|
|
754
|
+
r.getSequenceLength=function(){return this.l};r.getPositionInSequence=function(){return this.i};r.getTitle=function(){return""};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return""};r.getCreativeAdId=function(){return""};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};
|
|
755
|
+
r.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Np);Np.prototype.release=Np.prototype.release;Np.prototype.getPodIndex=Np.prototype.getPodIndex;Np.prototype.getTimeOffset=Np.prototype.getTimeOffset;Np.prototype.getMediaUrl=Np.prototype.getMediaUrl;Np.prototype.getAdvertiserName=Np.prototype.getAdvertiserName;Np.prototype.getCreativeAdId=Np.prototype.getCreativeAdId;Np.prototype.getAdId=Np.prototype.getAdId;Np.prototype.getVastMediaWidth=Np.prototype.getVastMediaWidth;
|
|
756
|
+
Np.prototype.getVastMediaHeight=Np.prototype.getVastMediaHeight;Np.prototype.getVastMediaBitrate=Np.prototype.getVastMediaBitrate;Np.prototype.getDescription=Np.prototype.getDescription;Np.prototype.getTitle=Np.prototype.getTitle;Np.prototype.getPositionInSequence=Np.prototype.getPositionInSequence;Np.prototype.getSequenceLength=Np.prototype.getSequenceLength;Np.prototype.setMuted=Np.prototype.setMuted;Np.prototype.resize=Np.prototype.resize;Np.prototype.isLinear=Np.prototype.isLinear;
|
|
757
|
+
Np.prototype.isMuted=Np.prototype.isMuted;Np.prototype.setVolume=Np.prototype.setVolume;Np.prototype.getVolume=Np.prototype.getVolume;Np.prototype.play=Np.prototype.play;Np.prototype.pause=Np.prototype.pause;Np.prototype.skip=Np.prototype.skip;Np.prototype.canSkipNow=Np.prototype.canSkipNow;Np.prototype.getTimeUntilSkippable=Np.prototype.getTimeUntilSkippable;Np.prototype.isSkippable=Np.prototype.isSkippable;Np.prototype.isPaused=Np.prototype.isPaused;Np.prototype.getRemainingTime=Np.prototype.getRemainingTime;
|
|
758
|
+
Np.prototype.getMinSuggestedDuration=Np.prototype.getMinSuggestedDuration;Np.prototype.getDuration=Np.prototype.getDuration;Np.prototype.needsSkipUI=Np.prototype.needsSkipUI;function Op(a,b,c,d){var e=this;this.F=a;this.B=b;this.i=c;this.C=null;this.m=!0;this.s=this.i;this.g=d;this.G=new Set;this.A=new Set;this.o=new Map;this.h=new X;Pp(this);this.I=new gb;this.j=new gb;this.H=!1;this.l=null;this.I.D(this.i,"timeupdate",function(){if(!e.H){var f=null==e.l||0==e.l;e.l=e.i.currentTime;(f=Qp(e,f))&&Rp(e,f,1,1,Date.now())}});(new Tc(function(){var f,g,h,k,l,m,n,p,q,u;return O(function(w){switch(w.g){case 1:if(!e.A.size||e.H||null==e.l){w.u(0);break}f=!1;g=Array.from(e.A);
|
|
759
|
+
h=e.B.Qb();k=t(g);l=k.next();case 3:if(l.done){w.u(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.l;0<p&&10>=p&&(e.o.has(m)||e.o.set(m,e.h.preload(m.uri)));w.u(4);break}if(!e.o.has(m)){w.u(7);break}return G(w,e.o.get(m),8);case 8:(q=w.h)&&q.destroy(),e.o.delete(m);case 7:u=JSON.stringify(m),e.G.has(u)&&e.G.delete(u),e.A.delete(m),f=!0;case 4:l=k.next();w.u(3);break;case 5:f&&Sp(e),H(w)}})})).Sa(1)}
|
|
760
|
+
Op.prototype.configure=function(a){this.F&&this.m==a.supportsMultipleMediaElements&&((this.m=!a.supportsMultipleMediaElements)?(this.s=this.i,this.C&&(this.C.parentElement&&this.F.removeChild(this.C),this.C=null)):(this.C||(a=document.createElement(this.i.tagName),a.autoplay=!0,a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.backgroundColor="rgb(0, 0, 0)",a.setAttribute("playsinline",""),this.C=a),this.s=this.C))};
|
|
761
|
+
Op.prototype.stop=function(){this.j&&this.j.Ra();this.G.clear();this.A.clear();this.h.lf();this.o.clear();this.h.detach();this.H=!1;this.l=null};Op.prototype.release=function(){this.stop();this.I&&this.I.release();this.j&&this.j.release();this.F&&vn(this.F);this.h.destroy()};
|
|
762
|
+
function Tp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.B.Mg()==hp&&a.m)return $a("Unsupported interstitial when using single media element",b),m.return();Pp(a);c=!1;return G(m,Up(a,b),2)}d=m.h;if(d.length)for(e=t(d),f=e.next();!f.done;f=e.next())(g=f.value,h=JSON.stringify(g),a.G.has(h))||(c=!0,a.G.add(h),a.A.add(g),k=!1,b.Cb&&null==a.l?k=!0:0!=g.startTime||g.ef?null!=a.l&&(l=b.startTime-a.l,0<l&&10>=l&&(k=!0)):k=!0,k&&(a.o.has(g)||a.o.set(g,a.h.preload(g.uri))));else $a("Unsupported interstitial",
|
|
763
|
+
b);c&&Sp(a);H(m)})}function Qp(a,b,c){c=void 0===c?0:c;var d=0,e=null;if(a.A.size&&null!=a.l){var f=a.i.ended,g=Array.from(a.A).sort(function(l,m){return m.startTime-l.startTime});g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;b?k=h.Cb:f?k=h.sc:h.Cb||h.sc||(k=a.l-Math.round(1E3*h.startTime)/1E3,k=0<k&&(1>=k||!h.ef));if(k){if(d==c){e=h;break}d++}}}return e}
|
|
764
|
+
function Rp(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,q,u,w,v,A,y,D;O(function(z){switch(z.g){case 1:g=Date.now();!a.s.parentElement&&a.F&&a.F.appendChild(a.s);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.Cb?B.Cb==b.Cb:b.sc?B.sc==b.sc:.001>Math.abs(B.startTime-b.startTime)}).length);if(b.once||b.Cb)f++,a.A.delete(b),Sp(a);a.H=!0;if(!a.m||1!=d){z.u(2);break}a.g(new U("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new bg;k=function(B){return O(function(C){if(1==
|
|
765
|
+
C.g)return"detach"!=B.state?C.u(0):pd()?G(C,new Promise(function(F){return(new Tc(F)).Y(.1)}),3):C.u(3);h.resolve();a.j.lb(a.B,"onstatechange",k);H(C)})};a.j.D(a.B,"onstatechange",k);return G(z,h,2);case 2:return a.m||(a.i.pause(),null!=b.Rc&&0!=b.Rc&&(a.i.currentTime+=b.Rc)),l=!1,m=null,n=function(){if(!a.m&&null==b.Rc)if(b.Ke&&b.endTime&&Infinity!=b.endTime)a.i.currentTime!=b.endTime&&(a.i.currentTime=b.endTime);else{var B=Date.now();a.i.currentTime+=(B-e)/1E3;e=B}},p=function(){var B,C;return O(function(F){if(1==
|
|
766
|
+
F.g)return n(),m&&m.stop(),(B=Qp(a,b.Cb,d-f))?(a.g(new U("ad-stopped")),a.j.Ra(),Rp(a,B,c,++d,e,f),F.u(0)):a.m?G(F,a.h.detach(),4):G(F,a.h.dc(),4);a.m&&(C=b.Rc,null==C&&(C=b.Ke&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.l||0):(Date.now()-e)/1E3),a.g(new U("ad-content-resume-requested",(new Map).set("offset",C))));a.g(new U("ad-stopped"));a.j.Ra();a.H=!1;a.m||(n(),a.i.ended||a.i.play());H(F)})},q=function(B){return O(function(C){if(l)return C.return();l=!0;a.g(new U("ad-error",(new Map).set("originalEvent",
|
|
767
|
+
B)));return G(C,p(),0)})},u=function(){return O(function(B){if(1==B.g){if(l)return B.return();l=!0;return G(B,p(),2)}a.g(new U("ad-complete"));H(B)})},w=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new U("ad-skipped"));return G(B,p(),0)})},v=new Np(a.s,b.isSkippable,w,c,d),a.m||(v.setMuted(a.i.muted),v.setVolume(a.i.volume)),a.g(new U("ad-started",(new Map).set("ad",v))),v.canSkipNow()&&a.g(new U("ad-skip-state-changed")),a.j.ha(a.h,"error",q),a.j.ha(a.h,"firstquartile",function(){n();
|
|
768
|
+
a.g(new U("ad-first-quartile"))}),a.j.ha(a.h,"midpoint",function(){n();a.g(new U("ad-midpoint"))}),a.j.ha(a.h,"thirdquartile",function(){n();a.g(new U("ad-third-quartile"))}),a.j.ha(a.h,"complete",u),a.j.D(a.s,"play",function(){a.g(new U("ad-resumed"))}),a.j.D(a.s,"pause",function(){a.g(new U("ad-paused"))}),a.j.D(a.s,"volumechange",function(){a.s.muted?a.g(new U("ad-muted")):a.g(new U("ad-volume-changed"))}),sa(z,4),b.Wf&&(m=(new Tc(function(){v.skip()})).Y(b.Wf)),Pp(a),G(z,a.h.Ub(a.s),6);case 6:return a.o.has(b)?
|
|
769
|
+
G(z,a.o.get(b),10):G(z,a.h.load(b.uri),8);case 10:return A=z.h,a.o.delete(b),A?G(z,a.h.load(A),8):G(z,a.h.load(b.uri),8);case 8:y=(Date.now()-g)/1E3;a.g(new U("ads-loaded",(new Map).set("loadTime",y)));a.m&&a.i.play();va(z,0);break;case 4:D=wa(z),q(D),H(z)}})}
|
|
768
770
|
function Up(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L,J,E,K,N,M,P,R;return O(function(Q){switch(Q.g){case 1:c=[];if(!b)return Q.return(c);d=b.values.find(function(W){return"X-ASSET-URI"==W.key});e=b.values.find(function(W){return"X-ASSET-LIST"==W.key});if(!d&&!e)return Q.return(c);f=b.values.find(function(W){return"X-RESTRICT"==W.key});h=g=!0;f&&f.data&&(k=f.data,g=!k.includes("SKIP"),h=!k.includes("JUMP"));l=null;if(m=b.values.find(function(W){return"X-RESUME-OFFSET"==W.key}))n=m.data,
|
|
769
|
-
l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(q=b.values.find(function(W){return"X-PLAYOUT-LIMIT"==W.key}))u=q.data,p=parseFloat(u),isNaN(p)&&(p=null);A=v=w=!1;if(y=b.values.find(function(W){return"CUE"==W.key}))D=y.data,w=D.includes("ONCE"),v=D.includes("PRE"),A=D.includes("POST");z=!
|
|
770
|
-
isSkippable:g,ef:h,Rc:l,Wf:p,once:w,
|
|
771
|
-
function Sp(a){for(var b=[],c={},d=t(a.A),e=d.next();!e.done;c={vb:c.vb},e=d.next())e=e.value,c.vb={start:e.startTime,end:null},e.
|
|
772
|
-
r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return"number"==typeof this.j?!0:!1};r.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};
|
|
773
|
-
r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return this.o};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.l?this.l:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};
|
|
774
|
-
r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Zp);Zp.prototype.release=Zp.prototype.release;
|
|
775
|
-
Zp.prototype.
|
|
776
|
-
Zp.prototype.
|
|
777
|
-
Zp.prototype.
|
|
771
|
+
l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(q=b.values.find(function(W){return"X-PLAYOUT-LIMIT"==W.key}))u=q.data,p=parseFloat(u),isNaN(p)&&(p=null);A=v=w=!1;if(y=b.values.find(function(W){return"CUE"==W.key}))D=y.data,w=D.includes("ONCE"),v=D.includes("PRE"),A=D.includes("POST");z=!1;(B=b.values.find(function(W){return"X-TIMELINE-OCCUPIES"==W.key}))?(C=B.data,z=C.includes("RANGE")):!m&&a.B.V()&&(z=!v&&!A);if(d){F=d.data;if(!F)return Q.return(c);c.push({startTime:b.startTime,endTime:b.endTime,uri:F,
|
|
772
|
+
isSkippable:g,ef:h,Rc:l,Wf:p,once:w,Cb:v,sc:A,Ke:z});Q.u(2);break}if(!e){Q.u(2);break}I=e.data;if(!I)return Q.return(c);L=tg([I],$f());J=a.B.zb().request(7,L);sa(Q,4);return G(Q,J.promise,6);case 6:E=Q.h;K=vd(E.data);N=JSON.parse(K);M=t(N.ASSETS);for(P=M.next();!P.done;P=M.next())R=P.value,R.URI&&c.push({startTime:b.startTime,endTime:b.endTime,uri:R.URI,isSkippable:g,ef:h,Rc:l,Wf:p,once:w,Cb:v,sc:A,Ke:z});va(Q,2);break;case 4:wa(Q);case 2:return Q.return(c)}})}
|
|
773
|
+
function Sp(a){for(var b=[],c={},d=t(a.A),e=d.next();!e.done;c={vb:c.vb},e=d.next())e=e.value,c.vb={start:e.startTime,end:null},e.Cb?(c.vb.start=0,c.vb.end=null):e.sc?(c.vb.start=-1,c.vb.end=null):e.Ke&&(c.vb.end=e.endTime),b.find(function(f){return function(g){return f.vb.start==g.start&&f.vb.end==g.end}}(c))||b.push(c.vb);a.g(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}function Pp(a){a.h.configure(a.B.Og());var b=a.h.zb();b.Ag();b.Bg();sg(a.B.zb(),b)};function Vp(a){this.h=a||"";this.g=0}function Wp(a){Xp(a,/[ \t]+/gm)}function Xp(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Yp(a){return a.g==a.h.length?null:(a=Xp(a,/[^ \t\n]*/gm))?a[0]:null};function Zp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Xp(new Vp(a),$p),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}r=Zp.prototype;r.needsSkipUI=function(){return!0};r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
774
|
+
r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return"number"==typeof this.j?!0:!1};r.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};
|
|
775
|
+
r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return this.o};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.l?this.l:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};
|
|
776
|
+
r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Zp);Zp.prototype.release=Zp.prototype.release;
|
|
777
|
+
Zp.prototype.getPodIndex=Zp.prototype.getPodIndex;Zp.prototype.getTimeOffset=Zp.prototype.getTimeOffset;Zp.prototype.getMediaUrl=Zp.prototype.getMediaUrl;Zp.prototype.getAdvertiserName=Zp.prototype.getAdvertiserName;Zp.prototype.getCreativeAdId=Zp.prototype.getCreativeAdId;Zp.prototype.getAdId=Zp.prototype.getAdId;Zp.prototype.getVastMediaWidth=Zp.prototype.getVastMediaWidth;Zp.prototype.getVastMediaHeight=Zp.prototype.getVastMediaHeight;Zp.prototype.getVastMediaBitrate=Zp.prototype.getVastMediaBitrate;
|
|
778
|
+
Zp.prototype.getDescription=Zp.prototype.getDescription;Zp.prototype.getTitle=Zp.prototype.getTitle;Zp.prototype.getPositionInSequence=Zp.prototype.getPositionInSequence;Zp.prototype.getSequenceLength=Zp.prototype.getSequenceLength;Zp.prototype.setMuted=Zp.prototype.setMuted;Zp.prototype.resize=Zp.prototype.resize;Zp.prototype.isLinear=Zp.prototype.isLinear;Zp.prototype.isMuted=Zp.prototype.isMuted;Zp.prototype.setVolume=Zp.prototype.setVolume;Zp.prototype.getVolume=Zp.prototype.getVolume;
|
|
779
|
+
Zp.prototype.play=Zp.prototype.play;Zp.prototype.pause=Zp.prototype.pause;Zp.prototype.skip=Zp.prototype.skip;Zp.prototype.canSkipNow=Zp.prototype.canSkipNow;Zp.prototype.getTimeUntilSkippable=Zp.prototype.getTimeUntilSkippable;Zp.prototype.isSkippable=Zp.prototype.isSkippable;Zp.prototype.isPaused=Zp.prototype.isPaused;Zp.prototype.getRemainingTime=Zp.prototype.getRemainingTime;Zp.prototype.getMinSuggestedDuration=Zp.prototype.getMinSuggestedDuration;Zp.prototype.getDuration=Zp.prototype.getDuration;
|
|
780
|
+
Zp.prototype.needsSkipUI=Zp.prototype.needsSkipUI;var $p=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function aq(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.U=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.R=!0;this.H="";this.o=new gb}aq.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.lb(b.target,b.type,b.listener);bq(this);this.m=[];this.s=[];this.G="";this.R=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
778
781
|
aq.prototype.release=function(){this.stop();this.o&&this.o.release()};aq.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(cq(this,this.G,this.R),this.R=!1)};aq.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
779
782
|
function dq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=tg([b],$f()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Ad(e)),f=a.K.request(7,d),sa(u,2),G(u,f.promise,4);if(2!=u.g){g=u.h;h=vd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new uc(b),m=new uc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.U,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),q=new uc(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
780
783
|
return va(u,0)}wa(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;H(u)})}
|
|
@@ -792,13 +795,14 @@ function kq(a){var b=!1;a.h.paused?b=!0:(jq(a,"impression"),jq(a,"start"));a.m.p
|
|
|
792
795
|
d.type,d.listener)}
|
|
793
796
|
function jq(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=tg([d],$f()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
|
|
794
797
|
case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
|
|
795
|
-
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function lq(a,b){this.g=a;this.i=null;this.h=b}r=lq.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};
|
|
796
|
-
r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};
|
|
797
|
-
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
798
|
-
r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",lq);lq.prototype.release=lq.prototype.release;
|
|
799
|
-
lq.prototype.getTimeOffset=lq.prototype.getTimeOffset;lq.prototype.getMediaUrl=lq.prototype.getMediaUrl;lq.prototype.getAdvertiserName=lq.prototype.getAdvertiserName;lq.prototype.getCreativeAdId=lq.prototype.getCreativeAdId;lq.prototype.getAdId=lq.prototype.getAdId;lq.prototype.getVastMediaWidth=lq.prototype.getVastMediaWidth;lq.prototype.getVastMediaHeight=lq.prototype.getVastMediaHeight;lq.prototype.getVastMediaBitrate=lq.prototype.getVastMediaBitrate;
|
|
800
|
-
lq.prototype.getTitle=lq.prototype.getTitle;lq.prototype.getPositionInSequence=lq.prototype.getPositionInSequence;lq.prototype.getSequenceLength=lq.prototype.getSequenceLength;lq.prototype.setMuted=lq.prototype.setMuted;lq.prototype.resize=lq.prototype.resize;lq.prototype.isLinear=lq.prototype.isLinear;lq.prototype.isMuted=lq.prototype.isMuted;lq.prototype.setVolume=lq.prototype.setVolume;lq.prototype.getVolume=lq.prototype.getVolume;
|
|
801
|
-
lq.prototype.skip=lq.prototype.skip;lq.prototype.canSkipNow=lq.prototype.canSkipNow;lq.prototype.getTimeUntilSkippable=lq.prototype.getTimeUntilSkippable;lq.prototype.isSkippable=lq.prototype.isSkippable;lq.prototype.isPaused=lq.prototype.isPaused;lq.prototype.getRemainingTime=lq.prototype.getRemainingTime;lq.prototype.getMinSuggestedDuration=lq.prototype.getMinSuggestedDuration;lq.prototype.getDuration=lq.prototype.getDuration;
|
|
798
|
+
break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function lq(a,b){this.g=a;this.i=null;this.h=b}r=lq.prototype;r.needsSkipUI=function(){return!0};r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};
|
|
799
|
+
r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};
|
|
800
|
+
r.setMuted=function(a){this.h.muted=a};r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
801
|
+
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",lq);lq.prototype.release=lq.prototype.release;
|
|
802
|
+
lq.prototype.getPodIndex=lq.prototype.getPodIndex;lq.prototype.getTimeOffset=lq.prototype.getTimeOffset;lq.prototype.getMediaUrl=lq.prototype.getMediaUrl;lq.prototype.getAdvertiserName=lq.prototype.getAdvertiserName;lq.prototype.getCreativeAdId=lq.prototype.getCreativeAdId;lq.prototype.getAdId=lq.prototype.getAdId;lq.prototype.getVastMediaWidth=lq.prototype.getVastMediaWidth;lq.prototype.getVastMediaHeight=lq.prototype.getVastMediaHeight;lq.prototype.getVastMediaBitrate=lq.prototype.getVastMediaBitrate;
|
|
803
|
+
lq.prototype.getDescription=lq.prototype.getDescription;lq.prototype.getTitle=lq.prototype.getTitle;lq.prototype.getPositionInSequence=lq.prototype.getPositionInSequence;lq.prototype.getSequenceLength=lq.prototype.getSequenceLength;lq.prototype.setMuted=lq.prototype.setMuted;lq.prototype.resize=lq.prototype.resize;lq.prototype.isLinear=lq.prototype.isLinear;lq.prototype.isMuted=lq.prototype.isMuted;lq.prototype.setVolume=lq.prototype.setVolume;lq.prototype.getVolume=lq.prototype.getVolume;
|
|
804
|
+
lq.prototype.play=lq.prototype.play;lq.prototype.pause=lq.prototype.pause;lq.prototype.skip=lq.prototype.skip;lq.prototype.canSkipNow=lq.prototype.canSkipNow;lq.prototype.getTimeUntilSkippable=lq.prototype.getTimeUntilSkippable;lq.prototype.isSkippable=lq.prototype.isSkippable;lq.prototype.isPaused=lq.prototype.isPaused;lq.prototype.getRemainingTime=lq.prototype.getRemainingTime;lq.prototype.getMinSuggestedDuration=lq.prototype.getMinSuggestedDuration;lq.prototype.getDuration=lq.prototype.getDuration;
|
|
805
|
+
lq.prototype.needsSkipUI=lq.prototype.needsSkipUI;function mq(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new gb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){nq(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
802
806
|
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new lq(f,e.l);e.A&&(e.m.i=e.A);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
803
807
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
|
|
804
808
|
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
|
|
@@ -808,8 +812,8 @@ r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!goo
|
|
|
808
812
|
r.onAssetUnload=function(){this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.dispatchEvent(new U("ad-content-attach-requested"));this.m=new Cp};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
|
|
809
813
|
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new aq(a,b,c,function(e){return oq(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new bg,dq(d,a,b),d.H=c||"",d.U=Date.now()/1E3,a=d.l);return a};
|
|
810
814
|
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new mq(a,b,this.o,function(d){return oq(c,d)});this.g.configure(this.l)};
|
|
811
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.10.
|
|
812
|
-
(c.G=!0),c.j=new bg,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.10.
|
|
815
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.10.9";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
816
|
+
(c.G=!0),c.j=new bg,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.10.9";this.g.g.replaceAdTagParameters(a)};
|
|
813
817
|
r.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:Dp(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
814
818
|
r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};r.onInterstitialMetadata=function(a,b,c){this.j||this.initInterstitial(null,a,b);this.j&&Tp(this.j,c)};
|
|
815
819
|
function oq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.onInterstitialMetadata=Y.prototype.onInterstitialMetadata;Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;
|
|
@@ -878,12 +882,12 @@ b.skip(1),d=ss(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&
|
|
|
878
882
|
function vs(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function ws(a,b,c){var d=null;b=t(vs(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=ds(f,c,a.i));a.h[e]=null}return d}function xs(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ys(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return zs[a<<2|b<<1|c]}
|
|
879
883
|
var As=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"]]),zs="black blue green cyan red magenta yellow white".split(" ");function Bs(){this.h=[];this.g=[];this.i=new ps;this.l=0;this.m=new Map([["CC1",new Or(0,0)],["CC2",new Or(0,1)],["CC3",new Or(1,0)],["CC4",new Or(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Cs(this)}Bs.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Cs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())xs(b.value)};
|
|
880
884
|
function Cs(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Pr,c.g=c.j,c.m=null,Ar(c.i),Ar(c.j),Ar(c.o);a.B=!0}
|
|
881
|
-
Bs.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Ig(a,0);if(!(8>a.getLength())&&181===a.T()&&49===a.ka()&&1195456820===a.P()&&3===a.T()&&(c=a.T(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.T(),f=(e&4)>>2,g=a.T(),h=a.T();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,cb:g,
|
|
885
|
+
Bs.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Ig(a,0);if(!(8>a.getLength())&&181===a.T()&&49===a.ka()&&1195456820===a.P()&&3===a.T()&&(c=a.T(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.T(),f=(e&4)>>2,g=a.T(),h=a.T();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,cb:g,Eb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
882
886
|
Bs.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Ds(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())qs(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Es(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
883
|
-
function Ds(a,b){var c=b.type;if(16===(b.cb&112)){var d=b.cb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.cb&&255===b.
|
|
887
|
+
function Ds(a,b){var c=b.type;if(16===(b.cb&112)){var d=b.cb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.cb&&255===b.Eb||!b.cb&&!b.Eb||!Fs(b.cb)||!Fs(b.Eb))return 45<=++a.l&&Cs(a),null;a.l=0;b.cb&=127;b.Eb&=127;var e=b.cb;if(1<=e&&15>=e||!b.cb&&!b.Eb)return null;e=null;if(16===(b.cb&112))a:{a.A.add(d),d=b.cb;a=b.Eb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
884
888
|
"white";e=!1;7>f?d=Xr[f]:7===f&&(e=!0);a=1===(a&1);c.h!==Sr&&(f=c.g,c.h===Rr&&b!==f.g&&(c=1+b-f.h,Nr(f,c,1+f.g-f.h,f.h),Dr(f,0,c-1),Dr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Er(c.g,Fr,32),d=!1,b=Xr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Wr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Er(c.g,
|
|
885
|
-
Hr,a);else if(18===(d&246)&&32===(a&224))Er(c.g,d&1?Lr:Jr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.
|
|
886
|
-
e-1,e,b.h),Dr(b,0,e-1),Dr(b,b.g,15-b.g),c.l=a);break;case 46:Dr(c.j,0,15);break;case 47:b=null,c.h!==Sr&&(b=Br(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Tr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.
|
|
889
|
+
Hr,a);else if(18===(d&246)&&32===(a&224))Er(c.g,d&1?Lr:Jr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Eb){case 32:Tr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Qr(c,2,a);break;case 38:d=Qr(c,3,a);break;case 39:d=Qr(c,4,a);break;case 40:Er(c.g,Fr,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Ar(c.o);Vr(c);break;case 43:Vr(c);break;case 44:b=c.i;d=null;c.h!==Sr&&(d=Br(b,c.l,a));Dr(b,0,15);break;case 45:b=c.g;c.h!==Rr?d=null:(d=Br(b,c.l,a),e=b.g-b.h+1,Nr(b,
|
|
890
|
+
e-1,e,b.h),Dr(b,0,e-1),Dr(b,b.g,15-b.g),c.l=a);break;case 46:Dr(c.j,0,15);break;case 47:b=null,c.h!==Sr&&(b=Br(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Tr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.Eb,Er(c.g,Fr,b.cb),Er(c.g,Fr,a);return e}
|
|
887
891
|
function Es(a,b){var c=[];try{for(;b.oa();){var d=ss(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=ss(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new ts(e));for(var g=a.j.get(e),h=b.ua();b.ua()-h<f;){e=b;var k=ss(e),l=k.value,m=k.pts;if(16===l){var n=ss(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:!cs(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.m-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=ds(q,p,g.i));if(q.h+1>=q.o){p=q;for(var u=
|
|
888
892
|
0,w=1;16>w;w++,u++)p.i[u]=p.i[w];for(w=0;1>w;w++,u++)p.i[u]=as()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=ds(q,p,g.i));q.i[q.h]=as();q.g=0;break;case 12:q.isVisible()&&(e=ds(q,p,g.i)),$r(q),p=q,p.h=0,p.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=us(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?bs(g.g,
|
|
889
893
|
"\u266a"):bs(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&bs(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(As.has(e)){var A=As.get(e);bs(g.g,A)}else bs(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?bs(g.g,"_"):bs(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(y){if(y instanceof T&&3E3===y.code)ab("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}function Fs(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
@@ -944,7 +948,7 @@ function Pt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Nd(a.
|
|
|
944
948
|
function Qt(a,b){if(!a.m.length)return b;b=new uc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Jc(e)&&yc(b,e);return b.toString()}function Rt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Tc(function(){Pt(a,d)});if(c=b.TTL)a.C=c;a.g.Y(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
945
949
|
function St(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Ot.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
946
950
|
function Tt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={jc:e.jc},g=f.next())if(e.jc=g.value,g=b.get(e.jc))d.push({Vf:e.jc,location:g});else if(g=a.F.find(function(k){return function(l){return l.Dj==k.jc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].xh?(h=new uc(h),wc(h,g["URI-REPLACEMENT"].xh),d.push({Vf:e.jc,location:h.toString()})):d.push({Vf:e.jc,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
947
|
-
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new uc(k.location)).
|
|
951
|
+
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new uc(k.location)).Gb))return!1;return!0});d.length&&(a.B=d[0].Vf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.B=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Nd(a.i,d)};function Ut(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=Ut.prototype;r.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.li=function(){return this.j};r.Gf=function(){return this.l.slice()};r.Uh=function(){return this.i};
|
|
948
952
|
function Vt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Wt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Xt(n),n]})),l=new Map(h.textStreams.map(function(n){return[Yt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Zt(n),n]}));if(b){var m=$t(Vd);l.set(Yt(m),m);m=$t("image");h.set(Zt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{xg:c,vh:d,sh:e,Sg:f}}
|
|
949
953
|
r.gf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L,J,E,K,N,M,P,R,Q;return O(function(W){if(1==W.g){e=Xd;if(!b&&1==a.length)return f=Vt(a,!1),g=f.xg,h=f.vh,k=f.sh,l=f.Sg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.i=Array.from(l[0].values()),W.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)q=a[p],d.m.has(q.id)||(d.m.add(q.id),-1==n&&(n=p));if(-1==n)return W.return();u=Vt(a,!0);w=u.xg;v=u.vh;A=u.sh;y=u.Sg;return G(W,
|
|
950
954
|
Promise.all([au(d,d.h,w,n,bu,cu,m),au(d,d.g,v,n,bu,cu,m),au(d,d.l,A,n,bu,cu,m),au(d,d.i,y,n,bu,cu,m)]),2)}D=0;z=[];if(d.g.length&&d.h.length)for(J=t(d.h),E=J.next();!E.done;E=J.next())for(K=E.value,N=t(d.g),M=N.next();!M.done;M=N.next())P=M.value,R=Oc(K.drmInfos,P.drmInfos),K.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=D++,z.push({id:Q,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K,video:P,bandwidth:(K.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
@@ -976,31 +980,31 @@ function $t(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:functio
|
|
|
976
980
|
function xu(a,b,c){if(b==a&&a!=c)return zu;if(c==a&&a!=b)return yu;if(b>a){if(c<=a||c-a<b-a)return yu;if(c-a>b-a)return zu}else{if(c>a)return zu;if(a-c<a-b)return yu;if(a-c>a-b)return zu}return Bu}function Au(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?yu:b<a?zu:Bu}function ju(a){switch(a.type){case Vd:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
977
981
|
function Xt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,wu(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Wt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,wu(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Yt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
978
982
|
function Zt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function wu(a){if(!Cu.has(a)){var b=ge(a);Cu.set(a,b)}return Cu.get(a)}S("shaka.util.PeriodCombiner",Ut);Ut.prototype.setUseStreamOnce=Ut.prototype.ph;Ut.prototype.setAllowMultiTypeVariants=Ut.prototype.ih;Ut.prototype.combinePeriods=Ut.prototype.gf;Ut.prototype.getImageStreams=Ut.prototype.Uh;Ut.prototype.getTextStreams=Ut.prototype.Gf;Ut.prototype.getVariants=Ut.prototype.li;var yu=1,Bu=0,zu=-1,Cu=new Map;function Du(a,b){var c=new DOMParser,d=Eu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Fu(a,b){try{var c=zd(a);return Du(c,b)}catch(d){return null}}
|
|
979
|
-
var Eu=new Lc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Gu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ea=1;this.B=[];this.l={we:"",type:"",profiles:[],
|
|
983
|
+
var Eu=new Lc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Gu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ea=1;this.B=[];this.l={we:"",type:"",profiles:[],Mb:null,Ia:0,Ga:null,Ld:0};this.o=new Map;this.s={};this.aa={};this.m=new Ut;this.H=0;this.da=new Qa(5);this.I=new Tc(function(){if(a.G&&!a.g.continueLoadingWhenPaused&&(a.C.lb(a.G,"timeupdate"),a.G.paused)){a.C.ha(a.G,"timeupdate",function(){return Hu(a)});return}Hu(a)});this.N=new mg;this.L=null;this.fa=[];this.R=Infinity;this.F=!1;this.h=null;this.K=0;this.U=!1;this.C=new gb;
|
|
980
984
|
this.G=null;this.Z=!1}r=Gu.prototype;r.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.V()&&this.I.xc();this.h&&this.h.configure(this.g);this.m&&(this.m.ih(this.g.dash.multiTypeVariantsAllowed&&pb()),this.m.ph(this.g.dash.useStreamOnceInPeriodFlattening))};
|
|
981
985
|
r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.A=[a],c.j=b,G(e,Iu(c),2);d=e.h;c.j&&Ju(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
982
|
-
r.stop=function(){for(var a=t(Object.values(this.s)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.s={};this.o.clear();this.l={we:"",type:"",profiles:[],
|
|
986
|
+
r.stop=function(){for(var a=t(Object.values(this.s)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.s={};this.o.clear();this.l={we:"",type:"",profiles:[],Mb:null,Ia:0,Ga:null,Ld:0};this.m=null;null!=this.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();this.C&&(this.C.release(),this.C=null);return this.N.destroy()};
|
|
983
987
|
r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return sa(c,2),G(c,Iu(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.V()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Zb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Ju(this,0))}}};
|
|
984
988
|
r.banLocation=function(a){this.h&&this.h.banLocation(a)};r.setMediaElement=function(a){this.G=a};
|
|
985
989
|
function Iu(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return b=4,c="MPD",d=Ku(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=Tt(a.h,"Location",!0),f.length&&(e=f)),g=tg(e,a.g.retryParameters),h=Date.now(),G(n,Lu(a,g,0,{type:b}),2);if(3!=n.g){k=n.h;if(!a.j)return n.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);return G(n,Mu(a,k.data,k.uri,c),3)}l=Date.now();m=(l-h)/1E3;a.da.sample(1,m);return n.return(m)})}
|
|
986
990
|
function Mu(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u;return O(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=ym;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Fu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ad(h.outerHTML)}k=$g(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=zm;l!=m&&l(k);if("Patch"===d)return w.return(Nu(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(Ou(a,k,c));
|
|
987
991
|
p=a.g.dash.xlinkFailGracefully;q=ft(k,a.g.retryParameters,p,c,a.j.networkingEngine);ng(a.N,q);return G(w,q.promise,2)}u=w.h;return w.return(Ou(a,u,c))})}
|
|
988
|
-
function Ou(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L,J,E,K,N,M,P,R,Q,W,aa,Sa,ta,Ma,Ya,Ta,hb,Wa,Ua,mc,Oa,lb,Pb,Nc,
|
|
992
|
+
function Ou(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L,J,E,K,N,M,P,R,Q,W,aa,Sa,ta,Ma,Ya,Ta,hb,Wa,Ua,mc,Oa,lb,Pb,Nc,ke,le,me,Kd,Li,Ld,Mi,Ni,Eg,ne;return O(function(nc){switch(nc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=gh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=ih(l))p=Nd(d,[n])[0],m&&(a.h?St(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=Tt(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.l.we=b.attributes.id||
|
|
989
993
|
"";a.l.Ld=nh(b,"publishTime",qh)||0;a.B=gh(b,"PatchLocation");u=Promise.resolve();if((w=kh(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new Ot(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,A=ih(w))(y=nh(w,"queryBeforeStart",xh,!1))?u=Pt(a.h,A):Pt(a.h,A);D=t(f.keys());for(z=D.next();!z.done;z=D.next())B=z.value,C=f.get(B),St(a.h,"Location",B,C)}F=gh(b,"BaseURL");L=!1;if(a.h)for(J=t(F),E=J.next();!E.done;E=J.next())K=E.value,
|
|
990
994
|
N=K.attributes.serviceLocation,M=ih(K),N&&M&&(St(a.h,"BaseURL",N,M),L=!0);L&&a.h||(P=F.map(ih),I=Nd(d,P));R=function(){return a.h&&L?Tt(a.h,"BaseURL"):I?I:[]};a.l.Ga=R;Q=0;F&&F.length&&(Q=nh(F[0],"availabilityTimeOffset",wh)||0);a.l.Ia=Q;W=a.g.dash.ignoreMinBufferTime;aa=0;W||(aa=nh(b,"minBufferTime",rh)||0);a.H=nh(b,"minimumUpdatePeriod",rh,-1);Sa=nh(b,"availabilityStartTime",qh);ta=nh(b,"timeShiftBufferDepth",rh);Ma=a.g.dash.ignoreSuggestedPresentationDelay;Ya=null;Ma||(Ya=nh(b,"suggestedPresentationDelay",
|
|
991
|
-
rh));Ta=a.g.dash.ignoreMaxSegmentDuration;hb=null;Ta||(hb=nh(b,"maxSegmentDuration",rh));Wa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.Z=a.i.presentationTimeline.V()&&"static"==Wa);a.l.type=Wa;if(a.i)for(Ua=a.i.presentationTimeline,mc=t(Object.values(a.s)),Oa=mc.next();!Oa.done;Oa=mc.next())lb=Oa.value,lb.segmentIndex&&lb.segmentIndex.Oa(Ua.nb());else Pb=a.g.defaultPresentationDelay||1.5*aa,Nc=null!=Ya?Ya:Pb,Ua=new vk(Sa,Nc,a.g.dash.autoCorrectDrift);Ua.wc("static"==Wa);(
|
|
992
|
-
!isNaN(a.g.availabilityWindowOverride)&&(ta=a.g.availabilityWindowOverride);null==ta&&(ta=Infinity);Ua.Ie(ta);
|
|
993
|
-
a.F&&Ua.jh(a.R);Ua.Pf(hb||1);return G(nc,u,2);case 2:a.F&&(aa=0,Ni=null!=Ya?Ya:a.g.defaultPresentationDelay,Ua.eg(Ni));if(!a.i)return G(nc,a.m.gf(Ld,
|
|
994
|
-
gapCount:a.K,isLowLatency:a.U};if(!Ua.uh()){nc.u(7);break}Eg=gh(b,"UTCTiming");return G(nc,ev(a,R,Eg),8);case 8:
|
|
995
|
-
function Nu(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L,J;return O(function(E){if(1==E.g){c=b.attributes.mpdId;d=nh(b,"originalPublishTime",qh);if(!c||c!==a.l.we||d!==a.l.Ld)throw a.B=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(fh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=zh(l.attributes.sel||""),n=m[m.length-1],p=ih(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Vb){q=ih(l)||"";var K=rh(q);if(null!=K){a.l.
|
|
995
|
+
rh));Ta=a.g.dash.ignoreMaxSegmentDuration;hb=null;Ta||(hb=nh(b,"maxSegmentDuration",rh));Wa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.Z=a.i.presentationTimeline.V()&&"static"==Wa);a.l.type=Wa;if(a.i)for(Ua=a.i.presentationTimeline,mc=t(Object.values(a.s)),Oa=mc.next();!Oa.done;Oa=mc.next())lb=Oa.value,lb.segmentIndex&&lb.segmentIndex.Oa(Ua.nb());else Pb=a.g.defaultPresentationDelay||1.5*aa,Nc=null!=Ya?Ya:Pb,Ua=new vk(Sa,Nc,a.g.dash.autoCorrectDrift);Ua.wc("static"==Wa);(ke=Ua.V())&&
|
|
996
|
+
!isNaN(a.g.availabilityWindowOverride)&&(ta=a.g.availabilityWindowOverride);null==ta&&(ta=Infinity);Ua.Ie(ta);le=b.attributes.profiles||"";a.l.profiles=le.split(",");me={xb:"static"!=Wa,presentationTimeline:Ua,va:null,ja:null,la:null,J:null,bandwidth:0,If:!1,Ia:Q,Mb:null,profiles:le.split(","),roles:null};a.K=0;Kd=Pu(a,me,R,b);Li=Kd.duration;Ld=Kd.periods;("static"!=Wa||a.Z)&&Kd.Fg||Ua.$a(Li||Infinity);a.U&&!a.F&&(Mi=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.F=a.j.isLowLatencyMode());
|
|
997
|
+
a.F&&Ua.jh(a.R);Ua.Pf(hb||1);return G(nc,u,2);case 2:a.F&&(aa=0,Ni=null!=Ya?Ya:a.g.defaultPresentationDelay,Ua.eg(Ni));if(!a.i)return G(nc,a.m.gf(Ld,me.xb),6);a.i.periodCount=Ld.length;a.i.gapCount=a.K;return G(nc,Qu(a,Ld,!1),4);case 6:a.i={presentationTimeline:Ua,variants:a.m.j,textStreams:a.m.Gf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:aa||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Ru(b),nextUrl:dv(b),periodCount:Ld.length,
|
|
998
|
+
gapCount:a.K,isLowLatency:a.U};if(!Ua.uh()){nc.u(7);break}Eg=gh(b,"UTCTiming");return G(nc,ev(a,R,Eg),8);case 8:ne=nc.h;if(!a.j)return nc.return();Ua.kh(ne);case 7:Ua.re();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(nc)}})}function Qu(a,b,c){var d;return O(function(e){if(1==e.g)return G(e,a.m.gf(b,!0,c),2);a.i.variants=a.m.j;d=a.m.Gf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
|
|
999
|
+
function Nu(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L,J;return O(function(E){if(1==E.g){c=b.attributes.mpdId;d=nh(b,"originalPublishTime",qh);if(!c||c!==a.l.we||d!==a.l.Ld)throw a.B=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(fh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=zh(l.attributes.sel||""),n=m[m.length-1],p=ih(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Vb){q=ih(l)||"";var K=rh(q);if(null!=K){a.l.Mb=K;for(var N=t(a.o.values()),M=N.next();!M.done;M=N.next())M.value.Mb=
|
|
996
1000
|
K}}else if("type"===n.Vb){a.i.presentationTimeline.wc("static"==p);a.l.type=p;K=t(a.o.values());for(N=K.next();!N.done;N=K.next())N.value.xb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.Vb?a.l.Ld=qh(p)||0:null===n.Vb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Ah(a.B,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(K=n.id,a.i.periodCount--,N=t(a.o.keys()),M=N.next();!M.done;M=N.next())if(M=M.value,M.startsWith(K)){var P=
|
|
997
1001
|
a.o.get(M);ct(P,Et,"SegmentTimeline").children=[];fv(a,M);a.o.delete(M)}}else if("SegmentTemplate"===n.name){N=zh(l.attributes.sel||"");K=N[N.length-1];if(K.Vb){N=gv(a,N);M=ih(l)||"";P=t(N);for(var R=P.next();!R.done;R=P.next())R=a.o.get(R.value),Bh(R.J.cc,l.tagName,K.Vb,M);K=N}else K=[];u=K;w=t(u);for(v=w.next();!v.done;v=w.next())A=v.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){K=zh(l.attributes.sel||"");K=gv(a,K);N=t(K);for(M=N.next();!M.done;M=N.next())M=a.o.get(M.value),M=
|
|
998
|
-
ct(M,Et,"SegmentTimeline"),P=gh(M,"S"),Ah(P,l),M.children=P;y=K;D=t(y);for(v=D.next();!v.done;v=D.next())z=v.value,g.add(z)}B=t(g);for(v=B.next();!v.done;v=B.next())C=v.value,fv(a,C);F=t(f);for(I=F.next();!I.done;I=F.next())L=I.value,e.push.apply(e,x(Pu(a,{xb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,va:null,ja:null,la:null,J:null,bandwidth:0,If:!1,Ia:a.l.Ia,profiles:a.l.profiles,
|
|
999
|
-
a.i.gapCount=a.K;return G(E,Qu(a,e,!0),2)}"static"==a.l.type&&(J=a.l.
|
|
1002
|
+
ct(M,Et,"SegmentTimeline"),P=gh(M,"S"),Ah(P,l),M.children=P;y=K;D=t(y);for(v=D.next();!v.done;v=D.next())z=v.value,g.add(z)}B=t(g);for(v=B.next();!v.done;v=B.next())C=v.value,fv(a,C);F=t(f);for(I=F.next();!I.done;I=F.next())L=I.value,e.push.apply(e,x(Pu(a,{xb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,va:null,ja:null,la:null,J:null,bandwidth:0,If:!1,Ia:a.l.Ia,profiles:a.l.profiles,Mb:a.l.Mb,roles:null},a.l.Ga,L).periods));if(!e.length)return E.u(2);a.i.periodCount+=e.length;
|
|
1003
|
+
a.i.gapCount=a.K;return G(E,Qu(a,e,!0),2)}"static"==a.l.type&&(J=a.l.Mb,a.i.presentationTimeline.$a(J||Infinity));H(E)})}function gv(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.o.values()),e=a.next();!e.done;e=a.next())e=e.value,e.va.id===c&&e.la.id===d&&e.J.id&&b.push(c+","+e.J.id);return b}
|
|
1000
1004
|
function fv(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Oa(a.i.presentationTimeline.nb());try{var e=Dt(c,function(f,g,h,k){return hv(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.aa,c.J.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.u(0);f=d;return G(g,e.mc(),3)}f.segmentIndex=g.h;H(g)})}}catch(f){if(b=c.J.contentType,b!=Vd&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
1001
1005
|
function Ru(a){var b=kh(a,"ServiceDescription");if(!b)return null;a=kh(b,"Latency");b=kh(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
|
|
1002
1006
|
return c}function dv(a){a=gh(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
|
|
1003
|
-
function Pu(a,b,c,d){var e=b.
|
|
1007
|
+
function Pu(a,b,c,d){var e=b.Mb;e||(e=nh(d,"mediaPresentationDuration",rh),a.l.Mb=e);var f=0;a.i&&a.i.presentationTimeline&&a.Z&&(f=a.i.presentationTimeline.Yb());var g=[],h=f;d=gh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=nh(l,"start",rh,h),p=l.attributes.id,q=nh(l,"duration",rh),u=null;if(m){var w=nh(m,"start",rh);null!=w&&(u=w-n)}else null!=e&&(u=e-n+f);w=Yd;u&&q&&Math.abs(u-q)>w&&u>q&&a.K++;null==u&&(u=q);if(!(null!==a.L&&null!==p&&null!==n&&n<a.L)||a.fa.includes(p)||k+1==
|
|
1004
1008
|
d.length){null!==n&&(null===a.L||n>a.L)&&(a.L=n);h=iv(a,b,c,{start:n,duration:u,node:l,Dd:null==u||!m});g.push(h);b.va.id&&u&&(a.aa[b.va.id]=u);if(null==u){h=null;break}h=n+u}}a.fa=g.map(function(v){return v.id});return null!=e?{periods:g,duration:e+f,Fg:!1}:{periods:g,duration:h,Fg:!0}}
|
|
1005
1009
|
function iv(a,b,c,d){b.va=jv(a,d.node,null,c);b.ja=d;b.va.Ia=b.Ia;b.va.id||(b.va.id="__shaka_period_"+d.start);var e=gh(d.node,"EventStream");c=b.presentationTimeline.nb();e=t(e);for(var f=e.next();!f.done;f=e.next())kv(a,d.start,d.duration,f.value,c);c=gh(d.node,"AdaptationSet").map(function(m){return lv(a,b,m)}).filter(Be);if(b.xb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ti);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);
|
|
1006
1010
|
}d=c.filter(function(m){return!m.mg});c=c.filter(function(m){return m.mg});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.mg.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Zd:h.Zd},l=k.next())h.Zd=l.value,h.Zd.trickModeVideo=e.streams.find(function(m){return function(n){return ge(m.Zd.codecs)==ge(n.codecs)}}(h))}}}c=mv(a.g.disableAudio,d,"audio");e=mv(a.g.disableVideo,d,"video");f=mv(a.g.disableText,
|
|
@@ -1014,7 +1018,7 @@ L=Ee(b.la.language||"und"),J=b.la.label;m=gh(c,"Representation");c=m.map(functio
|
|
|
1014
1018
|
l=b.la.id||"__fake__"+a.ea++;n=t(c);for(w=n.next();!w.done;w=n.next()){w=w.value;v=t(I.drmInfos);for(z=v.next();!z.done;z=v.next())z=z.value,z.keyIds=z.keyIds&&w.keyIds?new Set([].concat(x(z.keyIds),x(w.keyIds))):z.keyIds||w.keyIds;a.g.dash.enableAudioGroups&&(w.groupId=l)}m=m.map(function(E){return E.attributes.id}).filter(Be);return{id:l,contentType:b.la.contentType,language:L,lk:f,streams:c,drmInfos:I.drmInfos,mg:g,Ti:m}}
|
|
1015
1019
|
function nv(a,b,c,d,e,f,g,h,k,l,m,n){b.J=jv(a,l,b.la,null);var p=b.J.id;a.R=Math.min(a.R,b.J.Ia);a.U=0<a.R;if(!pv(b.J))return null;var q=b.ja.start;b.bandwidth=nh(l,"bandwidth",uh)||0;b.roles=h;var u=b.J.contentType,w=u==Vd||"application"==u;u="image"==u;try{var v=void 0;if(c.bf){var A=b.J.Ga,y=Nd(A(),[c.bf.Ai]),D=tg(y,a.g.retryParameters);v={bitsKey:128,blockCipherMode:"CBC",iv:c.bf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var K,N,M;return O(function(P){if(1==P.g)return G(P,Lu(a,D,6),2);
|
|
1016
1020
|
if(3!=P.g){K=P.h;if(!K.data||16!=K.data.byteLength)throw new T(2,4,4049);N={name:"AES-CBC"};M=v;return G(P,window.crypto.subtle.importKey("raw",K.data,N,!0,["decrypt"]),3)}M.cryptoKey=P.h;v.fetchKey=void 0;H(P)})}}}b.J.aesKey=v;A=function(K,N,M,P){return hv(a,K,N,M,P)};if(b.J.Tc)var z=st(b,A,v);else if(b.J.Rb)z=yt(b,a.s,v);else if(b.J.cc)z=Dt(b,A,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.aa,v,n,!1);else{var B=b.ja.duration||0,C=b.J.Ga,F=b.J.mimeType,I=b.J.codecs;z={mc:function(){var K=Tk(q,B,C());
|
|
1017
|
-
K.
|
|
1021
|
+
K.Jb(function(N){N.mimeType=F;N.codecs=I});return Promise.resolve(K)}}}}catch(K){if((w||u)&&4002==K.code)return null;throw K;}n=gh(l,"ContentProtection");n=Ts(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;gh(l,"SupplementalProperty").some(function(K){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==K.attributes.schemeIdUri&&"JOC"==K.attributes.value})&&(A=!0);y=!1;w&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var L;if(u&&((l=gh(l,"EssentialProperty").find(function(K){return["http://dashif.org/thumbnail_tile",
|
|
1018
1022
|
"http://dashif.org/guidelines/thumbnail_tile"].includes(K.attributes.schemeIdUri)}))&&(L=l.attributes.value),!L))return null;var J;l=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");w=b.J.id?b.va.id+","+b.J.id:"";a.B.length&&p&&a.o.set(b.va.id+","+p,qv(b));var E=w&&a.s[w]?a.s[w]:{id:a.ea++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&
|
|
1019
1023
|
(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:l,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.la.language,label:f,type:b.la.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.J.Nc,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:A,
|
|
1020
1024
|
closedCaptions:k,hdr:J,colorGamut:void 0,videoLayout:void 0,tilesLayout:L,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([$d(b.J.mimeType,b.J.codecs)])};E.createSegmentIndex=function(){var K;return O(function(N){if(1==N.g){if(E.segmentIndex)return N.u(0);K=E;return G(N,z.mc(),3)}K.segmentIndex=N.h;H(N)})};w&&b.xb&&!a.s[w]&&(a.s[w]=E);return E}
|
|
@@ -1040,22 +1044,22 @@ function Nv(a,b){b=vd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b
|
|
|
1040
1044
|
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Ov(a,k),Pv.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Dv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Dv("",d,f)));return new yv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
1041
1045
|
g.name&&(g.attributes.push(new Ev("URI",h)),d=!0)}}return new yv(b,e)}function Ov(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Vp(d);var f;(f=Xp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Xp(d,g);)c.push(new Ev(f[1],f[2]||f[3])),Wp(d)}return new zv(a,b,c,e)}
|
|
1042
1046
|
var Pv="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),Qv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function Rv(){}function Sv(a){try{var b=Tv(a);return fg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return dg(c)}}
|
|
1043
|
-
function Tv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",Rv);Rv.parse=Sv;pg("data",Sv);function Uv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.G=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Vd,new Map);this.N.set("image",new Map);this.wb=new Set;this.i=new Map;this.j=null;this.L="";this.Fa=new Mv;this.H=-1;this.fa=Infinity;this.ea=this.
|
|
1044
|
-
this.m=null;this.bb=0;this.o=Infinity;this.Da=this.za=this.U=0;this.da=new mg;this.C=new Map;this.F=new Map;this.ra=new Map;this.pa=new Map;this.K=new Map;this.qa=new Map;this.ya=new Map;this.
|
|
1047
|
+
function Tv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",Rv);Rv.parse=Sv;pg("data",Sv);function Uv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.G=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Vd,new Map);this.N.set("image",new Map);this.wb=new Set;this.i=new Map;this.j=null;this.L="";this.Fa=new Mv;this.H=-1;this.fa=Infinity;this.ea=this.Ib=!1;this.A=new Tc(function(){if(a.aa&&!a.g.continueLoadingWhenPaused&&(a.Z.lb(a.aa,"timeupdate"),a.aa.paused)){a.Z.ha(a.aa,"timeupdate",function(){return Vv(a)});return}Vv(a)});this.xa=Wv;
|
|
1048
|
+
this.m=null;this.bb=0;this.o=Infinity;this.Da=this.za=this.U=0;this.da=new mg;this.C=new Map;this.F=new Map;this.ra=new Map;this.pa=new Map;this.K=new Map;this.qa=new Map;this.ya=new Map;this.Hb=this.I=!1;this.Fb=new Qa(5);this.l=null;this.R=!0;this.Ea=new Set;this.Z=new gb;this.aa=null}r=Uv.prototype;r.configure=function(a){this.g=a;this.l&&this.l.configure(this.g)};
|
|
1045
1049
|
r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.I=b.isLowLatencyMode(),G(e,Xv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,G(e,Yv(c,d.data,a),3)):e.return(c.m)})};
|
|
1046
1050
|
r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.da&&(a.push(this.da.destroy()),this.da=null);this.g=this.h=null;this.wb.clear();this.m=null;this.i.clear();this.G.clear();this.F.clear();this.s.clear();this.ra.clear();this.pa.clear();this.K.clear();this.qa.clear();this.ya.clear();this.Ea.clear();this.l&&this.l.destroy();this.Z&&(this.Z.release(),this.Z=null);return Promise.all(a)};
|
|
1047
|
-
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){if(!Zv(a))return p.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(q){return q.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push($v(a,g));return G(p,Promise.all(b),2)}aw(a,d.map(function(q){return q.stream}));h=d.some(function(q){return 0==q.xd});d.length&&!h&&(k=bw,cw(a,k.zh),l=d.map(function(q){return q.
|
|
1051
|
+
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){if(!Zv(a))return p.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(q){return q.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push($v(a,g));return G(p,Promise.all(b),2)}aw(a,d.map(function(q){return q.stream}));h=d.some(function(q){return 0==q.xd});d.length&&!h&&(k=bw,cw(a,k.zh),l=d.map(function(q){return q.Lb}),a.j.$a(Math.min.apply(Math,x(l))),
|
|
1048
1052
|
a.h.updateDuration());h&&dw(a);m=t(d);for(f=m.next();!f.done;f=m.next())n=f.value,n.stream.segmentIndex&&!n.stream.segmentIndex.O[0]&&a.h.disableStream(n.stream);H(p)})};function ew(a,b){return Zv(a)?a.N.get(b.type):b.te}
|
|
1049
1053
|
function $v(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L,J,E,K,N,M,P,R,Q,W,aa,Sa;return O(function(ta){switch(ta.g){case 1:c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new uc(f),h=g.g,b.ce&&(0<=b.pb&&h.add("_HLS_msn",String(b.pb)),0<=b.qb&&h.add("_HLS_part",String(b.qb))),b.de&&h.add("_HLS_skip","YES"),Jc(h)&&yc(g,h),c.push(g.toString());sa(ta,2);return G(ta,Xv(a,c,!0),4);case 4:k=ta.h;va(ta,3);break;case 2:throw l=wa(ta),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return ta.return();
|
|
1050
1054
|
m=Nv(a.Fa,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.M().includes(n)||b.dh.push(n);p=Fv(m.g,"EXT-X-DEFINE");q=fw(a,p,n);u=b.stream;w=ew(a,b);return G(ta,gw(a,m,u.mimeType,b.M,q),5);case 5:v=ta.h;A=v.keyIds;y=v.drmInfos;D=function(Ma,Ya){return Ma.size===Ya.size&&[].concat(x(Ma)).every(function(Ta){return Ya.has(Ta)})};D(u.keyIds,A)||(u.keyIds=A,u.drmInfos=y,a.h.newDrmInfo(u));z=hw(a,m,w,q,b.M,b.type);B=z.segments;if(C=z.bandwidth)u.bandwidth=C;F=wl(u);I=t(B);for(L=I.next();!L.done;L=
|
|
1051
|
-
I.next())J=L.value,J.$&&(J.$.Lc=F);u.segmentIndex.Id(B,a.j.nb());B.length&&(E=Iv(m.g,"EXT-X-MEDIA-SEQUENCE",0),N=(K=Hv(m.g,"EXT-X-SKIP"))?Number(Z(K,"SKIPPED-SEGMENTS")):0,M=iw(E,B),P=M.pb,R=M.qb,b.pb=P+N,b.qb=R,Q=w.get(E),u.segmentIndex.Oa(Q));if(W=u.segmentIndex.O[0]||null)b.rc=W.startTime,aa=B[B.length-1],b.
|
|
1055
|
+
I.next())J=L.value,J.$&&(J.$.Lc=F);u.segmentIndex.Id(B,a.j.nb());B.length&&(E=Iv(m.g,"EXT-X-MEDIA-SEQUENCE",0),N=(K=Hv(m.g,"EXT-X-SKIP"))?Number(Z(K,"SKIPPED-SEGMENTS")):0,M=iw(E,B),P=M.pb,R=M.qb,b.pb=P+N,b.qb=R,Q=w.get(E),u.segmentIndex.Oa(Q));if(W=u.segmentIndex.O[0]||null)b.rc=W.startTime,aa=B[B.length-1],b.Lb=aa.endTime;if(Sa=Hv(m.g,"EXT-X-ENDLIST"))b.xd=!0;jw(a,m);kw(a,m.g,u.type,q,b.M);H(ta)}})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};
|
|
1052
1056
|
r.banLocation=function(a){this.l&&this.l.banLocation(a)};r.setMediaElement=function(a){this.aa=a};
|
|
1053
1057
|
function lw(a,b){for(var c=-1==a.H,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=ew(a,e);if(f=f.O[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.H=Math.max(a.H,k));e.mf=k;break}}}}if(!(0>a.H))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,mw(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.H-c.mf,0<e&&(d.O.splice(0,e),d=d.O[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),nw(a,
|
|
1054
1058
|
c,d)}
|
|
1055
1059
|
function ow(a,b){if(Infinity==a.fa){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.O[0]||null;null!=d&&null!=d.h&&(a.fa=Math.min(a.fa,d.h))}}b=a.fa;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!mw(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.O[0]||null;if(null==f.h)Za("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.M(),"Expect AV sync issues!");else for(nw(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.jg(b)}}}
|
|
1056
|
-
function nw(a,b,c){b.rc+=c;b.
|
|
1060
|
+
function nw(a,b,c){b.rc+=c;b.Lb+=c;a=ew(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}
|
|
1057
1061
|
function Yv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L,J,E,K,N,M,P,R,Q,W;return O(function(aa){switch(aa.g){case 1:d=Xd;e=Nv(a.Fa,b);f=Fv(e.g,"EXT-X-DEFINE");g=[];h=[];k=[];a.j=new vk(null,0);a.j.wc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.R=!1,D=Fv(e.g,"EXT-X-DEFINE"),n=fw(a,D,a.L),m=d.ga,z="",B=new Map,G(aa,pw(a,a.B++,n,e,l,"",m,z,!0,"Media Playlist",null,B,null,!1,null,!1),7);qw(a,f);p=Fv(e.g,"EXT-X-MEDIA");q=Fv(e.g,"EXT-X-STREAM-INF");u=Fv(e.g,"EXT-X-IMAGE-STREAM-INF");
|
|
1058
|
-
w=Fv(e.g,"EXT-X-I-FRAME-STREAM-INF");v=Fv(e.g,"EXT-X-SESSION-KEY");A=Fv(e.g,"EXT-X-SESSION-DATA");y=Fv(e.g,"EXT-X-CONTENT-STEERING");rw(a,A);return G(aa,sw(a,y),4);case 4:return tw(a,q),uw(a,p),G(aa,vw(a,q,v,p,l,a.s),5);case 5:return g=aa.h,h=ww(a,p),G(aa,xw(a,u,w),6);case 6:k=aa.h;aa.u(3);break;case 7:C=aa.h,a.i.set(c,C),C.stream&&(F=wl(C.stream),C.stream.segmentIndex.
|
|
1062
|
+
w=Fv(e.g,"EXT-X-I-FRAME-STREAM-INF");v=Fv(e.g,"EXT-X-SESSION-KEY");A=Fv(e.g,"EXT-X-SESSION-DATA");y=Fv(e.g,"EXT-X-CONTENT-STEERING");rw(a,A);return G(aa,sw(a,y),4);case 4:return tw(a,q),uw(a,p),G(aa,vw(a,q,v,p,l,a.s),5);case 5:return g=aa.h,h=ww(a,p),G(aa,xw(a,u,w),6);case 6:k=aa.h;aa.u(3);break;case 7:C=aa.h,a.i.set(c,C),C.stream&&(F=wl(C.stream),C.stream.segmentIndex.Jb(function(Sa){Sa.$&&(Sa.$.Lc=F)})),m=C.stream.type,g.push({id:0,language:Ee(z||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
|
|
1059
1063
|
m?C.stream:null,video:"video"==m?C.stream:null,bandwidth:C.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==e.type&&(Zv(a)&&(yw(a,e),I=a.o,a.A.Y(I)),L=Array.from(a.i.values()),zw(a,L),dw(a),kw(a,e.g,m,n,l));a.m={presentationTimeline:a.j,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
1060
1064
|
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1};if(a.ea||!a.g.hls.disableCodecGuessing){aa.u(8);break}J=[];E=t(a.m.variants);for(K=E.next();!K.done;K=E.next())N=K.value,N.audio&&""===N.audio.codecs&&J.push(N.audio.createSegmentIndex()),N.video&&""===N.video.codecs&&J.push(N.video.createSegmentIndex());return G(aa,Promise.all(J),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){M=[];P=g[0];R=t([P.video,P.audio]);for(Q=R.next();!Q.done;Q=R.next())(W=
|
|
1061
1065
|
Q.value)&&!W.segmentIndex&&M.push(W.createSegmentIndex());if(0<M.length)return G(aa,Promise.all(M),0)}aa.u(0)}})}
|
|
@@ -1063,14 +1067,14 @@ function Aw(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I;return O(func
|
|
|
1063
1067
|
case 5:p=L.h;case 4:(q=v.headers["content-type"])&&(q=q.split(";")[0].toLowerCase());case 2:return A=Dl(e.M(),e.$b(),e.Xb(),a.g.retryParameters),G(L,Dw(a,A,n,{type:1}),6);case 6:y=L.h;D=y.data;if(!e.aesKey){L.u(7);break}return G(L,Cl(D,e.aesKey,f),8);case 8:D=L.h;case 7:(z=y.headers["content-type"])&&(z=z.split(";")[0].toLowerCase());B="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");C=["audio/mp4","video/mp4","video/iso.segment"];if(Dj(Ab(D))){var J=D;var E=Ab(J);E=(new pj).parse(E);
|
|
1064
1068
|
var K=E.sd();E=E.Hf();var N=[],M=!1,P=!1;switch(K.audio){case "aac":case "aac-loas":N.push("mp4a.40.2");M=!0;break;case "mp3":N.push("mp4a.40.34");M=!0;break;case "ac3":N.push("ac-3");M=!0;break;case "ec3":N.push("ec-3");M=!0;break;case "opus":N.push("opus"),M=!0}switch(K.video){case "avc":E.Na?N.push(E.Na):N.push("avc1.42E01E");P=!0;break;case "hvc":E.Na?N.push(E.Na):N.push("hvc1.1.6.L93.90");P=!0;break;case "av1":N.push("av01.0.01M.08"),P=!0}if(N.length){K=M&&!P;M=new Map;if(P){P=new Hb("video/mp2t");
|
|
1065
1069
|
P.i(J);J=t(P.j());for(var R=J.next();!R.done;R=J.next())R=R.value,M.set(R,R);P.g()}E={type:K?"audio":"video",mimeType:"video/mp2t",codecs:N.join(", "),language:null,height:E.height,width:E.width,channelCount:null,sampleRate:null,closedCaptions:M,Qd:null,colorGamut:null}}else E=null;if(F=E)return L.return(F)}else if(B.includes(l)||C.includes(z)||q&&C.includes(q))if(I=yl(p,D))return L.return(I);return z?L.return(xl(z)):q?L.return(xl(q)):L.return(c)}})}
|
|
1066
|
-
function dw(a){if(Zv(a)){if(a.xa==Ew){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.
|
|
1070
|
+
function dw(a){if(Zv(a)){if(a.xa==Ew){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Lb),c=Math.min(c,e.rc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.A);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Ie(b)}}else a.j.$a(Fw(a));if(!a.j.s)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1067
1071
|
c.h&&a.j.lh(c.h);a.j.re()}function qw(a,b){var c=(new uc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
1068
1072
|
function fw(a,b,c){c=(new uc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
|
|
1069
1073
|
function tw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Gw(a,d);if(f){var g=Td(Vd,d);a.F.set(f,g);Ob(d,g)}e&&(f=Td("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.F.set(e,f));c&&(e=Td("video",d),e||(e=a.g.hls.defaultVideoCodec),a.F.set(c,e))}}
|
|
1070
1074
|
function rw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Jv([a.L],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1071
1075
|
function sw(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.l=new Ot(a.h);a.l.configure(a.g);a.l.i=[a.L];a.l.setManifestType("HLS");a.l.h=g;c=Pt(a.l,h);break}return G(k,c,0)})}
|
|
1072
1076
|
function ww(a,b){var c=Gv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Hw(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Cv(d.value,"GROUP-ID");if(d=a.F.get(e))if(e=a.G.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Iw(Vd,d)||Jw(Vd),Kw(f.stream)}}return b.filter(function(g){return g})}
|
|
1073
|
-
function Kw(a){var b=new Set([$d(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.
|
|
1077
|
+
function Kw(a){var b=new Set([$d(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Jb(function(c){c.mimeType&&b.add($d(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1074
1078
|
function xw(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);sa(m,2);return G(m,Lw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=wa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Cv(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
|
|
1075
1079
|
p=Z(g,"CHARACTERISTICS"),q=Mw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),w=t(u?u.split("x"):[null,null]),v=w.next().value,A=w.next().value;q.stream.width=Number(v)||void 0;q.stream.height=Number(A)||void 0;var y=Z(g,"BANDWIDTH");y&&(q.stream.bandwidth=Number(y));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(D){if(a.g.hls.ignoreImageStreamFailures)return null;throw D;}})),G(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1076
1080
|
function Nw(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Av(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Hw(a,d[g],c)}
|
|
@@ -1092,16 +1096,16 @@ Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.
|
|
|
1092
1096
|
function Ww(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var q=p.value;p=Cv(q,"URI");q=Z(q,"PATHWAY-ID");a.l&&q&&St(a.l,l,q,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.R=!1;b=null;break a}if(b){if("NONE"!=b){b=a.C.get(b);break a}a.R=!1}else if(!b&&a.C.size)for(b=t(a.C.keys()).next();!b.done;){b=a.C.get(b.value);break a}}b=null}c=Sd(d,c);d=Mw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,
|
|
1093
1097
|
d);return d}
|
|
1094
1098
|
function Mw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(B){var C,F,I,L,J,E,K,N,M,P,R,Q,W,aa,Sa,ta,Ma,Ya,Ta,hb,Wa,Ua,mc;return O(function(Oa){switch(Oa.g){case 1:return C=Xd,F=y.M(),sa(Oa,2),G(Oa,Xv(a,y.M(),!0),4);case 4:I=Oa.h;va(Oa,3);break;case 2:L=wa(Oa);v.closeSegmentIndex();if(J=a.h.disableStream(v))return Oa.return();throw L;case 3:if(B.aborted)return Oa.return();E=I.uri;E==I.originalUri||F.includes(E)||A.push(E);K=Nv(a.Fa,I.data);if(1!=K.type)throw new T(2,4,4017);N=Fv(K.g,"EXT-X-DEFINE");M=fw(a,
|
|
1095
|
-
N,E);P=!1;(!a.ea&&a.g.hls.disableCodecGuessing||a.R&&e==C.ga&&!a.g.hls.disableClosedCaptionsDetection)&&0<K.segments.length&&(a.R=!1,P=!0);R=!a.ea&&a.g.hls.disableCodecGuessing;Q=Zv(a);return G(Oa,pw(a,0,M,K,w,d,e,f,g,h,k,l,m,n,p,q,void 0,P,R),5);case 5:W=Oa.h;if(B.aborted)return Oa.return();aa=W.stream;Zv(a)&&!Q&&yw(a,K);y.rc=W.rc;y.
|
|
1099
|
+
N,E);P=!1;(!a.ea&&a.g.hls.disableCodecGuessing||a.R&&e==C.ga&&!a.g.hls.disableClosedCaptionsDetection)&&0<K.segments.length&&(a.R=!1,P=!0);R=!a.ea&&a.g.hls.disableCodecGuessing;Q=Zv(a);return G(Oa,pw(a,0,M,K,w,d,e,f,g,h,k,l,m,n,p,q,void 0,P,R),5);case 5:W=Oa.h;if(B.aborted)return Oa.return();aa=W.stream;Zv(a)&&!Q&&yw(a,K);y.rc=W.rc;y.Lb=W.Lb;y.de=W.de;y.ce=W.ce;y.xd=W.xd;y.te=W.te;y.pb=W.pb;y.qb=W.qb;y.Nf=!0;v.segmentIndex=aa.segmentIndex;v.encrypted=aa.encrypted;v.drmInfos=aa.drmInfos;v.keyIds=aa.keyIds;
|
|
1096
1100
|
v.mimeType=aa.mimeType;v.bandwidth=v.bandwidth||aa.bandwidth;v.codecs=v.codecs||aa.codecs;v.closedCaptions=v.closedCaptions||aa.closedCaptions;v.width=v.width||aa.width;v.height=v.height||aa.height;v.hdr=v.hdr||aa.hdr;v.colorGamut=v.colorGamut||aa.colorGamut;"und"==v.language&&"und"!=aa.language&&(v.language=aa.language);v.language=v.language||aa.language;v.channelsCount=v.channelsCount||aa.channelsCount;v.audioSamplingRate=v.audioSamplingRate||aa.audioSamplingRate;Kw(v);v.drmInfos.length&&a.h.newDrmInfo(v);
|
|
1097
|
-
Sa=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)Sa=!0;a.m&&Sa&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==C.ga||e==C.X)for(ta=t(a.i.values()),Ma=ta.next();!Ma.done;Ma=ta.next())Ya=Ma.value,Ya.Nf||Ya.type!=e||(Ya.stream.mimeType=aa.mimeType,Kw(Ya.stream));e==C.ta&&(Ta=aa.segmentIndex.get(0))&&Ta.$&&(v.mimeType="application/mp4",Kw(v));hb=wl(v);v.segmentIndex.
|
|
1098
|
-
zw(a,Ua),dw(a),mc=a.o,0<mc&&a.A.Y(mc)));kw(a,K.g,v.type,M,w);H(Oa)}})}function w(){return a.l&&1<c.length?Tt(a.l,b):A.concat(Kv([a.L],c,a.s))}var v=Zw(a,d,e,f,g,h,k,l,m,n,p,q),A=[],y={stream:v,type:e,dh:A,M:w,rc:0,
|
|
1099
|
-
v.segmentIndex=null);D=null};return y}function Fw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.
|
|
1101
|
+
Sa=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)Sa=!0;a.m&&Sa&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==C.ga||e==C.X)for(ta=t(a.i.values()),Ma=ta.next();!Ma.done;Ma=ta.next())Ya=Ma.value,Ya.Nf||Ya.type!=e||(Ya.stream.mimeType=aa.mimeType,Kw(Ya.stream));e==C.ta&&(Ta=aa.segmentIndex.get(0))&&Ta.$&&(v.mimeType="application/mp4",Kw(v));hb=wl(v);v.segmentIndex.Jb(function(lb){lb.$&&(lb.$.Lc=hb)});Yw(a)&&(a.Ib?zw(a,[y]):(a.Ib=!0,Wa=Array.from(a.i.values()),Ua=Wa.filter(function(lb){return lb.stream.segmentIndex}),
|
|
1102
|
+
zw(a,Ua),dw(a),mc=a.o,0<mc&&a.A.Y(mc)));kw(a,K.g,v.type,M,w);H(Oa)}})}function w(){return a.l&&1<c.length?Tt(a.l,b):A.concat(Kv([a.L],c,a.s))}var v=Zw(a,d,e,f,g,h,k,l,m,n,p,q),A=[],y={stream:v,type:e,dh:A,M:w,rc:0,Lb:0,te:new Map,de:!1,ce:!1,xd:!1,mf:-1,pb:-1,qb:-1,Nf:!1},D=null,z=new AbortController;v.createSegmentIndex=function(){if(D)return D;z=new AbortController;return D=new Promise(function(B){B(u(z.signal))})};v.closeSegmentIndex=function(){D&&!v.segmentIndex&&z.abort();v.segmentIndex&&(v.segmentIndex.release(),
|
|
1103
|
+
v.segmentIndex=null);D=null};return y}function Fw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Lb));return b}function aw(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Jb(function(e){c.push(e)});a.j.Jd(c)}
|
|
1100
1104
|
function zw(a,b){if(!Zv(a))for(var c=Fw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ec(0,c);aw(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?lw(a,b):(ow(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&lw(a,b))}function mw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
|
|
1101
1105
|
function Yw(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1102
1106
|
function pw(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,w,v,A,y){A=void 0===A?!0:A;y=void 0===y?!0:y;var D,z,B,C,F,I,L,J,E,K,N,M,P,R,Q,W,aa,Sa,ta,Ma,Ya,Ta,hb,Wa,Ua,mc;return O(function(Oa){switch(Oa.g){case 1:var lb=Hv(d.g,"EXT-X-PLAYLIST-TYPE"),Pb=Hv(d.g,"EXT-X-ENDLIST");Pb=lb&&"VOD"==lb.value||Pb;lb=lb&&"EVENT"==lb.value&&!Pb;lb=!Pb&&!lb;Pb?cw(a,Wv):lb?cw(a,Ew):cw(a,$w);Zv(a)&&jw(a,d);D=Zv(a)?a.N.get(g):new Map;z=hw(a,d,D,c,e,g);B=z.segments;C=z.bandwidth;J=L=I=F=null;if(!(0<B.length&&A)){Oa.u(2);break}return G(Oa,
|
|
1103
1107
|
Aw(a,B),3);case 3:E=Oa.h,g=E.type,h=E.language,m=E.channelCount,u=E.sampleRate,a.g.disableText||(n=E.closedCaptions),I=E.height,F=E.width,L=E.Qd,J=E.colorGamut,y&&(v=E.mimeType,f=E.codecs);case 2:if(v){Oa.u(4);break}return G(Oa,ax(a,g,f,B),5);case 5:v=Oa.h;case 4:return G(Oa,gw(a,d,v,e,c),6);case 6:K=Oa.h;N=K.drmInfos;M=K.keyIds;P=K.encrypted;R=K.Dh;if(P&&!N.length&&!R)throw new T(2,4,4026);Q=Zw(a,f,g,h,k,l,m,n,p,q,u,w);Q.encrypted=P;Q.drmInfos=N;Q.keyIds=M;Q.mimeType=v;C&&(Q.bandwidth=C);Kw(Q);"video"==
|
|
1104
|
-
g&&(F||I||L||J)&&Xw(Q,F,I,null,L,null,J);Zv(a)&&jw(a,d);W=B[0].startTime;aa=B[B.length-1];Sa=aa.endTime;ta=new Rk(B);Q.segmentIndex=ta;Ya=(Ma=Hv(d.g,"EXT-X-SERVER-CONTROL"))?null!=Bv(Ma,"CAN-SKIP-UNTIL"):!1;Ta=Ma?null!=Bv(Ma,"CAN-BLOCK-RELOAD"):!1;hb=Iv(d.g,"EXT-X-MEDIA-SEQUENCE",0);Wa=iw(hb,B);Ua=Wa.pb;mc=Wa.qb;return Oa.return({stream:Q,type:g,dh:[],M:e,rc:W,
|
|
1108
|
+
g&&(F||I||L||J)&&Xw(Q,F,I,null,L,null,J);Zv(a)&&jw(a,d);W=B[0].startTime;aa=B[B.length-1];Sa=aa.endTime;ta=new Rk(B);Q.segmentIndex=ta;Ya=(Ma=Hv(d.g,"EXT-X-SERVER-CONTROL"))?null!=Bv(Ma,"CAN-SKIP-UNTIL"):!1;Ta=Ma?null!=Bv(Ma,"CAN-BLOCK-RELOAD"):!1;hb=Iv(d.g,"EXT-X-MEDIA-SEQUENCE",0);Wa=iw(hb,B);Ua=Wa.pb;mc=Wa.qb;return Oa.return({stream:Q,type:g,dh:[],M:e,rc:W,Lb:Sa,de:Ya,ce:Ta,xd:!1,mf:-1,pb:Ua,qb:mc,te:D,Nf:!1})}})}
|
|
1105
1109
|
function iw(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{pb:a,qb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{pb:a,qb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{pb:a,qb:c}}
|
|
1106
1110
|
function Zw(a,b,c,d,e,f,g,h,k,l,m,n){var p=Iw(c,b)||Jw(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Vd?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1107
1111
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Vd?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ee(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
@@ -1111,14 +1115,14 @@ function gw(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,w,v,A,y,D,z,B,C,F,I,L,J,E,K,N,M,P
|
|
|
1111
1115
|
function cx(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw $a("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Id(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Iv(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.pa.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Cv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1112
1116
|
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u,w;return O(function(v){if(1==v.g)return l=Jv(d(),Cv(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=tg(l,a.g.retryParameters),p=Dw(a,n,6),a.K.set(m,p)),G(v,a.K.get(m),2);if(3!=v.g){q=v.h;if(!q.data||q.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};w=k;return G(v,window.crypto.subtle.importKey("raw",q.data,u,!0,["decrypt"]),3)}w.cryptoKey=v.h;k.fetchKey=void 0;
|
|
1113
1117
|
H(v)})};a.pa.set(c,k)}return a.pa.get(c)}
|
|
1114
|
-
function jw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Hv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Hv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Hv(b.g,"EXT-X-PART-INF"))a.U=Number(Cv(e,"PART-TARGET"));b=Hv(b.g,"EXT-X-SERVER-CONTROL");a.I&&a.U?(a.o=a.
|
|
1118
|
+
function jw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Hv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Hv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Hv(b.g,"EXT-X-PART-INF"))a.U=Number(Cv(e,"PART-TARGET"));b=Hv(b.g,"EXT-X-SERVER-CONTROL");a.I&&a.U?(a.o=a.Hb?5*a.U<=c?Math.min(a.U,a.o):Math.min(c,a.o):Math.min(a.U,a.o),a.Da=b?Number(Cv(b,"PART-HOLD-BACK")):0):(a.o=Math.min(c,a.o),c=b?
|
|
1115
1119
|
Bv(b,"HOLD-BACK"):null,a.za=c?Number(c.value):0);a.bb=Math.max(d,a.bb)}function yw(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Da)b=a.Da;else if(a.za)b=a.za;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.bb*c}a.j.mh(0);a.j.eg(b);a.j.wc(!1)}
|
|
1116
1120
|
function bx(a,b,c,d,e){var f=Hv(c,"EXT-X-MAP");if(!f)return null;var g=Cv(f,"URI"),h=Jv(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ra.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Ow(Cv(m,"METHOD"))&&m.id<f.id&&(k=cx(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=dx(h,f,l,k);a.ra.set(g,b)}return a.ra.get(g)}
|
|
1117
1121
|
function dx(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Ai(function(){return a},e,f,null,null,null,d)}
|
|
1118
1122
|
function ex(a,b,c,d,e,f,g,h,k){function l(W){W=(new uc(W)).Pa.split(".").pop();var aa=fx[g][W];aa||(aa=Cw[W]);return aa}var m=d.g,n=Hv(m,"EXTINF"),p=0,q=0,u=null;d.Bb.length&&(a.m.isLowLatency=!0);var w=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=Hv(m,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(w=qh(v.value))}var A=Di;Hv(m,"EXT-X-GAP")&&(a.m.gapCount++,A=2);if(!n){if(0==d.Bb.length)throw new T(2,4,4024,"EXTINF");if(!a.I)return null}var y=[];v=!1;var D=null,z=!1,B=!1;if(a.I&&d.Bb.length){p=b&&
|
|
1119
1123
|
window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=w,F={},I=0;I<d.Bb.length;F={gd:F.gd,bd:F.bd},I++){var L=d.Bb[I],J=0==I?c:y[y.length-1],E=0==I?e:J.endTime,K=Number(Z(L,"DURATION"))||a.U;if(K){var N=E+K,M=0,P=null;"EXT-X-PRELOAD-HINT"==L.name?(M=(M=Z(L,"BYTERANGE-START"))?Number(M):0,(J=Z(L,"BYTERANGE-LENGTH"))?P=M+Number(J)-1:M&&(P=Number.MAX_SAFE_INTEGER)):(M=Z(L,"BYTERANGE"),P=t(gx(J,M)),M=P.next().value,P=P.next().value);F.bd=Z(L,"URI");if(F.bd){J=Di;"YES"==Z(L,"GAP")&&
|
|
1120
1124
|
(a.m.gapCount++,J=2,z=!0);F.gd=null;var R=function(W){return function(){null==W.gd&&(W.gd=Jv(h(),W.bd,f));return W.gd}}(F);p&&0<=M&&null!=P&&(D=R,v=!0);E=new Ci(E,N,R,M,P,b,0,0,Infinity,[],"",null,C,J,k);"EXT-X-PRELOAD-HINT"==L.name&&(E.Of(),B=!0);"YES"!=Z(L,"INDEPENDENT")&&0<I&&E.se();if(L=l(F.bd))E.mimeType=L,hx.has(L)&&(E.$=null);y.push(E);C&&(C+=K)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;v&&(z||0!=y[0].Ha?(v=
|
|
1121
|
-
!1,D=null):y=[]);(n=Hv(m,"EXT-X-BYTERANGE"))?(u=t(gx(c,n.value)),q=u.next().value,u=u.next().value):y.length&&(q=y[0].Ha,u=y[y.length-1].sa);c="";n=null;"image"==g&&(c="1x1",m=Hv(m,"EXT-X-TILES"))&&(c=Cv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Ci(e,p,function(){if(D)return D();null==Q&&(Q=Jv(h(),d.h,f));return Q||[]},q,u,b,0,0,Infinity,y,c,n,w,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,hx.has(e)&&(b.$=null);v&&(a.
|
|
1125
|
+
!1,D=null):y=[]);(n=Hv(m,"EXT-X-BYTERANGE"))?(u=t(gx(c,n.value)),q=u.next().value,u=u.next().value):y.length&&(q=y[0].Ha,u=y[y.length-1].sa);c="";n=null;"image"==g&&(c="1x1",m=Hv(m,"EXT-X-TILES"))&&(c=Cv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Ci(e,p,function(){if(D)return D();null==Q&&(Q=Jv(h(),d.h,f));return Q||[]},q,u,b,0,0,Infinity,y,c,n,w,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,hx.has(e)&&(b.$=null);v&&(a.Hb=!0,b.Vg(),B&&b.Of());return b}
|
|
1122
1126
|
function gx(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.sa+1,d=c+b-1);return[c,d]}
|
|
1123
1127
|
function kw(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.j.m;if(f&&!mw(a,c))for(b=Fv(b,"EXT-X-DATERANGE"),b=b.sort(function(w,v){w=Cv(w,"START-DATE");v=Cv(v,"START-DATE");return w<v?-1:w>v?1:0}),c=0;c<b.length;c++){var g=b[c],h=Cv(g,"ID");if(!a.Ea.has(h)){var k=Cv(g,"START-DATE"),l=qh(k);if(!isNaN(l)){k=Math.max(0,l-f);var m=null,n=Z(g,"END-DATE");if(n&&(n=qh(n),!isNaN(n)&&(m=n-f,0>m)))continue;if(null==m&&(n=Z(g,"DURATION")||Z(g,"PLANNED-DURATION"))&&(n=parseFloat(n),isNaN(n)||(m=k+n),0>l-f+n))continue;
|
|
1124
1128
|
n=Z(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Z(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var q=Z(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==q&&(q=Cv(b[p],"START-DATE"),q=qh(q),!isNaN(q)&&q&&q>l)){m=Math.max(0,q-f);break}}if(null==m)continue}l="ID CLASS START-DATE END-DATE DURATION END-ON-NEXT".split(" ");p=[];g=t(g.attributes);for(q=g.next();!q.done;q=g.next())if(q=q.value,!l.includes(q.name)){var u=Lv(q.value,d);if("X-ASSET-URI"==q.name||"X-ASSET-LIST"==q.name)u=Jv(e(),
|
|
@@ -1130,7 +1134,7 @@ e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),
|
|
|
1130
1134
|
function Jw(a){return a==Vd?"text/vtt":fx[a].mp4}function Bw(a,b){a=Zv(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.ac()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
|
|
1131
1135
|
function ax(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,w,v,A;return O(function(y){switch(y.g){case 1:e=zg;f=Bw(a,d);g=f.segment;if(2==g.status)return y.return(Jw(b));h=g.M();k=new uc(h[0]);l=k.Pa.split(".").pop();m=fx[b];if((n=m[l])||(n=Cw[l])||(n=Iw(b,c)))return y.return(n);q=1;u=tg(h,a.g.retryParameters);sa(y,2);u.method="HEAD";return G(y,Dw(a,u,e,{type:q}),4);case 4:w=y.h;p=w.headers["content-type"];va(y,3);break;case 2:v=wa(y);if(!v||1002!=v.code&&1001!=v.code){y.u(3);break}u.method="GET";return G(y,
|
|
1132
1136
|
Dw(a,u,e,{type:q}),6);case 6:A=y.h,p=A.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return(Jw(b))}})}function Xw(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Xv(a,b,c){return Dw(a,tg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1133
|
-
function Vv(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(!a.h)return h.return();sa(h,2);b=Date.now();return G(h,a.update(),4);case 4:c=Date.now();Zv(a)&&(d=(c-b)/1E3,a.
|
|
1137
|
+
function Vv(a){var b,c,d,e,f,g;return O(function(h){switch(h.g){case 1:if(!a.h)return h.return();sa(h,2);b=Date.now();return G(h,a.update(),4);case 4:c=Date.now();Zv(a)&&(d=(c-b)/1E3,a.Fb.sample(1,d),e=a.o,f=Math.max(0,e-Ra(a.Fb)),a.A.Y(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
|
|
1134
1138
|
function Zv(a){return a.xa!=Wv}function cw(a,b){a.xa=b;a.j&&a.j.wc(!Zv(a));Zv(a)||a.A.stop()}function Dw(a,b,c,d){if(!a.da)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);ng(a.da,b);return b.promise}function Ow(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1135
1139
|
function Qw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,w,v,A,y,D,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(sd())throw new T(2,4,4041);g=Cv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=Jv(d(),Cv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Jd(Hd(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.qa.has(m)||(n=tg(k,a.g.retryParameters),p=Dw(a,n,6),a.qa.set(m,p));return G(B,a.qa.get(m),
|
|
1136
1140
|
3);case 3:q=B.h,l=Jd(q.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.ya.has(e)){w=a.ya.get(e);B.u(5);break}v=Dl(e.M(),e.$b(),e.Xb(),a.g.retryParameters);A=zg;return G(B,Dw(a,v,A,{type:0}),6);case 6:y=B.h,w=Bl(y.data),a.ya.set(e,w);case 5:w&&(u=w);case 4:return D=new Map,D.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Rd(D,z))}})}S("shaka.hls.HlsParser",Uv);
|
|
@@ -1226,7 +1230,7 @@ r.update=function(){};
|
|
|
1226
1230
|
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new Gy,sa(m,2,3),G(m,e.init(),5);case 5:return G(m,Ky(e,d.ob(),d.Ja()),6);case 6:return f=m.h,G(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),G(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.u(3)}})};
|
|
1227
1231
|
r.onInitialVariantChosen=function(){};r.banLocation=function(){};r.setMediaElement=function(){};vi["application/x-offline-manifest"]=function(){return new gz};function hz(){}function iz(a){var b=$y(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=fg(a)):a=b&&"segment"==b.g?jz(b.key(),b):dg(new T(2,1,9004,a));return a}
|
|
1228
1232
|
function jz(a,b){var c=new Gy;return fg(void 0).Aa(function(){return c.init()}).Aa(function(){return Ky(c,b.ob(),b.Ja())}).Aa(function(d){return d.getSegments([b.key()])}).Aa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",hz);hz.plugin=iz;pg("offline",iz);function kz(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,lz(w.info,p)){w.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=mz(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1229
|
-
function mz(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Dh({
|
|
1233
|
+
function mz(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Dh({Nb:b,onError:function(){},Ae:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),sa(f,2),d.configure(a),G(f,Lh(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 wa(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1230
1234
|
h.g)return sa(h,2),G(h,Xh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);H(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function lz(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Qb(a.audioCapabilities,b.audioCapabilities,c)&&Qb(a.videoCapabilities,b.videoCapabilities,c)};function nz(a,b,c){var d=b.presentationTimeline.getDuration();b=oz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function pz(a,b){var c=bz(new az(a.ob(),a.Ja()),b),d=b.appMetadata||{};c=oz(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}}
|
|
1231
1235
|
function oz(a){var b=[],c=uf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(lf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(mf(c.value));return b};function qz(){this.g={}}function rz(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 sz(a,b){a.g[b.id]=b.bandwidth||2048}function tz(a,b){a=a.g[b];null==a&&(a=0);return a};function uz(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.zb()):(this.h=xm(),this.g=new og);this.i=[];this.j=[];var c=!a;this.l=new Bg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return G(k,Promise.all(b.j.map(function(l){return qy(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 G(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return G(k,b.g.destroy(),4);
|
|
1232
1236
|
case 4:b.h=null,b.g=null,H(k)}})})}function vz(){if(Uc())a:{var a=t(Hy.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=uz.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=om(a,b));return Bm(this.h,a)};r.getConfiguration=function(){var a=xm();Bm(a,this.h,xm());return a};r.zb=function(){return this.g};
|
|
@@ -1252,7 +1256,7 @@ function Tz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:r
|
|
|
1252
1256
|
r.list=function(){return Mz(this,Uz())};function Uz(){var a,b,c;return O(function(d){switch(d.g){case 1:return yz(),a=[],b=new Gy,ua(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),Jy(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=pz(new Zy("manifest",e.ob,e.Ja,l),k);a.push(k)});H(h)})})}),G(d,c,2);case 2:return xa(d),G(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
|
|
1253
1257
|
function zz(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},
|
|
1254
1258
|
onMetadata:function(){},disableStream:function(){}},c.configure(d.manifest),Az(a),G(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Az(a),k=Vz(h),G(l,Promise.all(Dg(k,function(m){return m.createSegmentIndex()})),3);Az(a);if(e)throw e;return l.return(h)})}
|
|
1255
|
-
r.Dc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Dh({
|
|
1259
|
+
r.Dc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Dh({Nb:d.g,onError:b,Ae:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),G(f,Ih(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?G(f,Vh(e),3):f.return(e)})};
|
|
1256
1260
|
function Lz(a,b,c,d){var e=new Map,f=Vz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Wz(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),lg:Array.from(e.values())}}
|
|
1257
1261
|
function Wz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1258
1262
|
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;Xz(d,c.presentationTimeline.nb(),function(l){var m=ly(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=tz(b,d.id)*p;p=oy(a.g,p);f.set(m,new ky(l,p,k,!1))}l.$&&(n=ly(l.$),f.has(n)||(p=.5*tz(b,d.id),p=oy(a.g,p),f.set(n,new ky(l.$,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
@@ -1421,16 +1425,16 @@ if(!w.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var v=0;v<w.length;v++){v
|
|
|
1421
1425
|
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],ma:new Uint8Array([]),wa:B.wa,Ba:B.Ba,Ca:B.Ca,data:{sb:this.g,baseMediaDecodeTime:q,Za:p},stream:b};break;case "hvc":var C=[],F=null,I=[],L=k.Ic();if(!L.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var J=0;J<L.length;J++){var E=L[J],K=E.nalus;I.push.apply(I,x(K));for(var N=!1,M=[],P=!1,R=t(K),Q=R.next();!Q.done;Q=R.next()){var W=Q.value;switch(W.type){case 1:case 0:var aa=
|
|
1422
1426
|
P=!0;break;case 19:case 20:case 21:N=aa=P=!0;break;case 32:aa=!0;break;case 33:aa=!0;break;case 34:aa=!0;break;case 35:P=aa=!0;break;case 39:case 40:aa=!0;break;default:aa=!1}if(P&&aa){var Sa=W.fullData.byteLength,ta=new Uint8Array(4);ta[0]=Sa>>24&255;ta[1]=Sa>>16&255;ta[2]=Sa>>8&255;ta[3]=Sa&255;M.push(ta);M.push(W.fullData)}}var Ma=M.length?{data:Md.apply(Ed,x(M)),Cd:N}:null;if(Ma){null==F&&null!=E.dts&&(F=E.dts);var Ya=void 0;Ya=J+1<L.length?(L[J+1].dts||0)-(E.dts||0):1<L.length?(E.dts||0)-(L[J-
|
|
1423
1427
|
1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:Ma.data,size:Ma.data.byteLength,duration:Ya,eb:Math.round((E.pts||0)-(E.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:Ma.Cd?2:1,ib:Ma.Cd?0:1}})}}var Ta=jD(I);if(!Ta||null==F)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Ta.height;b.width=Ta.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],ma:new Uint8Array([]),wa:Ta.wa,Ba:Ta.Ba,Ca:Ta.Ca,data:{sb:this.g,baseMediaDecodeTime:F,Za:C},stream:b}}n&&
|
|
1424
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var hb=[],Wa,Ua=null,mc=t(k.Wb()),Oa=mc.next();!Oa.done;Oa=mc.next()){var lb=Oa.value,Pb=lb.data;if(Pb){var Nc=0;Wa=YC(Pb,Nc);if(!Wa)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Wa.sampleRate;b.channelsCount=Wa.channelCount;null==Ua&&null!==lb.pts&&(Ua=lb.pts);for(;Nc<Pb.length;){var
|
|
1425
|
-
Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Nc+=
|
|
1426
|
-
duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Ld+=1024/Wa.sampleRate*9E4}var Mi=Wa.sampleRate,Ni=Ua/9E4*Mi;n={id:b.id,type:"audio",codecs:Wa.Na,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Mi,duration:d,ab:[],ma:new Uint8Array([]),wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:Ni,Za:hb},stream:b};break;case "ac3":for(var Eg=[],
|
|
1427
|
-
(vj=Xm.pts);for(var
|
|
1428
|
-
Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:TD,Za:Eg},stream:b};break;case "ec3":for(var Tu=[],wj=0,Zm=new Uint8Array([]),xj=null,Uu=t(k.Wb()),$m=Uu.next();!$m.done;$m=Uu.next()){var an=$m.value,bn=an.data;null==xj&&null!==an.pts&&(xj=an.pts);for(var
|
|
1429
|
-
|
|
1430
|
-
|
|
1428
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var hb=[],Wa,Ua=null,mc=t(k.Wb()),Oa=mc.next();!Oa.done;Oa=mc.next()){var lb=Oa.value,Pb=lb.data;if(Pb){var Nc=0;Wa=YC(Pb,Nc);if(!Wa)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Wa.sampleRate;b.channelsCount=Wa.channelCount;null==Ua&&null!==lb.pts&&(Ua=lb.pts);for(;Nc<Pb.length;){var ke=XC(Pb,Nc);if(ke){var le=ke.le+ke.ba;Nc+le<=Pb.length&&hb.push({data:Pb.subarray(Nc+ke.le,Nc+le),size:ke.ba,duration:1024,eb:0,flags:{hb:0,
|
|
1429
|
+
Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Nc+=le}else Nc++}}}if(!Wa||null==Ua){if(!k.Ic().length)throw new T(2,3,3018,c?c.M()[0]:null);Ua=9E4*c.startTime;var me=Td("audio",b.codecs.split(","));if(!me||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);Wa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Na:me};var Kd=$C(me,b.channelsCount);if(!Kd)throw new T(2,3,3018,c?c.M()[0]:null);for(var Li=Ua+9E4*(c.endTime-c.startTime),Ld=Ua;Ld<Li;)hb.push({data:Kd,size:Kd.byteLength,
|
|
1430
|
+
duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Ld+=1024/Wa.sampleRate*9E4}var Mi=Wa.sampleRate,Ni=Ua/9E4*Mi;n={id:b.id,type:"audio",codecs:Wa.Na,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Mi,duration:d,ab:[],ma:new Uint8Array([]),wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:Ni,Za:hb},stream:b};break;case "ac3":for(var Eg=[],ne=0,nc=new Uint8Array([]),vj=null,Su=t(k.Wb()),Wm=Su.next();!Wm.done;Wm=Su.next()){var Xm=Wm.value,Ym=Xm.data;null==vj&&null!==Xm.pts&&
|
|
1431
|
+
(vj=Xm.pts);for(var wf=0;wf<Ym.length;){var Od=bD(Ym,wf);Od?(b.audioSamplingRate=Od.sampleRate,b.channelsCount=Od.channelCount,ne=Od.sampleRate,nc=Od.ma,Eg.push({data:Ym.subarray(wf,wf+Od.ba),size:Od.ba,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),wf+=Od.ba):wf++}}if(0==ne||0==nc.byteLength||null==vj)throw new T(2,3,3018,c?c.M()[0]:null);var TD=vj/9E4*ne;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ne,duration:d,ab:[],ma:nc,wa:new Uint8Array([]),
|
|
1432
|
+
Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:TD,Za:Eg},stream:b};break;case "ec3":for(var Tu=[],wj=0,Zm=new Uint8Array([]),xj=null,Uu=t(k.Wb()),$m=Uu.next();!$m.done;$m=Uu.next()){var an=$m.value,bn=an.data;null==xj&&null!==an.pts&&(xj=an.pts);for(var xf=0;xf<bn.length;){var Pd=eD(bn,xf);Pd?(b.audioSamplingRate=Pd.sampleRate,b.channelsCount=Pd.channelCount,wj=Pd.sampleRate,Zm=Pd.ma,Tu.push({data:bn.subarray(xf,xf+Pd.ba),size:Pd.ba,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),xf+=Pd.ba):
|
|
1433
|
+
xf++}}if(0==wj||0==Zm.byteLength||null==xj)throw new T(2,3,3018,c?c.M()[0]:null);var UD=xj/9E4*wj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wj,duration:d,ab:[],ma:Zm,wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:UD,Za:Tu},stream:b};break;case "mp3":for(var Vu=[],yj,zj=null,Wu=t(k.Wb()),cn=Wu.next();!cn.done;cn=Wu.next()){var dn=cn.value,Sg=dn.data;if(Sg){null==zj&&null!==dn.pts&&(zj=dn.pts);for(var qe=0;qe<Sg.length;){var yf=oD(Sg,
|
|
1434
|
+
qe);yf?(yj||(yj=yf),qe+yf.ba<=Sg.length&&Vu.push({data:Sg.subarray(qe,qe+yf.ba),size:yf.ba,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),qe+=yf.ba):qe++}}}if(!yj||null==zj)throw new T(2,3,3018,c?c.M()[0]:null);var Xu=yj.sampleRate,VD=zj/9E4*Xu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Xu,duration:d,ab:[],ma:new Uint8Array([]),wa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:VD,Za:Vu},stream:b};break;case "opus":var Yu=
|
|
1431
1435
|
[],Aj=null,Xc=k.F;if(!Xc)throw new T(2,3,3018,c?c.M()[0]:null);var Bb=[];switch(Xc.Jh){case 1:case 2:Bb=[0];break;case 0:Bb=[255,1,1,0,1];break;case 128:Bb=[255,2,0,0,1];break;case 3:Bb=[1,2,1,0,2,1];break;case 4:Bb=[1,2,2,0,1,2,3];break;case 5:Bb=[1,3,2,0,4,1,2,3];break;case 6:Bb=[1,4,2,0,4,1,2,3,5];break;case 7:Bb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Bb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Bb=[1,1,2,0,1];break;case 131:Bb=[1,1,3,0,1,2];break;case 132:Bb=[1,1,4,0,1,2,3];break;case 133:Bb=[1,1,5,
|
|
1432
|
-
0,1,2,3,4];break;case 134:Bb=[1,1,6,0,1,2,3,4,5];break;case 135:Bb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Bb=[1,1,8,0,1,2,3,4,5,6,7]}var Zu=new Uint8Array([0,Xc.channelCount,0,0,Xc.sampleRate>>>24&255,Xc.sampleRate>>>17&255,Xc.sampleRate>>>8&255,Xc.sampleRate>>>0&255,0,0].concat(x(Bb)));for(var $u=Xc.sampleRate,av=t(k.Wb()),en=av.next();!en.done;en=av.next()){var fn=en.value,
|
|
1433
|
-
wd=Tg+2,Bj=0;255===
|
|
1436
|
+
0,1,2,3,4];break;case 134:Bb=[1,1,6,0,1,2,3,4,5];break;case 135:Bb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Bb=[1,1,8,0,1,2,3,4,5,6,7]}var Zu=new Uint8Array([0,Xc.channelCount,0,0,Xc.sampleRate>>>24&255,Xc.sampleRate>>>17&255,Xc.sampleRate>>>8&255,Xc.sampleRate>>>0&255,0,0].concat(x(Bb)));for(var $u=Xc.sampleRate,av=t(k.Wb()),en=av.next();!en.done;en=av.next()){var fn=en.value,zf=fn.data;null==Aj&&null!==fn.pts&&(Aj=fn.pts);for(var Tg=0;Tg<zf.length;){for(var WD=0!==(zf[Tg+1]&16),XD=0!==(zf[Tg+1]&8),
|
|
1437
|
+
wd=Tg+2,Bj=0;255===zf[wd];)Bj+=255,wd+=1;Bj+=zf[wd];wd+=1;wd+=WD?2:0;wd+=XD?2:0;var bv=zf.slice(wd,wd+Bj);Yu.push({data:bv,size:bv.byteLength,duration:960,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});Tg=wd+Bj}}if(0==Zu.byteLength||null==Aj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Xc.sampleRate;b.channelsCount=Xc.channelCount;var YD=Aj/9E4*$u;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:$u,duration:d,ab:[],ma:Zu,wa:new Uint8Array([]),Ba:0,
|
|
1434
1438
|
Ca:0,data:{sb:this.g,baseMediaDecodeTime:YD,Za:Yu},stream:b}}n&&(l.push(n),n=null)}}catch(gn){return gn&&3023==gn.code?Promise.resolve(new Uint8Array([])):Promise.reject(gn)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var cv=new nx(l),hn=b.id+"_"+c.i;if(this.i.has(hn))var jn=this.i.get(hn);else jn=tx(cv),this.i.set(hn,jn);var ZD=Kx(cv);this.g++;var $D=Md(jn,ZD);return Promise.resolve($D)};S("shaka.transmuxer.TsTransmuxer",BD);BD.prototype.transmux=BD.prototype.transmux;
|
|
1435
1439
|
BD.prototype.getOriginalMimeType=BD.prototype.getOriginalMimeType;BD.prototype.convertCodecs=BD.prototype.convertCodecs;BD.prototype.isSupported=BD.prototype.isSupported;BD.prototype.destroy=BD.prototype.destroy;var CD=["aac","ac-3","ec-3","mp3","opus"],DD=["avc","hevc"];kc("video/mp2t",function(){return new BD("video/mp2t")},qc);/*
|
|
1436
1440
|
@license
|