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
package/dist/shaka-player.ui.js
CHANGED
|
@@ -69,10 +69,10 @@ var kb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
|
|
|
69
69
|
Copyright 2006 The Closure Library Authors
|
|
70
70
|
SPDX-License-Identifier: Apache-2.0
|
|
71
71
|
*/
|
|
72
|
-
function lb(a){var b;a instanceof lb?(mb(this,a
|
|
73
|
-
q.toString=function(){var a=[],b=this
|
|
74
|
-
q.resolve=function(a){var b=this.clone();"data"===b
|
|
75
|
-
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.ib=d:c=""!==a.g.toString();c?qb(b,a.g.clone()):c=!!a.Hc;c&&(b.Hc=a.Hc);return b};q.clone=function(){return new lb(this)};function mb(a,b,c){a
|
|
72
|
+
function lb(a){var b;a instanceof lb?(mb(this,a.$b),this.Wc=a.Wc,ob(this,a.dc),pb(this,a.sd),this.ib=a.ib,qb(this,a.g.clone()),this.Hc=a.Hc):a&&(b=String(a).match(kb))?(mb(this,b[1]||"",!0),this.Wc=rb(b[2]||""),ob(this,b[3]||"",!0),pb(this,b[4]),this.ib=rb(b[5]||"",!0),qb(this,b[6]||"",!0),this.Hc=rb(b[7]||"")):this.g=new sb(null)}q=lb.prototype;q.$b="";q.Wc="";q.dc="";q.sd=null;q.ib="";q.Hc="";
|
|
73
|
+
q.toString=function(){var a=[],b=this.$b;b&&a.push(ub(b,vb,!0),":");if(b=this.dc){a.push("//");var c=this.Wc;c&&a.push(ub(c,vb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.sd;null!=b&&a.push(":",String(b))}if(b=this.ib)this.dc&&"/"!=b.charAt(0)&&a.push("/"),a.push(ub(b,"/"==b.charAt(0)?wb:xb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hc)&&a.push("#",ub(b,yb));return a.join("")};
|
|
74
|
+
q.resolve=function(a){var b=this.clone();"data"===b.$b&&(b=new lb);var c=!!a.$b;c?mb(b,a.$b):c=!!a.Wc;c?b.Wc=a.Wc:c=!!a.dc;c?ob(b,a.dc):c=null!=a.sd;var d=a.ib;if(c)pb(b,a.sd);else if(c=!!a.ib){if("/"!=d.charAt(0))if(this.dc&&!this.ib)d="/"+d;else{var e=b.ib.lastIndexOf("/");-1!=e&&(d=b.ib.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(""):".."==
|
|
75
|
+
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.ib=d:c=""!==a.g.toString();c?qb(b,a.g.clone()):c=!!a.Hc;c&&(b.Hc=a.Hc);return b};q.clone=function(){return new lb(this)};function mb(a,b,c){a.$b=c?rb(b,!0):b;a.$b&&(a.$b=a.$b.replace(/:$/,""))}function ob(a,b,c){a.dc=c?rb(b,!0):b}function pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.sd=b}else a.sd=null}
|
|
76
76
|
function qb(a,b,c){b instanceof sb?a.g=b:(c||(b=ub(b,zb)),a.g=new sb(b))}function rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function ub(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Ab),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ab(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var vb=/[#\/\?@]/g,xb=/[#\?:]/g,wb=/[#\?]/g,zb=/[#\?@]/g,yb=/#/g;function sb(a){this.g=a||null}
|
|
77
77
|
function Bb(a){if(!a.cb&&(a.cb={},a.Vd=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," ")))}}q=sb.prototype;q.cb=null;q.Vd=null;function Cb(a){Bb(a);return a.Vd}q.add=function(a,b){Bb(this);this.g=null;var c=this.cb.hasOwnProperty(a)?this.cb[a]:null;c||(this.cb[a]=c=[]);c.push(b);this.Vd++;return this};
|
|
78
78
|
q.set=function(a,b){Bb(this);this.g=null;this.cb.hasOwnProperty(a)?this.cb[a]=[b]:this.add(a,b);return this};q.get=function(a){Bb(this);return this.cb[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.cb)return"";var a=[],b;for(b in this.cb)for(var c=encodeURIComponent(b),d=this.cb[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
@@ -143,8 +143,8 @@ var $d="normal",le={NORMAL:$d,ITALIC:"italic",OBLIQUE:"oblique"};Rd.fontStyle=le
|
|
|
143
143
|
me.registerTransmuxer=ne;me.prototype.destroy=me.prototype.destroy;var oe={},te=1,se=2,re=3,qe=4;me.PluginPriority={FALLBACK:te,PREFERRED_SECONDARY:se,PREFERRED:re,APPLICATION:qe};function ue(){}function ve(a,b){var c=a;b&&!we.includes(a)&&(c+='; codecs="'+b+'"');return c}function xe(a,b){b&&(a+='; codecs="'+b+'"');return a}function ye(a,b,c){var d=ve(a,b);b=xe(a,b);pe(b)?(a=pe(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}
|
|
144
144
|
function ze(a,b,c){var d=[b];Ae.forEach(function(e,f){var g=a[f];"codecs"==f?we.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Be(a){return a.split(";")[0].split("/")[1]}
|
|
145
145
|
function Ce(a){var b=De(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"===
|
|
146
|
-
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
|
|
147
|
-
function
|
|
146
|
+
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 Ee(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=De(c.value),b.push(c[0]);return b.sort().join(",")}function Je(a){return a.split(";")[0]}
|
|
147
|
+
function Ke(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Me(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function De(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}Q("shaka.util.MimeUtils",ue);ue.getFullTypeWithAllCodecs=xe;ue.getFullType=ve;
|
|
148
148
|
var Ae=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),we=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Ne(a){this.i=null;this.j=a;this.C=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.s=new Map}function Oe(a){return Pe[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Id:!1}Ne.prototype.destroy=function(){this.j=this.i=null;this.s.clear();return Promise.resolve()};
|
|
149
149
|
function Qe(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(Gb(b)),p.return();f=a.C?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Gb(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(r){return r.startTime>=a.l&&r.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)})}
|
|
150
150
|
Ne.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 Re(a,b,c){a.l=b;a.m=c}function Se(a,b,c){a.G=b;if(b=a.s.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)}
|
|
@@ -163,12 +163,12 @@ function lf(a,b){var c=$b(),d=ac("Firefox")&&pc(),e=a.video,f=e&&e.width||0,g=e&
|
|
|
163
163
|
if(e){d=of(e.codecs,e.mimeType);c=ye(e.mimeType,d,"audio");if(!vd(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 pf(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=pf(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
164
164
|
function qf(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=Ze(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={Bd:f.Bd,Cd:f.Cd},h=g.next())k=h.value,f.Cd=pf(k),f.Bd=rf,f.Bd[f.Cd]?d=c(d,f.Bd[f.Cd]):e.push(sf(k).then(function(m){return function(n){var p=
|
|
165
165
|
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.Bd[m.Cd]=p,d=c(d,p))}}(f)));return G(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
|
|
166
|
-
function sf(a){var b=[""];a.video&&(b=
|
|
166
|
+
function sf(a){var b=[""];a.video&&(b=Ke(a.video.contentType).split(","));var c=[""];a.audio&&(c=Ke(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={Cc:f.Cc},h=g.next())h=h.value,f.Cc=Ye(a),a.video&&(f.Cc.video.contentType=ve(Je(f.Cc.video.contentType),e)),a.audio&&(f.Cc.audio.contentType=ve(Je(f.Cc.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.Cc).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
|
|
167
167
|
return null})}
|
|
168
168
|
function kf(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z;return O(function(B){switch(B.g){case 1:if(e=a.some(function(D){return D.decodingInfos.length}))return B.return();f={};g=t(d);h=g.next();case 2:if(h.done){B.B(4);break}f.Rf=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){B.B(7);break}n=m.value;p=tf(n,b,c).filter(function(D){return function(F){F=F[0];return(F.keySystemConfiguration&&F.keySystemConfiguration.keySystem)===D.Rf}}(f));r=t(p);u=r.next();case 8:if(u.done){B.B(10);break}w=u.value;
|
|
169
169
|
return G(B,qf(n,w),9);case 9:u=r.next();B.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();B.B(5);break;case 7:if(k)return B.return();f={Rf:f.Rf};h=g.next();B.B(2);break;case 4:v=t(a),m=v.next();case 12:if(m.done){B.B(0);break}A=m.value;y=tf(A,b,c).filter(function(D){D=D[0];D=D.keySystemConfiguration&&D.keySystemConfiguration.keySystem;return!D||!d.includes(D)});C=t(y);u=C.next();case 15:if(u.done){m=v.next();B.B(12);break}z=u.value;return G(B,qf(A,z),16);case 16:u=C.next(),B.B(15)}})}
|
|
170
|
-
function tf(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=
|
|
171
|
-
"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=of(
|
|
170
|
+
function tf(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=Ke(k);if(l.includes(",")&&!d){var m=l.split(","),n=Je(k);l=Qc("video",m);m=Qc("audio",m);m=of(m,n);n=ye(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=nf(l);k={contentType:ye(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=
|
|
171
|
+
"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=of(Ke(l),k),k=ye(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=
|
|
172
172
|
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=
|
|
173
173
|
n.next();!m.done;m=n.next()){m=Object.assign({},m.value);var r=c.get(k),u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};r=t(r);for(p=r.next();!p.done;p=r.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=
|
|
174
174
|
"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=
|
|
@@ -199,8 +199,8 @@ q.playbackRateChanged=function(a){this.C=a};q.setMediaElement=function(a){var b=
|
|
|
199
199
|
function Mf(a){if(!a.I){var b=a.i;if(!(b.g>=b.i))return;a.I=!0;a.j-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.j<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Kf(a,b,c,d,e){if(a.l){var f=a.l.Yh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return df(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
200
200
|
function Lf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}Q("shaka.abr.SimpleAbrManager",Jf);Jf.prototype.configure=Jf.prototype.configure;Jf.prototype.setCmsdManager=Jf.prototype.setCmsdManager;Jf.prototype.setMediaElement=Jf.prototype.setMediaElement;Jf.prototype.playbackRateChanged=Jf.prototype.playbackRateChanged;Jf.prototype.setVariants=Jf.prototype.setVariants;
|
|
201
201
|
Jf.prototype.getBandwidthEstimate=Jf.prototype.getBandwidthEstimate;Jf.prototype.trySuggestStreams=Jf.prototype.trySuggestStreams;Jf.prototype.segmentDownloaded=Jf.prototype.segmentDownloaded;Jf.prototype.disable=Jf.prototype.disable;Jf.prototype.enable=Jf.prototype.enable;Jf.prototype.chooseVariant=Jf.prototype.chooseVariant;Jf.prototype.init=Jf.prototype.init;Jf.prototype.release=Jf.prototype.release;Jf.prototype.stop=Jf.prototype.stop;var Nf=1;Q("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});Q("shaka.config.CodecSwitchingStrategy",{Kl:"reload",Ti:"smooth"});function Of(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Of.prototype.add=function(a,b,c){return Pf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
202
|
-
function Pf(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||c&&!Qf(e,f)||!
|
|
203
|
-
function Qf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return
|
|
202
|
+
function Pf(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||c&&!Qf(e,f)||!Rf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Qf(a,b))&&Rf(a.roles,b.roles)));return d?!1:!0}Of.prototype.values=function(){return this.g.values()};
|
|
203
|
+
function Qf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Ee(d)});b=b.codecs.split(",").map(function(d){return Ee(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Rf(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Wf(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Xf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Wf.prototype.create=function(a){var b=this,c="smooth"==this.h&&xd(),d=a.filter(function(e){return Pf(b.i,e,!c,b.g)});return d.length?new Of(d[0],d,!c,this.g):this.j.create(a)};
|
|
204
204
|
function Xf(a,b,c,d,e,f,g,h,k,l,m){this.A=a;this.C=b;this.i=c;this.j=d;this.G=e;this.m=f;this.h=void 0===g?"":g;this.l=void 0===h?"":h;this.s=void 0===k?"reload":k;this.u=void 0===l?!1:l;this.g=void 0===m?"":m}
|
|
205
205
|
Xf.prototype.create=function(a){var b=[];b=Yf(a,this.A);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Zf(b,this.C);a.length&&(b=a);this.m&&(a=$f(b,this.m),a.length&&(b=a));this.j&&(a=ag(b,this.j),a.length&&(b=a));this.i&&(a=bg(b,this.i),a.length&&(b=a));this.h&&(a=cg(b,this.h),a.length&&(b=a));this.l&&(a=dg(b,this.l),a.length&&(b=a));a=eg(b,this.G);a.length&&(b=a);this.g&&(a=fg(b,this.g),a.length&&(b=a));return new Of(b[0],b,!("smooth"==this.s&&xd()),this.u)};
|
|
206
206
|
function Yf(a,b){b=$c(b);var c=hd(b,a.map(function(d){return gd(d)}));return c?a.filter(function(d){return c==gd(d)}):[]}function Zf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function cg(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function dg(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
@@ -215,7 +215,7 @@ function Cg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
|
|
|
215
215
|
q.request=function(a,b,c){var d=this,e=new Dg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new Eg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ye(b.retryParameters):lg();b.uris=Ye(b.uris);f=Fg(this,a,b,c);var g=f.Ta(function(){return Gg(d,a,b,c,new kg(b.retryParameters,!1),0,null,e)}),h=g.Ta(function(p){return Hg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
216
216
|
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Ta(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.Sj||!d.l||u.fromCache||"HEAD"==b.method||a!=Ig||d.l(u.timeMs,u.data.byteLength,Jg(c));d.G&&d.G(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new Eg(n.promise,function(){return n.abort()},e);wg(this.m,f);return f};
|
|
217
217
|
function Fg(a,b,c,d){function e(h){f=f.Ta(function(){c.body&&(c.body=Hb(c.body));return h(b,c,d)})}var f=rg(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Ta(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
218
|
-
function Gg(a,b,c,d,e,f,g,h){a.u&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new lb(c.uris[f]),l=k
|
|
218
|
+
function Gg(a,b,c,d,e,f,g,h){a.u&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.H&&a.H(b,d,c.uris[f],c.uris[f-1]);var k=new lb(c.uris[f]),l=k.$b,m=!1;l||(l=location.protocol,l=l.slice(0,-1),mb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=Ag[l])?l.xf:null;if(!n)return pg(new T(2,1,1E3,k));var p=l.qk,r=null,u=null,w=!1,v=!1,A;return sg(mg(e)).Ta(function(){if(a.i)return qg();A=Date.now();var y=0;c.requestStartTime=Date.now();
|
|
219
219
|
var C=n(c.uris[f],c,b,function(D,F,I){r&&r.stop();u&&u.X(B/1E3);a.l&&b==Ig&&(y++,c.packetNumber=y,a.l(D,F,Jg(d),c),m=!0,h.g=I)},function(D){a.j&&a.j(D,c,b);v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return C;var z=c.retryParameters.connectionTimeout;z&&(r=new Ub(function(){w=!0;C.abort()}),r.X(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Ub(function(){w=!0;C.abort()}));return C}).Ta(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var C={response:y,
|
|
220
220
|
Sj:m};!v&&a.j&&a.j(y.headers,c,b);return C},function(y){r&&r.stop();u&&u.stop();if(a.A){var C=null,z=0;y instanceof T&&(C=y,1001==y.code&&(z=y.data[1]));a.A(c,C,z,w)}if(a.i)return qg();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 C=(new Map).set("error",y),C=new S("retry",C),a.dispatchEvent(C),f=(f+1)%c.uris.length,Gg(a,b,c,d,e,f,y,h)}throw y;})}
|
|
221
221
|
function Hg(a,b,c,d){var e=rg(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Tf:f.Tf},g=a.next())f.Tf=g.value,e=e.Ta(function(h){return function(){var k=c.response;k.data&&(k.data=Hb(k.data));return h.Tf(b,k,d)}}(f));return e.Ta(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 Jg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.pe)return!1}return!0}Q("shaka.net.NetworkingEngine",xg);
|
|
@@ -255,9 +255,9 @@ function Sh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:
|
|
|
255
255
|
function Qh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y;return O(function(C){if(1==C.g){if(c=Uh(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(z){return z.video&&z.video.drmInfos.length||z.audio&&z.audio.drmInfos.length?!0:!1});g||(h=Mg(a.h.servers),Vh(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Wh(m),p=t(n),r=p.next();!r.done;r=p.next())u=r.value,k.add(u);w=t(k);for(r=w.next();!r.done;r=
|
|
256
256
|
w.next())v=r.value,Xh(v,Mg(a.h.servers),Mg(a.h.advanced||{}),a.h.keySystemsMapping);return G(C,kf(b,a.P,a.Y,a.h.preferredKeySystems),2)}Lg(a.j);A=g||Object.keys(a.h.servers).length;if(!A)return a.aa=!0,C.return(Promise.resolve());y=Th(a,void 0,b);return C.return(g?y:y.catch(function(){}))})}
|
|
257
257
|
function Yh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.I){c.B(2);break}return G(c,a.I,3);case 3:return Lg(a.j),c.return();case 2:return sa(c,4),a.I=a.m.setMediaKeys(a.u),G(c,a.I,6);case 6:ua(c,5);break;case 4:b=va(c),a.s(new T(2,6,6003,b.message));case 5:Lg(a.j),H(c)}})}function Zh(a,b){return O(function(c){if(1==c.g)return G(c,Yh(a),2);$h(a,b.initDataType,Gb(b.initData));H(c)})}
|
|
258
|
-
q.
|
|
258
|
+
q.bc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.u)return b.C.ka(a,"encrypted",function(){b.s(new T(2,6,6010))}),c.return();b.m=a;b.C.ka(b.m,"play",function(){for(var d=t(b.O),e=d.next();!e.done;e=d.next())ai(b,e.value);b.S=!0;b.O=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.C.o(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Oh(b)});b.H=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.H||"com.apple.fps"!==b.g.keySystem||
|
|
259
259
|
b.A.size?G(c,Yh(b),2):c.B(2)}bi(b).catch(function(){});b.H||b.A.size||b.h.parseInbandPsshEnabled||b.C.o(b.m,"encrypted",function(d){return Zh(b,d)});H(c)})};
|
|
260
|
-
function ci(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=Cg([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.G.
|
|
260
|
+
function ci(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=Cg([a.g.serverCertificateUri],a.h.retryParameters);sa(g,3);c=a.G.jc.request(5,b);return G(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Gb(d.data);ua(g,4);break;case 3:throw e=va(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();
|
|
261
261
|
sa(g,6);return G(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=va(g),new T(2,6,6004,f.message);}})}function di(a,b){var c,d,e;return O(function(f){if(1==f.g)return G(f,ei(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.Db=new ng,d.push(e.Db);d.push(c.remove());return G(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
|
|
262
262
|
function bi(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.B(2);a.A.forEach(function(h,k){ei(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&&fi(a))return g.return(a.l);a.l=new ng;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,$h(a,f.initDataType,f.initData);gi(a)&&a.l.resolve();return g.return(a.l)})}
|
|
263
263
|
function $h(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(Eb(c,e.value.initData))return}0<a.i.size&&gi(a)&&(a.l.resolve(),a.l=new ng,a.l.catch(function(){}));hi(a,b,c,a.g.sessionType)}}function ii(a){a=a.i.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}
|
|
@@ -277,7 +277,7 @@ d.load(b),4);case 4:return g=m.h,Lg(a.j),g||(a.i.delete(d),h=a.h.persistentSessi
|
|
|
277
277
|
function hi(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.s(new T(2,6,6005,f.message));return}a.C.o(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.S?a.O.push(f):ai(a,f)});a.C.o(e,"keystatuseschange",function(f){return pi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Zg:Infinity,Db: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.s(b);return}a.h.logLicenseExchange&&Ic(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
|
|
278
278
|
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.s(new T(2,6,6006,f.message,f,h))}})}
|
|
279
279
|
function ai(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w;O(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&Ic(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=Cg([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]=
|
|
280
|
-
f.headers[h];if(Qb(a.g.keySystem)){var A=zc(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=eh(A,"PlayReadyKeyMessage");var y=oh(A,"HttpHeader");y=t(y);for(var C=y.next();!C.done;C=y.next()){var z=C.value;C=oh(z,"name")[0];z=oh(z,"value")[0];g.headers[lh(C)]=lh(z)}A=oh(A,"Challenge")[0];g.body=Jc(lh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();sa(v,2);m=a.G.
|
|
280
|
+
f.headers[h];if(Qb(a.g.keySystem)){var A=zc(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=eh(A,"PlayReadyKeyMessage");var y=oh(A,"HttpHeader");y=t(y);for(var C=y.next();!C.done;C=y.next()){var z=C.value;C=oh(z,"name")[0];z=oh(z,"value")[0];g.headers[lh(C)]=lh(z)}A=oh(A,"Challenge")[0];g.body=Jc(lh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();sa(v,2);m=a.G.jc.request(2,g);return G(v,m.promise,4);case 4:l=v.h;ua(v,3);break;case 2:n=va(v);if(a.j.g)return v.return();
|
|
281
281
|
p=new T(2,6,6007,n);1==a.i.size?(a.s(p),d&&d.Db&&d.Db.reject(p)):(d&&d.Db&&d.Db.reject(p),a.i.delete(c),gi(a)&&(a.l.resolve(),a.M.X(.1)));return v.return();case 3:if(a.j.g)return v.return();a.K+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Ic(l.data);sa(v,5);return G(v,c.update(l.data),7);case 7:ua(v,6);break;case 5:return r=va(v),u=new T(2,6,6008,r.message),a.s(u),d&&d.Db&&d.Db.reject(u),v.return();case 6:if(a.j.g)return v.return();w=new S("drmsessionupdate");a.G.onEvent(w);d&&(d.Db&&d.Db.resolve(),
|
|
282
282
|
ni(a,d));H(v)}})}
|
|
283
283
|
function pi(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(Qb(a.g.keySystem)&&16==g.byteLength&&(Zb()||kc())){h=Lb(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=Lc(g).slice(0,32);a.W.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Db&&(a.i.delete(b),b.close().catch(function(){}));gi(a)&&
|
|
@@ -401,9 +401,9 @@ function yk(a,b,c,d){return dk(a,b,function(){b!==Tc&&(xd()&&(a.j[b]&&(a.j[b].de
|
|
|
401
401
|
function zk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I,L;return O(function(J){switch(J.g){case 1:c=Vc;a.G=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.sa&&(a.i.autoplay=!1);ta(J,2);a.u.Za();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(We)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.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,
|
|
402
402
|
Promise.all(g),4);case 4:return a.j={},a.h={},v=a.m.duration,a.M=new ng,a.m=Oj(a,a.M),G(J,a.M,5);case 5:!isNaN(v)&&v?a.m.duration=v:!isNaN(a.ea)&&a.ea&&(a.m.duration=a.ea),A=new ng,y=a.m.sourceBuffers,C=b.size,z=0,B=function(){z++;z===C&&(A.resolve(),a.u.Pa(y,"addsourcebuffer",B))},a.u.o(y,"addsourcebuffer",B),D=t(b.keys()),F=D.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.s?(a.l[c.ia]=[],a.l[c.ua]=[]):a.l[I]=[];F=D.next();
|
|
403
403
|
J.B(6);break;case 2:wa(J),a.G=!1,Lg(a.K),a.u.ka(a.i,"canplaythrough",function(){a.K.g||(a.i.autoplay=e,f||a.i.play())}),xa(J,0)}})}function Ak(a,b){return vk(a,function(){return zk(a,b)})}
|
|
404
|
-
function tk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,v,A,y,C;return O(function(z){if(1==z.g){f=Vc;if(b==f.Ka)return z.return(!1);g=
|
|
404
|
+
function tk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,v,A,y,C;return O(function(z){if(1==z.g){f=Vc;if(b==f.Ka)return z.return(!1);g=Ee(Ke(a.I[b]));h=Je(a.I[b]);l=!1;m=ve(c,d);n=a.A.forceTransmux;if(!vd(m)||!a.C&&we.includes(m))n=!0;n&&(p=xe(c,d),r=pe(p))&&(k=r(),u=Rc(f.ia,(d||"").split(",")),w=Rc(f.ua,(d||"").split(",")),u&&w?(l=!0,v=w,b==f.ia&&(v=u),m=k.convertCodecs(b,xe(c,v))):m=k.convertCodecs(b,p));A=Ee(Ke(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]=
|
|
405
405
|
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);C=!0;if(a.s||l&&k&&!a.j[b])C=!1;if(C&&"smooth"===a.A.codecSwitchingStrategy&&xd())return G(z,yk(a,b,m,k),3);k&&k.destroy();return G(z,Ak(a,e),3)}return z.return(!0)})}
|
|
406
|
-
function Bk(a,b,c,d){if(b==Tc)var e=!1;else{e=
|
|
406
|
+
function Bk(a,b,c,d){if(b==Tc)var e=!1;else{e=Ee(Ke(a.I[b]));var f=Je(a.I[b]),g=ve(c,d),h=a.A.forceTransmux;if(!vd(g)||!a.C&&we.includes(g))h=!0;c=xe(c,d);h&&(h=pe(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Ee(Ke(g));g=Je(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!xd()||a.s:!1}var Qj=window.URL.createObjectURL,Uj="sequence";function Ck(a,b,c){this.i=a;this.A=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.C=0;this.I=!0;this.J=0;this.G=void 0===c?!0:c;this.H=0;this.u=!1;this.m=a}q=Ck.prototype;q.getDuration=function(){return this.j};q.zj=function(){return this.g};q.Ei=function(a){this.i=a};q.vb=function(a){this.j=a};q.Dj=function(){return this.i};q.Ai=function(a){this.C=a};q.Uc=function(a){this.I=a};q.Bf=function(a){this.s=a};q.$e=function(){return this.s};q.nh=function(a){this.A=a};q.qj=function(){return this.A};
|
|
407
407
|
q.oi=function(a,b){if(0!=a.length){var c=(Date.now()+this.C)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.uf(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.G&&!this.u&&(this.i=c-this.h-this.g)}}};
|
|
408
408
|
q.me=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.C)/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.uf(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.u&&(this.i=d-this.h-this.g)}};q.Aj=function(){return this.h};q.mf=function(){this.u=!0};q.ck=function(){return this.u};q.Ci=function(a){this.m=a};q.tj=function(){return this.m};
|
|
409
409
|
q.uf=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Xg=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.I};q.Nc=function(){return Infinity!=this.j&&!this.I};q.Hb=function(){return Math.max(this.J,this.tc()-this.s)};q.Hi=function(a){this.J=a};
|
|
@@ -421,19 +421,19 @@ function Tk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.
|
|
|
421
421
|
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.sc():g.g.Xb():0>h&&(h=g.g.Xb()+h);return Wk(g,Xk(g,h))});this.m=new Ub(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ok(g.h),k=g.g.sc(),l=g.g.Xb();3>l-k&&(k=l-3);h<k&&(h=Vk(g,h),g.i.currentTime=h)}})}q=Tk.prototype;q.dg=function(){this.m.wa(.25)};q.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(){}};
|
|
422
422
|
q.eg=function(a){Pk(this.h,a)};q.Oe=function(){var a=Ok(this.h);return 0<this.i.readyState&&!this.i.paused?Xk(this,a):a};q.Eh=function(){return this.s?this.s.s:0};q.Dh=function(){return this.j.G};q.ni=function(){this.j.$g()};function Wk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
423
423
|
function Vk(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.sc(),f=a.g.Xb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Zd(c),k=a.g.Zd(d);c=a.g.Zd(c+d);return b>=g?Wk(a,b):b>f?f:b<e?Pi(a.i.buffered,k)?k:c:b>=h||Pi(a.i.buffered,b)?b:c}function Xk(a,b){var c=a.g.sc();if(b<c)return c;a=a.g.Xb();return b>a?a:b}
|
|
424
|
-
function Uk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Dk(new Gk(a),b.stallThreshold,c);Fk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Yk(a){this.T=a;this.l=null;this.i=0;this.m=!1}q=Yk.prototype;q.getNumReferences=function(){return this.T.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.m||(this.T=[],this.l&&this.l.stop(),this.l=null)};q.jk=function(){this.m=!0};q.
|
|
424
|
+
function Uk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Dk(new Gk(a),b.stallThreshold,c);Fk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Yk(a){this.T=a;this.l=null;this.i=0;this.m=!1}q=Yk.prototype;q.getNumReferences=function(){return this.T.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.m||(this.T=[],this.l&&this.l.stop(),this.l=null)};q.jk=function(){this.m=!0};q.ec=function(a){for(var b=t(this.T),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
425
425
|
q.find=function(a){for(var b=this.T.length-1,c=b;0<=c;--c){var d=this.T[c],e=c<b?this.T[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.T.length&&a<this.T[0].startTime?this.i:null};q.get=function(a){if(0==this.T.length)return null;a-=this.i;return 0>a||a>=this.T.length?null:this.T[a]};q.offset=function(a){if(!this.m)for(var b=t(this.T),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
426
426
|
q.qf=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.T=this.T.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.T.push.apply(this.T,x(a))}};q.ke=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.T.length||d.endTime>c.T[0].startTime)});this.qf(a);this.hb(b)};q.hb=function(a){if(!this.m){var b=this.T.length;this.T=this.T.filter(function(c){return c.endTime>a});this.i+=b-this.T.length}};
|
|
427
427
|
q.ed=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.T.length;)if(this.T[this.T.length-1].startTime>=b)this.T.pop();else break;for(;this.T.length;)if(this.T[0].endTime<=a)this.T.shift(),c||this.i++;else break;0!=this.T.length&&(a=this.T[this.T.length-1],b=new Ji(a.startTime,b,a.G,a.$a,a.Ja,a.ma,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.T[this.T.length-1]=b)}};
|
|
428
|
-
q.Ff=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Ub(function(){var d=b();d?c.T.push.apply(c.T,x(d)):(c.l.stop(),c.l=null)}),this.l.wa(a))};Yk.prototype[Symbol.iterator]=function(){return this.
|
|
429
|
-
Yk.prototype.
|
|
430
|
-
Q("shaka.media.SegmentIndex",Yk);Yk.forSingleSegment=$k;Yk.prototype.getIteratorForTime=Yk.prototype.
|
|
428
|
+
q.Ff=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new Ub(function(){var d=b();d?c.T.push.apply(c.T,x(d)):(c.l.stop(),c.l=null)}),this.l.wa(a))};Yk.prototype[Symbol.iterator]=function(){return this.fc(0)};
|
|
429
|
+
Yk.prototype.fc=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 Sa("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Zk(this,d,f,c)};function $k(a,b,c){a=new Ji(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Yk([a])}
|
|
430
|
+
Q("shaka.media.SegmentIndex",Yk);Yk.forSingleSegment=$k;Yk.prototype.getIteratorForTime=Yk.prototype.fc;Yk.prototype.updateEvery=Yk.prototype.Ff;Yk.prototype.fit=Yk.prototype.ed;Yk.prototype.evict=Yk.prototype.hb;Yk.prototype.mergeAndEvict=Yk.prototype.ke;Yk.prototype.offset=Yk.prototype.offset;Yk.prototype.get=Yk.prototype.get;Yk.prototype.find=Yk.prototype.find;Yk.prototype.markImmutable=Yk.prototype.jk;Yk.prototype.release=Yk.prototype.release;Yk.prototype.getNumEvicted=Yk.prototype.getNumEvicted;
|
|
431
431
|
Yk.prototype.getNumReferences=Yk.prototype.getNumReferences;function Zk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Zk.prototype.xd=function(a){this.reverse=a};Zk.prototype.dj=function(){return this.h};Zk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.s&&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};
|
|
432
432
|
Zk.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.s&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};Q("shaka.media.SegmentIterator",Zk);Zk.prototype.next=Zk.prototype.next;Zk.prototype.current=Zk.prototype.current;Zk.prototype.currentPosition=Zk.prototype.dj;
|
|
433
|
-
Zk.prototype.setReverse=Zk.prototype.xd;function al(){Yk.call(this,[]);this.g=[]}oa(al,Yk);q=al.prototype;q.clone=function(){var a=new al;a.g=this.g.slice();return a};q.release=function(){for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};q.
|
|
433
|
+
Zk.prototype.setReverse=Zk.prototype.xd;function al(){Yk.call(this,[]);this.g=[]}oa(al,Yk);q=al.prototype;q.clone=function(){var a=new al;a.g=this.g.slice();return a};q.release=function(){for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};q.ec=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.ec(a)};q.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};
|
|
434
434
|
q.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};q.offset=function(){};q.qf=function(){};q.hb=function(){};q.ke=function(){};q.ed=function(){};q.Ff=function(){};Q("shaka.media.MetaSegmentIndex",al);al.prototype.updateEvery=al.prototype.Ff;al.prototype.fit=al.prototype.ed;al.prototype.mergeAndEvict=al.prototype.ke;al.prototype.evict=al.prototype.hb;al.prototype.merge=al.prototype.qf;
|
|
435
|
-
al.prototype.offset=al.prototype.offset;al.prototype.get=al.prototype.get;al.prototype.find=al.prototype.find;al.prototype.forEachTopLevelReference=al.prototype.
|
|
436
|
-
function nl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.
|
|
435
|
+
al.prototype.offset=al.prototype.offset;al.prototype.get=al.prototype.get;al.prototype.find=al.prototype.find;al.prototype.forEachTopLevelReference=al.prototype.ec;al.prototype.release=al.prototype.release;function bl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ze();this.h=new Ub(function(){b.g.mi(.25*b.i)})}bl.prototype.release=function(){this.set(this.Jc());this.h&&(this.h.stop(),this.h=null);this.g=null};bl.prototype.set=function(a){this.i=a;cl(this)};bl.prototype.Jc=function(){return this.g.Jc()};function cl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ze()!=b&&a.g.rh(b);return}catch(c){}a.h.wa(.25);0!=a.g.Ze()&&a.g.rh(0)};function dl(a){var b=this;this.h=a;this.g=new Set;this.i=(new Ub(function(){el(b,!1)})).wa(.25)}dl.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 el(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function fl(){this.g=null;this.h=[]}function gl(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 hl(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 il(){this.i=this.h=null;this.g=[]}function jl(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 kl(){this.Pe=this.ii=this.A=this.C=this.K=this.G=this.u=this.j=this.J=this.m=this.i=this.S=this.W=this.M=this.O=this.P=this.l=this.s=NaN;this.L=0;this.H=this.I=NaN;this.g=new fl;this.h=new il};function ll(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.s=d}function ml(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
436
|
+
function nl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.fc(b,!0,a.s)),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.Ja&&(c=!1);2==b.uc()&&(c=!1);c&&b.ma&&ol(a,b.ma);c&&!a.h.has(b)&&(c=new pl(a.l),ql(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.pe&&b.kf)break}rl(a)}}function ol(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Ii(d,b)})){var c=new pl(a.l);ql(c,b,a.i);a.j.set(b,c)}}
|
|
437
437
|
function sl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&tl(a,c)}function ul(a){sl(a,a.h);sl(a,a.j);a.g=null}ll.prototype.hb=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&&tl(this,d);b&&rl(this)};ll.prototype.xd=function(a){this.s=a;this.g&&this.g.xd(a)};
|
|
438
438
|
function rl(a){for(var b=Array.from(a.h.keys()),c={},d=t(a.j.keys()),e=d.next();!e.done;c={Fe:c.Fe},e=d.next())c.Fe=e.value,b.some(function(f){return function(g){return Ii(g.ma,f.Fe)}}(c))||tl(a,c.Fe)}function vl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&tl(a,d)}rl(a)}function wl(a,b){b&&b!==a.i&&(ul(a),a.i=b)}function tl(a,b){var c=a.h;b instanceof Hi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function pl(a){this.g=a;this.wf=this.vh=null}
|
|
439
439
|
function ql(a,b,c){var d=new Uint8Array(0);a.wf=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Mc(d,e):d=e,a.vh?G(f,a.vh(d),3):f.B(0);d=new Uint8Array(0);H(f)})})}pl.prototype.abort=function(){this.wf&&this.wf.abort()};function xl(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Ub(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).wa(2)}oa(xl,fb);xl.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function yl(a){fb.call(this);this.g=new Map;this.h=a}oa(yl,fb);yl.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function zl(a,b){var c=a.g.get(b);c||(c={se:[],pg:null,contentType:b},a.g.set(b,c));return c}function Al(a,b,c){var d=zl(a,b.contentType);Bl(a,d);a={od:b,position:c};d=d.se;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
@@ -441,7 +441,7 @@ yl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.n
|
|
|
441
441
|
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&&!Qd(d.roles,e.roles);(g||h||d)&&Cl(this,a,e.contentType)&&(c.pg=e,d=new S("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Cl(this,a,e.contentType)&&(c.pg=e,JSON.stringify(e),c=new S("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
|
|
442
442
|
function Cl(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 Bl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.se;b.se=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.se=[]}
|
|
443
443
|
function Dl(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=
|
|
444
|
-
a.language);return b};function El(a){var b=Je(a),c=b.split("/")[0];a=
|
|
444
|
+
a.language);return b};function El(a){var b=Je(a),c=b.split("/")[0];a=Ke(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Ae:null,colorGamut:null}}
|
|
445
445
|
function Fl(a,b){function c(z){v=z.name;var B=z.reader;B.skip(24);var D=B.za(),F=B.za();B.skip(50);n=String(D);m=String(F);z.reader.Ea()&&Wg(z)}function d(z){var B=dj(z.reader);p=B.channelCount;r=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");
|
|
446
446
|
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,r=null,u=null,w=null,v;(new Rg).box("moov",Wg).box("trak",Wg).box("mdia",Wg).Z("mdhd",function(z){l=bj(z.reader,z.version).language}).box("minf",Wg).box("stbl",Wg).Z("stsd",Yg).box("mp4a",function(z){var B=dj(z.reader);p=B.channelCount;r=B.sampleRate;z.reader.Ea()?Wg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
|
|
447
447
|
"mp4a",D,F;z.Ea();){D=z.$();for(var I=z.$();I&128;)I=z.$();if(3==D)z.za(),I=z.$(),I&128&&z.za(),I&64&&z.skip(z.$()),I&32&&z.za();else if(4==D)F=z.$(),z.skip(12);else if(5==D)break}F&&(B+="."+gj(F),5==D&&z.Ea()&&(D=z.$(),F=(D&248)>>3,31===F&&z.Ea()&&(F=32+((D&7)<<3)+((z.$()&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",
|
|
@@ -450,7 +450,7 @@ gj(E,!0));B+="."+J+D;F="";for(I=z.length;I--;)if((J=z[I])||F)F="."+J.toString(16
|
|
|
450
450
|
"dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var D=z.reader;D.skip(2);z=D.$();D=D.$();g.push(B+"."+hj(z>>1&127)+"."+hj(z<<5&32|D>>3&31));k=!0}).Z("vpcC",function(z){var B=v||"",D=z.reader;z=D.$();var F=D.$();D=D.$()>>4&15;g.push(B+"."+hj(z)+"."+hj(F)+"."+hj(D));k=!0}).box("av1C",function(z){var B=v||"";switch(v){case "dav1":B="av01"}var D=z.reader;D.skip(1);z=D.$();D=D.$();var F=z>>>5,I=(D&64)>>6;g.push(B+"."+F+"."+hj(z&31)+(D>>>7?"H":"M")+"."+hj(2===F&&I?(D&32)>>5?12:10:I?10:8)+"."+
|
|
451
451
|
((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+hj(1)+"."+hj(1)+"."+hj(1)+".0");k=!0}).box("enca",$g).box("encv",Zg).box("sinf",Wg).box("frma",function(z){z=ej(z.reader).gb;e(z)}).box("colr",function(z){g=g.map(function(F){if(F.startsWith("av01.")){var I=z.reader,L=I.La(),J=I.Rb(4);var E=String.fromCharCode(J[0]);E+=String.fromCharCode(J[1]);E+=String.fromCharCode(J[2]);E+=String.fromCharCode(J[3]);if("nclx"===E){J=I.za();E=I.za();var K=I.za(),N=I.$()>>7,M=F.split(".");10==M.length&&(M[6]=hj(J),M[7]=
|
|
452
452
|
hj(E),M[8]=hj(K),M[9]=String(N),F=M.join("."))}I.seek(L)}return F});var B=fj(z.reader),D=B.colorGamut;u=B.Ae;w=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var C=new Gd("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);C.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:Gl(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:y,Ae:u,colorGamut:w}}
|
|
453
|
-
function Gl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=
|
|
453
|
+
function Gl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Ee(d);b.has(e)||(c.push(d),b.add(e))}b=Uc("audio",c);d=Uc("video",c);a=Uc(Tc,c);d=Hl(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}function Hl(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?vd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
454
454
|
function Il(a){var b=null;(new Rg).box("moov",Wg).box("trak",Wg).box("mdia",Wg).box("minf",Wg).box("stbl",Wg).Z("stsd",Yg).box("encv",Zg).box("enca",$g).box("sinf",Wg).box("schi",Wg).Z("tenc",function(c){c=c.reader;c.$();c.$();c.$();c.$();b=Lc(c.Rb(16))}).parse(a,!0);return b}
|
|
455
455
|
function Jl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.B(2):G(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Gb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Kl(a,b,c,d,e){a=Cg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Ll(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.C=1;this.u=this.j=null;this.J=0;this.H=!1;this.i=new Map;this.G=!1;this.K=null;this.A=!1;this.m=new Kg(function(){return Ml(c)});this.L=Date.now()/1E3;this.s=new Map;this.I={projection:null,hfov:null};this.O=0;this.M=Infinity}q=Ll.prototype;q.destroy=function(){return this.m.destroy()};
|
|
456
456
|
function Ml(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Nl(e),b.push(Ol(e)),e.ba&&(ul(e.ba),e.ba=null);f=t(a.s.values());for(g=f.next();!g.done;g=f.next())h=g.value,ul(h);return G(k,Promise.all(b),2)}a.i.clear();a.s.clear();a.g=null;a.l=null;a.h=null;H(k)})}
|
|
@@ -466,31 +466,31 @@ f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.Cb.h.g>h?
|
|
|
466
466
|
q.we=function(){if(this.g)for(var a=this.g.Ye(),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.oa;e.G?e=!1:d==Tc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Yj(e,d),e=Pi(e,a));if(!e){c.ba&&(c.ba.g=null);if("audio"===c.type){e=t(this.s.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.va=null;(null!=Zj(this.g.oa,d)||c.jb)&&cm(this,c);c.Cb&&(c.Cb.abort(),c.Cb=null);d===Tc&&(d=this.g.oa,d.J&&d.J.g());c.we=!0}}};
|
|
467
467
|
function cm(a,b){b.Td||b.Bc||(b.jb?(b.Bc=!0,b.Te=0):null==Xj(a.g.oa,b.type)?null==b.Tb&&Vl(a,b,0):(Nl(b),am(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
468
468
|
function Sl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Vc;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.ia,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ua,a.j.video),e.add(a.j.video));a.u&&(d.set(c.Ka,a.u),e.add(a.u));f=a.g.oa;return G(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Lg(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=Ul(a,l),b.has(l.id)&&(n=
|
|
469
|
-
b.get(l.id),ml(n,function(r,u,w){return dm(r,u,w||null,a.h.retryParameters,a.g.
|
|
470
|
-
function Pl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Tc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Tc&&a.h.disableTextPrefetch)return null;if(a.s.has(b))return a.s.get(b);var c=a.i.get(b.type);return(c=c&&c.ba)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new ll(a.h.segmentPrefetchLimit,b,function(d,e,f){return dm(d,e,f||null,a.h.retryParameters,a.g.
|
|
469
|
+
b.get(l.id),ml(n,function(r,u,w){return dm(r,u,w||null,a.h.retryParameters,a.g.jc)}),m.ba=n),a.i.set(k,m),Vl(a,m,0));H(p)})}function Ul(a,b){return{stream:b,type:b.type,va:null,ba:Pl(a,b),sb:null,nd:null,lf:null,jf:null,hf:null,Tc:null,endOfStream:!1,jb:!1,Tb:null,Bc:!1,Te:0,If:!1,Td:!1,we:!0,fh:!1,be:!1,Cb:null}}
|
|
470
|
+
function Pl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Tc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Tc&&a.h.disableTextPrefetch)return null;if(a.s.has(b))return a.s.get(b);var c=a.i.get(b.type);return(c=c&&c.ba)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new ll(a.h.segmentPrefetchLimit,b,function(d,e,f){return dm(d,e,f||null,a.h.retryParameters,a.g.jc)},0>a.g.Ua()):null}
|
|
471
471
|
function Ql(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=t(a.l.variants),f=e.next();!f.done;d={kb:d.kb},f=e.next())if(d.kb=f.value,d.kb.audio)if(a.s.has(d.kb.audio)){if(f=a.s.get(d.kb.audio),vl(f,b),!(0<b&&c.some(function(h){return function(k){return Zc(h.kb.audio.language,k)}}(d)))){var g=a.i.get(d.kb.audio.type);f!==(g&&g.ba)&&ul(f);a.s.delete(d.kb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Zc(h.kb.audio.language,k)}}(d))||!(f=Pl(a,d.kb.audio))||
|
|
472
472
|
(d.kb.audio.segmentIndex||d.kb.audio.createSegmentIndex(),a.s.set(d.kb.audio,f))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.oa.vb(a):this.g.oa.vb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
473
473
|
function em(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Lg(a.m);if(b.jb||null==b.Tb||b.Td)return k.return();b.Tb=null;if(!b.Bc){k.B(2);break}return G(k,am(a,b,b.If,b.Te),3);case 3:return k.return();case 2:if(b.stream.segmentIndex){k.B(4);break}c=b.stream;sa(k,5);return G(k,b.stream.createSegmentIndex(),7);case 7:ua(k,6);break;case 5:return d=va(k),G(k,fm(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.jb||b.Tb||Vl(a,b,0),
|
|
474
474
|
k.return();case 4:sa(k,9);e=gm(a,b);null!=e&&(Vl(a,b,e),b.be=!1);ua(k,10);break;case 9:return f=va(k),G(k,fm(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.G||!g.every(function(l){return l.endOfStream})){k.B(0);break}return G(k,a.g.oa.endOfStream(),13);case 13:Lg(a.m),h=a.g.oa.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.vb(h),H(k)}})}
|
|
475
475
|
function gm(a,b){if(hm(b))return hk(a.g.oa,b.stream.originalId||""),null;b.type==Tc&&ik(a.g.oa);if(!a.g.oa.xa&&b.type!=Tc)return a.h.updateIntervalSeconds/2;var c=a.g.Ye();if("audio"===b.type)for(var d=t(a.s.keys()),e=d.next();!e.done;e=d.next())e=a.s.get(e.value),e.hb(c,!0),nl(e,c);d=b.sb?b.sb.endTime:c;e=ak(a.g.oa,b.type,c);var f=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C),g=a.l.presentationTimeline.getDuration()-d,h=Zj(a.g.oa,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
476
476
|
!0,"video"==b.type&&(a=a.i.get(Tc))&&hm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=im(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,hm(h)||h.va&&!h.va.current()||(f=Math.min(f,h.sb?h.sb.endTime:c));if(d>=f+a.l.presentationTimeline.g)return a.h.updateIntervalSeconds;b.ba&&b.va&&!a.s.has(b.stream)&&(b.ba.hb(e.startTime),nl(b.ba,e.startTime));jm(a,b,c,e).catch(function(){});
|
|
477
|
-
return null}function im(a,b,c,d){if(b.va)return b.va.current();if(b.sb||d)return b.va=b.stream.segmentIndex.
|
|
477
|
+
return null}function im(a,b,c,d){if(b.va)return b.va.current();if(b.sb||d)return b.va=b.stream.segmentIndex.fc(b.sb?b.sb.endTime:d,!1,0>a.g.Ua()),b.va&&b.va.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Ua();var f=null;d&&(b.va=b.stream.segmentIndex.fc(e,!1,a),f=b.va&&b.va.next().value);f||(b.va=b.stream.segmentIndex.fc(c,!1,a),f=b.va&&b.va.next().value);return f}
|
|
478
478
|
function jm(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z;return O(function(B){switch(B.g){case 1:e=Vc;f=b.stream;g=b.va;b.jb=!0;sa(B,2);if(2==d.uc())throw new T(1,1,1011);return G(B,km(a,b,d),4);case 4:Lg(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=r=!1,v=function(D){var F,I,L,J;return O(function(E){switch(E.g){case 1:if(r)return E.return();
|
|
479
479
|
u=!0;Lg(a.m);if(a.A)return E.return();sa(E,2);p=lm(p,D);F=!1;I=0;(new Rg).box("mdat",function(K){I=K.size+K.start;F=!0}).parse(p,!1,!0);if(!F){E.B(4);break}L=p.subarray(0,I);p=p.subarray(I);return G(E,mm(a,b,c,f,d,L,!0),5);case 5:b.ba&&b.va&&nl(b.ba,d.startTime,!0);case 4:ua(E,0);break;case 2:w=J=va(E),H(E)}})},G(B,nm(a,b,d,v),9);m=nm(a,b,d);return G(B,m,7);case 7:n=B.h;Lg(a.m);if(a.A)return B.return();Lg(a.m);return b.Bc?(b.jb=!1,Vl(a,b,0),B.return()):G(B,mm(a,b,c,f,d,n),6);case 9:A=B.h;if(w)throw w;
|
|
480
480
|
if(u){B.B(10);break}r=!0;Lg(a.m);return a.A?B.return():b.Bc?(b.jb=!1,Vl(a,b,0),B.return()):G(B,mm(a,b,c,f,d,A),10);case 10:b.ba&&b.va&&nl(b.ba,d.startTime,!0);case 6:Lg(a.m);if(a.A)return B.return();b.sb=d;g.next();b.jb=!1;b.fh=!1;y=a.g.oa.Wb();C=y[b.type];bb(JSON.stringify(C));b.Bc||a.g.$g(d,b.stream);Vl(a,b,0);ua(B,0);break;case 2:z=va(B);Lg(a.m,z);if(a.A)return B.return();b.jb=!1;if(7001==z.code)b.jb=!1,Nl(b),Vl(a,b,0),B.B(0);else if(b.type==e.Ka&&a.h.ignoreTextStreamFailures)a.i.delete(e.Ka),
|
|
481
481
|
B.B(0);else if(3017==z.code)om(a,b,z),B.B(0);else return b.be=!0,1==z.category&&b.ba&&tl(b.ba,d),z.severity=2,G(B,fm(a,b,z),0)}})}function lm(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function om(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.fh})){if(a.g.disableStream(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.be=!0;a.A=!0;a.g.onError(c);return}b.fh=!0}Vl(a,b,4)}
|
|
482
|
-
function km(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(w){switch(w.g){case 1:d=Vc;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.O)-.1);g=Math.min(c.appendWindowEnd,a.M)+.01;h=
|
|
482
|
+
function km(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(w){switch(w.g){case 1:d=Vc;e=[];f=Math.max(0,Math.max(c.appendWindowStart,a.O)-.1);g=Math.min(c.appendWindowEnd,a.M)+.01;h=Ee(c.codecs||b.stream.codecs);k=Je(c.mimeType||b.stream.mimeType);l=c.timestampOffset;if(l==b.lf&&f==b.jf&&g==b.hf&&h==b.Tg&&k==b.Ug){w.B(2);break}m=b.Tg&&b.Ug&&Bk(a.g.oa,b.type,k,h);if(!m){w.B(3);break}n=null;b.type===d.ua?n=a.i.get(d.ia):b.type===d.ia&&(n=a.i.get(d.ua));if(!n){w.B(3);break}return G(w,Ol(n).catch(function(){}),
|
|
483
483
|
5);case 5:n.nd=null,cm(a,n);case 3:return G(w,pm(a,b,l,f,g,c,h,k),2);case 2:return Ii(c.ma,b.nd)||(b.nd=c.ma,c.l&&c.ma&&(p=nm(a,b,c.ma),r=function(){var v,A,y,C,z,B,D;return O(function(F){switch(F.g){case 1:return sa(F,2),G(F,p,4);case 4:return v=F.h,Lg(a.m),A=null,y=new Map,C={projection:null,hfov:null},z=new Rg,z.box("moov",Wg).box("trak",Wg).box("mdia",Wg).Z("mdhd",function(I){A=bj(I.reader,I.version).timescale}).box("hdlr",function(I){I=I.reader;I.skip(8);switch(I.Rc()){case "soun":y.set(d.ia,
|
|
484
484
|
A);break;case "vide":y.set(d.ua,A)}A=null}).box("minf",Wg).box("stbl",Wg).Z("stsd",Yg).box("encv",Zg).box("avc1",Zg).box("avc3",Zg).box("hev1",Zg).box("hvc1",Zg).box("dvav",Zg).box("dva1",Zg).box("dvh1",Zg).box("dvhe",Zg).box("vexu",Wg).box("proj",Wg).Z("prji",function(I){I=I.reader.Rc();C.projection=I}).box("hfov",function(I){I=I.reader.V()/1E3;C.hfov=I}).parse(v),qm(a,C),y.has(b.type)?c.ma.timescale=y.get(b.type):null!=A&&(c.ma.timescale=A),B=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,
|
|
485
485
|
G(F,a.g.Jh(b.type,v),5);case 5:return G(F,ck(a.g.oa,b.type,v,null,b.stream,B),6);case 6:ua(F,0);break;case 2:throw D=va(F),b.nd=null,D;}})},a.g.lk(c.startTime,c.ma),e.push(r()))),a.l.sequenceMode&&(u=b.sb?b.sb.i:null,c.i!=u&&e.push(uk(a.g.oa,b.type,c.startTime))),G(w,Promise.all(e),0)}})}
|
|
486
486
|
function pm(a,b,c,d,e,f,g,h){var k,l,m,n;return O(function(p){if(1==p.g)return k=Vc,l=new Map,a.j.audio&&l.set(k.ia,a.j.audio),a.j.video&&l.set(k.ua,a.j.video),sa(p,2),b.jf=d,b.hf=e,g&&(b.Tg=g),h&&(b.Ug=h),b.lf=c,m=a.l.sequenceMode||"HLS"==a.l.type,G(p,sk(a.g.oa,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return ua(p,0);n=va(p);b.jf=null;b.hf=null;b.Tg=null;b.Ug=null;b.lf=null;throw n;})}
|
|
487
487
|
function mm(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,p,r,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.H;n="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;p=null;e.ma&&(p=e.ma.timescale);r=n&&p&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(l||m||r)k=new Rg;l&&k.Z("emsg",function(A){var y=d.emsgSchemeIdUris;if(0===A.version){var C=
|
|
488
|
-
A.reader.Rc();var z=A.reader.Rc();var B=A.reader.V();var D=A.reader.V();var F=A.reader.V();var I=A.reader.V();var L=e.startTime+D/B}else B=A.reader.V(),L=A.reader.td()/B+e.timestampOffset,D=L-e.startTime,F=A.reader.V(),I=A.reader.V(),C=A.reader.Rc(),z=A.reader.Rc();A=A.reader.Rb(A.reader.getLength()-A.reader.La());if(y&&y.includes(C)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==C)a.g.nk();else if(y=(new Map).set("detail",{startTime:L,endTime:
|
|
489
|
-
eventDuration:F,id:I,messageData:A}),
|
|
490
|
-
|
|
491
|
-
|
|
488
|
+
A.reader.Rc();var z=A.reader.Rc();var B=A.reader.V();var D=A.reader.V();var F=A.reader.V();var I=A.reader.V();var L=e.startTime+D/B}else B=A.reader.V(),L=A.reader.td()/B+e.timestampOffset,D=L-e.startTime,F=A.reader.V(),I=A.reader.V(),C=A.reader.Rc(),z=A.reader.Rc();A=A.reader.Rb(A.reader.getLength()-A.reader.La());if(y&&y.includes(C)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==C)a.g.nk();else if(y=L+F/B,B=(new Map).set("detail",{startTime:L,endTime:y,schemeIdUri:C,value:z,timescale:B,
|
|
489
|
+
presentationTimeDelta:D,eventDuration:F,id:I,messageData:A}),B=new S("emsg",B),B.cancelable=!0,a.g.onEvent(B),!B.defaultPrevented&&("https://aomedia.org/emsg/ID3"==C||"https://developer.apple.com/streaming/emsg-id3"==C)&&(C=Yi(A),C.length))a.g.onMetadata([{cueTime:L,data:A,frames:C,dts:L,pts:L}],0,y)});m&&k.Z("prft",function(A){if(!a.H&&e.ma.timescale){var y=A.reader,C=A.version;y.V();A=y.V();var z=y.V();A=1E3*A+z/Math.pow(2,32)*1E3;0===C?y=y.V():(C=y.V(),y=y.V(),y=C*Math.pow(2,32)+y);A=(new Date((new Date(Date.UTC(1900,
|
|
490
|
+
0,1,0,0,0))).getTime()+A)).getTime();y=(new Map).set("detail",{wallClockTime:A,programStartDate:new Date(A-y/e.ma.timescale*1E3)});y=new S("prft",y);a.g.onEvent(y);a.H=!0}});r&&k.box("moof",Wg).box("traf",Wg).Z("tfdt",function(A){var y,C,z,B,D,F;return O(function(I){y=aj(A.reader,A.version);C=y.baseMediaDecodeTime;if(!C)return I.return();z=-C/p;B=Number(b.lf)||0;if(!(B<z))return I.B(0);D=b.jf;F=b.hf;return G(I,pm(a,b,z,D,F,e),0)})});(l||m||r)&&k.parse(f,!1,g);return G(v,rm(a,b,c),2);case 2:return Lg(a.m),
|
|
491
|
+
u=b.we,b.we=!1,w=b.Gh,b.Gh=!1,G(v,a.g.Jh(b.type,f),3);case 3:return G(v,ck(a.g.oa,b.type,f,e,d,h,u,w,g),4);case 4:Lg(a.m),H(v)}})}function rm(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.oa,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.oa.remove(b.type,e,e+g),2)}Lg(a.m);H(h)})}
|
|
492
492
|
function hm(a){return a&&a.type==Tc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
493
|
-
function nm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.$d())return l.return(e);f=null;if(b.ba){var m=b.ba,n=m.h;c instanceof Hi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.vh=d),f=m.wf):f=null}f||(f=dm(c,b.stream,d||null,a.h.retryParameters,a.g.
|
|
493
|
+
function nm(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.$d())return l.return(e);f=null;if(b.ba){var m=b.ba,n=m.h;c instanceof Hi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.vh=d),f=m.wf):f=null}f||(f=dm(c,b.stream,d||null,a.h.retryParameters,a.g.jc));g=0;b.va&&(g=b.va.h);b.Cb=f;return G(l,f.promise,2);case 2:h=l.h;b.Cb=null;k=h.data;if(!c.aesKey){l.B(3);break}return G(l,Jl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
494
494
|
function dm(a,b,c,d,e){var f=a instanceof Ji?a:void 0,g=f?1:0;a=Kl(a.R(),a.$a,a.Ja,d,c);a.contentType=b.type;return e.request(Ig,a,{type:g,stream:b,segment:f})}
|
|
495
495
|
function am(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Bc=!1,b.If=!1,b.Te=0,b.Td=!0,b.sb=null,b.va=null,b.ba&&!a.s.has(b.stream)&&ul(b.ba),d?(e=a.g.Ye(),f=a.g.oa.getDuration(),G(g,a.g.oa.remove(b.type,e+d,f),3)):G(g,rk(a.g.oa,b.type),4);if(3!=g.g)return Lg(a.m),c?G(g,a.g.oa.flush(b.type),3):g.B(3);Lg(a.m);b.Td=!1;b.endOfStream=!1;b.jb||b.Tb||Vl(a,b,0);H(g)})}
|
|
496
496
|
function Vl(a,b,c){var d=b.type;if(d!=Tc||a.i.has(d))b.Tb=(new Tb(function(){var e;return O(function(f){if(1==f.g)return sa(f,2),G(f,em(a,b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function Nl(a){null!=a.Tb&&(a.Tb.stop(),a.Tb=null)}function Ol(a){return O(function(b){return a.Cb?G(b,a.Cb.abort(),0):b.B(0)})}
|
|
@@ -500,7 +500,7 @@ function qm(a,b){if(a.I.projection!=b.projection||a.I.hfov!=b.hfov){if(null!=b.p
|
|
|
500
500
|
function um(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]=Ye(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ye(n)),m=um(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?(Sa("Invalid config, wrong type for "+m),
|
|
501
501
|
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&Ua("Unexpected number of arguments for "+m),a[l]=b[l]):(Sa("Invalid config, unrecognized key "+m),k=!1)}return k}function vm(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 wm(a,b){return a&&b}
|
|
502
502
|
function xm(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]=
|
|
503
|
-
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}Q("shaka.util.ConfigUtils",tm);tm.getDifferenceFromConfigObjects=xm;tm.convertToConfigObject=vm;tm.mergeConfigObjects=um;function ym(){}function zm(a){a=Bc(a);return(new lb(a)).
|
|
503
|
+
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}Q("shaka.util.ConfigUtils",tm);tm.getDifferenceFromConfigObjects=xm;tm.convertToConfigObject=vm;tm.mergeConfigObjects=um;function ym(){}function zm(a){a=Bc(a);return(new lb(a)).dc}function Am(a,b,c){function d(h){Lb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Gb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Dc(b,!0):e=b;a=Bc(a);a=Dc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Bm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Bc(a).split("skd://").pop();return Am(a,c,b)}
|
|
504
504
|
function Cm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}Q("shaka.util.FairPlayUtils",ym);ym.commonFairPlayResponse=function(a,b){if(2===a){try{var c=yc(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=Hb(Jc(c)))}};ym.expressplayFairPlayRequest=function(a,b){Cm(a,b)};
|
|
505
505
|
ym.conaxFairPlayRequest=function(a,b){Cm(a,b)};ym.ezdrmFairPlayRequest=function(a,b){Cm(a,b)};ym.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Gb(b.body),a=Ic(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Cc("spc="+a))};ym.expressplayInitDataTransform=function(a,b,c){return Bm(a,b,c)};
|
|
506
506
|
ym.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Bc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Jb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Am(a,d,b)};ym.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Bc(a).split(";").pop();return Am(a,c,b)};ym.verimatrixInitDataTransform=function(a,b,c){return Bm(a,b,c)};ym.initDataTransform=Am;
|
|
@@ -529,7 +529,7 @@ q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(n
|
|
|
529
529
|
function Sm(a){var b,c,d,e,f;return O(function(g){if(1==g.g){Wm(a,"manifest-parser");a.j||(a.H=Bi(a.M,a.S),a.j=a.H(),a.j.configure(a.g.manifest));b=Date.now()/1E3;Wm(a,"manifest");if(a.h)return g.B(2);c=a;return G(g,a.j.start(a.M,a.Xa),3)}2!=g.g&&(c.h=g.h);d=new S("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new T(2,4,4036);Xm(a.h);e=Date.now()/1E3;f=e-b;a.W.J=f;H(g)})}
|
|
530
530
|
function Um(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Wm(a,"drm-engine");a.sa=Date.now()/1E3;a.l=a.Ia();a.G.g=a.l;a.l.configure(a.g.drm);var h=a.G;b=ef(a.h.variants,h.h.restrictions,h.i);if(!b){g.B(2);break}c=new S("trackschanged",void 0);return G(g,Promise.resolve(),3);case 3:Tm(a),a.dispatchEvent(c);case 2:return d=Gf(a.h.variants),G(g,Rh(a.l,d,a.h.offlineSessionIds),4);case 4:return Tm(a),G(g,vi(a.G,a.h),5);case 5:e=g.h;if(!e){g.B(0);break}f=new S("trackschanged",void 0);return G(g,
|
|
531
531
|
Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}q.configure=function(a,b){a=vm(a,b);Im(this.g,a)};q.getConfiguration=function(){return Ye(this.g)};
|
|
532
|
-
function Vm(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 ll(d,b,function(l,m,n){return dm(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.L.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.A||0;(h=(g=b.segmentIndex.
|
|
532
|
+
function Vm(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 ll(d,b,function(l,m,n){return dm(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.L.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.A||0;(h=(g=b.segmentIndex.fc(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ma&&ol(e,h.ma):nl(e,h.startTime));H(k)})}q.Yk=function(){return this.m};
|
|
533
533
|
q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.u=!0;if(!a.j||a.ea){e.B(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.Y){e.B(4);break}return G(e,a.i.stop(),4);case 4:a.I&&!a.qa&&a.I.release();if(!a.l||a.aa){e.B(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.L.size&&!a.ra)for(b=t(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,ul(d);H(e)}})};
|
|
534
534
|
function Xm(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))}Q("shaka.media.PreloadManager",Jm);Jm.prototype.destroy=Jm.prototype.destroy;Jm.prototype.waitForFinish=Jm.prototype.Yk;function Ym(a,b){fb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Yc:null,Xc:Zm,Lc:function(d,e){return $m(c,"enter",d,e)}},{Yc:an,Xc:Zm,Lc:function(d,e){return $m(c,"enter",d,e)}},{Yc:bn,Xc:Zm,Lc:function(d,e){return $m(c,"enter",d,e)}},{Yc:Zm,Xc:an,Lc:function(d,e){return $m(c,"exit",d,e)}},{Yc:Zm,Xc:bn,Lc:function(d,e){return $m(c,"exit",d,e)}},{Yc:an,Xc:bn,Lc:function(d,e){return $m(c,"skip",d,e)}},{Yc:bn,Xc:an,Lc:function(d,e){return $m(c,"skip",d,e)}}];this.h=new qd;this.h.o(this.i,
|
|
535
535
|
"regionremove",function(d){c.g.delete(d.region)})}oa(Ym,fb);Ym.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;fb.prototype.release.call(this)};Ym.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?an:a>d.endTime?bn:Zm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Yc==e&&h.Xc==f&&h.Lc(d,b)}}};
|
|
@@ -556,9 +556,10 @@ g.viewportAnchorX-g.regionAnchorX*g.width/100+m);0!==g.heightUnits&&0!==g.widthU
|
|
|
556
556
|
"flex-start":"center"==b.displayAlign?"center":"flex-end";a.C.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{og:f,Ri:e,Sc:c})}function wn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sd?c:"left"===a||"start"===a&&b===Ud||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ud?"line-right":"center"}
|
|
557
557
|
function vn(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=xn(c.linePadding,c,a.u);f.paddingRight=xn(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
558
558
|
"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=W("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=yn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=yn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=
|
|
559
|
-
b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer
|
|
560
|
-
d/h*100),1==g&&(f.position="absolute",c.writingMode==Vd?(f.width="100%",c.lineAlign==Xd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xd?f.right=d+"%":"end"==c.lineAlign&&(f.left=
|
|
561
|
-
"line-
|
|
559
|
+
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();f.fontStyle=
|
|
560
|
+
c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=xn(c.fontSize,c,a.u);d=c.line;null!=d&&(g=c.lineInterpretation,g==Wd&&(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==Vd?(f.width="100%",c.lineAlign==Xd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xd?f.right=d+"%":"end"==c.lineAlign&&(f.left=
|
|
561
|
+
100-d+"%"))));f.lineHeight=c.lineHeight;a=wn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Vd?(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==Vd?(f.right=c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Vd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");
|
|
562
|
+
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==Vd?f.width=c.size+"%":f.height=c.size+"%")}
|
|
562
563
|
function xn(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 yn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}Q("shaka.text.UITextDisplayer",qn);qn.prototype.setTextVisibility=qn.prototype.setTextVisibility;
|
|
563
564
|
qn.prototype.isTextVisible=qn.prototype.isTextVisible;qn.prototype.remove=qn.prototype.remove;qn.prototype.destroy=qn.prototype.destroy;qn.prototype.append=qn.prototype.append;qn.prototype.configure=qn.prototype.configure;function zn(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=gn(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");
|
|
564
565
|
break;case "right":g.push("align:right");break;case Td: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}Q("shaka.text.WebVttGenerator",function(){});function An(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}An.prototype.configure=function(a){this.g=a};function Bn(a){a.i=!1;a.l=!0;a.j=!1}
|
|
@@ -573,14 +574,14 @@ function In(a,b){if(!b||a.includes("offline:"))return a;a=new lb(a);a.g.set("CMC
|
|
|
573
574
|
q.getBandwidthEstimate=function(a){var b=this.Xh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Zn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}Q("shaka.util.CmsdManager",Un);Un.prototype.getBandwidthEstimate=Un.prototype.getBandwidthEstimate;Un.prototype.getRoundTripTime=Un.prototype.Fj;Un.prototype.getResponseDelay=Un.prototype.Ej;Un.prototype.getEstimatedThroughput=Un.prototype.Xh;
|
|
574
575
|
Un.prototype.getMaxBitrate=Un.prototype.Yh;var Wn="etp",Vn="mb",Xn="rd",Yn="rtt";function $n(){this.g=null;this.h=[]}function ao(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.B(2);a.g=b;H(c)})}$n.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){fb.call(this);var c=this;this.l=bo;this.Hf=this.h=null;this.qa=!1;this.Le=new qd;this.oe=new qd;this.m=new qd;this.Ia=new qd;this.pb=new qd;this.G=this.I=this.C=this.J=null;this.Me=0;this.W=new $n;this.ra=this.Xf=this.aa=this.i=this.Xa=this.H=this.j=this.je=this.L=this.Fh=this.ea=this.O=this.le=this.M=this.Jf=this.K=this.Lb=null;this.Ha=!1;this.xa=this.s=null;this.Zf=1E9;this.ze=[];this.S=NaN;this.g=co(this);this.P=null;this.Ne=-1;this.Fa=null;this.ha={width:Infinity,height:Infinity};
|
|
575
576
|
this.Gf=new ui(this.g,this.ha,null);this.Lf=[];this.A=null;this.Aa=new Xf(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.Kb=this.g.preferredTextLanguage;this.ve=this.g.preferredTextRole;this.ue=this.g.preferForcedSubs;this.re=[];b&&
|
|
576
|
-
b(this);this.O=eo(this);this.ea=new Un(this.g.cmsd);this.J=fo(this);this.J.ph(this.g.streaming.forceHTTP);this.J.qh(this.g.streaming.forceHTTPS);this.Nb=this.Y=this.u=null;this.cg=!1;this.$f=new Ub(function(){return O(function(d){if(1==d.g)return c.Y?G(d,c.
|
|
577
|
-
g.g){c.$f.stop();if(c.Y)return g.B(0);c.Nb=c.h;c.cg=c.h.ended;e=d.saveLivePosition||!1;f=c;return G(g,c.Rh(!0,e),3)}f.Y=g.h;H(g)})}),this.pb.o(this.u,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.Y){var e=c.Y;e.A&&d&&(e.A+=d)}c.$f.X(.1)}),this.pb.o(this.u,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Nb?d.B(0):G(d,c.
|
|
578
|
-
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.Kf.stop();e&&wo(c,!1,void 0,!1,!1)});this.sa=null;a&&(zd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.
|
|
577
|
+
b(this);this.O=eo(this);this.ea=new Un(this.g.cmsd);this.J=fo(this);this.J.ph(this.g.streaming.forceHTTP);this.J.qh(this.g.streaming.forceHTTPS);this.Nb=this.Y=this.u=null;this.cg=!1;this.$f=new Ub(function(){return O(function(d){if(1==d.g)return c.Y?G(d,c.bc(c.Nb,!0),3):d.B(0);if(4!=d.g)return G(d,c.load(c.Y),4);c.cg?c.Nb.pause():c.Nb.play();c.Y=null;c.cg=!1;H(d)})});uo&&(this.u=uo(),this.u.configure(this.g.ads),this.pb.o(this.u,"ad-content-pause-requested",function(d){var e,f;return O(function(g){if(1==
|
|
578
|
+
g.g){c.$f.stop();if(c.Y)return g.B(0);c.Nb=c.h;c.cg=c.h.ended;e=d.saveLivePosition||!1;f=c;return G(g,c.Rh(!0,e),3)}f.Y=g.h;H(g)})}),this.pb.o(this.u,"ad-content-resume-requested",function(d){d=d.offset||0;if(c.Y){var e=c.Y;e.A&&d&&(e.A+=d)}c.$f.X(.1)}),this.pb.o(this.u,"ad-content-attach-requested",function(){return O(function(d){return c.h||!c.Nb?d.B(0):G(d,c.bc(c.Nb,!0),0)})}));this.Le.o(window,"online",function(){vo(c);c.gh()});this.Kf=new Ub(function(){for(var d=Date.now()/1E3,e=!1,f=!0,g=t(c.i.variants),
|
|
579
|
+
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.Kf.stop();e&&wo(c,!1,void 0,!1,!1)});this.sa=null;a&&(zd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.bc(a,!0))}oa(X,fb);function xo(a){null!=a.L&&(Fj(a.L),a.L.release(),a.L=null)}
|
|
579
580
|
function yo(a,b){b.lcevc.enabled?(xo(a),null==a.L&&(a.L=new Ej(a.h,a.Fh,b.lcevc),a.I&&(a.I.W=a.L))):xo(a)}function zo(a,b){return new S(a,b)}q=X.prototype;
|
|
580
581
|
q.destroy=function(){var a=this,b;return O(function(c){switch(c.g){case 1:if(a.l==Ao)return c.return();xo(a);b=a.detach();a.l=Ao;return G(c,b,2);case 2:return G(c,a.qg(),3);case 3:a.Le&&(a.Le.release(),a.Le=null);a.oe&&(a.oe.release(),a.oe=null);a.m&&(a.m.release(),a.m=null);a.Ia&&(a.Ia.release(),a.Ia=null);a.pb&&(a.pb.release(),a.pb=null);a.xa=null;a.g=null;a.A=null;a.Hf=null;a.O=null;a.ea=null;if(!a.J){c.B(4);break}return G(c,a.J.destroy(),5);case 5:a.J=null;case 4:a.s&&(a.s.release(),a.s=null),
|
|
581
582
|
fb.prototype.release.call(a),H(c)}})};function Bo(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||ac("Trident/"))return!1;var a=nc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Vb()?!0:Wb("application/x-mpegurl")}
|
|
582
583
|
function Co(a,b){a.dispatchEvent(zo("onstatechange",(new Map).set("state",b)))}
|
|
583
|
-
q.
|
|
584
|
+
q.bc=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==Ao)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.B(2);break}return G(g,c.detach(),2);case 2:return G(g,Do(c,"attach"),4);case 4:if(g.h)return g.return();sa(g,5,6);d||(Co(c,"attach"),e=function(){var h=Eo(c);h&&Fo(c,h)},c.oe.o(a,"error",e),c.h=a);if(!b||!Vb()||c.I){g.B(6);break}return G(g,Go(c),6);case 6:wa(g);c.W.release();xa(g,0);break;case 5:return f=va(g),G(g,c.detach(),10);case 10:throw f;
|
|
584
585
|
}})};q.Hh=function(a){this.Fh=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==Ao)throw new T(2,7,7E3);return G(c,b.Ac(!1,a),2)}if(3!=c.g)return G(c,Do(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.oe.Za(),b.h=null),Co(b,"detach"),b.u&&!a&&b.u.release()}finally{b.W.release()}H(c)})};function Do(a,b){var c;return O(function(d){return 1==d.g?(c=++a.Me,G(d,ao(a.W,b),2)):c!=a.Me?(a.W.release(),d.return(!0)):d.return(!1)})}
|
|
585
586
|
q.Ac=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!=Ao&&(c.l=bo),G(p,Do(c,"unload"),2);case 2:if(p.h)return p.return();ta(p,3);c.Ha=!1;Co(c,"unload");a&&!Vb()&&(a=!1);xo(c);d=c.re.map(function(r){return r()});c.re=[];return G(p,Promise.all(d),5);case 5:c.dispatchEvent(zo("unloading"));c.le&&(c.le.release(),c.le=null);c.h&&(c.m.Za(),c.Ia.Za());c.Kf.stop();c.Lb&&(c.Lb.release(),c.Lb=null);c.Jf&&(c.Jf.stop(),c.Jf=null);
|
|
586
587
|
if(!c.H){p.B(6);break}return G(p,c.H.stop(),7);case 7:c.H=null,c.Xa=null;case 6:if(!c.s){p.B(8);break}return G(p,c.s.stop(),8);case 8:if(!c.j){p.B(10);break}return G(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.K&&(c.K.release(),c.K=null);c.G&&(c.G.release(),c.G=null);if(!tc("webkit")||!c.C){p.B(12);break}return G(p,c.C.destroy(),13);case 13:c.C=null;case 12:if(!c.I){p.B(14);break}return G(p,c.I.destroy(),15);case 15:c.I=null;case 14:if(c.u&&!b)c.u.onAssetUnload();c.Y&&!b&&(c.Y.destroy(),c.Y=null);
|
|
@@ -589,7 +590,7 @@ k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.
|
|
|
589
590
|
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,w,v;return O(function(A){switch(A.g){case 1:if(d.l==Ao)throw new T(2,7,7E3);e=null;f="";a instanceof Jm?(e=a,f=e.gd()||""):f=a||"";return G(A,ao(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new T(2,7,7002);if(!d.aa){A.B(3);break}d.aa=f;return G(A,d.Ac(!1),3);case 3:g=++d.Me;h=function(){return O(function(y){if(1==y.g)return d.Me==g?y.B(0):e?G(y,e.destroy(),3):y.B(3);throw new T(2,7,7E3);})};k=function(y,C){return O(function(z){switch(z.g){case 1:return ta(z,
|
|
590
591
|
2),G(z,ao(d.W,C),4);case 4:return G(z,h(),5);case 5:return G(z,y(),6);case 6:return G(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:wa(z),d.W.release(),xa(z,0)}})};sa(A,5,6);null==b&&e&&(b=e.getStartTime());d.ra=b;d.Ha=!1;d.dispatchEvent(zo("loading"));if(e){c=e.S;A.B(8);break}if(c){A.B(8);break}return G(A,k(function(){return O(function(y){if(1==y.g)return G(y,Io(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Mm(e,d);d.A=e.getStats();A.B(11);break}return G(A,Jo(d,f,b,c,!0),12);case 12:(e=
|
|
591
592
|
A.h)?(Mm(e,d),d.A=e.getStats(),e.start(),e.m.catch(function(){})):d.A=new kl;case 11:m=!e;n=Date.now()/1E3;d.A=e?e.getStats():new kl;d.aa=f;d.Xf=c||null;if(m)return G(A,k(function(){return O(function(y){return G(y,Ko(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.I){A.B(15);break}return G(A,k(function(){return O(function(y){return G(y,Go(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return G(A,k(function(){return O(function(y){return G(y,e.m,0)})},"waitForFinish"),17);case 17:d.g=
|
|
592
|
-
e.getConfiguration();d.Gf=e.G;d.Xa=e.H;d.H=Om(e);d.H&&d.H.setMediaElement&&d.h&&d.H.setMediaElement(d.h);d.le=Pm(e);d.je=e.Aa;d.i=e.Jg();if(p=e.s)d.Aa=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(Lo(d),d.configure("manifest.disableVideo",!0));d.C=Qm(e);return G(A,k(function(){return O(function(y){return G(y,d.C.
|
|
593
|
+
e.getConfiguration();d.Gf=e.G;d.Xa=e.H;d.H=Om(e);d.H&&d.H.setMediaElement&&d.h&&d.H.setMediaElement(d.h);d.le=Pm(e);d.je=e.Aa;d.i=e.Jg();if(p=e.s)d.Aa=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(Lo(d),d.configure("manifest.disableVideo",!0));d.C=Qm(e);return G(A,k(function(){return O(function(y){return G(y,d.C.bc(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(r=e.C)||d.xa&&d.xa==r||(d.s=Nm(e),d.xa=e.C,"function"!=typeof d.s.setMediaElement&&(zd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),
|
|
593
594
|
d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(zd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(zd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),u=Rm(e),w=e.ha,G(A,k(function(){return O(function(y){return G(y,Mo(d,n,w,u),0)})},"loadInner_"),19);case 19:Lm(e);A.B(14);
|
|
594
595
|
break;case 20:return G(A,k(function(){return O(function(y){return G(y,No(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(zo("loaded"));case 6:wa(A);if(!e){A.B(22);break}return G(A,e.destroy(),22);case 22:d.sa=null;xa(A,0);break;case 5:v=va(A);if(7E3==v.code){A.B(24);break}return G(A,d.Ac(!1),24);case 24:throw v;}})};
|
|
595
596
|
function Lo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.Tk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?G(e,Oo(c),2):3!=e.g?(d=e.h,G(e,c.Ac(a,b),3)):e.return(d)})};
|
|
@@ -602,7 +603,7 @@ filter:function(F){var I,L;return O(function(J){if(1==J.g)return G(J,vi(r,F),2);
|
|
|
602
603
|
new S("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.P&&a.j.updateDuration()},newDrmInfo:function(F){var I=h.l,L=I?I.g:null;L&&I.u&&xi(r,L.keySystem,F)},onManifestUpdated:function(){var F=
|
|
603
604
|
(new Map).set("isLive",a.U());h.dispatchEvent(zo("manifestupdated",F));Km(h,!1,function(){if(a.u)a.u.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.s.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.u))a.u.onInterstitialMetadata(a,a.h,F);F={};J=t(J);for(var K=J.next();!K.done;F={Qf:F.Qf},K=J.next())F.Qf=K.value,Km(h,!1,function(N){return function(){So(a,I,L,E,N.Qf)}}(F))},
|
|
604
605
|
disableStream:function(F){return a.disableStream(F,a.g.streaming.maxDisabledTime)}};w=new xl(function(){return a.Oa()});w.addEventListener("regionadd",function(F){var I=F.region;To(a,"timelineregionadded",I,h);Km(h,!1,function(){if(a.u)a.u.onDashTimedMetadata(I)})});v=null;k.streaming.observeQualityChanges&&(v=new yl(function(){return a.Wb()}),v.addEventListener("qualitychange",function(F){Uo(a,F.quality,F.position)}),v.addEventListener("audiotrackchange",function(F){Uo(a,F.quality,F.position,!0)}));
|
|
605
|
-
A=!0;y={
|
|
606
|
+
A=!0;y={jc:a.J,onError:function(F){return h.onError(F)},vf:function(F){Km(h,!0,function(){a:{var I=F,L=zo("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=
|
|
606
607
|
!0;P=t(P.keyIds);for(var U=P.next();!U.done;U=P.next())if(U=U.value,(U=I[L?"00":U])||a.C.H)K.allowedByKeySystem=K.allowedByKeySystem&&!!U&&!zi.includes(U)}M!=K.allowedByKeySystem&&(E=!0)}}}if(E&&(Vo(a),!Wo(a)))break a;(I=a.j.j)&&!I.allowedByKeySystem&&wo(a)}})},onExpirationUpdated:function(F,I){var L=zo("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.sa,
|
|
607
608
|
(a.A||h.getStats()).j=F,a.L&&Fj(a.L))}};C=fo(a,l);Bg(a.J,C);z=function(){return a.dd(y)};B={config:k,hk:u,tk:w,rk:v,dd:z,gk:r,networkingEngine:C,aj:e,$i:g};h=new Jm(b,d,c,B);return D.return(h)})}function Io(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,G(e,cn(b,a.J,c),2);d=e.h;"application/x-mpegurl"==d&&ic()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
608
609
|
function Qo(a,b){if(!Vb())return!0;if(b){if(""==(a.h||Xb()).canPlayType(b))return!1;if(!(Vb()&&b in Ci))return!0;if(Me(b))return ic()&&(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}
|
|
@@ -614,9 +615,9 @@ a.g.playRangeStart,a.g.playRangeEnd);Rl(a.j,a.g.playRangeStart,a.g.playRangeEnd)
|
|
|
614
615
|
z||((B=Hf(a.i.textStreams,a.Kb,a.ve,a.ue)[0]||null)&&jl(a.A.h,B,!0),h&&(B?(kp(a,h.audio,B)&&(a.qa=!0),a.qa&&a.I.H.setTextVisibility(!0),lp(a)):a.qa=!1),B&&(a.g.streaming.alwaysStreamText||a.Oc())&&$l(a.j,B)),G(J,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),mp(a));Vo(a);Wo(a);a.i.variants.some(function(E){return E.primary});if((D=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)F=
|
|
615
616
|
function(){return np(a)},a.m.o(e,"timeupdate",F);D||(I=function(){return op(a)},a.m.o(e,"timeupdate",I),op(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.B(0);a.m.Pa(e,"timeupdate",L);K=a;return G(N,a.preload(a.i.nextUrl),4)}K.sa=N.h;H(N)})},a.m.o(e,"timeupdate",L)),a.m.o(e,"ended",function(){a.load(a.sa||a.i.nextUrl)})));if(a.u)a.u.onManifestUpdated(D);
|
|
616
617
|
a.Ha=!0;a.m.ka(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-b});H(J)}})}
|
|
617
|
-
function Ko(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Vc,d=Date.now()/1E3,e=!0,a.C=a.dd({
|
|
618
|
-
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Je(b):"",codecs:b?
|
|
619
|
-
g.codecs)),b.startsWith("audio/")?(g.type=c.ia,f.audio=g):f.video=g,a.C.Y=!0,G(h,Rh(a.C,[f],[]),2)):G(h,a.C.
|
|
618
|
+
function Ko(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Vc,d=Date.now()/1E3,e=!0,a.C=a.dd({jc:a.J,onError:function(k){Fo(a,k)},vf:function(){},onExpirationUpdated:function(){var k=zo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.A.j=Date.now()/1E3-d)}}),a.C.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
619
|
+
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Je(b):"",codecs:b?Ke(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ua,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(ve(g.mimeType,
|
|
620
|
+
g.codecs)),b.startsWith("audio/")?(g.type=c.ia,f.audio=g):f.video=g,a.C.Y=!0,G(h,Rh(a.C,[f],[]),2)):G(h,a.C.bc(a.h),0)})}
|
|
620
621
|
function No(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return Co(a,"src-equals"),d=a.h,a.G=new Sk(d),e=!1,a.re.push(function(){e=!0}),null!=a.ra&&a.G.eg(a.ra),a.K=new bl({Ze:function(){return d.playbackRate},Jc:function(){return d.defaultPlaybackRate},rh:function(w){d.playbackRate=w},mi:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,ip(a,d,f),g=function(){return Zo(a)},h=function(){return $o(a)},a.m.o(d,"playing",g),a.m.o(d,"pause",g),a.m.o(d,"ended",g),a.m.o(d,
|
|
621
622
|
"ratechange",h),"none"!=d.preload&&a.m.ka(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.o(d.audioTracks,"addtrack",function(){return Vo(a)}),a.m.o(d.audioTracks,"removetrack",function(){return Vo(a)}),a.m.o(d.audioTracks,"change",function(){return Vo(a)})),d.textTracks&&(a.m.o(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":pp(a,w);break;case "chapters":ep(a,w);break;default:Vo(a)}}),a.m.o(d.textTracks,"removetrack",function(){return Vo(a)}),
|
|
622
623
|
a.m.o(d.textTracks,"change",function(){return Vo(a)})),d.src=Cn(a.O,a.aa,c),(bc()||ec())&&d.load(),"none"!=d.preload&&!d.autoplay&&Me(c)&&nc()&&d.load(),a.l=qp,a.dispatchEvent(zo("streaming")),k=new ng,Jk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.G.dg();k.resolve()}),Jk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(v){if(1==v.g)return rp(a),w=sp(a),w.find(function(A){return"disabled"!=A.mode})?(0<w.length&&(a.qa=!0),v.B(2)):G(v,new Promise(function(A){a.m.ka(d.textTracks,
|
|
@@ -625,19 +626,19 @@ l]),2);if((m=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.
|
|
|
625
626
|
function rp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.jh(b,a.g.preferredVariantRole)}function tp(a){var b=a.g.preferredTextLanguage;""!=b&&a.kh(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
626
627
|
function pp(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.o(b,"cuechange",function(){if(b.activeCues){for(var d=[],e={},f=t(b.activeCues),g=f.next();!g.done;e={fb:e.fb},g=f.next()){e.fb=g.value;So(a,e.fb.startTime,e.fb.endTime,e.fb.type,e.fb.value);if(a.u)a.u.onCueMetadataChange(e.fb.value);"com.apple.quicktime.HLS"==e.fb.type&&null!=e.fb.startTime&&(g=d.find(function(h){return function(k){return k.startTime==h.fb.startTime&&k.endTime==h.fb.endTime}}(e)),g||(g={startTime:e.fb.startTime,endTime:e.fb.endTime,
|
|
627
628
|
values:[]},d.push(g)),g.values.push(e.fb.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.u&&(e.values.push({key:"CUE",description:"",data:"ONCE",mimeType:null,pictureType:null}),a.u.onInterstitialMetadata(a,a.h,e))}});var c=(new Ub(function(){var d=up(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Sa().X(.5);a.re.push(function(){c.stop()})}}
|
|
628
|
-
function Yo(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())So(a,f,g,"org.id3",k.value);if(a.u)a.u.onHlsTimedMetadata(e,f)}}function So(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(zo("metadata",b))}
|
|
629
|
+
function Yo(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())So(a,f,g,"org.id3",k.value);if(a.u)a.u.onHlsTimedMetadata(e,f)}}function So(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(zo("metadata",b))}
|
|
629
630
|
function ep(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Ub(function(){b.mode="hidden"})).Sa().X(.5);a.re.push(function(){c.stop()})}}q.yk=function(){for(var a=this.W;a.g;)a.release()};q.dd=function(a){return new Kh(a)};
|
|
630
631
|
function fo(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Km(b(),!0,e):e()}b||(b=function(){return null});return new xg(function(e,f,g,h){var k=b()?b().i:a.s;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(zo("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],
|
|
631
632
|
Zn(n[1]))}}catch(v){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],Zn(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(zo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.O,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Jn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
632
633
|
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Jn(h,f,{ot:Gn,su:!h.i})}}catch(M){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case Ig:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=Nn(k);var p=n.ot===Kn||n.ot===En||n.ot===Fn||n.ot===Pn,r=k.stream;if(r){var u=h.h.Ua();if(p&&(n.bl=Rn(h,r.type),n.ot!==Pn)){var w=Sn(h,r.type);n.dl=u?w/Math.abs(u):w}r.bandwidth&&(n.br=r.bandwidth/1E3);
|
|
633
|
-
if(r.segmentIndex&&m){var v=r.segmentIndex.
|
|
634
|
+
if(r.segmentIndex&&m){var v=r.segmentIndex.fc(m.endTime,!0,0>u);if(v){var A=v.next().value;if(A&&A!=m){if(!Qd(m.R(),A.R())){var y=A.R()[0],C=f.uris[0],z=new URL(y),B=new URL(C);if(z.origin!==B.origin)var D=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("..");D=F.join("/")}n.nor=D}if((A.$a||A.Ja)&&(m.$a!=A.$a||m.Ja!=A.Ja)){var L=A.$a+"-";A.Ja&&(L+=A.Ja);n.nrr=L}}}var J=h.h.Ua()||1,E=Sn(h,r.type)||
|
|
634
635
|
500,K=r.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!==Pn&&(n.tb=Tn(h,n.ot)/1E3);Jn(h,f,n)}}catch(M){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:Jn(h,f,{ot:"k"});break;case 4:Jn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.H)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.A;g&&(g.Pe=isNaN(g.Pe)?f:g.Pe+f,0===e&&(g.ii=f))}})}
|
|
635
636
|
function gp(a,b){return new Tk(a.h,a.i,a.g.streaming,b,function(){a.Lb&&el(a.Lb,!0);a.j&&a.j.we();a.M&&vp(a)},function(c){return a.dispatchEvent(c)})}
|
|
636
637
|
function hp(a,b){b=new Ym(a.le,a.U()||0<b);b.addEventListener("enter",function(d){To(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){To(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(To(a,"timelineregionenter",e),To(a,"timelineregionexit",e))});var c=new dl(a.h);c.g.add(b);a.je&&c.g.add(a.je);return c}
|
|
637
638
|
function ip(a,b,c){a.M=new gg;a.M.g=ig;jg(a.M,c,Math.min(.5,c/2));Ho(a);a.Jf=(new Ub(function(){vp(a)})).wa(.25);a.m.o(b,"waiting",function(){return vp(a)});a.m.o(b,"stalled",function(){return vp(a)});a.m.o(b,"canplaythrough",function(){return vp(a)});a.m.o(b,"progress",function(){return vp(a)})}
|
|
638
639
|
function vp(a){switch(a.l){case qp:if(a.h.ended)var b=!0;else{var c=Oi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case dp:a:if(a.h.ended||Wj(a.I))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.tc();var d=Oi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Qi(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?hg:ig;c.g=d;(b=b!=d)&&d===hg&&(c.h=Date.now());b&&Ho(a)}function Xo(a,b,c,d){return new Nj(a,b,c,d)}
|
|
639
640
|
function eo(a){return new An({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Wb:function(){return a.Wb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Ua:function(){return a.Ua()},Gb:function(){return a.Gb()},Jb:function(){return a.Jb()},U:function(){return a.U()}},a.g.cmcd)}
|
|
640
|
-
function cp(a){return new Ll(a.i,{Ye:function(){return a.G?a.G.Oe():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Ua:function(){return a.Ua()},oa:a.I,
|
|
641
|
+
function cp(a){return new Ll(a.i,{Ye:function(){return a.G?a.G.Oe():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Ua:function(){return a.Ua()},oa:a.I,jc:a.J,onError:function(b){return Fo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},nk:function(){a.H&&a.H.update&&a.H.update()},$g:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.G){a.G.ni();var h=Xj(a.I,f);!a.U()&&a.h.paused&&null!=h&&0<h&&a.G.Oe()<h&&a.G.eg(h)}vp(a);d=(new Map).set("start",
|
|
641
642
|
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(zo("segmentappended",d));a.s&&c.fastSwitching&&b.pe&&b.kf&&a.s.trySuggestStreams()},lk:function(b,c){(c=c.od)&&a.je&&Al(a.je,c,b)},Jh:function(b,c){var d=a.C;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new bh(Gb(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,
|
|
642
643
|
f),f+=b.length;$h(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){Yo(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
|
|
643
644
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=vm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(zd("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(zd("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
@@ -662,7 +663,7 @@ q.Vc=function(a){var b=this;0==a?Ua("A trick play rate of 0 is unsupported!"):(t
|
|
|
662
663
|
q.cd=function(){var a=this.K.Jc();this.l==qp&&this.K.set(a);this.l==dp&&(this.K.set(a),this.s.playbackRateChanged(a),Xl(this.j,!1));this.Ia.Za()};
|
|
663
664
|
q.Jb=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,Ff(e)){var f=xf(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 Ef(g)}):[]};
|
|
664
665
|
q.vc=function(){if(this.i){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=yf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?sp(this).map(function(f){return Cf(f)}):[]};q.We=function(){var a=this.ze;this.i&&(a=this.i.imageStreams);return a.map(function(b){return zf(b)})};
|
|
665
|
-
q.fj=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=dp&&b.l!=qp)return g.return(null);c=b.ze;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.
|
|
666
|
+
q.fj=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=dp&&b.l!=qp)return g.return(null);c=b.ze;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.ec(function(h){var k=xp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Gc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.Mg(a,h.startTime+l*m/k))}}),G(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
666
667
|
function xp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Gc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
667
668
|
q.Mg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z;return O(function(B){if(1==B.g){if(c.l!=dp&&c.l!=qp)return B.return(null);d=c.ze;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?B.B(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=xp(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.Gc;n=l/h.rows;p=h.Gc*h.rows;r=g.j-g.startTime;
|
|
668
669
|
u=g.A||r/p;w=g.startTime;A=v=0;1<p&&(y=Math.floor((b-g.startTime)/u),w=g.startTime+y*u,v=y%h.Gc*m,A=Math.floor(y/h.Gc)*n);C=!1;if(z=g.u)C=!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.R(),width:m,sprite:C})})};
|
|
@@ -699,7 +700,7 @@ q.Jg=function(){Ua("Shaka Player's internal Manifest structure is NOT covered by
|
|
|
699
700
|
function co(a){var b=Em();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.gh(d))}};b.textDisplayFactory=function(){if(a.Hf){var c=a.getConfiguration();return new qn(a.h,a.Hf,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new kn(a.h,"Shaka Player TextTrack"):new mn};return b}q.uh=function(a){this.Hf=a};
|
|
700
701
|
function Ro(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 al,l=e.closedCaptions.get(g);h={id:a.Zf++,originalId:g,groupId:null,
|
|
701
702
|
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:Tc,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([ve(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
702
|
-
function jp(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(r){if(1==r.g)return k?G(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.
|
|
703
|
+
function jp(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(r){if(1==r.g)return k?G(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.fc(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.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)})}
|
|
703
704
|
function Ho(a){var b=a.ee();if(a.A&&a.M&&a.G){var c=a.K;c.j=b;cl(c);a.O&&(c=a.O,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Zo(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.P&&(a.P=Math.min(a.P+ ++a.Ne*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(zo("buffering",
|
|
704
705
|
b))}function $o(a){var b=a.h.playbackRate;0!=b&&(a.K&&a.K.set(b),b=zo("ratechange"),a.dispatchEvent(b))}
|
|
705
706
|
function Zo(a){if(a.A&&a.M){var b=a.A.g,c="playing";a.M.g==ig?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(zo("statechanged",c)))}}
|
|
@@ -726,19 +727,20 @@ X.prototype.selectAudioLanguage=X.prototype.jh;X.prototype.getTextLanguages=X.pr
|
|
|
726
727
|
X.prototype.getVariantTracks=X.prototype.Jb;X.prototype.cancelTrickPlay=X.prototype.cd;X.prototype.trickPlay=X.prototype.Vc;X.prototype.getPlaybackRate=X.prototype.Ua;X.prototype.isBuffering=X.prototype.ee;X.prototype.getKeyStatuses=X.prototype.Xe;X.prototype.getActiveSessionsMetadata=X.prototype.Hg;X.prototype.getExpiration=X.prototype.Yd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.isFullyLoaded=X.prototype.ei;X.prototype.goToLive=X.prototype.Rj;
|
|
727
728
|
X.prototype.seekRange=X.prototype.Oa;X.prototype.isAudioOnly=X.prototype.Mc;X.prototype.isInProgress=X.prototype.Nc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.Ve;X.prototype.getAssetUri=X.prototype.gd;X.prototype.getNetworkingEngine=X.prototype.Gb;X.prototype.getMediaElement=X.prototype.Bj;X.prototype.getManifestType=X.prototype.Kg;X.prototype.getLoadMode=X.prototype.hd;X.prototype.resetConfiguration=X.prototype.Ck;X.prototype.getBufferFullness=X.prototype.Vh;
|
|
728
729
|
X.prototype.getNonDefaultConfiguration=X.prototype.Zh;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.yk;X.prototype.destroyAllPreloads=X.prototype.qg;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Rh;X.prototype.unloadAndSavePreload=X.prototype.Tk;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Xk;X.prototype.unload=X.prototype.Ac;
|
|
729
|
-
X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Hh;X.prototype.attach=X.prototype.
|
|
730
|
+
X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Hh;X.prototype.attach=X.prototype.bc;
|
|
730
731
|
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.B(2);break}return G(k,ri(),3);case 3:b=k.h;case 2:var l={};if(Vb())for(var m in Ci)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]=Vb()?!!Ci[n]:Wb(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(we));
|
|
731
732
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Oe(n)?!0:Vb()?vd(n)||(pe(n)?!0:!1):Wb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return G(k,uc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Jp;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=Bo;X.setAdManagerFactory=function(a){uo=a};X.registerSupportPlugin=function(a,b){Jp[a]=b};X.prototype.destroy=X.prototype.destroy;var Ao=0,bo=1,dp=2,qp=3;
|
|
732
|
-
X.LoadMode={DESTROYED:Ao,NOT_LOADED:bo,MEDIA_SOURCE:dp,SRC_EQUALS:qp};X.version="v4.10.
|
|
733
|
+
X.LoadMode={DESTROYED:Ao,NOT_LOADED:bo,MEDIA_SOURCE:dp,SRC_EQUALS:qp};X.version="v4.10.9";var Kp=["4","10"];Ad=new function(a){this.g=a;this.i=Bd;this.h=Cd}(new yd(Number(Kp[0]),Number(Kp[1])));var Jp={},uo=null;function Lp(){this.g=[];this.i=this.l=this.j=this.h=0}function Mp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Np(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 qd;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Np.prototype;q.needsSkipUI=function(){return!1};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
733
734
|
q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
734
735
|
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.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)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
735
736
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
736
737
|
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};Q("shaka.ads.ClientSideAd",Np);Np.prototype.release=Np.prototype.release;
|
|
737
738
|
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;Np.prototype.getVastMediaHeight=Np.prototype.getVastMediaHeight;Np.prototype.getVastMediaBitrate=Np.prototype.getVastMediaBitrate;
|
|
738
739
|
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;Np.prototype.isMuted=Np.prototype.isMuted;Np.prototype.setVolume=Np.prototype.setVolume;Np.prototype.getVolume=Np.prototype.getVolume;
|
|
739
|
-
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;Np.prototype.getMinSuggestedDuration=Np.prototype.getMinSuggestedDuration;Np.prototype.getDuration=Np.prototype.getDuration;
|
|
740
|
+
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;Np.prototype.getMinSuggestedDuration=Np.prototype.getMinSuggestedDuration;Np.prototype.getDuration=Np.prototype.getDuration;
|
|
741
|
+
Np.prototype.needsSkipUI=Np.prototype.needsSkipUI;function Op(){}Q("shaka.ads.Utils",Op);Op.ADS_LOADED="ads-loaded";Op.AD_STARTED="ad-started";Op.AD_FIRST_QUARTILE="ad-first-quartile";Op.AD_MIDPOINT="ad-midpoint";Op.AD_THIRD_QUARTILE="ad-third-quartile";Op.AD_COMPLETE="ad-complete";Op.AD_STOPPED="ad-stopped";Op.AD_SKIPPED="ad-skipped";Op.AD_VOLUME_CHANGED="ad-volume-changed";Op.AD_MUTED="ad-muted";Op.AD_PAUSED="ad-paused";Op.AD_RESUMED="ad-resumed";Op.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Op.CUEPOINTS_CHANGED="ad-cue-points-changed";
|
|
740
742
|
Op.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Op.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Op.AD_CLICKED="ad-clicked";Op.AD_PROGRESS="ad-progress";Op.AD_BUFFERING="ad-buffering";Op.AD_IMPRESSION="ad-impression";Op.AD_DURATION_CHANGED="ad-duration-changed";Op.AD_CLOSED="ad-closed";Op.AD_LOADED="ad-loaded";Op.ALL_ADS_COMPLETED="all-ads-completed";Op.AD_LINEAR_CHANGED="ad-linear-changed";Op.AD_METADATA="ad-metadata";Op.AD_RECOVERABLE_ERROR="ad-recoverable-error";Op.AD_ERROR="ad-error";
|
|
741
|
-
Op.AD_BREAK_READY="ad-break-ready";Op.AD_INTERACTION="ad-interaction";Op.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Op.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Op.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Pp(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.A=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new qd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.
|
|
743
|
+
Op.AD_BREAK_READY="ad-break-ready";Op.AD_INTERACTION="ad-interaction";Op.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Op.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Op.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Pp(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.A=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new qd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.10.9");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
|
|
742
744
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Qp(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Rp(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.ka(this.i,"play",function(){f.H=!0})}Pp.prototype.configure=function(a){this.s=a};Pp.prototype.stop=function(){this.g&&this.g.stop();this.u&&pn(this.u)};
|
|
743
745
|
Pp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.G.destroy()};function Rp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new S("ad-error",b));Sp(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
744
746
|
function Qp(a,b){a.l(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(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.C);a.l(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -751,34 +753,35 @@ a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paus
|
|
|
751
753
|
a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,
|
|
752
754
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
753
755
|
function Vp(a,b){var c=b.getAd();c?(a.j=new Np(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.s.supportsMultipleMediaElements||a.l(new S("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new S("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.s.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))):Ua("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
754
|
-
function Sp(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new S("ad-content-resume-requested"));a.l(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function Wp(a,b,c,d,e){this.g=a;this.h=b;this.j=c;this.l=d;this.i=e}q=Wp.prototype;q.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h};
|
|
755
|
-
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.j()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
756
|
-
q.getTitle=function(){return""};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return""};q.getCreativeAdId=function(){return""};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};
|
|
757
|
-
Wp.prototype.release=Wp.prototype.release;Wp.prototype.getPodIndex=Wp.prototype.getPodIndex;Wp.prototype.getTimeOffset=Wp.prototype.getTimeOffset;Wp.prototype.getMediaUrl=Wp.prototype.getMediaUrl;Wp.prototype.getAdvertiserName=Wp.prototype.getAdvertiserName;Wp.prototype.getCreativeAdId=Wp.prototype.getCreativeAdId;Wp.prototype.getAdId=Wp.prototype.getAdId;Wp.prototype.getVastMediaWidth=Wp.prototype.getVastMediaWidth;
|
|
758
|
-
Wp.prototype.getVastMediaBitrate=Wp.prototype.getVastMediaBitrate;Wp.prototype.getDescription=Wp.prototype.getDescription;Wp.prototype.getTitle=Wp.prototype.getTitle;Wp.prototype.getPositionInSequence=Wp.prototype.getPositionInSequence;Wp.prototype.getSequenceLength=Wp.prototype.getSequenceLength;Wp.prototype.setMuted=Wp.prototype.setMuted;Wp.prototype.resize=Wp.prototype.resize;Wp.prototype.isLinear=Wp.prototype.isLinear;
|
|
759
|
-
Wp.prototype.getVolume=Wp.prototype.getVolume;Wp.prototype.play=Wp.prototype.play;Wp.prototype.pause=Wp.prototype.pause;Wp.prototype.skip=Wp.prototype.skip;Wp.prototype.canSkipNow=Wp.prototype.canSkipNow;Wp.prototype.getTimeUntilSkippable=Wp.prototype.getTimeUntilSkippable;Wp.prototype.isSkippable=Wp.prototype.isSkippable;Wp.prototype.isPaused=Wp.prototype.isPaused;Wp.prototype.getRemainingTime=Wp.prototype.getRemainingTime;
|
|
760
|
-
Wp.prototype.getDuration=Wp.prototype.getDuration;function Xp(a,b,c,d){var e=this;this.H=a;this.C=b;this.i=c;this.G=null;this.
|
|
761
|
-
k=t(g);l=k.next();case 3:if(l.done){w.B(5);break}m=l.value;n=m.endTime||m.startTime;if(!(1<=h.start-n)){p=m.startTime-e.
|
|
762
|
-
Xp.prototype.configure=function(a){this.H&&this.
|
|
763
|
-
Xp.prototype.stop=function(){this.j&&this.j.Za();this.I.clear();this.A.clear();this.h.qg();this.s.clear();this.h.detach();this.J=!1;this.
|
|
764
|
-
function bq(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.C.hd()==qp&&a.
|
|
765
|
-
b);c&&aq(a);H(m)})}function Zp(a,b,c){c=void 0===c?0:c;var d=0,e=null;if(a.A.size&&null!=a.
|
|
766
|
-
function $p(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,w,v,A,y,C;O(function(z){switch(z.g){case 1:g=Date.now();!a.u.parentElement&&a.H&&a.H.appendChild(a.u);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.
|
|
767
|
-
D.g)return"detach"!=B.state?D.B(0):qc()?G(D,new Promise(function(F){return(new Ub(F)).X(.1)}),3):D.B(3);h.resolve();a.j.Pa(a.C,"onstatechange",k);H(D)})};a.j.o(a.C,"onstatechange",k);return G(z,h,2);case 2:return a.
|
|
768
|
-
m&&m.stop(),(B=Zp(a,b.
|
|
769
|
-
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 S("ad-complete"));H(B)})},w=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new S("ad-skipped"));return G(B,p(),0)})},v=new Wp(a.u,b.isSkippable,w,c,d),a.
|
|
770
|
-
a.j.ka(a.h,"midpoint",function(){n();a.g(new S("ad-midpoint"))}),a.j.ka(a.h,"thirdquartile",function(){n();a.g(new S("ad-third-quartile"))}),a.j.ka(a.h,"complete",u),a.j.o(a.u,"play",function(){a.g(new S("ad-resumed"))}),a.j.o(a.u,"pause",function(){a.g(new S("ad-paused"))}),a.j.o(a.u,"volumechange",function(){a.u.muted?a.g(new S("ad-muted")):a.g(new S("ad-volume-changed"))}),sa(z,4),b.eh&&(m=(new Ub(function(){v.skip()})).X(b.eh)),Yp(a),G(z,a.h.
|
|
771
|
-
10):G(z,a.h.load(b.uri),8);case 10:return A=z.h,a.s.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 S("ads-loaded",(new Map).set("loadTime",y)));a.
|
|
756
|
+
function Sp(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new S("ad-content-resume-requested"));a.l(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function Wp(a,b,c,d,e){this.g=a;this.h=b;this.j=c;this.l=d;this.i=e}q=Wp.prototype;q.needsSkipUI=function(){return!0};q.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h};
|
|
757
|
+
q.getTimeUntilSkippable=function(){return this.h?0:Math.max(this.getRemainingTime(),0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.j()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
758
|
+
q.getSequenceLength=function(){return this.l};q.getPositionInSequence=function(){return this.i};q.getTitle=function(){return""};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return""};q.getCreativeAdId=function(){return""};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};
|
|
759
|
+
q.release=function(){this.g=null};Q("shaka.ads.InterstitialAd",Wp);Wp.prototype.release=Wp.prototype.release;Wp.prototype.getPodIndex=Wp.prototype.getPodIndex;Wp.prototype.getTimeOffset=Wp.prototype.getTimeOffset;Wp.prototype.getMediaUrl=Wp.prototype.getMediaUrl;Wp.prototype.getAdvertiserName=Wp.prototype.getAdvertiserName;Wp.prototype.getCreativeAdId=Wp.prototype.getCreativeAdId;Wp.prototype.getAdId=Wp.prototype.getAdId;Wp.prototype.getVastMediaWidth=Wp.prototype.getVastMediaWidth;
|
|
760
|
+
Wp.prototype.getVastMediaHeight=Wp.prototype.getVastMediaHeight;Wp.prototype.getVastMediaBitrate=Wp.prototype.getVastMediaBitrate;Wp.prototype.getDescription=Wp.prototype.getDescription;Wp.prototype.getTitle=Wp.prototype.getTitle;Wp.prototype.getPositionInSequence=Wp.prototype.getPositionInSequence;Wp.prototype.getSequenceLength=Wp.prototype.getSequenceLength;Wp.prototype.setMuted=Wp.prototype.setMuted;Wp.prototype.resize=Wp.prototype.resize;Wp.prototype.isLinear=Wp.prototype.isLinear;
|
|
761
|
+
Wp.prototype.isMuted=Wp.prototype.isMuted;Wp.prototype.setVolume=Wp.prototype.setVolume;Wp.prototype.getVolume=Wp.prototype.getVolume;Wp.prototype.play=Wp.prototype.play;Wp.prototype.pause=Wp.prototype.pause;Wp.prototype.skip=Wp.prototype.skip;Wp.prototype.canSkipNow=Wp.prototype.canSkipNow;Wp.prototype.getTimeUntilSkippable=Wp.prototype.getTimeUntilSkippable;Wp.prototype.isSkippable=Wp.prototype.isSkippable;Wp.prototype.isPaused=Wp.prototype.isPaused;Wp.prototype.getRemainingTime=Wp.prototype.getRemainingTime;
|
|
762
|
+
Wp.prototype.getMinSuggestedDuration=Wp.prototype.getMinSuggestedDuration;Wp.prototype.getDuration=Wp.prototype.getDuration;Wp.prototype.needsSkipUI=Wp.prototype.needsSkipUI;function Xp(a,b,c,d){var e=this;this.H=a;this.C=b;this.i=c;this.G=null;this.m=!0;this.u=this.i;this.g=d;this.I=new Set;this.A=new Set;this.s=new Map;this.h=new X;Yp(this);this.K=new qd;this.j=new qd;this.J=!1;this.l=null;this.K.o(this.i,"timeupdate",function(){if(!e.J){var f=null==e.l||0==e.l;e.l=e.i.currentTime;(f=Zp(e,f))&&$p(e,f,1,1,Date.now())}});(new Ub(function(){var f,g,h,k,l,m,n,p,r,u;return O(function(w){switch(w.g){case 1:if(!e.A.size||e.J||null==e.l){w.B(0);break}f=!1;g=Array.from(e.A);
|
|
763
|
+
h=e.C.Oa();k=t(g);l=k.next();case 3:if(l.done){w.B(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.s.has(m)||e.s.set(m,e.h.preload(m.uri)));w.B(4);break}if(!e.s.has(m)){w.B(7);break}return G(w,e.s.get(m),8);case 8:(r=w.h)&&r.destroy(),e.s.delete(m);case 7:u=JSON.stringify(m),e.I.has(u)&&e.I.delete(u),e.A.delete(m),f=!0;case 4:l=k.next();w.B(3);break;case 5:f&&aq(e),H(w)}})})).wa(1)}
|
|
764
|
+
Xp.prototype.configure=function(a){this.H&&this.m==a.supportsMultipleMediaElements&&((this.m=!a.supportsMultipleMediaElements)?(this.u=this.i,this.G&&(this.G.parentElement&&this.H.removeChild(this.G),this.G=null)):(this.G||(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.G=a),this.u=this.G))};
|
|
765
|
+
Xp.prototype.stop=function(){this.j&&this.j.Za();this.I.clear();this.A.clear();this.h.qg();this.s.clear();this.h.detach();this.J=!1;this.l=null};Xp.prototype.release=function(){this.stop();this.K&&this.K.release();this.j&&this.j.release();this.H&&pn(this.H);this.h.destroy()};
|
|
766
|
+
function bq(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(a.C.hd()==qp&&a.m)return Ua("Unsupported interstitial when using single media element",b),m.return();Yp(a);c=!1;return G(m,cq(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.I.has(h))||(c=!0,a.I.add(h),a.A.add(g),k=!1,b.Zb&&null==a.l?k=!0:0!=g.startTime||g.jg?null!=a.l&&(l=b.startTime-a.l,0<l&&10>=l&&(k=!0)):k=!0,k&&(a.s.has(g)||a.s.set(g,a.h.preload(g.uri))));else Ua("Unsupported interstitial",
|
|
767
|
+
b);c&&aq(a);H(m)})}function Zp(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.Zb:f?k=h.Qc:h.Zb||h.Qc||(k=a.l-Math.round(1E3*h.startTime)/1E3,k=0<k&&(1>=k||!h.jg));if(k){if(d==c){e=h;break}d++}}}return e}
|
|
768
|
+
function $p(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,w,v,A,y,C;O(function(z){switch(z.g){case 1:g=Date.now();!a.u.parentElement&&a.H&&a.H.appendChild(a.u);1==d&&1==c&&(c=Array.from(a.A).filter(function(B){return b.Zb?B.Zb==b.Zb:b.Qc?B.Qc==b.Qc:.001>Math.abs(B.startTime-b.startTime)}).length);if(b.once||b.Zb)f++,a.A.delete(b),aq(a);a.J=!0;if(!a.m||1!=d){z.B(2);break}a.g(new S("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new ng;k=function(B){return O(function(D){if(1==
|
|
769
|
+
D.g)return"detach"!=B.state?D.B(0):qc()?G(D,new Promise(function(F){return(new Ub(F)).X(.1)}),3):D.B(3);h.resolve();a.j.Pa(a.C,"onstatechange",k);H(D)})};a.j.o(a.C,"onstatechange",k);return G(z,h,2);case 2:return a.m||(a.i.pause(),null!=b.ud&&0!=b.ud&&(a.i.currentTime+=b.ud)),l=!1,m=null,n=function(){if(!a.m&&null==b.ud)if(b.Df&&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,D;return O(function(F){if(1==
|
|
770
|
+
F.g)return n(),m&&m.stop(),(B=Zp(a,b.Zb,d-f))?(a.g(new S("ad-stopped")),a.j.Za(),$p(a,B,c,++d,e,f),F.B(0)):a.m?G(F,a.h.detach(),4):G(F,a.h.Ac(),4);a.m&&(D=b.ud,null==D&&(D=b.Df&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.l||0):(Date.now()-e)/1E3),a.g(new S("ad-content-resume-requested",(new Map).set("offset",D))));a.g(new S("ad-stopped"));a.j.Za();a.J=!1;a.m||(n(),a.i.ended||a.i.play());H(F)})},r=function(B){return O(function(D){if(l)return D.return();l=!0;a.g(new S("ad-error",(new Map).set("originalEvent",
|
|
771
|
+
B)));return G(D,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 S("ad-complete"));H(B)})},w=function(){return O(function(B){if(l)return B.return();l=!0;a.g(new S("ad-skipped"));return G(B,p(),0)})},v=new Wp(a.u,b.isSkippable,w,c,d),a.m||(v.setMuted(a.i.muted),v.setVolume(a.i.volume)),a.g(new S("ad-started",(new Map).set("ad",v))),v.canSkipNow()&&a.g(new S("ad-skip-state-changed")),a.j.ka(a.h,"error",r),a.j.ka(a.h,"firstquartile",function(){n();
|
|
772
|
+
a.g(new S("ad-first-quartile"))}),a.j.ka(a.h,"midpoint",function(){n();a.g(new S("ad-midpoint"))}),a.j.ka(a.h,"thirdquartile",function(){n();a.g(new S("ad-third-quartile"))}),a.j.ka(a.h,"complete",u),a.j.o(a.u,"play",function(){a.g(new S("ad-resumed"))}),a.j.o(a.u,"pause",function(){a.g(new S("ad-paused"))}),a.j.o(a.u,"volumechange",function(){a.u.muted?a.g(new S("ad-muted")):a.g(new S("ad-volume-changed"))}),sa(z,4),b.eh&&(m=(new Ub(function(){v.skip()})).X(b.eh)),Yp(a),G(z,a.h.bc(a.u),6);case 6:return a.s.has(b)?
|
|
773
|
+
G(z,a.s.get(b),10):G(z,a.h.load(b.uri),8);case 10:return A=z.h,a.s.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 S("ads-loaded",(new Map).set("loadTime",y)));a.m&&a.i.play();ua(z,0);break;case 4:C=va(z),r(C),H(z)}})}
|
|
772
774
|
function cq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I,L,J,E,K,N,M,P,U;return O(function(R){switch(R.g){case 1:c=[];if(!b)return R.return(c);d=b.values.find(function(Z){return"X-ASSET-URI"==Z.key});e=b.values.find(function(Z){return"X-ASSET-LIST"==Z.key});if(!d&&!e)return R.return(c);f=b.values.find(function(Z){return"X-RESTRICT"==Z.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(Z){return"X-RESUME-OFFSET"==Z.key}))n=m.data,
|
|
773
|
-
l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(r=b.values.find(function(Z){return"X-PLAYOUT-LIMIT"==Z.key}))u=r.data,p=parseFloat(u),isNaN(p)&&(p=null);A=v=w=!1;if(y=b.values.find(function(Z){return"CUE"==Z.key}))C=y.data,w=C.includes("ONCE"),v=C.includes("PRE"),A=C.includes("POST");z=!
|
|
774
|
-
isSkippable:g,jg:h,ud:l,eh:p,once:w,
|
|
775
|
-
function aq(a){for(var b=[],c={},d=t(a.A),e=d.next();!e.done;c={Ub:c.Ub},e=d.next())e=e.value,c.Ub={start:e.startTime,end:null},e.
|
|
776
|
-
q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};
|
|
777
|
-
q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return this.s};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};
|
|
778
|
-
q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};Q("shaka.ads.MediaTailorAd",hq);hq.prototype.release=hq.prototype.release;
|
|
779
|
-
hq.prototype.
|
|
780
|
-
hq.prototype.
|
|
781
|
-
hq.prototype.
|
|
775
|
+
l=parseFloat(n),isNaN(l)&&(l=null);p=null;if(r=b.values.find(function(Z){return"X-PLAYOUT-LIMIT"==Z.key}))u=r.data,p=parseFloat(u),isNaN(p)&&(p=null);A=v=w=!1;if(y=b.values.find(function(Z){return"CUE"==Z.key}))C=y.data,w=C.includes("ONCE"),v=C.includes("PRE"),A=C.includes("POST");z=!1;(B=b.values.find(function(Z){return"X-TIMELINE-OCCUPIES"==Z.key}))?(D=B.data,z=D.includes("RANGE")):!m&&a.C.U()&&(z=!v&&!A);if(d){F=d.data;if(!F)return R.return(c);c.push({startTime:b.startTime,endTime:b.endTime,uri:F,
|
|
776
|
+
isSkippable:g,jg:h,ud:l,eh:p,once:w,Zb:v,Qc:A,Df:z});R.B(2);break}if(!e){R.B(2);break}I=e.data;if(!I)return R.return(c);L=Cg([I],lg());J=a.C.Gb().request(7,L);sa(R,4);return G(R,J.promise,6);case 6:E=R.h;K=yc(E.data);N=JSON.parse(K);M=t(N.ASSETS);for(P=M.next();!P.done;P=M.next())U=P.value,U.URI&&c.push({startTime:b.startTime,endTime:b.endTime,uri:U.URI,isSkippable:g,jg:h,ud:l,eh:p,once:w,Zb:v,Qc:A,Df:z});ua(R,2);break;case 4:va(R);case 2:return R.return(c)}})}
|
|
777
|
+
function aq(a){for(var b=[],c={},d=t(a.A),e=d.next();!e.done;c={Ub:c.Ub},e=d.next())e=e.value,c.Ub={start:e.startTime,end:null},e.Zb?(c.Ub.start=0,c.Ub.end=null):e.Qc?(c.Ub.start=-1,c.Ub.end=null):e.Df&&(c.Ub.end=e.endTime),b.find(function(f){return function(g){return f.Ub.start==g.start&&f.Ub.end==g.end}}(c))||b.push(c.Ub);a.g(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}function Yp(a){a.h.configure(a.C.Zh());var b=a.h.Gb();b.Nh();b.Oh();Bg(a.C.Gb(),b)};function dq(a){this.h=a||"";this.g=0}function eq(a){fq(a,/[ \t]+/gm)}function fq(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 gq(a){return a.g==a.h.length?null:(a=fq(a,/[^ \t\n]*/gm))?a[0]:null};function hq(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=fq(new dq(a),iq),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.s=d;this.m=!1}q=hq.prototype;q.needsSkipUI=function(){return!0};q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
778
|
+
q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};
|
|
779
|
+
q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return this.s};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};
|
|
780
|
+
q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};Q("shaka.ads.MediaTailorAd",hq);hq.prototype.release=hq.prototype.release;
|
|
781
|
+
hq.prototype.getPodIndex=hq.prototype.getPodIndex;hq.prototype.getTimeOffset=hq.prototype.getTimeOffset;hq.prototype.getMediaUrl=hq.prototype.getMediaUrl;hq.prototype.getAdvertiserName=hq.prototype.getAdvertiserName;hq.prototype.getCreativeAdId=hq.prototype.getCreativeAdId;hq.prototype.getAdId=hq.prototype.getAdId;hq.prototype.getVastMediaWidth=hq.prototype.getVastMediaWidth;hq.prototype.getVastMediaHeight=hq.prototype.getVastMediaHeight;hq.prototype.getVastMediaBitrate=hq.prototype.getVastMediaBitrate;
|
|
782
|
+
hq.prototype.getDescription=hq.prototype.getDescription;hq.prototype.getTitle=hq.prototype.getTitle;hq.prototype.getPositionInSequence=hq.prototype.getPositionInSequence;hq.prototype.getSequenceLength=hq.prototype.getSequenceLength;hq.prototype.setMuted=hq.prototype.setMuted;hq.prototype.resize=hq.prototype.resize;hq.prototype.isLinear=hq.prototype.isLinear;hq.prototype.isMuted=hq.prototype.isMuted;hq.prototype.setVolume=hq.prototype.setVolume;hq.prototype.getVolume=hq.prototype.getVolume;
|
|
783
|
+
hq.prototype.play=hq.prototype.play;hq.prototype.pause=hq.prototype.pause;hq.prototype.skip=hq.prototype.skip;hq.prototype.canSkipNow=hq.prototype.canSkipNow;hq.prototype.getTimeUntilSkippable=hq.prototype.getTimeUntilSkippable;hq.prototype.isSkippable=hq.prototype.isSkippable;hq.prototype.isPaused=hq.prototype.isPaused;hq.prototype.getRemainingTime=hq.prototype.getRemainingTime;hq.prototype.getMinSuggestedDuration=hq.prototype.getMinSuggestedDuration;hq.prototype.getDuration=hq.prototype.getDuration;
|
|
784
|
+
hq.prototype.needsSkipUI=hq.prototype.needsSkipUI;var iq=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function jq(a,b,c,d){this.C=a;this.L=b;this.h=c;this.l=null;this.S=NaN;this.i=d;this.K=!1;this.A=null;this.j=[];this.O=[];this.M=this.G=this.g=null;this.H=new Map;this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.s=new qd}jq.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.Pa(b.target,b.type,b.listener);kq(this);this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.A=null;this.j=[];this.O=[];this.H.clear()};
|
|
782
785
|
jq.prototype.release=function(){this.stop();this.s&&this.s.release()};jq.prototype.onManifestUpdated=function(a){this.K=a;""!=this.I&&(lq(this,this.I,this.P),this.P=!1)};jq.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};
|
|
783
786
|
function mq(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=Cg([b],lg()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Cc(e)),f=a.L.request(7,d),sa(u,2),G(u,f.promise,4);if(2!=u.g){g=u.h;h=yc(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new lb(b),m=new lb(k.trackingUrl),a.I=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.S,a.i(new S("ads-loaded",(new Map).set("loadTime",p))),r=new lb(k.manifestUrl),a.l.resolve(l.resolve(r).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
784
787
|
return ua(u,0)}va(u);if(!a.J.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.J);a.l=null;H(u)})}
|
|
@@ -796,13 +799,14 @@ function tq(a){var b=!1;a.h.paused?b=!0:(sq(a,"impression"),sq(a,"start"));a.m.p
|
|
|
796
799
|
d.type,d.listener)}
|
|
797
800
|
function sq(a,b){var c=a.G.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.M.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=Cg([d],lg()),d.method="POST",a.L.request(7,d))}switch(b){case "impression":a.i(new S("ad-impression"));break;case "start":a.i(new S("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new S("ad-muted"));break;case "unmute":a.i(new S("ad-volume-changed"));break;
|
|
798
801
|
case "resume":a.i(new S("ad-resumed"));break;case "pause":a.i(new S("ad-paused"));break;case "firstQuartile":a.i(new S("ad-first-quartile"));break;case "midpoint":a.i(new S("ad-midpoint"));break;case "thirdQuartile":a.i(new S("ad-third-quartile"));break;case "complete":a.i(new S("ad-complete"));a.i(new S("ad-stopped"));break;case "skip":a.i(new S("ad-skipped"));a.i(new S("ad-stopped"));break;case "breakStart":a.C.setAttribute("ad-active","true");break;case "breakEnd":a.C.removeAttribute("ad-active");
|
|
799
|
-
break;case "skipStateChanged":a.i(new S("ad-skip-state-changed"))}};function uq(a,b){this.g=a;this.i=null;this.h=b}q=uq.prototype;q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};
|
|
800
|
-
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};
|
|
801
|
-
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
802
|
-
q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};Q("shaka.ads.ServerSideAd",uq);uq.prototype.release=uq.prototype.release;
|
|
803
|
-
uq.prototype.getTimeOffset=uq.prototype.getTimeOffset;uq.prototype.getMediaUrl=uq.prototype.getMediaUrl;uq.prototype.getAdvertiserName=uq.prototype.getAdvertiserName;uq.prototype.getCreativeAdId=uq.prototype.getCreativeAdId;uq.prototype.getAdId=uq.prototype.getAdId;uq.prototype.getVastMediaWidth=uq.prototype.getVastMediaWidth;uq.prototype.getVastMediaHeight=uq.prototype.getVastMediaHeight;uq.prototype.getVastMediaBitrate=uq.prototype.getVastMediaBitrate;
|
|
804
|
-
uq.prototype.getTitle=uq.prototype.getTitle;uq.prototype.getPositionInSequence=uq.prototype.getPositionInSequence;uq.prototype.getSequenceLength=uq.prototype.getSequenceLength;uq.prototype.setMuted=uq.prototype.setMuted;uq.prototype.resize=uq.prototype.resize;uq.prototype.isLinear=uq.prototype.isLinear;uq.prototype.isMuted=uq.prototype.isMuted;uq.prototype.setVolume=uq.prototype.setVolume;uq.prototype.getVolume=uq.prototype.getVolume;
|
|
805
|
-
uq.prototype.skip=uq.prototype.skip;uq.prototype.canSkipNow=uq.prototype.canSkipNow;uq.prototype.getTimeUntilSkippable=uq.prototype.getTimeUntilSkippable;uq.prototype.isSkippable=uq.prototype.isSkippable;uq.prototype.isPaused=uq.prototype.isPaused;uq.prototype.getRemainingTime=uq.prototype.getRemainingTime;uq.prototype.getMinSuggestedDuration=uq.prototype.getMinSuggestedDuration;uq.prototype.getDuration=uq.prototype.getDuration;
|
|
802
|
+
break;case "skipStateChanged":a.i(new S("ad-skip-state-changed"))}};function uq(a,b){this.g=a;this.i=null;this.h=b}q=uq.prototype;q.needsSkipUI=function(){return!0};q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};
|
|
803
|
+
q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};
|
|
804
|
+
q.setMuted=function(a){this.h.muted=a};q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
805
|
+
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};Q("shaka.ads.ServerSideAd",uq);uq.prototype.release=uq.prototype.release;
|
|
806
|
+
uq.prototype.getPodIndex=uq.prototype.getPodIndex;uq.prototype.getTimeOffset=uq.prototype.getTimeOffset;uq.prototype.getMediaUrl=uq.prototype.getMediaUrl;uq.prototype.getAdvertiserName=uq.prototype.getAdvertiserName;uq.prototype.getCreativeAdId=uq.prototype.getCreativeAdId;uq.prototype.getAdId=uq.prototype.getAdId;uq.prototype.getVastMediaWidth=uq.prototype.getVastMediaWidth;uq.prototype.getVastMediaHeight=uq.prototype.getVastMediaHeight;uq.prototype.getVastMediaBitrate=uq.prototype.getVastMediaBitrate;
|
|
807
|
+
uq.prototype.getDescription=uq.prototype.getDescription;uq.prototype.getTitle=uq.prototype.getTitle;uq.prototype.getPositionInSequence=uq.prototype.getPositionInSequence;uq.prototype.getSequenceLength=uq.prototype.getSequenceLength;uq.prototype.setMuted=uq.prototype.setMuted;uq.prototype.resize=uq.prototype.resize;uq.prototype.isLinear=uq.prototype.isLinear;uq.prototype.isMuted=uq.prototype.isMuted;uq.prototype.setVolume=uq.prototype.setVolume;uq.prototype.getVolume=uq.prototype.getVolume;
|
|
808
|
+
uq.prototype.play=uq.prototype.play;uq.prototype.pause=uq.prototype.pause;uq.prototype.skip=uq.prototype.skip;uq.prototype.canSkipNow=uq.prototype.canSkipNow;uq.prototype.getTimeUntilSkippable=uq.prototype.getTimeUntilSkippable;uq.prototype.isSkippable=uq.prototype.isSkippable;uq.prototype.isPaused=uq.prototype.isPaused;uq.prototype.getRemainingTime=uq.prototype.getRemainingTime;uq.prototype.getMinSuggestedDuration=uq.prototype.getMinSuggestedDuration;uq.prototype.getDuration=uq.prototype.getDuration;
|
|
809
|
+
uq.prototype.needsSkipUI=uq.prototype.needsSkipUI;function vq(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.I=!1;this.A=this.m=this.s=null;this.C="";this.G=[];this.h=new qd;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){wq(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
|
|
806
810
|
e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new uq(f,e.l);e.A&&(e.m.i=e.A);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
|
|
807
811
|
var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(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.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))});
|
|
808
812
|
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.o(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.G=
|
|
@@ -812,8 +816,8 @@ q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!goo
|
|
|
812
816
|
q.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 S("ad-stopped"));this.dispatchEvent(new S("ad-content-attach-requested"));this.m=new Lp};q.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.I=Date.now()/1E3;b.m.requestAds(a)};
|
|
813
817
|
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new jq(a,b,c,function(e){return yq(d,e)})};q.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 ng,mq(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
814
818
|
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.I=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};q.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 vq(a,b,this.s,function(d){return yq(c,d)});this.g.configure(this.l)};
|
|
815
|
-
q.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)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.10.
|
|
816
|
-
(c.I=!0),c.j=new ng,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.10.
|
|
819
|
+
q.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)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.10.9";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
820
|
+
(c.I=!0),c.j=new ng,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.10.9";this.g.g.replaceAdTagParameters(a)};
|
|
817
821
|
q.getServerSideCuePoints=function(){zd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:Mp(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
818
822
|
q.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)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};q.onInterstitialMetadata=function(a,b,c){this.j||this.initInterstitial(null,a,b);this.j&&bq(this.j,c)};
|
|
819
823
|
function yq(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)}Q("shaka.ads.AdManager",xq);xq.prototype.onInterstitialMetadata=xq.prototype.onInterstitialMetadata;xq.prototype.onCueMetadataChange=xq.prototype.onCueMetadataChange;xq.prototype.onHlsTimedMetadata=xq.prototype.onHlsTimedMetadata;xq.prototype.onDashTimedMetadata=xq.prototype.onDashTimedMetadata;
|
|
@@ -882,12 +886,12 @@ b.skip(1),d=Cs(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&
|
|
|
882
886
|
function Fs(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Gs(a,b,c){var d=null;b=t(Fs(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=ns(f,c,a.i));a.h[e]=null}return d}function Hs(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Is(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Js[a<<2|b<<1|c]}
|
|
883
887
|
var Ks=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"]]),Js="black blue green cyan red magenta yellow white".split(" ");function Ls(){this.h=[];this.g=[];this.i=new zs;this.l=0;this.m=new Map([["CC1",new Yr(0,0)],["CC2",new Yr(0,1)],["CC3",new Yr(1,0)],["CC4",new Yr(1,1)]]);this.u=this.s=0;this.j=new Map;this.C=!0;this.A=new Set;Ms(this)}Ls.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Ms(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Hs(b.value)};
|
|
884
888
|
function Ms(a){a.s=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Zr,c.g=c.j,c.m=null,Kr(c.i),Kr(c.j),Kr(c.s);a.C=!0}
|
|
885
|
-
Ls.prototype.extract=function(a,b){if(this.C){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new Og(a,0);if(!(8>a.getLength())&&181===a.$()&&49===a.za()&&1195456820===a.V()&&3===a.$()&&(c=a.$(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.$(),f=(e&4)>>2,g=a.$(),h=a.$();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,xb:g,
|
|
889
|
+
Ls.prototype.extract=function(a,b){if(this.C){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new Og(a,0);if(!(8>a.getLength())&&181===a.$()&&49===a.za()&&1195456820===a.V()&&3===a.$()&&(c=a.$(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.$(),f=(e&4)>>2,g=a.$(),h=a.$();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,xb:g,cc: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})))}};
|
|
886
890
|
Ls.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=Ns(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())As(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Os(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
887
|
-
function Ns(a,b){var c=b.type;if(16===(b.xb&112)){var d=b.xb>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.xb&&255===b.
|
|
891
|
+
function Ns(a,b){var c=b.type;if(16===(b.xb&112)){var d=b.xb>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.xb&&255===b.cc||!b.xb&&!b.cc||!Ps(b.xb)||!Ps(b.cc))return 45<=++a.l&&Ms(a),null;a.l=0;b.xb&=127;b.cc&=127;var e=b.xb;if(1<=e&&15>=e||!b.xb&&!b.cc)return null;e=null;if(16===(b.xb&112))a:{a.A.add(d),d=b.xb;a=b.cc;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=
|
|
888
892
|
"white";e=!1;7>f?d=gs[f]:7===f&&(e=!0);a=1===(a&1);c.h!==bs&&(f=c.g,c.h===as&&b!==f.g&&(c=1+b-f.h,Xr(f,c,1+f.g-f.h,f.h),Nr(f,0,c-1),Nr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Or(c.g,Pr,32),d=!1,b=gs[(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=fs[(a&14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))Or(c.g,
|
|
889
|
-
Rr,a);else if(18===(d&246)&&32===(a&224))Or(c.g,d&1?Vr:Tr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.
|
|
890
|
-
e-1,e,b.h),Nr(b,0,e-1),Nr(b,b.g,15-b.g),c.l=a);break;case 46:Nr(c.j,0,15);break;case 47:b=null,c.h!==bs&&(b=Lr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,cs(c),c.l=a,d=b}e=d;break a}e=null}else a=b.
|
|
893
|
+
Rr,a);else if(18===(d&246)&&32===(a&224))Or(c.g,d&1?Vr:Tr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.cc){case 32:cs(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=$r(c,2,a);break;case 38:d=$r(c,3,a);break;case 39:d=$r(c,4,a);break;case 40:Or(c.g,Pr,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Kr(c.s);es(c);break;case 43:es(c);break;case 44:b=c.i;d=null;c.h!==bs&&(d=Lr(b,c.l,a));Nr(b,0,15);break;case 45:b=c.g;c.h!==as?d=null:(d=Lr(b,c.l,a),e=b.g-b.h+1,Xr(b,
|
|
894
|
+
e-1,e,b.h),Nr(b,0,e-1),Nr(b,b.g,15-b.g),c.l=a);break;case 46:Nr(c.j,0,15);break;case 47:b=null,c.h!==bs&&(b=Lr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,cs(c),c.l=a,d=b}e=d;break a}e=null}else a=b.cc,Or(c.g,Pr,b.xb),Or(c.g,Pr,a);return e}
|
|
891
895
|
function Os(a,b){var c=[];try{for(;b.Ea();){var d=Cs(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Cs(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Ds(e));for(var g=a.j.get(e),h=b.La();b.La()-h<f;){e=b;var k=Cs(e),l=k.value,m=k.pts;if(16===l){var n=Cs(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!ms(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.m-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=ns(r,p,g.i));if(r.h+1>=r.s){p=r;for(var u=
|
|
892
896
|
0,w=1;16>w;w++,u++)p.i[u]=p.i[w];for(w=0;1>w;w++,u++)p.i[u]=ks()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=ns(r,p,g.i));r.i[r.h]=ks();r.g=0;break;case 12:r.isVisible()&&(e=ns(r,p,g.i)),js(r),p=r,p.h=0,p.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=Es(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?ls(g.g,
|
|
893
897
|
"\u266a"):ls(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&ls(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ks.has(e)){var A=Ks.get(e);ls(g.g,A)}else ls(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?ls(g.g,"_"):ls(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(y){if(y instanceof T&&3E3===y.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}function Ps(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
@@ -948,7 +952,7 @@ function Zt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Nc(a.
|
|
|
948
952
|
function $t(a,b){if(!a.m.length)return b;b=new lb(b);var c=a.C||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Cb(e)&&qb(b,e);return b.toString()}function au(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Ub(function(){Zt(a,d)});if(c=b.TTL)a.G=c;a.g.X(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
949
953
|
function bu(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Yt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
950
954
|
function cu(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={Fc:e.Fc},g=f.next())if(e.Fc=g.value,g=b.get(e.Fc))d.push({dh:e.Fc,location:g});else if(g=a.H.find(function(k){return function(l){return l.xl==k.Fc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Si?(h=new lb(h),ob(h,g["URI-REPLACEMENT"].Si),d.push({dh:e.Fc,location:h.toString()})):d.push({dh:e.Fc,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
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 lb(k.location)).
|
|
955
|
+
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 lb(k.location)).dc))return!1;return!0});d.length&&(a.C=d[0].dh);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.C=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:Nc(a.i,d)};function du(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.u=this.s=!1;this.m=new Set}q=du.prototype;q.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=[]};q.Oj=function(){return this.j};q.Lg=function(){return this.l.slice()};q.sj=function(){return this.i};
|
|
952
956
|
function eu(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[fu(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[gu(n),n]})),l=new Map(h.textStreams.map(function(n){return[hu(n),n]}));h=new Map(h.imageStreams.map(function(n){return[iu(n),n]}));if(b){var m=ju(Tc);l.set(hu(m),m);m=ju("image");h.set(iu(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Ih:c,Pi:d,Ki:e,ci:f}}
|
|
953
957
|
q.mg=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I,L,J,E,K,N,M,P,U,R;return O(function(Z){if(1==Z.g){e=Vc;if(!b&&1==a.length)return f=eu(a,!1),g=f.Ih,h=f.Pi,k=f.Ki,l=f.ci,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()),Z.B(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return Z.return();u=eu(a,!0);w=u.Ih;v=u.Pi;A=u.Ki;y=u.ci;return G(Z,
|
|
954
958
|
Promise.all([ku(d,d.h,w,n,lu,mu,m),ku(d,d.g,v,n,lu,mu,m),ku(d,d.l,A,n,lu,mu,m),ku(d,d.i,y,n,lu,mu,m)]),2)}C=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,U=Pb(K.drmInfos,P.drmInfos),K.drmInfos.length&&P.drmInfos.length&&!U.length||(R=C++,z.push({id:R,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K,video:P,bandwidth:(K.bandwidth||0)+(P.bandwidth||0),drmInfos:U,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
@@ -980,31 +984,31 @@ function ju(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:functio
|
|
|
980
984
|
function Hu(a,b,c){if(b==a&&a!=c)return Ju;if(c==a&&a!=b)return Iu;if(b>a){if(c<=a||c-a<b-a)return Iu;if(c-a>b-a)return Ju}else{if(c>a)return Ju;if(a-c<a-b)return Iu;if(a-c>a-b)return Ju}return Lu}function Ku(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Iu:b<a?Ju:Lu}function tu(a){switch(a.type){case Tc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
981
985
|
function gu(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,Gu(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function fu(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,Gu(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function hu(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
982
986
|
function iu(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Gu(a){if(!Mu.has(a)){var b=Ce(a);Mu.set(a,b)}return Mu.get(a)}Q("shaka.util.PeriodCombiner",du);du.prototype.setUseStreamOnce=du.prototype.Gi;du.prototype.setAllowMultiTypeVariants=du.prototype.xi;du.prototype.combinePeriods=du.prototype.mg;du.prototype.getImageStreams=du.prototype.sj;du.prototype.getTextStreams=du.prototype.Lg;du.prototype.getVariants=du.prototype.Oj;var Iu=1,Lu=0,Ju=-1,Mu=new Map;function Nu(a,b){var c=new DOMParser,d=Ou.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 Pu(a,b){try{var c=Bc(a);return Nu(c,b)}catch(d){return null}}
|
|
983
|
-
var Ou=new Nb(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 Qu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ea=1;this.C=[];this.l={tf:"",type:"",profiles:[],
|
|
987
|
+
var Ou=new Nb(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 Qu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ea=1;this.C=[];this.l={tf:"",type:"",profiles:[],ic:null,ab:0,Ya:null,qe:0};this.s=new Map;this.u={};this.Y={};this.m=new du;this.J=0;this.aa=new nd(5);this.K=new Ub(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.Pa(a.I,"timeupdate"),a.I.paused)){a.G.ka(a.I,"timeupdate",function(){return Ru(a)});return}Ru(a)});this.O=new vg;this.M=null;this.ha=[];this.P=Infinity;this.H=!1;this.h=null;this.L=0;this.S=!1;this.G=new qd;this.I=
|
|
984
988
|
null;this.W=!1}q=Qu.prototype;q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.K.Sa();this.h&&this.h.configure(this.g);this.m&&(this.m.xi(this.g.dash.multiTypeVariantsAllowed&&xd()),this.m.Gi(this.g.dash.useStreamOnceInPeriodFlattening))};
|
|
985
989
|
q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.H=b.isLowLatencyMode(),c.A=[a],c.j=b,G(e,Su(c),2);d=e.h;c.j&&Tu(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
986
|
-
q.stop=function(){for(var a=t(Object.values(this.u)),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.u={};this.s.clear();this.l={tf:"",type:"",profiles:[],
|
|
990
|
+
q.stop=function(){for(var a=t(Object.values(this.u)),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.u={};this.s.clear();this.l={tf:"",type:"",profiles:[],ic:null,ab:0,Ya:null,qe:0};this.m=null;null!=this.K&&(this.K.stop(),this.K=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.O.destroy()};
|
|
987
991
|
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return sa(c,2),G(c,Su(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.tc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.J=b.endTime-a,Tu(this,0))}}};
|
|
988
992
|
q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.I=a};
|
|
989
993
|
function Su(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=Uu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=cu(a.h,"Location",!0),f.length&&(e=f)),g=Cg(e,a.g.retryParameters),h=Date.now(),G(n,Vu(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,Wu(a,k.data,k.uri,c),3)}l=Date.now();m=(l-h)/1E3;a.aa.sample(1,m);return n.return(m)})}
|
|
990
994
|
function Wu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=Fm;if(f!=g){zd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Pu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Cc(h.outerHTML)}k=dh(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Gm;l!=m&&l(k);if("Patch"===d)return w.return(Xu(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(Yu(a,k,c));
|
|
991
995
|
p=a.g.dash.xlinkFailGracefully;r=pt(k,a.g.retryParameters,p,c,a.j.networkingEngine);wg(a.O,r);return G(w,r.promise,2)}u=w.h;return w.return(Yu(a,u,c))})}
|
|
992
|
-
function Yu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I,L,J,E,K,N,M,P,U,R,Z,ca,Xa,Aa,Ra,cb,Ya,nb,ab,Za,wc,Ta,tb,Yb,Xc,
|
|
996
|
+
function Yu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I,L,J,E,K,N,M,P,U,R,Z,ca,Xa,Aa,Ra,cb,Ya,nb,ab,Za,wc,Ta,tb,Yb,Xc,Fe,Ge,He,be,zj,ce,Aj,Bj,mh,Ie;return O(function(xc){switch(xc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=kh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=nh(l))p=Nc(d,[n])[0],m&&(a.h?bu(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=cu(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.tf=b.attributes.id||
|
|
993
997
|
"";a.l.qe=sh(b,"publishTime",vh)||0;a.C=kh(b,"PatchLocation");u=Promise.resolve();if((w=ph(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new Yt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,A=nh(w))(y=sh(w,"queryBeforeStart",Eh,!1))?u=Zt(a.h,A):Zt(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),bu(a.h,"Location",B,D)}F=kh(b,"BaseURL");L=!1;if(a.h)for(J=t(F),E=J.next();!E.done;E=J.next())K=E.value,
|
|
994
998
|
N=K.attributes.serviceLocation,M=nh(K),N&&M&&(bu(a.h,"BaseURL",N,M),L=!0);L&&a.h||(P=F.map(nh),I=Nc(d,P));U=function(){return a.h&&L?cu(a.h,"BaseURL"):I?I:[]};a.l.Ya=U;R=0;F&&F.length&&(R=sh(F[0],"availabilityTimeOffset",Dh)||0);a.l.ab=R;Z=a.g.dash.ignoreMinBufferTime;ca=0;Z||(ca=sh(b,"minBufferTime",wh)||0);a.J=sh(b,"minimumUpdatePeriod",wh,-1);Xa=sh(b,"availabilityStartTime",vh);Aa=sh(b,"timeShiftBufferDepth",wh);Ra=a.g.dash.ignoreSuggestedPresentationDelay;cb=null;Ra||(cb=sh(b,"suggestedPresentationDelay",
|
|
995
|
-
wh));Ya=a.g.dash.ignoreMaxSegmentDuration;nb=null;Ya||(nb=sh(b,"maxSegmentDuration",wh));ab=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.W=a.i.presentationTimeline.U()&&"static"==ab);a.l.type=ab;if(a.i)for(Za=a.i.presentationTimeline,wc=t(Object.values(a.u)),Ta=wc.next();!Ta.done;Ta=wc.next())tb=Ta.value,tb.segmentIndex&&tb.segmentIndex.hb(Za.Hb());else Yb=a.g.defaultPresentationDelay||1.5*ca,Xc=null!=cb?cb:Yb,Za=new Ck(Xa,Xc,a.g.dash.autoCorrectDrift);Za.Uc("static"==ab);(
|
|
996
|
-
!isNaN(a.g.availabilityWindowOverride)&&(Aa=a.g.availabilityWindowOverride);null==Aa&&(Aa=Infinity);Za.Bf(Aa);
|
|
997
|
-
a.H&&Za.zi(a.P);Za.Xg(nb||1);return G(xc,u,2);case 2:a.H&&(ca=0,Bj=null!=cb?cb:a.g.defaultPresentationDelay,Za.nh(Bj));if(!a.i)return G(xc,a.m.mg(ce,
|
|
998
|
-
gapCount:a.L,isLowLatency:a.S};if(!Za.Ni()){xc.B(7);break}mh=kh(b,"UTCTiming");return G(xc,cv(a,U,mh),8);case 8:
|
|
999
|
-
function Xu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I,L,J;return O(function(E){if(1==E.g){c=b.attributes.mpdId;d=sh(b,"originalPublishTime",vh);if(!c||c!==a.l.tf||d!==a.l.qe)throw a.C=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(jh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Gh(l.attributes.sel||""),n=m[m.length-1],p=nh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.qc){r=nh(l)||"";var K=wh(r);if(null!=K){a.l.
|
|
999
|
+
wh));Ya=a.g.dash.ignoreMaxSegmentDuration;nb=null;Ya||(nb=sh(b,"maxSegmentDuration",wh));ab=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.W=a.i.presentationTimeline.U()&&"static"==ab);a.l.type=ab;if(a.i)for(Za=a.i.presentationTimeline,wc=t(Object.values(a.u)),Ta=wc.next();!Ta.done;Ta=wc.next())tb=Ta.value,tb.segmentIndex&&tb.segmentIndex.hb(Za.Hb());else Yb=a.g.defaultPresentationDelay||1.5*ca,Xc=null!=cb?cb:Yb,Za=new Ck(Xa,Xc,a.g.dash.autoCorrectDrift);Za.Uc("static"==ab);(Fe=Za.U())&&
|
|
1000
|
+
!isNaN(a.g.availabilityWindowOverride)&&(Aa=a.g.availabilityWindowOverride);null==Aa&&(Aa=Infinity);Za.Bf(Aa);Ge=b.attributes.profiles||"";a.l.profiles=Ge.split(",");He={Vb:"static"!=ab,presentationTimeline:Za,Na:null,ya:null,Ba:null,N:null,bandwidth:0,Rg:!1,ab:R,ic:null,profiles:Ge.split(","),roles:null};a.L=0;be=Zu(a,He,U,b);zj=be.duration;ce=be.periods;("static"!=ab||a.W)&&be.Sh||Za.vb(zj||Infinity);a.S&&!a.H&&(Aj=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.H=a.j.isLowLatencyMode());
|
|
1001
|
+
a.H&&Za.zi(a.P);Za.Xg(nb||1);return G(xc,u,2);case 2:a.H&&(ca=0,Bj=null!=cb?cb:a.g.defaultPresentationDelay,Za.nh(Bj));if(!a.i)return G(xc,a.m.mg(ce,He.Vb),6);a.i.periodCount=ce.length;a.i.gapCount=a.L;return G(xc,$u(a,ce,!1),4);case 6:a.i={presentationTimeline:Za,variants:a.m.j,textStreams:a.m.Lg(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:av(b),nextUrl:bv(b),periodCount:ce.length,
|
|
1002
|
+
gapCount:a.L,isLowLatency:a.S};if(!Za.Ni()){xc.B(7);break}mh=kh(b,"UTCTiming");return G(xc,cv(a,U,mh),8);case 8:Ie=xc.h;if(!a.j)return xc.return();Za.Ai(Ie);case 7:Za.mf();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(xc)}})}function $u(a,b,c){var d;return O(function(e){if(1==e.g)return G(e,a.m.mg(b,!0,c),2);a.i.variants=a.m.j;d=a.m.Lg();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
|
|
1003
|
+
function Xu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I,L,J;return O(function(E){if(1==E.g){c=b.attributes.mpdId;d=sh(b,"originalPublishTime",vh);if(!c||c!==a.l.tf||d!==a.l.qe)throw a.C=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(jh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Gh(l.attributes.sel||""),n=m[m.length-1],p=nh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.qc){r=nh(l)||"";var K=wh(r);if(null!=K){a.l.ic=K;for(var N=t(a.s.values()),M=N.next();!M.done;M=N.next())M.value.ic=
|
|
1000
1004
|
K}}else if("type"===n.qc){a.i.presentationTimeline.Uc("static"==p);a.l.type=p;K=t(a.s.values());for(N=K.next();!N.done;N=K.next())N.value.Vb="dynamic"==p;"static"==p&&(a.J=-1)}else"publishTime"===n.qc?a.l.qe=vh(p)||0:null===n.qc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Hh(a.C,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.s.keys()),M=N.next();!M.done;M=N.next())if(M=M.value,M.startsWith(K)){var P=
|
|
1001
1005
|
a.s.get(M);mt(P,Ot,"SegmentTimeline").children=[];dv(a,M);a.s.delete(M)}}else if("SegmentTemplate"===n.name){N=Gh(l.attributes.sel||"");K=N[N.length-1];if(K.qc){N=ev(a,N);M=nh(l)||"";P=t(N);for(var U=P.next();!U.done;U=P.next())U=a.s.get(U.value),Ih(U.N.zc,l.tagName,K.qc,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=Gh(l.attributes.sel||"");K=ev(a,K);N=t(K);for(M=N.next();!M.done;M=N.next())M=a.s.get(M.value),M=
|
|
1002
|
-
mt(M,Ot,"SegmentTimeline"),P=kh(M,"S"),Hh(P,l),M.children=P;y=K;C=t(y);for(v=C.next();!v.done;v=C.next())z=v.value,g.add(z)}B=t(g);for(v=B.next();!v.done;v=B.next())D=v.value,dv(a,D);F=t(f);for(I=F.next();!I.done;I=F.next())L=I.value,e.push.apply(e,x(Zu(a,{Vb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,Na:null,ya:null,Ba:null,N:null,bandwidth:0,Rg:!1,ab:a.l.ab,profiles:a.l.profiles,
|
|
1003
|
-
a.i.gapCount=a.L;return G(E,$u(a,e,!0),2)}"static"==a.l.type&&(J=a.l.
|
|
1006
|
+
mt(M,Ot,"SegmentTimeline"),P=kh(M,"S"),Hh(P,l),M.children=P;y=K;C=t(y);for(v=C.next();!v.done;v=C.next())z=v.value,g.add(z)}B=t(g);for(v=B.next();!v.done;v=B.next())D=v.value,dv(a,D);F=t(f);for(I=F.next();!I.done;I=F.next())L=I.value,e.push.apply(e,x(Zu(a,{Vb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,Na:null,ya:null,Ba:null,N:null,bandwidth:0,Rg:!1,ab:a.l.ab,profiles:a.l.profiles,ic:a.l.ic,roles:null},a.l.Ya,L).periods));if(!e.length)return E.B(2);a.i.periodCount+=e.length;
|
|
1007
|
+
a.i.gapCount=a.L;return G(E,$u(a,e,!0),2)}"static"==a.l.type&&(J=a.l.ic,a.i.presentationTimeline.vb(J||Infinity));H(E)})}function ev(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.s.values()),e=a.next();!e.done;e=a.next())e=e.value,e.Na.id===c&&e.Ba.id===d&&e.N.id&&b.push(c+","+e.N.id);return b}
|
|
1004
1008
|
function dv(a,b){var c=a.s.get(b),d=a.u[b];d.segmentIndex&&d.segmentIndex.hb(a.i.presentationTimeline.Hb());try{var e=Nt(c,function(f,g,h,k){return fv(a,f,g,h,k)},a.u,!0,a.g.dash.initialSegmentLimit,a.Y,c.N.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.B(0);f=d;return G(g,e.Ic(),3)}f.segmentIndex=g.h;H(g)})}}catch(f){if(b=c.N.contentType,b!=Tc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
1005
1009
|
function av(a){var b=ph(a,"ServiceDescription");if(!b)return null;a=ph(b,"Latency");b=ph(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)));
|
|
1006
1010
|
return c}function bv(a){a=kh(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}
|
|
1007
|
-
function Zu(a,b,c,d){var e=b.
|
|
1011
|
+
function Zu(a,b,c,d){var e=b.ic;e||(e=sh(d,"mediaPresentationDuration",wh),a.l.ic=e);var f=0;a.i&&a.i.presentationTimeline&&a.W&&(f=a.i.presentationTimeline.sc());var g=[],h=f;d=kh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=sh(l,"start",wh,h),p=l.attributes.id,r=sh(l,"duration",wh),u=null;if(m){var w=sh(m,"start",wh);null!=w&&(u=w-n)}else null!=e&&(u=e-n+f);w=Wc;u&&r&&Math.abs(u-r)>w&&u>r&&a.L++;null==u&&(u=r);if(!(null!==a.M&&null!==p&&null!==n&&n<a.M)||a.ha.includes(p)||k+1==
|
|
1008
1012
|
d.length){null!==n&&(null===a.M||n>a.M)&&(a.M=n);h=gv(a,b,c,{start:n,duration:u,node:l,ie:null==u||!m});g.push(h);b.Na.id&&u&&(a.Y[b.Na.id]=u);if(null==u){h=null;break}h=n+u}}a.ha=g.map(function(v){return v.id});return null!=e?{periods:g,duration:e+f,Sh:!1}:{periods:g,duration:h,Sh:!0}}
|
|
1009
1013
|
function gv(a,b,c,d){b.Na=hv(a,d.node,null,c);b.ya=d;b.Na.ab=b.ab;b.Na.id||(b.Na.id="__shaka_period_"+d.start);var e=kh(d.node,"EventStream");c=b.presentationTimeline.Hb();e=t(e);for(var f=e.next();!f.done;f=e.next())iv(a,d.start,d.duration,f.value,c);c=kh(d.node,"AdaptationSet").map(function(m){return jv(a,b,m)}).filter(Xe);if(b.Vb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Bk);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);
|
|
1010
1014
|
}d=c.filter(function(m){return!m.Ah});c=c.filter(function(m){return m.Ah});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ah.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={Ie:h.Ie},l=k.next())h.Ie=l.value,h.Ie.trickModeVideo=e.streams.find(function(m){return function(n){return Ce(m.Ie.codecs)==Ce(n.codecs)}}(h))}}}c=kv(a.g.disableAudio,d,"audio");e=kv(a.g.disableVideo,d,"video");f=kv(a.g.disableText,
|
|
@@ -1017,7 +1021,7 @@ n.next();!w.done;w=n.next())if(v=w.value,w=v.attributes.schemeIdUri,v=v.attribut
|
|
|
1017
1021
|
L=$c(b.Ba.language||"und"),J=b.Ba.label;m=kh(c,"Representation");c=m.map(function(E){if(E=lv(a,b,I,k,L,J,f,h,y,E,C,A))E.hdr=E.hdr||p,E.colorGamut=E.colorGamut||r,E.fastSwitching=u;return E}).filter(function(E){return!!E});if(0==c.length){g="image"==b.Ba.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new T(2,4,4003);}if(!b.Ba.contentType||"application"==b.Ba.contentType)for(b.Ba.contentType=mv(c[0].mimeType,c[0].codecs),l=t(c),w=l.next();!w.done;w=l.next())w.value.type=b.Ba.contentType;
|
|
1018
1022
|
l=b.Ba.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(Xe);return{id:l,contentType:b.Ba.contentType,language:L,fm:f,streams:c,drmInfos:I.drmInfos,Ah:g,Bk:m}}
|
|
1019
1023
|
function lv(a,b,c,d,e,f,g,h,k,l,m,n){b.N=hv(a,l,b.Ba,null);var p=b.N.id;a.P=Math.min(a.P,b.N.ab);a.S=0<a.P;if(!nv(b.N))return null;var r=b.ya.start;b.bandwidth=sh(l,"bandwidth",zh)||0;b.roles=h;var u=b.N.contentType,w=u==Tc||"application"==u;u="image"==u;try{var v=void 0;if(c.fg){var A=b.N.Ya,y=Nc(A(),[c.fg.dk]),C=Cg(y,a.g.retryParameters);v={bitsKey:128,blockCipherMode:"CBC",iv:c.fg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var K,N,M;return O(function(P){if(1==P.g)return G(P,Vu(a,C,6),2);
|
|
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.N.aesKey=v;A=function(K,N,M,P){return fv(a,K,N,M,P)};if(b.N.wd)var z=Ct(b,A,v);else if(b.N.mc)z=It(b,a.u,v);else if(b.N.zc)z=Nt(b,A,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.Y,v,n,!1);else{var B=b.ya.duration||0,D=b.N.Ya,F=b.N.mimeType,I=b.N.codecs;z={Ic:function(){var K=$k(r,B,D());K.
|
|
1024
|
+
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.N.aesKey=v;A=function(K,N,M,P){return fv(a,K,N,M,P)};if(b.N.wd)var z=Ct(b,A,v);else if(b.N.mc)z=It(b,a.u,v);else if(b.N.zc)z=Nt(b,A,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.Y,v,n,!1);else{var B=b.ya.duration||0,D=b.N.Ya,F=b.N.mimeType,I=b.N.codecs;z={Ic:function(){var K=$k(r,B,D());K.ec(function(N){N.mimeType=
|
|
1021
1025
|
F;N.codecs=I});return Promise.resolve(K)}}}}catch(K){if((w||u)&&4002==K.code)return null;throw K;}n=kh(l,"ContentProtection");n=ct(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;kh(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=kh(l,"EssentialProperty").find(function(K){return["http://dashif.org/thumbnail_tile",
|
|
1022
1026
|
"http://dashif.org/guidelines/thumbnail_tile"].includes(K.attributes.schemeIdUri)}))&&(L=l.attributes.value),!L))return null;var J;l=b.N.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.N.id?b.Na.id+","+b.N.id:"";a.C.length&&p&&a.s.set(b.Na.id+","+p,ov(b));var E=w&&a.u[w]?a.u[w]:{id:a.ea++,originalId:b.N.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&
|
|
1023
1027
|
(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.N.mimeType,codecs:l,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.Ba.language,label:f,type:b.Ba.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.N.qd,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:A,
|
|
@@ -1048,18 +1052,18 @@ function Sv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,10
|
|
|
1048
1052
|
null;this.Xa=0;this.s=Infinity;this.Fa=this.Aa=this.S=0;this.aa=new vg;this.G=new Map;this.H=new Map;this.sa=new Map;this.qa=new Map;this.L=new Map;this.ra=new Map;this.Ga=new Map;this.Lb=this.K=!1;this.Kb=new nd(5);this.l=null;this.P=!0;this.Ha=new Set;this.W=new qd;this.Y=null}q=Tv.prototype;q.configure=function(a){this.g=a;this.l&&this.l.configure(this.g)};
|
|
1049
1053
|
q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.K=b.isLowLatencyMode(),G(e,Wv(c,[a]),2)):3!=e.g?(d=e.h,c.M=d.uri,G(e,Xv(c,d.data,a),3)):e.return(c.m)})};
|
|
1050
1054
|
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.aa&&(a.push(this.aa.destroy()),this.aa=null);this.g=this.h=null;this.pb.clear();this.m=null;this.i.clear();this.I.clear();this.H.clear();this.u.clear();this.sa.clear();this.qa.clear();this.L.clear();this.ra.clear();this.Ga.clear();this.Ha.clear();this.l&&this.l.destroy();this.W&&(this.W.release(),this.W=null);return Promise.all(a)};
|
|
1051
|
-
q.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(!Yv(a))return p.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(r){return r.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Zv(a,g));return G(p,Promise.all(b),2)}$v(a,d.map(function(r){return r.stream}));h=d.some(function(r){return 0==r.ae});d.length&&!h&&(k=aw,bw(a,k.Ui),l=d.map(function(r){return r.
|
|
1055
|
+
q.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(!Yv(a))return p.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(r){return r.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Zv(a,g));return G(p,Promise.all(b),2)}$v(a,d.map(function(r){return r.stream}));h=d.some(function(r){return 0==r.ae});d.length&&!h&&(k=aw,bw(a,k.Ui),l=d.map(function(r){return r.hc}),a.j.vb(Math.min.apply(Math,x(l))),
|
|
1052
1056
|
a.h.updateDuration());h&&cw(a);m=t(d);for(f=m.next();!f.done;f=m.next())n=f.value,n.stream.segmentIndex&&!n.stream.segmentIndex.T[0]&&a.h.disableStream(n.stream);H(p)})};function dw(a,b){return Yv(a)?a.O.get(b.type):b.pf}
|
|
1053
1057
|
function Zv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I,L,J,E,K,N,M,P,U,R,Z,ca,Xa;return O(function(Aa){switch(Aa.g){case 1:c=[];d=t(b.R());for(e=d.next();!e.done;e=d.next())f=e.value,g=new lb(f),h=g.g,b.Re&&(0<=b.Pb&&h.add("_HLS_msn",String(b.Pb)),0<=b.Qb&&h.add("_HLS_part",String(b.Qb))),b.Se&&h.add("_HLS_skip","YES"),Cb(h)&&qb(g,h),c.push(g.toString());sa(Aa,2);return G(Aa,Wv(a,c,!0),4);case 4:k=Aa.h;ua(Aa,3);break;case 2:throw l=va(Aa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Aa.return();
|
|
1054
1058
|
m=Mv(a.Ia,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.R().includes(n)||b.si.push(n);p=Ev(m.g,"EXT-X-DEFINE");r=ew(a,p,n);u=b.stream;w=dw(a,b);return G(Aa,fw(a,m,u.mimeType,b.R,r),5);case 5:v=Aa.h;A=v.keyIds;y=v.drmInfos;C=function(Ra,cb){return Ra.size===cb.size&&[].concat(x(Ra)).every(function(Ya){return cb.has(Ya)})};C(u.keyIds,A)||(u.keyIds=A,u.drmInfos=y,a.h.newDrmInfo(u));z=gw(a,m,w,r,b.R,b.type);B=z.segments;if(D=z.bandwidth)u.bandwidth=D;F=Dl(u);I=t(B);for(L=I.next();!L.done;L=
|
|
1055
|
-
I.next())J=L.value,J.ma&&(J.ma.od=F);u.segmentIndex.ke(B,a.j.Hb());B.length&&(E=Hv(m.g,"EXT-X-MEDIA-SEQUENCE",0),N=(K=Gv(m.g,"EXT-X-SKIP"))?Number(Av(K,"SKIPPED-SEGMENTS")):0,M=hw(E,B),P=M.Pb,U=M.Qb,b.Pb=P+N,b.Qb=U,R=w.get(E),u.segmentIndex.hb(R));if(Z=u.segmentIndex.T[0]||null)b.Pc=Z.startTime,ca=B[B.length-1],b.
|
|
1059
|
+
I.next())J=L.value,J.ma&&(J.ma.od=F);u.segmentIndex.ke(B,a.j.Hb());B.length&&(E=Hv(m.g,"EXT-X-MEDIA-SEQUENCE",0),N=(K=Gv(m.g,"EXT-X-SKIP"))?Number(Av(K,"SKIPPED-SEGMENTS")):0,M=hw(E,B),P=M.Pb,U=M.Qb,b.Pb=P+N,b.Qb=U,R=w.get(E),u.segmentIndex.hb(R));if(Z=u.segmentIndex.T[0]||null)b.Pc=Z.startTime,ca=B[B.length-1],b.hc=ca.endTime;if(Xa=Gv(m.g,"EXT-X-ENDLIST"))b.ae=!0;iw(a,m);jw(a,m.g,u.type,r,b.R);H(Aa)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
|
|
1056
1060
|
q.banLocation=function(a){this.l&&this.l.banLocation(a)};q.setMediaElement=function(a){this.Y=a};
|
|
1057
1061
|
function kw(a,b){for(var c=-1==a.J,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=dw(a,e);if(f=f.T[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.J=Math.max(a.J,k));e.rg=k;break}}}}if(!(0>a.J))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,lw(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.rg,0<e&&(d.T.splice(0,e),d=d.T[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),mw(a,
|
|
1058
1062
|
c,d)}
|
|
1059
1063
|
function nw(a,b){if(Infinity==a.ha){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.T[0]||null;null!=d&&null!=d.h&&(a.ha=Math.min(a.ha,d.h))}}b=a.ha;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!lw(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.T[0]||null;if(null==f.h)Sa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.R(),"Expect AV sync issues!");else for(mw(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.wh(b)}}}
|
|
1060
|
-
function mw(a,b,c){b.Pc+=c;b.
|
|
1064
|
+
function mw(a,b,c){b.Pc+=c;b.hc+=c;a=dw(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.R()}
|
|
1061
1065
|
function Xv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I,L,J,E,K,N,M,P,U,R,Z;return O(function(ca){switch(ca.g){case 1:d=Vc;e=Mv(a.Ia,b);f=Ev(e.g,"EXT-X-DEFINE");g=[];h=[];k=[];a.j=new Ck(null,0);a.j.Uc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.P=!1,C=Ev(e.g,"EXT-X-DEFINE"),n=ew(a,C,a.M),m=d.ua,z="",B=new Map,G(ca,ow(a,a.C++,n,e,l,"",m,z,!0,"Media Playlist",null,B,null,!1,null,!1),7);pw(a,f);p=Ev(e.g,"EXT-X-MEDIA");r=Ev(e.g,"EXT-X-STREAM-INF");u=Ev(e.g,"EXT-X-IMAGE-STREAM-INF");
|
|
1062
|
-
w=Ev(e.g,"EXT-X-I-FRAME-STREAM-INF");v=Ev(e.g,"EXT-X-SESSION-KEY");A=Ev(e.g,"EXT-X-SESSION-DATA");y=Ev(e.g,"EXT-X-CONTENT-STEERING");qw(a,A);return G(ca,rw(a,y),4);case 4:return sw(a,r),tw(a,p),G(ca,uw(a,r,v,p,l,a.u),5);case 5:return g=ca.h,h=vw(a,p),G(ca,ww(a,u,w),6);case 6:k=ca.h;ca.B(3);break;case 7:D=ca.h,a.i.set(c,D),D.stream&&(F=Dl(D.stream),D.stream.segmentIndex.
|
|
1066
|
+
w=Ev(e.g,"EXT-X-I-FRAME-STREAM-INF");v=Ev(e.g,"EXT-X-SESSION-KEY");A=Ev(e.g,"EXT-X-SESSION-DATA");y=Ev(e.g,"EXT-X-CONTENT-STEERING");qw(a,A);return G(ca,rw(a,y),4);case 4:return sw(a,r),tw(a,p),G(ca,uw(a,r,v,p,l,a.u),5);case 5:return g=ca.h,h=vw(a,p),G(ca,ww(a,u,w),6);case 6:k=ca.h;ca.B(3);break;case 7:D=ca.h,a.i.set(c,D),D.stream&&(F=Dl(D.stream),D.stream.segmentIndex.ec(function(Xa){Xa.ma&&(Xa.ma.od=F)})),m=D.stream.type,g.push({id:0,language:$c(z||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
|
|
1063
1067
|
m?D.stream:null,video:"video"==m?D.stream:null,bandwidth:D.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==e.type&&(Yv(a)&&(xw(a,e),I=a.s,a.A.X(I)),L=Array.from(a.i.values()),yw(a,L),cw(a),jw(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,
|
|
1064
1068
|
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1};if(a.ea||!a.g.hls.disableCodecGuessing){ca.B(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(ca,Promise.all(J),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){M=[];P=g[0];U=t([P.video,P.audio]);for(R=U.next();!R.done;R=U.next())(Z=
|
|
1065
1069
|
R.value)&&!Z.segmentIndex&&M.push(Z.createSegmentIndex());if(0<M.length)return G(ca,Promise.all(M),0)}ca.B(0)}})}
|
|
@@ -1067,14 +1071,14 @@ function zw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z,B,D,F,I;return O(func
|
|
|
1067
1071
|
case 5:p=L.h;case 4:(r=v.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return A=Kl(e.R(),e.Ib(),e.Fb(),a.g.retryParameters),G(L,Cw(a,A,n,{type:1}),6);case 6:y=L.h;C=y.data;if(!e.aesKey){L.B(7);break}return G(L,Jl(C,e.aesKey,f),8);case 8:C=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(" ");D=["audio/mp4","video/mp4","video/iso.segment"];if(Dj(Gb(C))){var J=C;var E=Gb(J);E=(new tj).parse(E);
|
|
1068
1072
|
var K=E.Xd();E=E.Ng();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.gb?N.push(E.gb):N.push("avc1.42E01E");P=!0;break;case "hvc":E.gb?N.push(E.gb):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 Gd("video/mp2t");
|
|
1069
1073
|
P.i(J);J=t(P.j());for(var U=J.next();!U.done;U=J.next())U=U.value,M.set(U,U);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,Ae:null,colorGamut:null}}else E=null;if(F=E)return L.return(F)}else if(B.includes(l)||D.includes(z)||r&&D.includes(r))if(I=Fl(p,C))return L.return(I);return z?L.return(El(z)):r?L.return(El(r)):L.return(c)}})}
|
|
1070
|
-
function cw(a){if(Yv(a)){if(a.xa==Dw){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.
|
|
1074
|
+
function cw(a){if(Yv(a)){if(a.xa==Dw){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.hc),c=Math.min(c,e.Pc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.A);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Bf(b)}}else a.j.vb(Ew(a));if(!a.j.u)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))&&
|
|
1071
1075
|
c.h&&a.j.Ci(c.h);a.j.mf()}function pw(a,b){var c=(new lb(a.M)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Av(e,"NAME");var f=Av(e,"VALUE");e=Av(e,"QUERYPARAM");d&&f&&(a.u.has(d)||a.u.set(d,f));e&&(d=c.get(e)[0])&&!a.u.has(d)&&a.u.set(e,d)}}
|
|
1072
1076
|
function ew(a,b,c){c=(new lb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Av(f,"NAME"),h=Av(f,"VALUE");e=Av(f,"QUERYPARAM");f=Av(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.u.get(f))&&d.set(f,e)}return d}
|
|
1073
1077
|
function sw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Av(d,"AUDIO");c=Av(d,"VIDEO");var f=Av(d,"SUBTITLES");d=Fw(a,d);if(f){var g=Rc(Tc,d);a.H.set(f,g);Od(d,g)}e&&(f=Rc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.H.set(e,f));c&&(e=Rc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.H.set(c,e))}}
|
|
1074
1078
|
function qw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Av(d,"DATA-ID");c=Av(d,"URI");var f=Av(d,"LANGUAGE");d=Av(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Iv([a.M],c,a.u)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new S("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1075
1079
|
function rw(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=Av(f,"PATHWAY-ID"),h=Av(f,"SERVER-URI"),g&&h){a.l=new Yt(a.h);a.l.configure(a.g);a.l.i=[a.M];a.l.setManifestType("HLS");a.l.h=g;c=Zt(a.l,h);break}return G(k,c,0)})}
|
|
1076
1080
|
function vw(a,b){var c=Fv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Gw(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=Bv(d.value,"GROUP-ID");if(d=a.H.get(e))if(e=a.I.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=Hw(Tc,d)||Iw(Tc),Jw(f.stream)}}return b.filter(function(g){return g})}
|
|
1077
|
-
function Jw(a){var b=new Set([ve(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.
|
|
1081
|
+
function Jw(a){var b=new Set([ve(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.ec(function(c){c.mimeType&&b.add(ve(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1078
1082
|
function ww(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,Kw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Bv(g,"URI"),k=Av(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Av(g,"LANGUAGE"),n=Av(g,"NAME"),
|
|
1079
1083
|
p=Av(g,"CHARACTERISTICS"),r=Lw(a,a.C++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Av(g,"RESOLUTION"),w=t(u?u.split("x"):[null,null]),v=w.next().value,A=w.next().value;r.stream.width=Number(v)||void 0;r.stream.height=Number(A)||void 0;var y=Av(g,"BANDWIDTH");y&&(r.stream.bandwidth=Number(y));a.i.set(h,r);l=r}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),G(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1080
1084
|
function Mw(a,b,c){b=b.filter(function(h){var k=Av(h,"URI")||"";return"SUBTITLES"!=Av(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=yv(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Gw(a,d[g],c)}
|
|
@@ -1096,16 +1100,16 @@ Number(m.split("x")[1]));if(n=Av(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i
|
|
|
1096
1100
|
function Vw(a,b,c,d,e,f,g,h,k){for(var l=a.C++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=Bv(r,"URI");r=Av(r,"PATHWAY-ID");a.l&&r&&bu(a.l,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Av(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.P=!1;b=null;break a}if(b){if("NONE"!=b){b=a.G.get(b);break a}a.P=!1}else if(!b&&a.G.size)for(b=t(a.G.keys()).next();!b.done;){b=a.G.get(b.value);break a}}b=null}c=Qc(d,c);d=Lw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);
|
|
1097
1101
|
a.i.set(n,d);return d}
|
|
1098
1102
|
function Lw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var D,F,I,L,J,E,K,N,M,P,U,R,Z,ca,Xa,Aa,Ra,cb,Ya,nb,ab,Za,wc;return O(function(Ta){switch(Ta.g){case 1:return D=Vc,F=y.R(),sa(Ta,2),G(Ta,Wv(a,y.R(),!0),4);case 4:I=Ta.h;ua(Ta,3);break;case 2:L=va(Ta);v.closeSegmentIndex();if(J=a.h.disableStream(v))return Ta.return();throw L;case 3:if(B.aborted)return Ta.return();E=I.uri;E==I.originalUri||F.includes(E)||A.push(E);K=Mv(a.Ia,I.data);if(1!=K.type)throw new T(2,4,4017);N=Ev(K.g,"EXT-X-DEFINE");M=ew(a,
|
|
1099
|
-
N,E);P=!1;(!a.ea&&a.g.hls.disableCodecGuessing||a.P&&e==D.ua&&!a.g.hls.disableClosedCaptionsDetection)&&0<K.segments.length&&(a.P=!1,P=!0);U=!a.ea&&a.g.hls.disableCodecGuessing;R=Yv(a);return G(Ta,ow(a,0,M,K,w,d,e,f,g,h,k,l,m,n,p,r,void 0,P,U),5);case 5:Z=Ta.h;if(B.aborted)return Ta.return();ca=Z.stream;Yv(a)&&!R&&xw(a,K);y.Pc=Z.Pc;y.
|
|
1103
|
+
N,E);P=!1;(!a.ea&&a.g.hls.disableCodecGuessing||a.P&&e==D.ua&&!a.g.hls.disableClosedCaptionsDetection)&&0<K.segments.length&&(a.P=!1,P=!0);U=!a.ea&&a.g.hls.disableCodecGuessing;R=Yv(a);return G(Ta,ow(a,0,M,K,w,d,e,f,g,h,k,l,m,n,p,r,void 0,P,U),5);case 5:Z=Ta.h;if(B.aborted)return Ta.return();ca=Z.stream;Yv(a)&&!R&&xw(a,K);y.Pc=Z.Pc;y.hc=Z.hc;y.Se=Z.Se;y.Re=Z.Re;y.ae=Z.ae;y.pf=Z.pf;y.Pb=Z.Pb;y.Qb=Z.Qb;y.Vg=!0;v.segmentIndex=ca.segmentIndex;v.encrypted=ca.encrypted;v.drmInfos=ca.drmInfos;v.keyIds=ca.keyIds;
|
|
1100
1104
|
v.mimeType=ca.mimeType;v.bandwidth=v.bandwidth||ca.bandwidth;v.codecs=v.codecs||ca.codecs;v.closedCaptions=v.closedCaptions||ca.closedCaptions;v.width=v.width||ca.width;v.height=v.height||ca.height;v.hdr=v.hdr||ca.hdr;v.colorGamut=v.colorGamut||ca.colorGamut;"und"==v.language&&"und"!=ca.language&&(v.language=ca.language);v.language=v.language||ca.language;v.channelsCount=v.channelsCount||ca.channelsCount;v.audioSamplingRate=v.audioSamplingRate||ca.audioSamplingRate;Jw(v);v.drmInfos.length&&a.h.newDrmInfo(v);
|
|
1101
|
-
Xa=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)Xa=!0;a.m&&Xa&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==D.ua||e==D.ia)for(Aa=t(a.i.values()),Ra=Aa.next();!Ra.done;Ra=Aa.next())cb=Ra.value,cb.Vg||cb.type!=e||(cb.stream.mimeType=ca.mimeType,Jw(cb.stream));e==D.Ka&&(Ya=ca.segmentIndex.get(0))&&Ya.ma&&(v.mimeType="application/mp4",Jw(v));nb=Dl(v);v.segmentIndex.
|
|
1102
|
-
ab.filter(function(tb){return tb.stream.segmentIndex}),yw(a,Za),cw(a),wc=a.s,0<wc&&a.A.X(wc)));jw(a,K.g,v.type,M,w);H(Ta)}})}function w(){return a.l&&1<c.length?cu(a.l,b):A.concat(Jv([a.M],c,a.u))}var v=Yw(a,d,e,f,g,h,k,l,m,n,p,r),A=[],y={stream:v,type:e,si:A,R:w,Pc:0,
|
|
1103
|
-
!v.segmentIndex&&z.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);C=null};return y}function Ew(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.
|
|
1105
|
+
Xa=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)Xa=!0;a.m&&Xa&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==D.ua||e==D.ia)for(Aa=t(a.i.values()),Ra=Aa.next();!Ra.done;Ra=Aa.next())cb=Ra.value,cb.Vg||cb.type!=e||(cb.stream.mimeType=ca.mimeType,Jw(cb.stream));e==D.Ka&&(Ya=ca.segmentIndex.get(0))&&Ya.ma&&(v.mimeType="application/mp4",Jw(v));nb=Dl(v);v.segmentIndex.ec(function(tb){tb.ma&&(tb.ma.od=nb)});Xw(a)&&(a.Nb?yw(a,[y]):(a.Nb=!0,ab=Array.from(a.i.values()),Za=
|
|
1106
|
+
ab.filter(function(tb){return tb.stream.segmentIndex}),yw(a,Za),cw(a),wc=a.s,0<wc&&a.A.X(wc)));jw(a,K.g,v.type,M,w);H(Ta)}})}function w(){return a.l&&1<c.length?cu(a.l,b):A.concat(Jv([a.M],c,a.u))}var v=Yw(a,d,e,f,g,h,k,l,m,n,p,r),A=[],y={stream:v,type:e,si:A,R:w,Pc:0,hc:0,pf:new Map,Se:!1,Re:!1,ae:!1,rg:-1,Pb:-1,Qb:-1,Vg:!1},C=null,z=new AbortController;v.createSegmentIndex=function(){if(C)return C;z=new AbortController;return C=new Promise(function(B){B(u(z.signal))})};v.closeSegmentIndex=function(){C&&
|
|
1107
|
+
!v.segmentIndex&&z.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);C=null};return y}function Ew(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.hc));return b}function $v(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.ec(function(e){c.push(e)});a.j.me(c)}
|
|
1104
1108
|
function yw(a,b){if(!Yv(a))for(var c=Ew(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.ed(0,c);$v(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?kw(a,b):(nw(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&kw(a,b))}function lw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
|
|
1105
1109
|
function Xw(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}
|
|
1106
1110
|
function ow(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y){A=void 0===A?!0:A;y=void 0===y?!0:y;var C,z,B,D,F,I,L,J,E,K,N,M,P,U,R,Z,ca,Xa,Aa,Ra,cb,Ya,nb,ab,Za,wc;return O(function(Ta){switch(Ta.g){case 1:var tb=Gv(d.g,"EXT-X-PLAYLIST-TYPE"),Yb=Gv(d.g,"EXT-X-ENDLIST");Yb=tb&&"VOD"==tb.value||Yb;tb=tb&&"EVENT"==tb.value&&!Yb;tb=!Yb&&!tb;Yb?bw(a,Vv):tb?bw(a,Dw):bw(a,Zw);Yv(a)&&iw(a,d);C=Yv(a)?a.O.get(g):new Map;z=gw(a,d,C,c,e,g);B=z.segments;D=z.bandwidth;J=L=I=F=null;if(!(0<B.length&&A)){Ta.B(2);break}return G(Ta,
|
|
1107
1111
|
zw(a,B),3);case 3:E=Ta.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.Ae,J=E.colorGamut,y&&(v=E.mimeType,f=E.codecs);case 2:if(v){Ta.B(4);break}return G(Ta,$w(a,g,f,B),5);case 5:v=Ta.h;case 4:return G(Ta,fw(a,d,v,e,c),6);case 6:K=Ta.h;N=K.drmInfos;M=K.keyIds;P=K.encrypted;U=K.Yi;if(P&&!N.length&&!U)throw new T(2,4,4026);R=Yw(a,f,g,h,k,l,m,n,p,r,u,w);R.encrypted=P;R.drmInfos=N;R.keyIds=M;R.mimeType=v;D&&(R.bandwidth=D);Jw(R);"video"==
|
|
1108
|
-
g&&(F||I||L||J)&&Ww(R,F,I,null,L,null,J);Yv(a)&&iw(a,d);Z=B[0].startTime;ca=B[B.length-1];Xa=ca.endTime;Aa=new Yk(B);R.segmentIndex=Aa;cb=(Ra=Gv(d.g,"EXT-X-SERVER-CONTROL"))?null!=zv(Ra,"CAN-SKIP-UNTIL"):!1;Ya=Ra?null!=zv(Ra,"CAN-BLOCK-RELOAD"):!1;nb=Hv(d.g,"EXT-X-MEDIA-SEQUENCE",0);ab=hw(nb,B);Za=ab.Pb;wc=ab.Qb;return Ta.return({stream:R,type:g,si:[],R:e,Pc:Z,
|
|
1112
|
+
g&&(F||I||L||J)&&Ww(R,F,I,null,L,null,J);Yv(a)&&iw(a,d);Z=B[0].startTime;ca=B[B.length-1];Xa=ca.endTime;Aa=new Yk(B);R.segmentIndex=Aa;cb=(Ra=Gv(d.g,"EXT-X-SERVER-CONTROL"))?null!=zv(Ra,"CAN-SKIP-UNTIL"):!1;Ya=Ra?null!=zv(Ra,"CAN-BLOCK-RELOAD"):!1;nb=Hv(d.g,"EXT-X-MEDIA-SEQUENCE",0);ab=hw(nb,B);Za=ab.Pb;wc=ab.Qb;return Ta.return({stream:R,type:g,si:[],R:e,Pc:Z,hc:Xa,Se:cb,Re:Ya,ae:!1,rg:-1,Pb:Za,Qb:wc,pf:C,Vg:!1})}})}
|
|
1109
1113
|
function hw(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}}
|
|
1110
1114
|
function Yw(a,b,c,d,e,f,g,h,k,l,m,n){var p=Hw(c,b)||Iw(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Tc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1111
1115
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Tc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:$c(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:r,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,
|
|
@@ -1230,7 +1234,7 @@ q.update=function(){};
|
|
|
1230
1234
|
q.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 Ry,sa(m,2,3),G(m,e.init(),5);case 5:return G(m,Vy(e,d.Ob(),d.bb()),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.B(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),G(m,e.destroy(),10);case 10:xa(m,0);break;case 2:va(m),m.B(3)}})};
|
|
1231
1235
|
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};Ci["application/x-offline-manifest"]=function(){return new rz};function sz(){}function tz(a){var b=kz(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=rg(a)):a=b&&"segment"==b.g?uz(b.key(),b):pg(new T(2,1,9004,a));return a}
|
|
1232
1236
|
function uz(a,b){var c=new Ry;return rg(void 0).Ta(function(){return c.init()}).Ta(function(){return Vy(c,b.Ob(),b.bb())}).Ta(function(d){return d.getSegments([b.key()])}).Ta(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}Q("shaka.offline.OfflineScheme",sz);sz.plugin=tz;yg("offline",tz);function vz(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 r=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,wz(w.info,p)){w.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=xz(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
|
|
1233
|
-
function xz(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Kh({
|
|
1237
|
+
function xz(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Kh({jc:b,onError:function(){},vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),sa(f,2),d.configure(a),G(f,Sh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(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==
|
|
1234
1238
|
h.g)return sa(h,2),G(h,di(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);H(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function wz(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pd(a.audioCapabilities,b.audioCapabilities,c)&&Pd(a.videoCapabilities,b.videoCapabilities,c)};function yz(a,b,c){var d=b.presentationTimeline.getDuration();b=zz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Az(a,b){var c=mz(new lz(a.Ob(),a.bb()),b),d=b.appMetadata||{};c=zz(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}}
|
|
1235
1239
|
function zz(a){var b=[],c=Gf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(xf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(yf(c.value));return b};function Bz(){this.g={}}function Cz(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 Dz(a,b){a.g[b.id]=b.bandwidth||2048}function Ez(a,b){a=a.g[b];null==a&&(a=0);return a};function Fz(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.Gb()):(this.h=Em(),this.g=new xg);this.i=[];this.j=[];var c=!a;this.l=new Kg(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 By(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.B(4);break}return G(k,b.g.destroy(),4);
|
|
1236
1240
|
case 4:b.h=null,b.g=null,H(k)}})})}function Gz(){if(Vb())a:{var a=t(Sy.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}q=Fz.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=vm(a,b));return Im(this.h,a)};q.getConfiguration=function(){var a=Em();Im(a,this.h,Em());return a};q.Gb=function(){return this.g};
|
|
@@ -1256,7 +1260,7 @@ function dA(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:r
|
|
|
1256
1260
|
q.list=function(){return Xz(this,eA())};function eA(){var a,b,c;return O(function(d){switch(d.g){case 1:return Jz(),a=[],b=new Ry,ta(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),Uy(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=Az(new jz("manifest",e.Ob,e.bb,l),k);a.push(k)});H(h)})})}),G(d,c,2);case 2:return wa(d),G(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
|
|
1257
1261
|
function Kz(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},
|
|
1258
1262
|
onMetadata:function(){},disableStream:function(){}},c.configure(d.manifest),Lz(a),G(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Lz(a),k=fA(h),G(l,Promise.all(gb(k,function(m){return m.createSegmentIndex()})),3);Lz(a);if(e)throw e;return l.return(h)})}
|
|
1259
|
-
q.dd=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Kh({
|
|
1263
|
+
q.dd=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Kh({jc:d.g,onError:b,vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),G(f,Ph(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?G(f,bi(e),3):f.return(e)})};
|
|
1260
1264
|
function Wz(a,b,c,d){var e=new Map,f=fA(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=gA(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()),yh:Array.from(e.values())}}
|
|
1261
1265
|
function gA(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,
|
|
1262
1266
|
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;hA(d,c.presentationTimeline.Hb(),function(l){var m=wy(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Ez(b,d.id)*p;p=zy(a.g,p);f.set(m,new vy(l,p,k,!1))}l.ma&&(n=wy(l.ma),f.has(n)||(p=.5*Ez(b,d.id),p=zy(a.g,p),f.set(n,new vy(l.ma,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
@@ -1280,7 +1284,7 @@ function EA(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__
|
|
|
1280
1284
|
var AA=null;yA.originalMcap=AA;var FA={};yA.memoizedCanDisplayTypeRequests_=FA;lA(zA,-1);function GA(){}function HA(){var a=nc();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(IA(),JA()):15>=a&&IA():ac("DT_STB_BCM")?(IA(),JA()):(dc()||cc()||ac("Tizen 4"))&&KA();(window.MediaSource||window.ManagedMediaSource)&&LA();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&MA()}
|
|
1281
1285
|
function IA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function JA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1282
1286
|
function LA(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Be(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Be(c)&&b(c)}}}
|
|
1283
|
-
function KA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=
|
|
1287
|
+
function KA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Ee(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Ee(c)&&b(c)}}}
|
|
1284
1288
|
function MA(){var a=MediaSource.isTypeSupported;ec()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}iA.MediaSource=GA;GA.install=HA;lA(HA);function NA(){}function OA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?PA():void 0!=window.orientation&&QA())}function PA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1285
1289
|
function QA(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new RA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}iA.Orientation=NA;NA.install=OA;function RA(){fb.call(this);this.type="";this.angle=0}oa(RA,fb);
|
|
1286
1290
|
RA.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
@@ -1373,7 +1377,7 @@ function gD(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","
|
|
|
1373
1377
|
var bD=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,cD=/^\s*([^:]+):\s*(.*)/,dD=/\s*,\s*/,hD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Pe["text/x-ssa"]=function(){return new aD};function iD(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{cf:c,na:a}:null}function jD(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,gb:"mp4a.40."+e}}
|
|
1374
1378
|
function kD(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1375
1379
|
function lD(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1376
|
-
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function mD(a){this.i=a;this.h=0;this.g=new Map}q=mD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?vd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(
|
|
1380
|
+
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function mD(a){this.i=a;this.h=0;this.g=new Map}q=mD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?vd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Ke(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1377
1381
|
q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Zi(e),g=f.length;g<e.length&&!kD(e,g);g++);a=1E3*c.endTime;f=Yi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=jD(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=iD(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));var l=k.cf+k.na;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1378
1382
|
k.cf,g+l),size:k.na,duration:1024,yb:0,flags:{zb:0,rb:0,qb:0,mb:0,ob:2,Ab:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.gb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:a,ub:h},stream:b};d=new mx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=sx(d),this.g.set(c,b));c=Vx(d);this.h++;b=Mc(b,c);return Promise.resolve(b)};
|
|
1379
1383
|
Q("shaka.transmuxer.AacTransmuxer",mD);mD.prototype.transmux=mD.prototype.transmux;mD.prototype.getOriginalMimeType=mD.prototype.getOriginalMimeType;mD.prototype.convertCodecs=mD.prototype.convertCodecs;mD.prototype.isSupported=mD.prototype.isSupported;mD.prototype.destroy=mD.prototype.destroy;ne("audio/aac",function(){return new mD("audio/aac")},te);function nD(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
@@ -1401,7 +1405,7 @@ function FD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function
|
|
|
1401
1405
|
var BD=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],CD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],DD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ED=[0,1,1,4];function HD(a){this.i=a;this.h=0;this.g=new Map}q=HD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?vd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1402
1406
|
q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Zi(e).length;f<e.length&&!GD(e,f);f++);var g;for(a=[];f<e.length;){var h=AD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));g||(g=h);f+h.na<=e.length&&a.push({data:e.subarray(f,f+h.na),size:h.na,duration:1152,yb:0,flags:{zb:0,rb:0,qb:0,mb:0,ob:2,Ab:0}});f+=h.na}if(!g)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));e=9E4*g.Fk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1403
1407
|
duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.h,baseMediaDecodeTime:e,ub:a},stream:b};d=new mx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=sx(d),this.g.set(c,b));c=Vx(d);this.h++;b=Mc(b,c);return Promise.resolve(b)};Q("shaka.transmuxer.Mp3Transmuxer",HD);HD.prototype.transmux=HD.prototype.transmux;HD.prototype.getOriginalMimeType=HD.prototype.getOriginalMimeType;HD.prototype.convertCodecs=HD.prototype.convertCodecs;HD.prototype.isSupported=HD.prototype.isSupported;
|
|
1404
|
-
HD.prototype.destroy=HD.prototype.destroy;ne("audio/mpeg",function(){return new HD("audio/mpeg")},te);function ID(a){this.h=a;this.g=null}q=ID.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=
|
|
1408
|
+
HD.prototype.destroy=HD.prototype.destroy;ne("audio/mpeg",function(){return new HD("audio/mpeg")},te);function ID(a){this.h=a;this.g=null}q=ID.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Ke(a).split(","),c=Rc("audio",b);b=Rc("video",b);return!c||b||"mp3"!=Ce(c)?!1:vd(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
|
|
1405
1409
|
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new tj;a=Gb(a);a=this.g.parse(a);if("mp3"!=a.Xd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));c=new Uint8Array([]);e=t(a.rc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=AD(a,b))?(b+d.na<=a.length&&(c=Mc(c,a.subarray(b,b+d.na))),b+=d.na):b++;return Promise.resolve(c)};Q("shaka.transmuxer.MpegTsTransmuxer",ID);ID.prototype.transmux=ID.prototype.transmux;
|
|
1406
1410
|
ID.prototype.getOriginalMimeType=ID.prototype.getOriginalMimeType;ID.prototype.convertCodecs=ID.prototype.convertCodecs;ID.prototype.isSupported=ID.prototype.isSupported;ID.prototype.destroy=ID.prototype.destroy;ne("video/mp2t",function(){return new ID("video/mp2t")},se);/*
|
|
1407
1411
|
@license
|
|
@@ -1418,23 +1422,23 @@ q.transmux=function(a,b,c){if(!c)return Promise.resolve(Gb(a));if(!b.mssPrivateD
|
|
|
1418
1422
|
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
|
|
1419
1423
|
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=MD(u,"traf")+MD(h,"senc")+16);var v=Gb(e.write());return Promise.resolve(v)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.R()[0]:null))}};function MD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}Q("shaka.transmuxer.MssTransmuxer",JD);JD.prototype.transmux=JD.prototype.transmux;
|
|
1420
1424
|
JD.prototype.getOriginalMimeType=JD.prototype.getOriginalMimeType;JD.prototype.convertCodecs=JD.prototype.convertCodecs;JD.prototype.isSupported=JD.prototype.isSupported;JD.prototype.destroy=JD.prototype.destroy;var LD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);ne("mss/audio/mp4",function(){return new JD("mss/audio/mp4")},te);ne("mss/video/mp4",function(){return new JD("mss/video/mp4")},te);function ND(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=ND.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1421
|
-
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=
|
|
1422
|
-
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=
|
|
1425
|
+
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Ke(c).split(",");c=Rc("audio",d);d=Rc("video",d);if(c&&(c=Ce(c),!OD.includes(c))||d&&(c=Ce(d),!PD.includes(c)))return!1;if(b)return vd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return vd(b)||vd(a)};
|
|
1426
|
+
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Ke(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return of(c,"audio/mp4")}).map(nf).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1423
1427
|
q.transmux=function(a,b,c,d,e){var f=Gb(a);if("audio"==e&&!Dj(f)){for(var g=Zi(f),h=g.length;h<f.length;h++)if(GD(f,h))return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));for(h=g.length;h<f.length;h++)if(kD(f,h))return this.h||(this.h=new mD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.R()[0]:null))}this.j?this.j.clearData():this.j=new tj;var k=this.j.parse(f),l=[],m=k.Xd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],w=k.kd();
|
|
1424
1428
|
if(!w.length)throw new T(2,3,3023,c?c.R()[0]:null);for(var v=0;v<w.length;v++){var A=w[v],y=A.nalus;u.push.apply(u,x(y));var C=uD(y);if(C){null==r&&(r=A.dts);var z=void 0;z=v+1<w.length?(w[v+1].dts||0)-(A.dts||0):1<w.length?(A.dts||0)-(w[v-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:C.data,size:C.data.byteLength,duration:z,yb:Math.round((A.pts||0)-(A.dts||0)),flags:{zb:0,rb:0,qb:0,mb:0,ob:C.ge?2:1,Ab:C.ge?0:1}})}}var B=sD(u);if(!B||null==r)throw new T(2,3,3018,c?c.R()[0]:null);b.height=B.height;
|
|
1425
1429
|
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,wb:[],Ca:new Uint8Array([]),Qa:B.Qa,Va:B.Va,Wa:B.Wa,data:{Sb:this.g,baseMediaDecodeTime:r,ub:p},stream:b};break;case "hvc":var D=[],F=null,I=[],L=k.kd();if(!L.length)throw new T(2,3,3023,c?c.R()[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,U=t(K),R=U.next();!R.done;R=U.next()){var Z=R.value;switch(Z.type){case 1:case 0:var ca=
|
|
1426
1430
|
P=!0;break;case 19:case 20:case 21:N=ca=P=!0;break;case 32:ca=!0;break;case 33:ca=!0;break;case 34:ca=!0;break;case 35:P=ca=!0;break;case 39:case 40:ca=!0;break;default:ca=!1}if(P&&ca){var Xa=Z.fullData.byteLength,Aa=new Uint8Array(4);Aa[0]=Xa>>24&255;Aa[1]=Xa>>16&255;Aa[2]=Xa>>8&255;Aa[3]=Xa&255;M.push(Aa);M.push(Z.fullData)}}var Ra=M.length?{data:Mc.apply(Gc,x(M)),ge:N}:null;if(Ra){null==F&&null!=E.dts&&(F=E.dts);var cb=void 0;cb=J+1<L.length?(L[J+1].dts||0)-(E.dts||0):1<L.length?(E.dts||0)-(L[J-
|
|
1427
1431
|
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ra.data,size:Ra.data.byteLength,duration:cb,yb:Math.round((E.pts||0)-(E.dts||0)),flags:{zb:0,rb:0,qb:0,mb:0,ob:Ra.ge?2:1,Ab:Ra.ge?0:1}})}}var Ya=vD(I);if(!Ya||null==F)throw new T(2,3,3018,c?c.R()[0]:null);b.height=Ya.height;b.width=Ya.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,wb:[],Ca:new Uint8Array([]),Qa:Ya.Qa,Va:Ya.Va,Wa:Ya.Wa,data:{Sb:this.g,baseMediaDecodeTime:F,ub:D},stream:b}}n&&
|
|
1428
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var nb=[],ab,Za=null,wc=t(k.rc()),Ta=wc.next();!Ta.done;Ta=wc.next()){var tb=Ta.value,Yb=tb.data;if(Yb){var Xc=0;ab=jD(Yb,Xc);if(!ab)throw new T(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=ab.sampleRate;b.channelsCount=ab.channelCount;null==Za&&null!==tb.pts&&(Za=tb.pts);for(;Xc<Yb.length;){var
|
|
1429
|
-
rb:0,qb:0,mb:0,ob:2,Ab:0}});Xc+=
|
|
1430
|
-
duration:1024,yb:0,flags:{zb:0,rb:0,qb:0,mb:0,ob:2,Ab:0}}),ce+=1024/ab.sampleRate*9E4}var Aj=ab.sampleRate,Bj=Za/9E4*Aj;n={id:b.id,type:"audio",codecs:ab.gb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aj,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:Bj,ub:nb},stream:b};break;case "ac3":for(var mh=[],
|
|
1431
|
-
(kk=ho.pts);for(var
|
|
1432
|
-
Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:pH,ub:mh},stream:b};break;case "ec3":for(var vx=[],lk=0,jo=new Uint8Array([]),mk=null,wx=t(k.rc()),ko=wx.next();!ko.done;ko=wx.next()){var lo=ko.value,mo=lo.data;null==mk&&null!==lo.pts&&(mk=lo.pts);for(var
|
|
1433
|
-
|
|
1434
|
-
|
|
1432
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var nb=[],ab,Za=null,wc=t(k.rc()),Ta=wc.next();!Ta.done;Ta=wc.next()){var tb=Ta.value,Yb=tb.data;if(Yb){var Xc=0;ab=jD(Yb,Xc);if(!ab)throw new T(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=ab.sampleRate;b.channelsCount=ab.channelCount;null==Za&&null!==tb.pts&&(Za=tb.pts);for(;Xc<Yb.length;){var Fe=iD(Yb,Xc);if(Fe){var Ge=Fe.cf+Fe.na;Xc+Ge<=Yb.length&&nb.push({data:Yb.subarray(Xc+Fe.cf,Xc+Ge),size:Fe.na,duration:1024,yb:0,flags:{zb:0,
|
|
1433
|
+
rb:0,qb:0,mb:0,ob:2,Ab:0}});Xc+=Ge}else Xc++}}}if(!ab||null==Za){if(!k.kd().length)throw new T(2,3,3018,c?c.R()[0]:null);Za=9E4*c.startTime;var He=Rc("audio",b.codecs.split(","));if(!He||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.R()[0]:null);ab={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,gb:He};var be=lD(He,b.channelsCount);if(!be)throw new T(2,3,3018,c?c.R()[0]:null);for(var zj=Za+9E4*(c.endTime-c.startTime),ce=Za;ce<zj;)nb.push({data:be,size:be.byteLength,
|
|
1434
|
+
duration:1024,yb:0,flags:{zb:0,rb:0,qb:0,mb:0,ob:2,Ab:0}}),ce+=1024/ab.sampleRate*9E4}var Aj=ab.sampleRate,Bj=Za/9E4*Aj;n={id:b.id,type:"audio",codecs:ab.gb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aj,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:Bj,ub:nb},stream:b};break;case "ac3":for(var mh=[],Ie=0,xc=new Uint8Array([]),kk=null,ux=t(k.rc()),go=ux.next();!go.done;go=ux.next()){var ho=go.value,io=ho.data;null==kk&&null!==ho.pts&&
|
|
1435
|
+
(kk=ho.pts);for(var Sf=0;Sf<io.length;){var fe=nD(io,Sf);fe?(b.audioSamplingRate=fe.sampleRate,b.channelsCount=fe.channelCount,Ie=fe.sampleRate,xc=fe.Ca,mh.push({data:io.subarray(Sf,Sf+fe.na),size:fe.na,duration:1536,yb:0,flags:{zb:0,rb:0,qb:0,mb:0,ob:2,Ab:0}}),Sf+=fe.na):Sf++}}if(0==Ie||0==xc.byteLength||null==kk)throw new T(2,3,3018,c?c.R()[0]:null);var pH=kk/9E4*Ie;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ie,duration:d,wb:[],Ca:xc,Qa:new Uint8Array([]),
|
|
1436
|
+
Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:pH,ub:mh},stream:b};break;case "ec3":for(var vx=[],lk=0,jo=new Uint8Array([]),mk=null,wx=t(k.rc()),ko=wx.next();!ko.done;ko=wx.next()){var lo=ko.value,mo=lo.data;null==mk&&null!==lo.pts&&(mk=lo.pts);for(var Tf=0;Tf<mo.length;){var ge=qD(mo,Tf);ge?(b.audioSamplingRate=ge.sampleRate,b.channelsCount=ge.channelCount,lk=ge.sampleRate,jo=ge.Ca,vx.push({data:mo.subarray(Tf,Tf+ge.na),size:ge.na,duration:1536,yb:0,flags:{zb:0,rb:0,qb:0,mb:0,ob:2,Ab:0}}),Tf+=ge.na):
|
|
1437
|
+
Tf++}}if(0==lk||0==jo.byteLength||null==mk)throw new T(2,3,3018,c?c.R()[0]:null);var qH=mk/9E4*lk;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:lk,duration:d,wb:[],Ca:jo,Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:qH,ub:vx},stream:b};break;case "mp3":for(var xx=[],nk,ok=null,yx=t(k.rc()),no=yx.next();!no.done;no=yx.next()){var oo=no.value,Ah=oo.data;if(Ah){null==ok&&null!==oo.pts&&(ok=oo.pts);for(var Le=0;Le<Ah.length;){var Uf=AD(Ah,
|
|
1438
|
+
Le);Uf?(nk||(nk=Uf),Le+Uf.na<=Ah.length&&xx.push({data:Ah.subarray(Le,Le+Uf.na),size:Uf.na,duration:1152,yb:0,flags:{zb:0,rb:0,qb:0,mb:0,ob:2,Ab:0}}),Le+=Uf.na):Le++}}}if(!nk||null==ok)throw new T(2,3,3018,c?c.R()[0]:null);var zx=nk.sampleRate,rH=ok/9E4*zx;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:zx,duration:d,wb:[],Ca:new Uint8Array([]),Qa:new Uint8Array([]),Va:0,Wa:0,data:{Sb:this.g,baseMediaDecodeTime:rH,ub:xx},stream:b};break;case "opus":var Ax=
|
|
1435
1439
|
[],pk=null,id=k.H;if(!id)throw new T(2,3,3018,c?c.R()[0]:null);var Kb=[];switch(id.bj){case 1:case 2:Kb=[0];break;case 0:Kb=[255,1,1,0,1];break;case 128:Kb=[255,2,0,0,1];break;case 3:Kb=[1,2,1,0,2,1];break;case 4:Kb=[1,2,2,0,1,2,3];break;case 5:Kb=[1,3,2,0,4,1,2,3];break;case 6:Kb=[1,4,2,0,4,1,2,3,5];break;case 7:Kb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Kb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Kb=[1,1,2,0,1];break;case 131:Kb=[1,1,3,0,1,2];break;case 132:Kb=[1,1,4,0,1,2,3];break;case 133:Kb=[1,1,5,
|
|
1436
|
-
0,1,2,3,4];break;case 134:Kb=[1,1,6,0,1,2,3,4,5];break;case 135:Kb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Kb=[1,1,8,0,1,2,3,4,5,6,7]}var Bx=new Uint8Array([0,id.channelCount,0,0,id.sampleRate>>>24&255,id.sampleRate>>>17&255,id.sampleRate>>>8&255,id.sampleRate>>>0&255,0,0].concat(x(Kb)));for(var Cx=id.sampleRate,Dx=t(k.rc()),po=Dx.next();!po.done;po=Dx.next()){var qo=po.value,
|
|
1437
|
-
Md=Bh+2,qk=0;255===
|
|
1440
|
+
0,1,2,3,4];break;case 134:Kb=[1,1,6,0,1,2,3,4,5];break;case 135:Kb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Kb=[1,1,8,0,1,2,3,4,5,6,7]}var Bx=new Uint8Array([0,id.channelCount,0,0,id.sampleRate>>>24&255,id.sampleRate>>>17&255,id.sampleRate>>>8&255,id.sampleRate>>>0&255,0,0].concat(x(Kb)));for(var Cx=id.sampleRate,Dx=t(k.rc()),po=Dx.next();!po.done;po=Dx.next()){var qo=po.value,Vf=qo.data;null==pk&&null!==qo.pts&&(pk=qo.pts);for(var Bh=0;Bh<Vf.length;){for(var sH=0!==(Vf[Bh+1]&16),tH=0!==(Vf[Bh+1]&8),
|
|
1441
|
+
Md=Bh+2,qk=0;255===Vf[Md];)qk+=255,Md+=1;qk+=Vf[Md];Md+=1;Md+=sH?2:0;Md+=tH?2:0;var Ex=Vf.slice(Md,Md+qk);Ax.push({data:Ex,size:Ex.byteLength,duration:960,yb:0,flags:{zb:0,rb:0,qb:0,mb:0,ob:2,Ab:0}});Bh=Md+qk}}if(0==Bx.byteLength||null==pk)throw new T(2,3,3018,c?c.R()[0]:null);b.audioSamplingRate=id.sampleRate;b.channelsCount=id.channelCount;var uH=pk/9E4*Cx;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Cx,duration:d,wb:[],Ca:Bx,Qa:new Uint8Array([]),Va:0,
|
|
1438
1442
|
Wa:0,data:{Sb:this.g,baseMediaDecodeTime:uH,ub:Ax},stream:b}}n&&(l.push(n),n=null)}}catch(ro){return ro&&3023==ro.code?Promise.resolve(new Uint8Array([])):Promise.reject(ro)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.R()[0]:null));var Fx=new mx(l),so=b.id+"_"+c.i;if(this.i.has(so))var to=this.i.get(so);else to=sx(Fx),this.i.set(so,to);var vH=Vx(Fx);this.g++;var wH=Mc(to,vH);return Promise.resolve(wH)};Q("shaka.transmuxer.TsTransmuxer",ND);ND.prototype.transmux=ND.prototype.transmux;
|
|
1439
1443
|
ND.prototype.getOriginalMimeType=ND.prototype.getOriginalMimeType;ND.prototype.convertCodecs=ND.prototype.convertCodecs;ND.prototype.isSupported=ND.prototype.isSupported;ND.prototype.destroy=ND.prototype.destroy;var OD=["aac","ac-3","ec-3","mp3","opus"],PD=["avc","hevc"];ne("video/mp2t",function(){return new ND("video/mp2t")},re);/*
|
|
1440
1444
|
@license
|
|
@@ -1526,7 +1530,7 @@ q.onChange=function(){if(this.video.duration)if(this.update(),this.u.X(.125),thi
|
|
|
1526
1530
|
q.update=function(){var a=this.J.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Oa(),g=f.end-f.start;this.setRange(f.start,f.end);NE(this)?(rE(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.J.showUnbufferedStart?
|
|
1527
1531
|
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):rE(this.container,!1)};
|
|
1528
1532
|
function KE(a){if(a.G.length){for(var b=a.player.Oa(),c=b.end-b.start,d=["to right"],e=[],f=a.J.seekBarColors.adBreaks,g=!1,h=t(a.G),k=h.next();!k.done;k=h.next())if(k=k.value,-1==k.start&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||"number"==typeof k.end&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,p){return n.start-p.start});b=t(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+
|
|
1529
|
-
100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.H.style.background="linear-gradient("+d.join(",")+")"}else a.H.style.background="transparent",a.C.stop()}function OE(a){function b(){var c=a.player.Oa();c=c.end-c.start;a.player.U()&&5<c&&a.C.wa(.25)}
|
|
1533
|
+
100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.H.style.background="linear-gradient("+d.join(",")+")"}else a.H.style.background="transparent",a.C.stop()}function OE(a){function b(){KE(a);var c=a.player.Oa();c=c.end-c.start;a.player.U()&&5<c&&a.C.wa(.25)}a.player.ei()?b():a.eventManager.ka(a.player,"loaded",b)}
|
|
1530
1534
|
function NE(a){var b=a.player.Oa();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function ME(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1531
1535
|
function QE(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z;O(function(B){switch(B.g){case 1:d=SE(a);if(!d)return LE(a),B.return();0>c&&(c=0);e=a.player.Oa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return G(B,a.player.Mg(d.id,f),2);case 2:g=B.h;if(!g||!g.uris.length)return LE(a),B.return();a.player.U()?(h=e.end-c,a.A.textContent=1>h?a.localization.resolve("LIVE"):"-"+RE(h)):a.A.textContent=RE(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1532
1536
|
-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";p=g.uris[0].split("#xywh=")[0];if(a.m&&p===a.m.uris[0].split("#xywh=")[0]&&g.segment.Ib()==a.m.segment.Ib()&&g.segment.Fb()==a.m.segment.Fb()){B.B(3);break}a.m=g;a.l&&(a.l.abort(),a.l=null);if("mjpg"!=d.codecs&&!p.startsWith("offline:")){B.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';sa(B,5);r=Ig;u=Kl(g.segment.R(),g.segment.Ib(),g.segment.Fb(),a.player.getConfiguration().streaming.retryParameters);
|
|
@@ -1536,7 +1540,7 @@ g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",H(B)}})}
|
|
|
1536
1540
|
function SE(a){var b=a.player.We();if(!b.length)return null;for(var c={},d=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Pf:c.Pf,Nf:c.Nf},e=d.next())if(c.Pf=e.value,c.Nf=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Pf&&g.bandwidth<.01*f.Nf}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b.find(function(f){return"application/mp4"==f.mimeType&&
|
|
1537
1541
|
"mjpg"==f.codecs})||b[0]}function LE(a){a.i.style.visibility="hidden";a.A.textContent=""}function PE(a){a.j.style.visibility="hidden"}function RE(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}Q("shaka.ui.SeekBar",JE);function TE(){}TE.prototype.create=function(a,b){return new JE(a,b)};JE.Factory=TE;function UE(a,b){mE.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");rE(this.h,!1);this.j.appendChild(this.h);this.g=on();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;rE(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);VE(this);this.i=new Ub(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1538
1542
|
d:(c.i.stop(),rE(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){VE(c)});this.eventManager.o(this.localization,"locale-changed",function(){VE(c)});this.eventManager.o(this.adManager,"ad-started",function(){WE(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),rE(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;rE(c.g,!1);rE(c.h,!1)});this.eventManager.o(this.g,
|
|
1539
|
-
"click",function(){c.ad.skip()});this.ad&&WE(this)}oa(UE,mE);UE.prototype.release=function(){this.i.stop();this.i=null;mE.prototype.release.call(this)};function VE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function WE(a){a.ad.isSkippable()&&(rE(a.g,!0),rE(a.h,!0),a.h.textContent="",a.i.Sa(),a.i.wa(.5))}Q("shaka.ui.SkipAdButton",UE);/*
|
|
1543
|
+
"click",function(){c.ad.skip()});this.ad&&WE(this)}oa(UE,mE);UE.prototype.release=function(){this.i.stop();this.i=null;mE.prototype.release.call(this)};function VE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function WE(a){a.ad.isSkippable()&&a.ad.needsSkipUI()&&(rE(a.g,!0),rE(a.h,!0),a.h.textContent="",a.i.Sa(),a.i.wa(.5))}Q("shaka.ui.SkipAdButton",UE);/*
|
|
1540
1544
|
@license
|
|
1541
1545
|
glMatrix: https://github.com/toji/gl-matrix/
|
|
1542
1546
|
Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
|
|
@@ -1699,7 +1703,7 @@ function tG(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,v,A,y,C,z;return O(function(B)
|
|
|
1699
1703
|
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=wG(h,c,d),m=l.gi,n=l.Qi,xG(h,g,m,n));B.B(2);break}p=t(a);r=p.next();case 4:if(r.done){B.B(2);break}u=r.value;if(u.ui){B.B(5);break}w=null;v=t(b);for(f=v.next();!f.done;f=v.next())if(A=f.value,A.parentElement==u){w=A;break}w||(w=document.createElement("video"),w.setAttribute("playsinline",""),u.appendChild(w));y=wG(u,c,d);C=y.gi;z=y.Qi;sa(B,7);return G(B,xG(u,w,C,z),9);case 9:ua(B,5);break;case 7:return va(B),
|
|
1700
1704
|
uG("shaka-ui-load-failed",yG),B.return();case 5:r=p.next();B.B(4);break;case 2:uG("shaka-ui-loaded"),H(B)}})}function uG(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1701
1705
|
function xG(a,b,c,d){var e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:e=new X;f=new qG(e,a,b,d);e.Hh(c);g="";h=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(g=a.dataset.shakaPlayerCastReceiverId,h="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(g=b.dataset.shakaPlayerCastReceiverId,h="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);g.length&&f.configure({castReceiverAppId:g,castAndroidReceiverCompatible:h});
|
|
1702
|
-
b.controls&&f.g.Bi(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");m=t(b.querySelectorAll("source"));n=m.next();case 2:if(n.done){r.B(4);break}p=n.value;sa(r,5);return G(r,f.g.jd().load(p.getAttribute("src")),7);case 7:r.B(4);break;case 5:va(r);case 3:n=m.next();r.B(2);break;case 4:return G(r,e.
|
|
1706
|
+
b.controls&&f.g.Bi(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");m=t(b.querySelectorAll("source"));n=m.next();case 2:if(n.done){r.B(4);break}p=n.value;sa(r,5);return G(r,f.g.jd().load(p.getAttribute("src")),7);case 7:r.B(4);break;case 5:va(r);case 3:n=m.next();r.B(2);break;case 4:return G(r,e.bc(b),0)}})}
|
|
1703
1707
|
function wG(a,b,c){var d=null,e=t(b);for(b=e.next();!b.done;b=e.next())if(b=b.value,b.parentElement==a){d=b;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));e=null;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,b.parentElement==a){e=b;break}e||(e=document.createElement("canvas"),e.classList.add("shaka-vr-canvas-container"),a.appendChild(e));return{gi:d,Qi:e}}Q("shaka.ui.Overlay",qG);qG.prototype.setEnabled=qG.prototype.Ok;
|
|
1704
1708
|
qG.prototype.getControls=qG.prototype.nj;qG.prototype.configure=qG.prototype.configure;qG.prototype.getConfiguration=qG.prototype.getConfiguration;qG.prototype.isMobile=qG.prototype.Sg;qG.prototype.destroy=qG.prototype.destroy;var sG=0;qG.TrackLabelFormat={LANGUAGE:sG,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var vG=0,yG=1;qG.FailReasonCode={NO_BROWSER_SUPPORT:vG,PLAYER_FAILED_TO_LOAD:yG};
|
|
1705
1709
|
"complete"==document.readyState?O(function(a){if(1==a.g)return G(a,Promise.resolve(),2);tG();H(a)}):window.addEventListener("load",tG);function zG(a,b,c,d,e,f,g,h){function k(E){var K="";E=E.toLowerCase();E.startsWith("mp4a")?K="AAC":"ec-3"===E||"ac-3"===E?K="Dolby":"opus"===E?K="Opus":"flac"===E&&(K="fLaC");return K?" "+K:K}function l(E){var K="";5<=E&&(K=" "+f.resolve("SURROUND"));return K}function m(E,K,N,M,P){K=[E,K];h&&null!=M&&K.push(M);p(E)&&P&&K.push(P);N&&3==g&&K.push(N);return K.join(": ")}function n(E){return"variant"==E.type?E.audioRoles?E.audioRoles.join(", "):void 0:E.roles.join(", ")}function p(E){return u.has(E)&&
|
|
@@ -1742,8 +1746,8 @@ case 9:ua(d,8);break;case 7:va(d);case 8:return sa(d,11),G(d,a.video.remote.watc
|
|
|
1742
1746
|
"trackschanged",function(){IH(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){IH(c)});IH(this)}oa(GH,BG);
|
|
1743
1747
|
function IH(a){var b=[];a.player.hd()!=qp&&(b=a.player.Jb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=a.player.Mc()?b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==k.bandwidth})==l}):
|
|
1744
1748
|
1<[].concat(x(new Set(b.map(function(k){return k.audioId})))).length?b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l}):b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height&&m.bandwidth==k.bandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout})==l});a.player.Mc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):
|
|
1745
|
-
b.sort(function(k,l){return l.height==k.height||null==k.height||null==l.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=nE(a.menu);pn(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={
|
|
1746
|
-
var h=W("span");h.textContent=!a.player.Mc()&&e
|
|
1749
|
+
b.sort(function(k,l){return l.height==k.height||null==k.height||null==l.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=nE(a.menu);pn(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={ac:e.ac},g=f.next()){e.ac=g.value;g=on();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.ac;a.player.configure({abr:{enabled:!1}});a.player.Af(l,a.controls.g.clearBufferOnQualityChange)}}(e));
|
|
1750
|
+
var h=W("span");h.textContent=!a.player.Mc()&&e.ac.height&&e.ac.width?JH(e.ac,b):e.ac.bandwidth?Math.round(e.ac.bandwidth/1E3)+" kbits/s":"Unknown";g.appendChild(h);d||e.ac!=c||(g.ariaSelected="true",g.appendChild(qE()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=on();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});IH(a)});a.g=W("span");a.g.classList.add("shaka-auto-span");
|
|
1747
1751
|
a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(qE()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);pE(a.menu);a.controls.dispatchEvent(new S("resolutionselectionupdated"));HH(a);rE(a.button,1<b.length)}
|
|
1748
1752
|
function JH(a,b){var c=a.height||0,d=a.width||0,e=c;d/c>16/9&&(e=Math.round(9*d/16));c=e+"p";2160==e&&(c="4K");(e=a.frameRate)&&(50<=e||20>=e)&&(c+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)c+=" (HDR)";"CH-STEREO"==a.videoLayout&&(c+=" (3D)");b.some(function(f){return f!=a&&f.height==a.height})&&(c+=" ("+Math.round((a.videoBandwidth||a.bandwidth)/1E3)+" kbits/s)");return c}
|
|
1749
1753
|
function HH(a){var b=a.player.Mc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}Q("shaka.ui.ResolutionSelection",GH);function KH(){}
|