shaka-player 4.9.13 → 4.9.14
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 +36 -36
- package/dist/shaka-player.compiled.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.js +13 -13
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +29 -28
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +1 -1
- package/dist/shaka-player.ui.debug.d.ts +1 -1
- package/dist/shaka-player.ui.debug.js +17 -17
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +41 -40
- package/dist/shaka-player.ui.map +3 -3
- package/externs/shaka/player.js +7 -1
- package/lib/abr/simple_abr_manager.js +11 -8
- package/lib/hls/hls_parser.js +4 -3
- package/lib/player.js +6 -3
- package/lib/util/player_configuration.js +1 -0
- package/package.json +1 -1
- package/ui/locales/fr.json +1 -1
package/dist/shaka-player.ui.js
CHANGED
|
@@ -139,19 +139,19 @@ Nd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Pd};v
|
|
|
139
139
|
Nd.lineInterpretation={LINE_NUMBER:Td,PERCENTAGE:1};var Ud="start",de={CENTER:"center",START:Ud,END:"end"};Nd.lineAlign=de;var ee={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Nd.defaultTextColor=ee;var fe={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Nd.defaultTextBackgroundColor=fe;var Wd=400;Nd.fontWeight={NORMAL:Wd,BOLD:700};
|
|
140
140
|
var Xd="normal",ge={NORMAL:Xd,ITALIC:"italic",OBLIQUE:"oblique"};Nd.fontStyle=ge;Nd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Od(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=he;this.scroll=ie}P("shaka.text.CueRegion",Od);var he=1;Od.units={PX:0,PERCENTAGE:he,LINES:2};var ie="";Od.scrollMode={NONE:ie,UP:"up"};function je(){}je.prototype.destroy=function(){};function ke(a,b,c){le[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,ef:b}}function me(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([ne,oe,pe,qe]),e=d.next();!e.done;e=d.next())if(e=le[c+"-"+e.value]){var f=e.ef(),g=f.isSupported(a,b);f.destroy();if(g)return e.ef}return null}P("shaka.transmuxer.TransmuxerEngine",je);je.findTransmuxer=me;je.unregisterTransmuxer=function(a,b){delete le[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
141
141
|
je.registerTransmuxer=ke;je.prototype.destroy=je.prototype.destroy;var le={},qe=1,pe=2,oe=3,ne=4;je.PluginPriority={FALLBACK:qe,PREFERRED_SECONDARY:pe,PREFERRED:oe,APPLICATION:ne};function re(){}function se(a,b){var c=a;b&&!te.includes(a)&&(c+='; codecs="'+b+'"');return c}function ue(a,b){b&&(a+='; codecs="'+b+'"');return a}function ve(a,b,c){var d=se(a,b);b=ue(a,b);me(b)?(a=me(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}
|
|
142
|
-
function we(a,b,c){var d=[b];
|
|
143
|
-
function
|
|
142
|
+
function we(a,b,c){var d=[b];xe.forEach(function(e,f){var g=a[f];"codecs"==f?te.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function De(a){return a.split(";")[0].split("/")[1]}
|
|
143
|
+
function Ee(a){var b=Ge(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"===
|
|
144
144
|
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 He(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Ge(c.value),b.push(c[0]);return b.sort().join(",")}function Ie(a){return a.split(";")[0]}
|
|
145
145
|
function Je(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ke(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function Ge(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}P("shaka.util.MimeUtils",re);re.getFullTypeWithAllCodecs=ue;re.getFullType=se;
|
|
146
|
-
var
|
|
146
|
+
var xe=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),te=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Le(a){this.i=null;this.j=a;this.F=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.o=new Map}function Me(a){return Ne[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Hd:!1}Le.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
147
147
|
function Oe(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return E(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.F?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);F(p)})}
|
|
148
148
|
Le.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return E(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));F(d)})};function Pe(a,b,c){a.l=b;a.m=c}function Qe(a,b,c){a.G=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
149
149
|
function Re(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Re(a,d.value,c)}
|
|
150
150
|
function Se(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Re(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.G&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
151
151
|
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}P("shaka.text.TextEngine",Le);Le.prototype.destroy=Le.prototype.destroy;Le.findParser=function(a){return Ne[a]};Le.unregisterParser=function(a){delete Ne[a]};Le.registerParser=function(a,b){Ne[a]=b};var Ne={};function Te(a,b){return a.concat(b)}function Ue(){}function Ve(a){return null!=a};function We(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer instanceof ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){}
|
|
152
152
|
function Ze(a,b,c,d){var e=a.variants;if(b.length||c.length)e=$e(e,b,c);if(d.length){b=new fb;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var w=[],A={};v=t(v);for(var z=v.next();!z.done;A={Id:A.Id},z=v.next())A.Id=z.value,z=d.filter(function(C){return function(y){return C.Id.decodingInfos[0][y]}}(A)).length,z>u?(u=z,w=[A.Id]):z==u&&w.push(A.Id);f.push.apply(f,x(w))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
|
|
153
|
-
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=
|
|
154
|
-
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=ud();var r=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=
|
|
153
|
+
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=Ee(m.codecs),p=Ee(g.codecs);n==p&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(u,
|
|
154
|
+
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=ud();var r=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=Ee(m.codecs),p=Ee(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),r.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Ee(m.codecs),p=Ee(g.codecs),n==p&&g.bandwidth>m.bandwidth&&(l.push(g),r.push(g.id)))}else l.push(g),
|
|
155
155
|
r.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!r.includes(u.id)?!1:!0})}
|
|
156
156
|
function $e(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={If:d.If},e=b.next())if(d.If=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.If)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={zf:d.zf},b=c.next())if(d.zf=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.zf)}}(d)),b.length){a=b;break}return a}function af(a,b,c){a.variants=a.variants.filter(function(d){return bf(d,b,c)})}
|
|
157
157
|
function bf(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
|
|
@@ -187,14 +187,14 @@ function Bf(a){var b=a.language;return{id:yf(a),active:!1,type:"",bandwidth:0,la
|
|
|
187
187
|
originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function Df(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function Ef(a){return a.filter(function(b){return Df(b)})}
|
|
188
188
|
function Ff(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=fd(Wc(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Wc(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Gf(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Te,[]);return a.length?
|
|
189
189
|
Gf(e,a[0]):e}function Gf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function kf(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}P("shaka.util.StreamUtils",Ye);Ye.meetsRestrictions=bf;
|
|
190
|
-
var pf={},zf=0,sf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),tf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Hf(){var a=this;this.
|
|
191
|
-
b&&a.
|
|
192
|
-
q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.
|
|
193
|
-
(e=this.
|
|
194
|
-
0;d<a.length;d++){e=a[d];for(var f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.
|
|
195
|
-
q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.
|
|
196
|
-
q.playbackRateChanged=function(a){this.F=a};q.setMediaElement=function(a){var b=this;this.
|
|
197
|
-
function Kf(a){if(!a.I){var b=a.i;if(!(b.g>=b.i))return;a.I=!0}
|
|
190
|
+
var pf={},zf=0,sf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),tf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Hf(){var a=this;this.A=null;this.m=!1;this.i=new md;this.H=new nd;navigator.connection&&navigator.connection.addEventListener&&this.H.s(navigator.connection,"change",function(){if(a.m&&a.g.useNetworkInformation){a.i=new md;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.u=[];this.F=1;this.I=!1;this.h=this.o=this.g=this.j=null;this.G=new Ub(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
191
|
+
b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.l=null}q=Hf.prototype;q.stop=function(){this.A=null;this.m=!1;this.u=[];this.F=1;this.o=this.j=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop();this.l=null};q.release=function(){this.H.release();this.G=null};q.init=function(a){this.A=a};
|
|
192
|
+
q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.o.clientHeight*d);c=Math.min(c,this.o.clientWidth*d)}var e=this.u.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||
|
|
193
|
+
(e=this.u);d=e;a&&e.length!=this.u.length&&(d=this.u.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=If(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Jf(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=If(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=If(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=
|
|
194
|
+
0;d<a.length;d++){e=a[d];for(var f=isNaN(this.F)?1:Math.abs(this.F),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.j=Date.now();return c};q.enable=function(){this.m=!0};q.disable=function(){this.m=!1};
|
|
195
|
+
q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.j&&this.m&&Kf(this))};q.trySuggestStreams=function(){null!=this.j&&this.m&&Kf(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.l?this.l.getBandwidthEstimate(a):a};q.setVariants=function(a){this.u=a};
|
|
196
|
+
q.playbackRateChanged=function(a){this.F=a};q.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.V(Lf)}),this.h.observe(this.o))};q.setCmsdManager=function(a){this.l=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
|
|
197
|
+
function Kf(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 If(a,b,c,d,e){if(a.l){var f=a.l.Ih();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return bf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
|
|
198
198
|
function Jf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}P("shaka.abr.SimpleAbrManager",Hf);Hf.prototype.configure=Hf.prototype.configure;Hf.prototype.setCmsdManager=Hf.prototype.setCmsdManager;Hf.prototype.setMediaElement=Hf.prototype.setMediaElement;Hf.prototype.playbackRateChanged=Hf.prototype.playbackRateChanged;Hf.prototype.setVariants=Hf.prototype.setVariants;
|
|
199
199
|
Hf.prototype.getBandwidthEstimate=Hf.prototype.getBandwidthEstimate;Hf.prototype.trySuggestStreams=Hf.prototype.trySuggestStreams;Hf.prototype.segmentDownloaded=Hf.prototype.segmentDownloaded;Hf.prototype.disable=Hf.prototype.disable;Hf.prototype.enable=Hf.prototype.enable;Hf.prototype.chooseVariant=Hf.prototype.chooseVariant;Hf.prototype.init=Hf.prototype.init;Hf.prototype.release=Hf.prototype.release;Hf.prototype.stop=Hf.prototype.stop;var Lf=1;P("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});P("shaka.config.CodecSwitchingStrategy",{ql:"reload",Bi:"smooth"});function Qf(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)}Qf.prototype.add=function(a,b,c){return Rf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
|
|
200
200
|
function Rf(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||c&&!Sf(e,f)||!Tf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Sf(a,b))&&Tf(a.roles,b.roles)));return d?!1:!0}Qf.prototype.values=function(){return this.g.values()};
|
|
@@ -496,9 +496,9 @@ rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStre
|
|
|
496
496
|
maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncTargetLatencyTolerance:.5,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:.95,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,
|
|
497
497
|
infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:jc()||kc()};if(dc()||ac()||gc()||lc())e.stallSkip=0;var f={trackSelectionCallback:function(m){return O(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return O(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?E(p,navigator.storage.estimate(),3):p.return(!0);n=p.h;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return nm([m,n])},usePersistentLicense:!0,
|
|
498
498
|
numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,
|
|
499
|
-
ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return nm([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return nm([m,n])}};var g=!1,h=!1,k=!0;oc()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new Hf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",
|
|
500
|
-
preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},
|
|
501
|
-
playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(ym(m,
|
|
499
|
+
ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:hc()?.5:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return nm([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return nm([m,n])}};var g=!1,h=!1,k=!0;oc()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new Hf},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",
|
|
500
|
+
preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},
|
|
501
|
+
playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(ym(m,
|
|
502
502
|
l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}function zm(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return lm(a,b,c||vm(),d,"")}
|
|
503
503
|
function ym(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=fd(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Wc(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
504
504
|
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Qc&&"image"!=c.type||b.push(c);return b}function wm(a){return nm([a],a)}function xm(a){return nm([a],a)}P("shaka.util.PlayerConfiguration",um);um.mergeConfigObjects=zm;um.createDefault=vm;function Am(a,b,c,d,e){gb.call(this);this.L=a;this.R=b;this.Ja=e.networkingEngine;this.S=d;this.o=null;this.jb=c;this.ra=0;this.Xa=e.Vc;this.F=e.Pj;this.Za=e.Qj;this.g=e.config;this.j=this.G=this.h=null;this.ea=!1;this.H=e.Zj;this.na=!1;this.l=null;this.aa=!1;this.i=this.A=null;this.$=!1;this.K=new Map;this.oa=!1;this.Ma=e.Yj;this.Z=new jl;this.m=new kg;this.N=null;this.u=!1;this.Sa=e.Ji;this.ha=null;this.Ta=e.Ii;this.O=!1;this.J=[];this.I=[]}na(Am,gb);
|
|
@@ -588,8 +588,8 @@ function wo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return so(a,"media-s
|
|
|
588
588
|
function Co(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J;return O(function(H){switch(H.g){case 1:so(a,"load");e=a.h;a.J=new al({Me:function(){return e.playbackRate},xc:function(){return e.defaultPlaybackRate},ah:function(G){e.playbackRate=G},Th:function(G){e.currentTime+=G}});f=function(){return Oo(a)};g=function(){return Po(a)};a.m.s(e,"playing",f);a.m.s(e,"pause",f);a.m.s(e,"ended",f);a.m.s(e,"ratechange",g);oo(a,a.g);a.Sa=a.g.preferredTextLanguage;a.ee=a.g.preferredTextRole;a.be=a.g.preferForcedSubs;
|
|
589
589
|
Qo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,N,L){a.i&&a.j&&G!=a.j.j&&Ro(a,G,!0,void 0===N?!1:N,void 0===L?0:L)});a.o.setMediaElement(e);a.o.setCmsdManager(a.$);a.j=So(a);a.j.configure(a.g.streaming);a.l=To;e.textTracks&&a.m.s(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Uo(a,G)}});a.dispatchEvent(po("streaming"));h=c;(k=a.j.j)||h||(h=Vo(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(r=
|
|
590
590
|
p.value)&&!r.segmentIndex&&l.push(r.createSegmentIndex());if(!(0<l.length)){H.B(2);break}return E(H,Promise.all(l),2);case 2:if(a.K&&a.K.onInitialVariantChosen)a.K.onInitialVariantChosen(m);Qo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Il(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.G=Wo(a,G);a.Za=Xo(a,G);Yo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ha);if(k){H.B(4);break}if(!a.g.streaming.startAtSegmentBoundary){H.B(5);
|
|
591
|
-
break}v=a.i.presentationTimeline;w=a.ha||a.h.currentTime;A=v.yc();z=v.Ob();w<A?w=A:w>z&&(w=z);return E(H,Zo(h,w),6);case 6:C=H.h,u(C);case 5:Ro(a,h,!0,!1,0);case 4:return a.G.Pf(),y=a.jc().find(function(G){return G.active}),y||((B=Ff(a.i.textStreams,a.Sa,a.ee,a.be)[0]||null)&&il(a.u.h,B,!0),h&&(B?(
|
|
592
|
-
|
|
591
|
+
break}v=a.i.presentationTimeline;w=a.ha||a.h.currentTime;A=v.yc();z=v.Ob();w<A?w=A:w>z&&(w=z);return E(H,Zo(h,w),6);case 6:C=H.h,u(C);case 5:Ro(a,h,!0,!1,0);case 4:return a.G.Pf(),y=a.jc().find(function(G){return G.active}),y||((B=Ff(a.i.textStreams,a.Sa,a.ee,a.be)[0]||null)&&il(a.u.h,B,!0),h&&(B?($o(a,h.audio,B)&&(a.ea=!0),a.ea&&a.H.H.setTextVisibility(!0),ap(a)):a.ea=!1),B&&(a.g.streaming.alwaysStreamText||a.Fc())&&Rl(a.j,B)),E(H,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),bp(a));Jo(a);
|
|
592
|
+
Ko(a);a.i.variants.some(function(G){return G.primary});if((D=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)K=function(){return cp(a)},a.m.s(e,"timeupdate",K);D||(I=function(){return dp(a)},a.m.s(e,"timeupdate",I),dp(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(J=function(){var G,N;return O(function(L){if(1==L.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return L.B(0);
|
|
593
593
|
a.m.Wa(e,"timeupdate",J);N=a;return E(L,a.preload(a.i.nextUrl),4)}N.oa=L.h;F(L)})},a.m.s(e,"timeupdate",J)),a.m.s(e,"ended",function(){a.load(a.oa||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(D);a.Xa=!0;a.m.ma(e,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});F(H)}})}
|
|
594
594
|
function Ao(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Tc,d=Date.now()/1E3,e=!0,a.F=a.Vc({Zb:a.I,onError:function(k){vo(a,k)},bf:function(){},onExpirationUpdated:function(){var k=po("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.u.j=Date.now()/1E3-d)}}),a.F.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
595
595
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Ie(b):"",codecs:b?Je(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(se(g.mimeType,
|
|
@@ -679,8 +679,9 @@ d>f?b!=g&&a.Mc(g):h&&k&&c-d<h?b!=k&&a.Mc(k):b!==a.J.xc()&&a.Uc()}}function dp(a)
|
|
|
679
679
|
function Ko(a){try{wi(a.gf,a.i)}catch(c){return vo(a,c),!1}var b=Ef(a.i.variants);b=a.Ja.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Vo(a,b){b=void 0===b?!1:b;return Ko(a)?a.o.chooseVariant(b):null}
|
|
680
680
|
function mo(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,eb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.uf.stop();d&&Lo(a,!1,void 0,!1,!1)}
|
|
681
681
|
function Lo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=Vo(a);f&&Ro(a,f,e,b,c,d)}function Ro(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Ql(a.j,b,d,e,!0);else{var h=a.u.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Ql(a.j,b,d,e,f,c);d=null;g&&(d=vf(g));b=vf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&Fj(a.L,b,a.sg()),c=po("adaptation",c),xp(a,c)):yp(a,d,b)}}
|
|
682
|
-
function pp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=Cf(c),b=Cf(b),yp(a,c,b))}function $o(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Wc(a.g.preferredTextLanguage);c=Wc(c.language);if(2==a.g.autoShowText)return Vc(c,d);if(3==a.g.autoShowText)return
|
|
683
|
-
function yp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Fj(a.L,c,a.sg());c=po("variantchanged",b);xp(a,c)}function op(a){var b=po("textchanged");xp(a,b)}function ap(a){var b=po("texttrackvisibility");xp(a,b)}function bp(a){a.g.abr.enabled||lo(a);var b=(new Map).set("newStatus",a.g.abr.enabled);xp(a,po("abrstatuschanged",b))}
|
|
682
|
+
function pp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=Cf(c),b=Cf(b),yp(a,c,b))}function $o(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Wc(a.g.preferredTextLanguage);c=Wc(c.language);if(2==a.g.autoShowText)return Vc(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Wc(b.language);return Vc(c,d)&&!Vc(a,c)}Ya("Invalid autoShowText setting!");return!1}
|
|
683
|
+
function Jo(a){var b=po("trackschanged");xp(a,b)}function yp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Fj(a.L,c,a.sg());c=po("variantchanged",b);xp(a,c)}function op(a){var b=po("textchanged");xp(a,b)}function ap(a){var b=po("texttrackvisibility");xp(a,b)}function bp(a){a.g.abr.enabled||lo(a);var b=(new Map).set("newStatus",a.g.abr.enabled);xp(a,po("abrstatuschanged",b))}
|
|
684
|
+
function lo(a,b){b=void 0===b?!0:b;if(a.l==To){a.uf.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Ko(a)}}
|
|
684
685
|
q.He=function(a,b){if(!this.g.abr.enabled||this.l===qo||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.uf.xa(1);b=this.Mb().video.reduce(function(f,g){return f+g.end-g.start},0);Lo(this,!1,b,!0,!1);return!0}return!1};
|
|
685
686
|
function vo(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==qo)return f.return();c=!0;if(!(a.Xa&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.B(2);break}ta(f,3);return E(f,jm(a.j),5);case 5:d=f.h;c=!d;va(f,2);break;case 3:wa(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&lo(a,!1);e=po("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);F(f)}})}
|
|
686
687
|
function Io(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(po(b,a))}function uo(a){if(!a.h.error)return null;var b=a.h.error.code;if(1==b)return null;var c=a.h.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new U(2,3,3016,b,c,a.h.error.message)}
|
|
@@ -694,14 +695,14 @@ X.prototype.isAudioOnly=X.prototype.dd;X.prototype.isInProgress=X.prototype.Ec;X
|
|
|
694
695
|
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.dk;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Bh;X.prototype.unloadAndSavePreload=X.prototype.Ck;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Gk;X.prototype.unload=X.prototype.Nc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.qh;X.prototype.attach=X.prototype.tc;
|
|
695
696
|
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 E(k,pi(),3);case 3:b=k.h;case 2:var l={};if(Vb())for(var m in Ai)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()?!!Ai[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(te));
|
|
696
697
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Me(n)?!0:Vb()?sd(n)||(me(n)?!0:!1):Wb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,tc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=zp;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=ro;X.setAdManagerFactory=function(a){ko=a};X.registerSupportPlugin=function(a,b){zp[a]=b};X.prototype.destroy=X.prototype.destroy;var qo=0,go=1,To=2,fp=3;
|
|
697
|
-
X.LoadMode={DESTROYED:qo,NOT_LOADED:go,MEDIA_SOURCE:To,SRC_EQUALS:fp};X.version="v4.9.
|
|
698
|
+
X.LoadMode={DESTROYED:qo,NOT_LOADED:go,MEDIA_SOURCE:To,SRC_EQUALS:fp};X.version="v4.9.14";var Ap=["4","9"];xd=new function(a){this.g=a;this.i=yd;this.h=zd}(new vd(Number(Ap[0]),Number(Ap[1])));var zp={},ko=null;function Bp(){this.h=[];this.j=this.i=this.g=0};function Cp(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 nd;this.m.s(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.s(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Cp.prototype;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};
|
|
698
699
|
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)};
|
|
699
700
|
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)};
|
|
700
701
|
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()};
|
|
701
702
|
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};P("shaka.ads.ClientSideAd",Cp);Cp.prototype.release=Cp.prototype.release;
|
|
702
703
|
Cp.prototype.getPodIndex=Cp.prototype.getPodIndex;Cp.prototype.getTimeOffset=Cp.prototype.getTimeOffset;Cp.prototype.getMediaUrl=Cp.prototype.getMediaUrl;Cp.prototype.getAdvertiserName=Cp.prototype.getAdvertiserName;Cp.prototype.getCreativeAdId=Cp.prototype.getCreativeAdId;Cp.prototype.getAdId=Cp.prototype.getAdId;Cp.prototype.getVastMediaWidth=Cp.prototype.getVastMediaWidth;Cp.prototype.getVastMediaHeight=Cp.prototype.getVastMediaHeight;Cp.prototype.getVastMediaBitrate=Cp.prototype.getVastMediaBitrate;
|
|
703
704
|
Cp.prototype.getDescription=Cp.prototype.getDescription;Cp.prototype.getTitle=Cp.prototype.getTitle;Cp.prototype.getPositionInSequence=Cp.prototype.getPositionInSequence;Cp.prototype.getSequenceLength=Cp.prototype.getSequenceLength;Cp.prototype.setMuted=Cp.prototype.setMuted;Cp.prototype.resize=Cp.prototype.resize;Cp.prototype.isLinear=Cp.prototype.isLinear;Cp.prototype.isMuted=Cp.prototype.isMuted;Cp.prototype.setVolume=Cp.prototype.setVolume;Cp.prototype.getVolume=Cp.prototype.getVolume;
|
|
704
|
-
Cp.prototype.play=Cp.prototype.play;Cp.prototype.pause=Cp.prototype.pause;Cp.prototype.skip=Cp.prototype.skip;Cp.prototype.canSkipNow=Cp.prototype.canSkipNow;Cp.prototype.getTimeUntilSkippable=Cp.prototype.getTimeUntilSkippable;Cp.prototype.isSkippable=Cp.prototype.isSkippable;Cp.prototype.isPaused=Cp.prototype.isPaused;Cp.prototype.getRemainingTime=Cp.prototype.getRemainingTime;Cp.prototype.getMinSuggestedDuration=Cp.prototype.getMinSuggestedDuration;Cp.prototype.getDuration=Cp.prototype.getDuration;function Dp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new nd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.
|
|
705
|
+
Cp.prototype.play=Cp.prototype.play;Cp.prototype.pause=Cp.prototype.pause;Cp.prototype.skip=Cp.prototype.skip;Cp.prototype.canSkipNow=Cp.prototype.canSkipNow;Cp.prototype.getTimeUntilSkippable=Cp.prototype.getTimeUntilSkippable;Cp.prototype.isSkippable=Cp.prototype.isSkippable;Cp.prototype.isPaused=Cp.prototype.isPaused;Cp.prototype.getRemainingTime=Cp.prototype.getRemainingTime;Cp.prototype.getMinSuggestedDuration=Cp.prototype.getMinSuggestedDuration;Cp.prototype.getDuration=Cp.prototype.getDuration;function Dp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new nd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.14");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.s(this.l,
|
|
705
706
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Ep(f,g)});this.h.s(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Fp(f,g)});this.h.s(this.i,"ended",function(){f.l.contentComplete()});this.h.ma(this.i,"play",function(){f.H=!0})}Dp.prototype.configure=function(a){this.u=a};Dp.prototype.stop=function(){this.g&&this.g.stop();this.o&&fn(this.o)};
|
|
706
707
|
Dp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.G.destroy()};function Fp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new S("ad-error",b));Gp(a,null);a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
707
708
|
function Ep(a,b){a.m(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.s(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.s(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.F);a.m(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -753,8 +754,8 @@ function cq(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
753
754
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);gb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.j=new Bp};q.requestClientSideAds=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.I=Date.now()/1E3;b.l.requestAds(a)};
|
|
754
755
|
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Qp(a,b,c,function(e){return eq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new U(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new kg,Tp(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
755
756
|
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new U(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 U(2,10,10002);this.g&&this.g.release();this.g=new bq(a,b,this.m,function(d){return eq(c,d)});this.g.configure(this.l)};
|
|
756
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.
|
|
757
|
-
(c.I=!0),c.j=new kg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.
|
|
757
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.14";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
758
|
+
(c.I=!0),c.j=new kg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.14";this.g.g.replaceAdTagParameters(a)};
|
|
758
759
|
q.getServerSideCuePoints=function(){wd("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.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
759
760
|
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)};
|
|
760
761
|
function eq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}P("shaka.ads.AdManager",dq);dq.prototype.onCueMetadataChange=dq.prototype.onCueMetadataChange;dq.prototype.onHlsTimedMetadata=dq.prototype.onHlsTimedMetadata;dq.prototype.onDashTimedMetadata=dq.prototype.onDashTimedMetadata;dq.prototype.onManifestUpdated=dq.prototype.onManifestUpdated;
|
|
@@ -917,7 +918,7 @@ d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions|
|
|
|
917
918
|
b)}function au(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
918
919
|
function fu(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=iu(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
919
920
|
function iu(a,b,c){var d={audio:Qt,video:Rt,text:St,image:Tt}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return eu(a,l,m)},video:function(l,m){return eu(a,l,m)},text:ju,image:ku}[c.type];for(var g={audio:lu,video:mu,text:nu,image:ou}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!du(e)&&b.delete(d(e));return e}
|
|
920
|
-
function pu(a,b){function c(d){if(!qu.has(d)){var e=
|
|
921
|
+
function pu(a,b){function c(d){if(!qu.has(d)){var e=Ee(d);qu.set(d,e)}return qu.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}q.ai=function(a){this.o=a};q.ki=function(a){this.u=a};function eu(a,b,c){return!pu(b,c)&&!a.o||b.drmInfos&&!Ob(b.drmInfos,c.drmInfos)?!1:!0}function ju(a,b){return b.language?a.forced!==b.forced||0==dd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function ku(){return!0}
|
|
921
922
|
function lu(a,b,c){var d=pu(a,b),e=pu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=dd(a.language,b.language);e=dd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
|
|
922
923
|
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=ru(a.channelsCount,b.channelsCount,c.channelsCount);if(d==su)return!0;if(d==tu)return!1;d=ru(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==su?!0:d==tu?!1:a.bandwidth&&uu(a.bandwidth,b.bandwidth,c.bandwidth)==su?!0:!1}
|
|
923
924
|
function mu(a,b,c){var d=pu(a,b),e=pu(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=ru(a.width*a.height,b.width*b.height,c.width*c.height);if(d==su)return!0;if(d==tu)return!1;if(a.frameRate){d=ru(a.frameRate,b.frameRate,c.frameRate);if(d==su)return!0;if(d==tu)return!1}return a.bandwidth&&uu(a.bandwidth,b.bandwidth,c.bandwidth)==su?!0:!1}
|
|
@@ -936,13 +937,13 @@ q.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
|
936
937
|
function Bu(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=Du(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=Nt(a.h,"Location",!0),e.length&&(d=e)),f=zg(d,a.g.retryParameters),g=Date.now(),E(m,Eu(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.i)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,Fu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.O.sample(1,l);return m.return(l)})}
|
|
937
938
|
function Fu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=wm;if(f!=g){wd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=yu(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=zc(h.outerHTML)}k=ah(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=xm;l!=m&&l(k);if("Patch"===d)return v.return(Gu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Hu(a,k,c));
|
|
938
939
|
p=a.g.dash.xlinkFailGracefully;r=Vs(k,a.g.retryParameters,p,c,a.i.networkingEngine);tg(a.L,r);return E(v,r.promise,2)}u=v.h;return v.return(Hu(a,u,c))})}
|
|
939
|
-
function Hu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q,T,R,ra,sa,Ca,Fa,Ia,Pa,Ja,db,Ga,$a,xb,ad,
|
|
940
|
+
function Hu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q,T,R,ra,sa,Ca,Fa,Ia,Pa,Ja,db,Ga,$a,xb,ad,ye,Fd,Rc,ze,Ae,Be,Gd,nj,dh,oj,pj,eh,Ce;return O(function(qc){switch(qc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=jh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=lh(l))p=Kc(d,[n])[0],m&&(a.h?Mt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Nt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.j.Ze=
|
|
940
941
|
b.attributes.id||"";a.j.ge=qh(b,"publishTime",vh)||0;a.F=jh(b,"PatchLocation");u=Promise.resolve();if((v=nh(b,"ContentSteering"))&&a.i){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new It(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=lh(v))(z=qh(v,"queryBeforeStart",Ch,!1))?u=Jt(a.h,A):Jt(a.h,A);C=t(f.keys());for(y=C.next();!y.done;y=C.next())B=y.value,D=f.get(B),Mt(a.h,"Location",B,D)}K=jh(b,"BaseURL");J=!1;if(a.h)for(H=t(K),G=H.next();!G.done;G=
|
|
941
942
|
H.next())N=G.value,L=N.attributes.serviceLocation,M=lh(N),L&&M&&(Mt(a.h,"BaseURL",L,M),J=!0);J&&a.h||(Q=K.map(lh),I=Kc(d,Q));T=function(){return a.h&&J?Nt(a.h,"BaseURL"):I?I:[]};a.j.Ua=T;R=0;K&&K.length&&(R=qh(K[0],"availabilityTimeOffset",Bh)||0);a.j.Ya=R;ra=a.g.dash.ignoreMinBufferTime;sa=0;ra||(sa=qh(b,"minBufferTime",wh)||0);a.H=qh(b,"minimumUpdatePeriod",wh,-1);Ca=qh(b,"availabilityStartTime",vh);Fa=qh(b,"timeShiftBufferDepth",wh);Ia=a.g.dash.ignoreSuggestedPresentationDelay;Pa=null;Ia||(Pa=
|
|
942
|
-
qh(b,"suggestedPresentationDelay",wh));Ja=a.g.dash.ignoreMaxSegmentDuration;db=null;Ja||(db=qh(b,"maxSegmentDuration",wh));Ga=b.attributes.type||"static";a.j.type=Ga;if(a.l)for($a=a.l.presentationTimeline,xb=t(Object.values(a.u)),ad=xb.next();!ad.done;ad=xb.next())
|
|
943
|
-
(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);$a.nf(Fa);
|
|
944
|
-
$a.Jg(db||1);return E(qc,u,2);case 2:return a.G&&(sa=0,pj=null!=Pa?Pa:a.g.defaultPresentationDelay,$a.Xg(pj)),a.l?E(qc,Ju(a,Gd.periods,!1),4):E(qc,a.m.Xf(dh,
|
|
945
|
-
case 8:
|
|
943
|
+
qh(b,"suggestedPresentationDelay",wh));Ja=a.g.dash.ignoreMaxSegmentDuration;db=null;Ja||(db=qh(b,"maxSegmentDuration",wh));Ga=b.attributes.type||"static";a.j.type=Ga;if(a.l)for($a=a.l.presentationTimeline,xb=t(Object.values(a.u)),ad=xb.next();!ad.done;ad=xb.next())ye=ad.value,ye.segmentIndex&&ye.segmentIndex.eb($a.Cb());else Fd=a.g.defaultPresentationDelay||1.5*sa,Rc=null!=Pa?Pa:Fd,$a=new Bk(Ca,Rc,a.g.dash.autoCorrectDrift);$a.Lc("static"==Ga);(ze=$a.U())&&!isNaN(a.g.availabilityWindowOverride)&&
|
|
944
|
+
(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);$a.nf(Fa);Ae=b.attributes.profiles||"";a.j.profiles=Ae.split(",");Be={Lb:"static"!=Ga,presentationTimeline:$a,Ha:null,va:null,Ea:null,M:null,bandwidth:0,Ag:!1,Ya:R,Yb:null,profiles:Ae.split(",")};Gd=Iu(a,Be,T,b);nj=Gd.duration;dh=Gd.periods;"static"!=Ga&&Gd.Ch||$a.sb(nj||Infinity);a.K&&!a.G&&(oj=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.G=a.i.isLowLatencyMode());a.G?$a.bi(a.K):a.K&&Ya("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
945
|
+
$a.Jg(db||1);return E(qc,u,2);case 2:return a.G&&(sa=0,pj=null!=Pa?Pa:a.g.defaultPresentationDelay,$a.Xg(pj)),a.l?E(qc,Ju(a,Gd.periods,!1),4):E(qc,a.m.Xf(dh,Be.Lb),6);case 6:a.l={presentationTimeline:$a,variants:a.m.j,textStreams:a.m.ug(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:sa||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Ku(b),nextUrl:Lu(b)};if(!$a.si()){qc.B(7);break}eh=jh(b,"UTCTiming");return E(qc,Mu(a,T,eh),8);
|
|
946
|
+
case 8:Ce=qc.h;if(!a.i)return qc.return();$a.ci(Ce);case 7:$a.Ue();case 4:a.i.makeTextStreamsForClosedCaptions(a.l),F(qc)}})}function Ju(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Xf(b,!0,c),2);a.l.variants=a.m.j;d=a.m.ug();0<d.length&&(a.l.textStreams=d);a.l.imageStreams=a.m.i;a.i.filter(a.l);F(e)})}
|
|
946
947
|
function Gu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H;return O(function(G){if(1==G.g){c=b.attributes.mpdId;d=qh(b,"originalPublishTime",vh);if(!c||c!==a.j.Ze||d!==a.j.ge)throw a.F=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(ih(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Eh(l.attributes.sel||""),n=m[m.length-1],p=lh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.ec){r=lh(l)||"";var N=wh(r);if(null!=N){a.j.Yb=N;for(var L=t(a.o.values()),M=L.next();!M.done;M=L.next())M.value.Yb=
|
|
947
948
|
N}}else if("type"===n.ec){a.l.presentationTimeline.Lc("static"==p);a.j.type=p;N=t(a.o.values());for(L=N.next();!L.done;L=N.next())L.value.Lb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.ec?a.j.ge=vh(p)||0:null===n.ec&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Fh(a.F,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(N=n.id,L=t(a.o.keys()),M=L.next();!M.done;M=L.next())if(M=M.value,M.startsWith(N)){var Q=a.o.get(M);Ss(Q,
|
|
948
949
|
tt,"SegmentTimeline").children=[];Nu(a,M);a.o.delete(M)}}else if("SegmentTemplate"===n.name){L=Eh(l.attributes.sel||"");N=L[L.length-1];if(N.ec){L=Ou(a,L);M=lh(l)||"";Q=t(L);for(var T=Q.next();!T.done;T=Q.next())T=a.o.get(T.value),Gh(T.M.mc,l.tagName,N.ec,M);N=L}else N=[];u=N;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){N=Eh(l.attributes.sel||"");N=Ou(a,N);L=t(N);for(M=L.next();!M.done;M=L.next())M=a.o.get(M.value),M=Ss(M,tt,"SegmentTimeline"),
|
|
@@ -954,7 +955,7 @@ return c}function Lu(a){a=jh(a,"SupplementalProperty");if(!a.length)return null;
|
|
|
954
955
|
function Iu(a,b,c,d){var e=b.Yb;e||(e=qh(d,"mediaPresentationDuration",wh),a.j.Yb=e);var f=[],g=0;d=jh(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=qh(k,"start",wh,g),n=k.attributes.id,p=qh(k,"duration",wh),r=null;if(l){var u=qh(l,"start",wh);null!=u&&(r=u-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.J&&null!==n&&null!==m&&m<a.J)||a.S.includes(n)||h+1==d.length){null!==m&&(null===a.J||m>a.J)&&(a.J=m);g=Qu(a,b,c,{start:m,duration:r,node:k,Zd:null==r||!l});f.push(g);b.Ha.id&&
|
|
955
956
|
r&&(a.N[b.Ha.id]=r);if(null==r){g=null;break}g=m+r}}a.S=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Ch:!1}:{periods:f,duration:g,Ch:!0}}
|
|
956
957
|
function Qu(a,b,c,d){b.Ha=Ru(a,d.node,null,c);b.va=d;b.Ha.Ya=b.Ya;b.Ha.id||(b.Ha.id="__shaka_period_"+d.start);var e=jh(d.node,"EventStream");c=b.presentationTimeline.Cb();e=t(e);for(var f=e.next();!f.done;f=e.next())Su(a,d.start,d.duration,f.value,c);c=jh(d.node,"AdaptationSet").map(function(m){return Tu(a,b,m)}).filter(Ve);if(b.Lb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.gk);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new U(2,4,4018);
|
|
957
|
-
}d=c.filter(function(m){return!m.ih});c=c.filter(function(m){return m.ih});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ih.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={ye:h.ye},l=k.next())h.ye=l.value,h.ye.trickModeVideo=e.streams.find(function(m){return function(n){return
|
|
958
|
+
}d=c.filter(function(m){return!m.ih});c=c.filter(function(m){return m.ih});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ih.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={ye:h.ye},l=k.next())h.ye=l.value,h.ye.trickModeVideo=e.streams.find(function(m){return function(n){return Ee(m.ye.codecs)==Ee(n.codecs)}}(h))}}}c=Uu(a.g.disableAudio,d,"audio");e=Uu(a.g.disableVideo,d,"video");f=Uu(a.g.disableText,
|
|
958
959
|
d,Qc);d=Uu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.Ha.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Uu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
959
960
|
function Tu(a,b,c){function d(G){switch(G){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ea=Ru(a,c,b.Ha,null);var f=!1,g=jh(c,"Role"),h=g.map(function(G){return G.attributes.value}).filter(Ve),k=void 0,l=b.Ea.contentType==Qc;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
|
|
960
961
|
n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,r;n=jh(c,"EssentialProperty");g=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?g=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?r=d(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=
|
|
@@ -1339,7 +1340,7 @@ function jD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function
|
|
|
1339
1340
|
var fD=[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],gD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],hD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],iD=[0,1,1,4];function lD(a){this.i=a;this.h=0;this.g=new Map}q=lD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?sd(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};
|
|
1340
1341
|
q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Xi(e).length;f<e.length&&!kD(e,f);f++);var g;for(a=[];f<e.length;){var h=eD(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));g||(g=h);f+h.ia<=e.length&&a.push({data:e.subarray(f,f+h.ia),size:h.ia,duration:1152,wb:0,flags:{xb:0,mb:0,kb:0,hb:0,ib:2,yb:0}});f+=h.ia}if(!g)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=9E4*g.kk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1341
1342
|
duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.h,baseMediaDecodeTime:c,rb:a},stream:b};g=new cx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=ix(g),this.g.set(b.id,d));b=zx(g);this.h++;b=Jc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",lD);lD.prototype.transmux=lD.prototype.transmux;lD.prototype.getOriginalMimeType=lD.prototype.getOriginalMimeType;lD.prototype.convertCodecs=lD.prototype.convertCodecs;lD.prototype.isSupported=lD.prototype.isSupported;
|
|
1342
|
-
lD.prototype.destroy=lD.prototype.destroy;ke("audio/mpeg",function(){return new lD("audio/mpeg")},qe);function mD(a){this.h=a;this.g=null}q=mD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Je(a).split(","),c=Oc("audio",b);b=Oc("video",b);return!c||b||"mp3"!=
|
|
1343
|
+
lD.prototype.destroy=lD.prototype.destroy;ke("audio/mpeg",function(){return new lD("audio/mpeg")},qe);function mD(a){this.h=a;this.g=null}q=mD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Je(a).split(","),c=Oc("audio",b);b=Oc("video",b);return!c||b||"mp3"!=Ee(c)?!1:sd(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};
|
|
1343
1344
|
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new vj;a=Gb(a);a=this.g.parse(a);if("mp3"!=a.Od().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=new Uint8Array([]);e=t(a.fc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=eD(a,b))?(b+d.ia<=a.length&&(c=Jc(c,a.subarray(b,b+d.ia))),b+=d.ia):b++;return Promise.resolve(c)};P("shaka.transmuxer.MpegTsTransmuxer",mD);mD.prototype.transmux=mD.prototype.transmux;
|
|
1344
1345
|
mD.prototype.getOriginalMimeType=mD.prototype.getOriginalMimeType;mD.prototype.convertCodecs=mD.prototype.convertCodecs;mD.prototype.isSupported=mD.prototype.isSupported;mD.prototype.destroy=mD.prototype.destroy;ke("video/mp2t",function(){return new mD("video/mp2t")},pe);/*
|
|
1345
1346
|
@license
|
|
@@ -1356,20 +1357,20 @@ q.transmux=function(a,b,c){if(!c)return Promise.resolve(Gb(a));if(!b.mssPrivateD
|
|
|
1356
1357
|
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=
|
|
1357
1358
|
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=qD(u,"traf")+qD(h,"senc")+16);var w=Gb(e.write());return Promise.resolve(w)}catch(A){return A instanceof U?Promise.reject(A):Promise.reject(new U(2,3,3022,c?c.P()[0]:null))}};function qD(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}P("shaka.transmuxer.MssTransmuxer",nD);nD.prototype.transmux=nD.prototype.transmux;
|
|
1358
1359
|
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 pD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);ke("mss/audio/mp4",function(){return new nD("mss/audio/mp4")},qe);ke("mss/video/mp4",function(){return new nD("mss/video/mp4")},qe);function rD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=rD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1359
|
-
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=Je(c).split(",");c=Oc("audio",d);d=Oc("video",d);if(c&&(c=
|
|
1360
|
+
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=Je(c).split(",");c=Oc("audio",d);d=Oc("video",d);if(c&&(c=Ee(c),!sD.includes(c))||d&&(c=Ee(d),!tD.includes(c)))return!1;if(b)return sd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return sd(b)||sd(a)};
|
|
1360
1361
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Je(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return mf(c,"audio/mp4")}).map(lf).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1361
1362
|
q.transmux=function(a,b,c,d,e){var f=Gb(a);if("audio"==e&&!Cj(f)){for(var g=Xi(f),h=g.length;h<f.length;h++)if(kD(f,h))return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));for(h=g.length;h<f.length;h++)if(PC(f,h))return this.h||(this.h=new RC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.P()[0]:null))}this.j?this.j.clearData():this.j=new vj;var k=this.j.parse(f),l=[],m=k.Od();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.bd();
|
|
1362
1363
|
if(!v.length)throw new U(2,3,3023,c?c.P()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var C=ZC(z);if(C){null==r&&(r=A.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(A.dts||0):1<v.length?(A.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:C.data,size:C.data.byteLength,duration:y,wb:Math.round((A.pts||0)-(A.dts||0)),flags:{xb:0,mb:0,kb:0,hb:0,ib:C.Yd?2:1,yb:C.Yd?0:1}})}}var B=XC(u);if(!B||null==r)throw new U(2,3,3018,c?c.P()[0]:null);b.height=B.height;
|
|
1363
1364
|
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],wa:new Uint8Array([]),Ia:B.Ia,Pa:B.Pa,Ra:B.Ra,data:{Ib:this.g,baseMediaDecodeTime:r,rb:p},stream:b};break;case "hvc":var D=[],K=null,I=[],J=k.bd();if(!J.length)throw new U(2,3,3023,c?c.P()[0]:null);for(var H=0;H<J.length;H++){var G=J[H],N=G.nalus;I.push.apply(I,x(N));for(var L=!1,M=[],Q=!1,T=t(N),R=T.next();!R.done;R=T.next()){var ra=R.value;switch(ra.type){case 1:case 0:var sa=
|
|
1364
1365
|
Q=!0;break;case 19:case 20:case 21:L=sa=Q=!0;break;case 32:sa=!0;break;case 33:sa=!0;break;case 34:sa=!0;break;case 35:Q=sa=!0;break;case 39:case 40:sa=!0;break;default:sa=!1}if(Q&&sa){var Ca=ra.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=Ca>>24&255;Fa[1]=Ca>>16&255;Fa[2]=Ca>>8&255;Fa[3]=Ca&255;M.push(Fa);M.push(ra.fullData)}}var Ia=M.length?{data:Jc.apply(Dc,x(M)),Yd:L}:null;if(Ia){null==K&&null!=G.dts&&(K=G.dts);var Pa=void 0;Pa=H+1<J.length?(J[H+1].dts||0)-(G.dts||0):1<J.length?(G.dts||0)-(J[H-
|
|
1365
1366
|
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ia.data,size:Ia.data.byteLength,duration:Pa,wb:Math.round((G.pts||0)-(G.dts||0)),flags:{xb:0,mb:0,kb:0,hb:0,ib:Ia.Yd?2:1,yb:Ia.Yd?0:1}})}}var Ja=$C(I);if(!Ja||null==K)throw new U(2,3,3018,c?c.P()[0]:null);b.height=Ja.height;b.width=Ja.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],wa:new Uint8Array([]),Ia:Ja.Ia,Pa:Ja.Pa,Ra:Ja.Ra,data:{Ib:this.g,baseMediaDecodeTime:K,rb:D},stream:b}}n&&
|
|
1366
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var db=[],Ga,$a=null,xb=t(k.fc()),ad=xb.next();!ad.done;ad=xb.next()){var
|
|
1367
|
-
mb:0,kb:0,hb:0,ib:2,yb:0}});Rc+=
|
|
1368
|
-
duration:1024,wb:0,flags:{xb:0,mb:0,kb:0,hb:0,ib:2,yb:0}}),dh+=1024/Ga.sampleRate*9E4}var oj=Ga.sampleRate,pj=$a/9E4*oj;n={id:b.id,type:"audio",codecs:Ga.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:oj,duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:pj,rb:db},stream:b};break;case "ac3":for(var eh=[],
|
|
1369
|
-
(Zj=On.pts);for(var Mf=0;Mf<Pn.length;){var Zd=SC(Pn,Mf);Zd?(b.audioSamplingRate=Zd.sampleRate,b.channelsCount=Zd.channelCount,
|
|
1367
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var db=[],Ga,$a=null,xb=t(k.fc()),ad=xb.next();!ad.done;ad=xb.next()){var ye=ad.value,Fd=ye.data;if(Fd){var Rc=0;Ga=OC(Fd,Rc);if(!Ga)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=Ga.sampleRate;b.channelsCount=Ga.channelCount;null==$a&&null!==ye.pts&&($a=ye.pts);for(;Rc<Fd.length;){var ze=NC(Fd,Rc);if(ze){var Ae=ze.Pe+ze.ia;Rc+Ae<=Fd.length&&db.push({data:Fd.subarray(Rc+ze.Pe,Rc+Ae),size:ze.ia,duration:1024,wb:0,flags:{xb:0,
|
|
1368
|
+
mb:0,kb:0,hb:0,ib:2,yb:0}});Rc+=Ae}else Rc++}}}if(!Ga||null==$a){if(!k.bd().length)throw new U(2,3,3018,c?c.P()[0]:null);$a=9E4*c.startTime;var Be=Oc("audio",b.codecs.split(","));if(!Be||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.P()[0]:null);Ga={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,cb:Be};var Gd=QC(Be,b.channelsCount);if(!Gd)throw new U(2,3,3018,c?c.P()[0]:null);for(var nj=$a+9E4*(c.endTime-c.startTime),dh=$a;dh<nj;)db.push({data:Gd,size:Gd.byteLength,
|
|
1369
|
+
duration:1024,wb:0,flags:{xb:0,mb:0,kb:0,hb:0,ib:2,yb:0}}),dh+=1024/Ga.sampleRate*9E4}var oj=Ga.sampleRate,pj=$a/9E4*oj;n={id:b.id,type:"audio",codecs:Ga.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:oj,duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:pj,rb:db},stream:b};break;case "ac3":for(var eh=[],Ce=0,qc=new Uint8Array([]),Zj=null,Rw=t(k.fc()),Nn=Rw.next();!Nn.done;Nn=Rw.next()){var On=Nn.value,Pn=On.data;null==Zj&&null!==On.pts&&
|
|
1370
|
+
(Zj=On.pts);for(var Mf=0;Mf<Pn.length;){var Zd=SC(Pn,Mf);Zd?(b.audioSamplingRate=Zd.sampleRate,b.channelsCount=Zd.channelCount,Ce=Zd.sampleRate,qc=Zd.wa,eh.push({data:Pn.subarray(Mf,Mf+Zd.ia),size:Zd.ia,duration:1536,wb:0,flags:{xb:0,mb:0,kb:0,hb:0,ib:2,yb:0}}),Mf+=Zd.ia):Mf++}}if(0==Ce||0==qc.byteLength||null==Zj)throw new U(2,3,3018,c?c.P()[0]:null);var MG=Zj/9E4*Ce;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ce,duration:d,ub:[],wa:qc,Ia:new Uint8Array([]),
|
|
1370
1371
|
Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:MG,rb:eh},stream:b};break;case "ec3":for(var Sw=[],ak=0,Qn=new Uint8Array([]),bk=null,Tw=t(k.fc()),Rn=Tw.next();!Rn.done;Rn=Tw.next()){var Sn=Rn.value,Tn=Sn.data;null==bk&&null!==Sn.pts&&(bk=Sn.pts);for(var Nf=0;Nf<Tn.length;){var $d=VC(Tn,Nf);$d?(b.audioSamplingRate=$d.sampleRate,b.channelsCount=$d.channelCount,ak=$d.sampleRate,Qn=$d.wa,Sw.push({data:Tn.subarray(Nf,Nf+$d.ia),size:$d.ia,duration:1536,wb:0,flags:{xb:0,mb:0,kb:0,hb:0,ib:2,yb:0}}),Nf+=$d.ia):
|
|
1371
|
-
Nf++}}if(0==ak||0==Qn.byteLength||null==bk)throw new U(2,3,3018,c?c.P()[0]:null);var NG=bk/9E4*ak;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ak,duration:d,ub:[],wa:Qn,Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:NG,rb:Sw},stream:b};break;case "mp3":for(var Uw=[],ck,dk=null,Vw=t(k.fc()),Un=Vw.next();!Un.done;Un=Vw.next()){var Vn=Un.value,rh=Vn.data;if(rh){null==dk&&null!==Vn.pts&&(dk=Vn.pts);for(var
|
|
1372
|
-
|
|
1372
|
+
Nf++}}if(0==ak||0==Qn.byteLength||null==bk)throw new U(2,3,3018,c?c.P()[0]:null);var NG=bk/9E4*ak;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ak,duration:d,ub:[],wa:Qn,Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:NG,rb:Sw},stream:b};break;case "mp3":for(var Uw=[],ck,dk=null,Vw=t(k.fc()),Un=Vw.next();!Un.done;Un=Vw.next()){var Vn=Un.value,rh=Vn.data;if(rh){null==dk&&null!==Vn.pts&&(dk=Vn.pts);for(var Fe=0;Fe<rh.length;){var Of=eD(rh,
|
|
1373
|
+
Fe);Of?(ck||(ck=Of),Fe+Of.ia<=rh.length&&Uw.push({data:rh.subarray(Fe,Fe+Of.ia),size:Of.ia,duration:1152,wb:0,flags:{xb:0,mb:0,kb:0,hb:0,ib:2,yb:0}}),Fe+=Of.ia):Fe++}}}if(!ck||null==dk)throw new U(2,3,3018,c?c.P()[0]:null);var Ww=ck.sampleRate,OG=dk/9E4*Ww;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ww,duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:OG,rb:Uw},stream:b};break;case "opus":var Xw=
|
|
1373
1374
|
[],ek=null,cd=k.H;if(!cd)throw new U(2,3,3018,c?c.P()[0]:null);var Hb=[];switch(cd.Ki){case 1:case 2:Hb=[0];break;case 0:Hb=[255,1,1,0,1];break;case 128:Hb=[255,2,0,0,1];break;case 3:Hb=[1,2,1,0,2,1];break;case 4:Hb=[1,2,2,0,1,2,3];break;case 5:Hb=[1,3,2,0,4,1,2,3];break;case 6:Hb=[1,4,2,0,4,1,2,3,5];break;case 7:Hb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Hb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Hb=[1,1,2,0,1];break;case 131:Hb=[1,1,3,0,1,2];break;case 132:Hb=[1,1,4,0,1,2,3];break;case 133:Hb=[1,1,5,
|
|
1374
1375
|
0,1,2,3,4];break;case 134:Hb=[1,1,6,0,1,2,3,4,5];break;case 135:Hb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Hb=[1,1,8,0,1,2,3,4,5,6,7]}var Yw=new Uint8Array([0,cd.channelCount,0,0,cd.sampleRate>>>24&255,cd.sampleRate>>>17&255,cd.sampleRate>>>8&255,cd.sampleRate>>>0&255,0,0].concat(x(Hb)));for(var Zw=cd.sampleRate,$w=t(k.fc()),Wn=$w.next();!Wn.done;Wn=$w.next()){var Xn=Wn.value,Pf=Xn.data;null==ek&&null!==Xn.pts&&(ek=Xn.pts);for(var sh=0;sh<Pf.length;){for(var PG=0!==(Pf[sh+1]&16),QG=0!==(Pf[sh+1]&8),
|
|
1375
1376
|
Id=sh+2,fk=0;255===Pf[Id];)fk+=255,Id+=1;fk+=Pf[Id];Id+=1;Id+=PG?2:0;Id+=QG?2:0;var ax=Pf.slice(Id,Id+fk);Xw.push({data:ax,size:ax.byteLength,duration:960,wb:0,flags:{xb:0,mb:0,kb:0,hb:0,ib:2,yb:0}});sh=Id+fk}}if(0==Yw.byteLength||null==ek)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=cd.sampleRate;b.channelsCount=cd.channelCount;var RG=ek/9E4*Zw;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Zw,duration:d,ub:[],wa:Yw,Ia:new Uint8Array([]),Pa:0,
|
|
@@ -1566,7 +1567,7 @@ a.Ga("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1566
1567
|
["AD_TIME","Anuncio: [AD_TIME]"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Transmitir..."],["ENTER_LOOP_MODE","Repetir indefinidamente el video actual"],["ENTER_PICTURE_IN_PICTURE","Ingresar al modo de pantalla en pantalla"],["EXIT_FULL_SCREEN","Salir de pantalla completa"],["EXIT_LOOP_MODE","Detener la repetici\u00f3n indefinida del video actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo de pantalla en pantalla"],["FAST_FORWARD","Avanzar"],
|
|
1567
1568
|
["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Repetir indefinidamente"],["MORE_SETTINGS","M\u00e1s opciones de configuraci\u00f3n"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Detener"],["PICTURE_IN_PICTURE","Pantalla en pantalla"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["RECENTER_VR","Recentrar"],["RESOLUTION","Resoluci\u00f3n"],
|
|
1568
1569
|
["REWIND","Retroceder"],["SEEK","Buscar"],["SKIP_AD","Omitir anuncio"],["SKIP_TO_LIVE","Adelantar hasta la transmisi\u00f3n en vivo"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Envolvente"],["TOGGLE_STEREOSCOPIC","Alternar estereosc\u00f3pico"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Dejar de silenciar"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]]));a.Ga("fr",new Map([["AD_DURATION","Dur\u00e9e de l'annonce"],["AD_PROGRESS","Annonce [AD_ON] sur [NUM_ADS]"],["AD_STATISTICS",
|
|
1569
|
-
"Statistiques de
|
|
1570
|
+
"Statistiques de l'annonce"],["AD_TIME","Annonce : [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatique"],["BACK","Retour"],["CAPTIONS","Sous-titres"],["CAST","Caster\u2026"],["ENTER_LOOP_MODE","Lire en boucle la vid\u00e9o en cours"],["ENTER_PICTURE_IN_PICTURE","Utiliser le mode Picture-in-Picture"],["EXIT_FULL_SCREEN","Quitter le mode plein \u00e9cran"],["EXIT_LOOP_MODE","Arr\u00eater la lecture en boucle de la vid\u00e9o en cours"],["EXIT_PICTURE_IN_PICTURE","Quitter le mode PIP (Picture-in-picture)"],
|
|
1570
1571
|
["FAST_FORWARD","Avance rapide"],["FULL_SCREEN","Plein \u00e9cran"],["LANGUAGE","Langue"],["LIVE","En direct"],["LOOP","R\u00e9p\u00e9ter"],["MORE_SETTINGS","Plus de param\u00e8tres"],["MULTIPLE_LANGUAGES","Plusieurs langues"],["MUTE","Couper le son"],["NOT_APPLICABLE","Non applicable"],["OFF","D\u00e9sactiv\u00e9e"],["ON","Activ\u00e9e"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Visionner"],["PLAYBACK_RATE","Vitesse de lecture"],["QUALITY","Qualit\u00e9"],["RECENTER_VR",
|
|
1571
1572
|
"Recentrer"],["REPLAY","Rejouer"],["RESOLUTION","R\u00e9solution"],["REWIND","Retour arri\u00e8re"],["SEEK","Chercher"],["SKIP_AD","Passer l'annonce"],["SKIP_TO_LIVE","Acc\u00e9der \u00e0 la partie la plus r\u00e9cente du direct"],["STATISTICS","Statistiques"],["SUBTITLE_FORCED","Forc\u00e9"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","St\u00e9r\u00e9oscopique ON/OFF"],["UNDETERMINED_LANGUAGE","Langue ind\u00e9termin\u00e9e"],["UNMUTE","R\u00e9activer le son"],["UNRECOGNIZED_LANGUAGE","Non reconnu"],
|
|
1572
1573
|
["VOLUME","Volume"]]));a.Ga("it",new Map([["AD_DURATION","Durata dell'annuncio"],["AD_PROGRESS","Annuncio [AD_ON] di [NUM_ADS]"],["AD_TIME","Annuncio: [AD_TIME]"],["AUTO_QUALITY","Automatica"],["BACK","Indietro"],["CAPTIONS","Sottotitoli"],["CAST","Trasmetti..."],["ENTER_LOOP_MODE","Riproduci in loop il video corrente"],["ENTER_PICTURE_IN_PICTURE","Attiva Picture in picture"],["EXIT_FULL_SCREEN","Esci da schermo intero"],["EXIT_LOOP_MODE","Interrompi riproduzione in loop del video corrente"],["EXIT_PICTURE_IN_PICTURE",
|